gi: hide WP_PRIVATE_API functions from gir

Document them and annotate them with (skip) so that they are
marked as introspectable=0 in the gir file.

Fixes: #599
This commit is contained in:
George Kiagiadakis 2024-05-31 21:00:07 +03:00
parent ba0de72a9d
commit 0b51b6b570
4 changed files with 47 additions and 4 deletions

View file

@ -319,6 +319,8 @@ class DoxyFunction(DoxyElement):
d = normalize_text(d)
e = DoxyFunction(name, d)
if (xml.get("prot") == "private"):
e.extra = "(skip)"
e.add_brief(xml.find("briefdescription"))
e.add_detail(xml.find("detaileddescription"))
for p in xml.xpath(".//detaileddescription/*/parameterlist[@kind='param']/parameteritem"):

View file

@ -184,6 +184,7 @@ wp_event_hook_get_runs_after_hooks (WpEventHook * self)
/*!
* \brief Returns the associated event dispatcher
*
* \private
* \ingroup wpeventhook
* \param self the event hook
* \return (transfer full)(nullable): the event dispatcher on which this hook
@ -197,6 +198,15 @@ wp_event_hook_get_dispatcher (WpEventHook * self)
return g_weak_ref_get (&priv->dispatcher);
}
/*!
* \brief Sets the associated event dispatcher
*
* \private
* \ingroup wpeventhook
* \param self the event hook
* \param dispatcher (transfer none): the event dispatcher on which
* this hook is registered
*/
void
wp_event_hook_set_dispatcher (WpEventHook * self, WpEventDispatcher * dispatcher)
{

View file

@ -550,7 +550,11 @@ wp_log_set_level (const gchar *level_str)
return TRUE;
}
/* private, called from wp_init() */
/*!
* \brief private, called from wp_init()
* \ingroup wplog
* \private
*/
void
wp_log_init (gint flags)
{

View file

@ -672,6 +672,12 @@ idle_emit_objects_changed (WpObjectManager * self)
return G_SOURCE_REMOVE;
}
/*!
* \brief Checks if the object manager should emit the 'objects-changed' signal
* \private
* \ingroup wpobjectmanager
* \param self the object manager
*/
void
wp_object_manager_maybe_objects_changed (WpObjectManager * self)
{
@ -724,7 +730,14 @@ wp_object_manager_maybe_objects_changed (WpObjectManager * self)
}
}
/* caller must also call wp_object_manager_maybe_objects_changed() after */
/*!
* \brief Adds an object to the object manager.
* \private
* \ingroup wpobjectmanager
* \param self the object manager
* \param object (transfer none): the object to add
* \note caller must also call wp_object_manager_maybe_objects_changed() after
*/
void
wp_object_manager_add_object (WpObjectManager * self, gpointer object)
{
@ -736,7 +749,14 @@ wp_object_manager_add_object (WpObjectManager * self, gpointer object)
}
}
/* caller must also call wp_object_manager_maybe_objects_changed() after */
/*!
* \brief Removes an object from the object manager.
* \private
* \ingroup wpobjectmanager
* \param self the object manager
* \param object the object to remove
* \note caller must also call wp_object_manager_maybe_objects_changed() after
*/
void
wp_object_manager_rm_object (WpObjectManager * self, gpointer object)
{
@ -765,7 +785,14 @@ on_proxy_ready (GObject * proxy, GAsyncResult * res, gpointer data)
wp_object_manager_maybe_objects_changed (self);
}
/* caller must also call wp_object_manager_maybe_objects_changed() after */
/*!
* \brief Adds a global object to the object manager.
* \private
* \ingroup wpobjectmanager
* \param self the object manager
* \param global the global object to add
* \note caller must also call wp_object_manager_maybe_objects_changed() after
*/
void
wp_object_manager_add_global (WpObjectManager * self, WpGlobal * global)
{