Top | ![]() |
![]() |
![]() |
![]() |
GsCategory * | gs_category_new_for_desktop_data () |
const gchar * | gs_category_get_id () |
GsCategory * | gs_category_get_parent () |
const gchar * | gs_category_get_name () |
const gchar * | gs_category_get_icon_name () |
gint | gs_category_get_score () |
GPtrArray * | gs_category_get_desktop_groups () |
gboolean | gs_category_has_desktop_group () |
GsCategory * | gs_category_find_child () |
GPtrArray * | gs_category_get_children () |
guint | gs_category_get_size () |
void | gs_category_increment_size () |
This object provides functionality that allows a plugin to create a tree structure of categories that each contain GsApp's.
GsCategory *
gs_category_new_for_desktop_data (const GsDesktopData *data
);
Create a new GsCategory instance which wraps the desktop category
information in data
. Where possible, the static data will be reused, so
data
must be static and constant across the lifetime of the process.
Since: 40
const gchar *
gs_category_get_id (GsCategory *category
);
Gets the category ID.
Since: 3.22
GsCategory *
gs_category_get_parent (GsCategory *category
);
Gets the parent category.
Since: 3.22
const gchar *
gs_category_get_name (GsCategory *category
);
Gets the category name.
Since: 3.22
const gchar *
gs_category_get_icon_name (GsCategory *category
);
Gets the category icon name.
Since: 3.22
gint
gs_category_get_score (GsCategory *category
);
Gets if the category score. Important categories may be shown before other categories, or tagged in a different way, for example with color or in a different section.
Since: 3.22
GPtrArray *
gs_category_get_desktop_groups (GsCategory *category
);
Gets the list of AppStream groups for the category.
Since: 3.22
gboolean gs_category_has_desktop_group (GsCategory *category
,const gchar *desktop_group
);
Finds out if the category has the specific AppStream desktop group.
category |
||
desktop_group |
a group of categories found in AppStream, e.g. "AudioVisual::Player" |
Since: 3.22
GsCategory * gs_category_find_child (GsCategory *category
,const gchar *id
);
Find a child category with a specific ID.
Since: 3.22
GPtrArray *
gs_category_get_children (GsCategory *category
);
Gets the list if children for a category.
Since: 3.22
guint
gs_category_get_size (GsCategory *category
);
Returns how many applications the category could contain.
NOTE: This may over-estimate the number if duplicate applications are filtered or core applications are not shown.
Since: 3.22
void gs_category_increment_size (GsCategory *category
,guint value
);
Adds value
to the size count.
Since: 3.22