Top | ![]() |
![]() |
![]() |
![]() |
gs-category-managergs-category-manager — A container to store GsCategory instances in |
GsCategoryManager is a container object which stores GsCategory instances, so that they can be consistently reused by other code, without creating multiple GsCategory instances for the same category ID.
It is intended to be used as a singleton, and typically accessed by calling
gs_plugin_loader_get_category_manager()
.
GsCategoryManager *
gs_category_manager_new (void
);
Create a new GsCategoryManager. It will contain all the categories, but
their sizes will not be set until gs_category_increment_size()
is called
on them.
Since: 40
GsCategory * gs_category_manager_lookup (GsCategoryManager *self
,const gchar *id
);
Look up a category by its ID. If the category is not found, NULL
is
returned.
Since: 40
GsCategory * const * gs_category_manager_get_categories (GsCategoryManager *self
,gsize *out_n_categories
);
Get the full list of categories from the category manager. The returned array
is NULL
terminated and guaranteed to be non-NULL
(although it may be
empty).
If out_n_categories
is provided, it will be set to the number of GsCategory
objects in the return value, not including the NULL
terminator.
self |
||
out_n_categories |
return location for
the number of categories in the return value, or |
[optional][out caller-allocates] |
the categories; do not free this memory.
[array length=out_n_categories][transfer none][not nullable]
Since: 40