[gnome-control-center/gbsneto/interactive-test-panels: 10/13] panel-loader: Document public functions
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/interactive-test-panels: 10/13] panel-loader: Document public functions
- Date: Fri, 9 Nov 2018 03:21:11 +0000 (UTC)
commit 74c1c9e01278a9163b94097beb654c5103f7f4d3
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Nov 7 22:11:45 2018 -0200
panel-loader: Document public functions
Add documentation comments to the public functions, which
has the additional benefit of adding visual marks for
public functions and making it easier to navigate through
this file.
shell/cc-panel-loader.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
---
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index c68b033d4..82acf115c 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -180,6 +180,15 @@ ensure_panel_types (void)
g_hash_table_insert (panel_types, (char*)panels_vtable[i].name, panels_vtable[i].get_type);
}
+/**
+ * cc_panel_loader_load_by_name:
+ * @shell: a #CcShell implementation
+ * @name: name of the panel
+ * @parameters: parameters passed to the new panel
+ *
+ * Creates a new instance of a #CcPanel from @name, and sets the
+ * @shell and @parameters properties at construction time.
+ */
CcPanel *
cc_panel_loader_load_by_name (CcShell *shell,
const gchar *name,
@@ -200,6 +209,15 @@ cc_panel_loader_load_by_name (CcShell *shell,
#endif /* CC_PANEL_LOADER_NO_GTYPES */
+/**
+ * cc_panel_loader_fill_model:
+ * @model: a #CcShellModel
+ *
+ * Fills @model with information from the available panels. It
+ * iterates over the panel vtable, gathering the panel names,
+ * build the desktop filename from it, and retrieves additional
+ * information from it.
+ */
void
cc_panel_loader_fill_model (CcShellModel *model)
{
@@ -244,6 +262,13 @@ cc_panel_loader_fill_model (CcShellModel *model)
#endif
}
+/**
+ * cc_panel_loader_list_panels:
+ *
+ * Prints the list of panels from the current panel vtable,
+ * usually as response to running GNOME Settings with the
+ * '--list' command line argument.
+ */
void
cc_panel_loader_list_panels (void)
{
@@ -256,6 +281,16 @@ cc_panel_loader_list_panels (void)
}
+/**
+ * cc_panel_loader_override_vtable:
+ * @override_vtable: the new panel vtable
+ * @n_elements: number of items of @override_vtable
+ *
+ * Override the default panel vtable so that GNOME Settings loads
+ * a custom set of panels. Intended to be used by tests to inject
+ * panels that execise specific interactions with CcWindow (e.g.
+ * header widgets, permissions, etc).
+ */
void
cc_panel_loader_override_vtable (CcPanelLoaderVtable *override_vtable,
gsize n_elements)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]