gplugin/gplugin

Parents 82ae9323306b
Children f9fd009d9ca4
Add a doc check unit test to gplugin and fix the issues it found

Testing Done:
Ran the unit tests

Reviewed at https://reviews.imfreedom.org/r/3039/
--- a/gplugin/gplugin-file-source.c Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/gplugin-file-source.c Wed Mar 20 22:34:37 2024 -0500
@@ -577,7 +577,7 @@
obj_class->finalize = gplugin_file_source_finalize;
/**
- * GPluginFileSource::manager:
+ * GPluginFileSource:manager:
*
* The [class@GPlugin.Manager] that this source is working for.
*
--- a/gplugin/gplugin-loader.c Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/gplugin-loader.c Wed Mar 20 22:34:37 2024 -0500
@@ -141,7 +141,7 @@
obj_class->finalize = gplugin_loader_finalize;
/**
- * GPluginLoader::id:
+ * GPluginLoader:id:
*
* The identifier of the loader.
*
--- a/gplugin/gplugin-manager.c Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/gplugin-manager.c Wed Mar 20 22:34:37 2024 -0500
@@ -306,7 +306,10 @@
*
* Emitted before @plugin is loaded.
*
- * Return FALSE to stop loading
+ * Returns: %TRUE to allow the plugin to load or %FALSE to stop it from
+ * being loaded.
+ *
+ * Since: 0.33
*/
signals[SIG_LOADING] = g_signal_new_class_handler(
"loading-plugin",
@@ -327,6 +330,8 @@
* @plugin: The [iface@GPlugin.Plugin] that's about to be loaded.
*
* Emitted after a plugin is loaded.
+ *
+ * Since: 0.33
*/
signals[SIG_LOADED] = g_signal_new_class_handler(
"loaded-plugin",
@@ -347,6 +352,8 @@
* @error: The [struct@GLib.Error] of what went wrong.
*
* Emitted after a plugin fails to load.
+ *
+ * Since: 0.33
*/
signals[SIG_LOAD_FAILED] = g_signal_new_class_handler(
"load-plugin-failed",
@@ -369,7 +376,10 @@
*
* Emitted before a plugin is unloaded.
*
- * Return FALSE to stop unloading
+ * Returns: %TRUE to allow the plugin to be unloaded, or %FALSE to stop
+ * the plugin from being unloaded.
+ *
+ * Since: 0.33
*/
signals[SIG_UNLOADING] = g_signal_new_class_handler(
"unloading-plugin",
@@ -390,6 +400,8 @@
* @plugin: The [iface@GPlugin.Plugin] that's about to be loaded.
*
* emitted after a plugin is successfully unloaded.
+ *
+ * Since: 0.33
*/
signals[SIG_UNLOADED] = g_signal_new_class_handler(
"unloaded-plugin",
@@ -411,6 +423,8 @@
*
* Emitted when @manager was asked to unload @plugin, but @plugin returned
* %FALSE when its unload function was called.
+ *
+ * Since: 0.33
*/
signals[SIG_UNLOAD_FAILED] = g_signal_new_class_handler(
"unload-plugin-failed",
--- a/gplugin/gplugin-version.h Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/gplugin-version.h Wed Mar 20 22:34:37 2024 -0500
@@ -66,6 +66,26 @@
#endif
/**
+ * GPLUGIN_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including the
+ * `gplugin.h` header.
+ *
+ * The definition should be one of the predefined GPlugin version macros:
+ * %GPLUGIN_VERSION_0_42, %GPLUGIN_VERSION_0_43, ...
+ *
+ * This macro defines the earliest version of GPlugin that the package is
+ * required to be able to compile against.
+ *
+ * If the compiler is configured to warn about the use of deprecated functions,
+ * then using functions that were deprecated in version
+ * %GPLUGIN_VERSION_MIN_REQUIRED or earlier will cause warnings (but using
+ * functions deprecated in later releases will not).
+ *
+ * Since: 0.42
+ */
+
+/**
* GPLUGIN_VERSION_CUR_STABLE:
*
* A macro that evaluates to the current stable version of GPlugin, in a format
--- a/gplugin/reference/gplugin.toml.in Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/reference/gplugin.toml.in Wed Mar 20 22:34:37 2024 -0500
@@ -48,3 +48,27 @@
content_images = [
]
urlmap_file = "urlmap.js"
+
+[[object]]
+pattern = "DEPRECATED_IN_*"
+hidden = true
+
+[[object]]
+name = "DEPRECATED_FOR"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_MACRO"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_STATIC_INLINE"
+hidden = true
+
+[[object]]
+name = "UNAVAILABLE_TYPE"
+hidden = true
--- a/gplugin/reference/meson.build Mon Mar 18 01:16:56 2024 -0500
+++ b/gplugin/reference/meson.build Wed Mar 20 22:34:37 2024 -0500
@@ -40,4 +40,13 @@
install_dir : docs_dir,
)
+test('doc-check',
+ gidocgen,
+ args: [
+ 'check',
+ '--config', gplugin_toml,
+ gplugin_gir[0],
+ ],
+ depends: gplugin_gir[0],
+)
doc_targets += gplugin_doc