Top |
Functions
GsCategory * | gs_category_new () |
const gchar * | gs_category_get_id () |
GsCategory * | gs_category_get_parent () |
const gchar * | gs_category_get_name () |
void | gs_category_set_name () |
const gchar * | gs_category_get_icon () |
void | gs_category_set_icon () |
gint | gs_category_get_score () |
void | gs_category_set_score () |
GPtrArray * | gs_category_get_key_colors () |
void | gs_category_add_key_color () |
GPtrArray * | gs_category_get_desktop_groups () |
gboolean | gs_category_has_desktop_group () |
void | gs_category_add_desktop_group () |
GsCategory * | gs_category_find_child () |
GPtrArray * | gs_category_get_children () |
void | gs_category_add_child () |
guint | gs_category_get_size () |
void | gs_category_increment_size () |
Description
This object provides functionality that allows a plugin to create a tree structure of categories that each contain GsApp's.
Functions
gs_category_new ()
GsCategory *
gs_category_new (const gchar *id
);
Creates a new category object.
Since: 3.22
gs_category_get_id ()
const gchar *
gs_category_get_id (GsCategory *category
);
Gets the category ID.
Since: 3.22
gs_category_get_parent ()
GsCategory *
gs_category_get_parent (GsCategory *category
);
Gets the parent category.
Since: 3.22
gs_category_get_name ()
const gchar *
gs_category_get_name (GsCategory *category
);
Gets the category name.
Since: 3.22
gs_category_set_name ()
void gs_category_set_name (GsCategory *category
,const gchar *name
);
Sets the category name.
Since: 3.22
gs_category_get_icon ()
const gchar *
gs_category_get_icon (GsCategory *category
);
Gets the category icon.
Since: 3.22
gs_category_set_icon ()
void gs_category_set_icon (GsCategory *category
,const gchar *icon
);
Sets the category icon.
Since: 3.22
gs_category_get_score ()
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
gs_category_set_score ()
void gs_category_set_score (GsCategory *category
,gint score
);
Sets the category score, where larger numbers get sorted before lower numbers.
Since: 3.22
gs_category_get_key_colors ()
GPtrArray *
gs_category_get_key_colors (GsCategory *category
);
Gets the list of key colors for the category.
Since: 3.22
gs_category_add_key_color ()
void gs_category_add_key_color (GsCategory *category
,const GdkRGBA *key_color
);
Adds a key color to the category.
Since: 3.22
gs_category_get_desktop_groups ()
GPtrArray *
gs_category_get_desktop_groups (GsCategory *category
);
Gets the list of AppStream groups for the category.
Since: 3.22
gs_category_has_desktop_group ()
gboolean gs_category_has_desktop_group (GsCategory *category
,const gchar *desktop_group
);
Finds out if the category has the specific AppStream desktop group.
Parameters
category |
||
desktop_group |
a group of categories found in AppStream, e.g. "AudioVisual::Player" |
Since: 3.22
gs_category_add_desktop_group ()
void gs_category_add_desktop_group (GsCategory *category
,const gchar *desktop_group
);
Adds a desktop group to the category. A desktop group is a set of category strings that all must exist.
Parameters
category |
||
desktop_group |
a group of categories found in AppStream, e.g. "AudioVisual::Player" |
Since: 3.22
gs_category_find_child ()
GsCategory * gs_category_find_child (GsCategory *category
,const gchar *id
);
Find a child category with a specific ID.
Since: 3.22
gs_category_get_children ()
GPtrArray *
gs_category_get_children (GsCategory *category
);
Gets the list if children for a category.
Since: 3.22
gs_category_add_child ()
void gs_category_add_child (GsCategory *category
,GsCategory *subcategory
);
Adds a child category to a parent category.
Since: 3.22
gs_category_get_size ()
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
gs_category_increment_size ()
void
gs_category_increment_size (GsCategory *category
);
Adds one to the size count if an application is available
Since: 3.22