AsCategory
AsCategory — Representation of a XDG category
|
|
Object Hierarchy
GObject
╰── AsCategory
Includes
#include <appstream.h>
Description
This object represents an XDG category, as defined at:
http://standards.freedesktop.org/menu-spec/menu-spec-1.0.htmlcategory-registry
The AsCategory object does not support all aspects of a menu. It's main purpose
is to be used in software-centers to show information about application-groups,
which are use to thematically group applications.
You can use AsMenuParser to get a set of supported default categories.
See also: AsMenuParser
Functions
as_category_construct ()
AsCategory *
as_category_construct (GType object_type
);
Construct a new AsCategory.
as_category_complete ()
void
as_category_complete (AsCategory *self
);
as_category_get_directory ()
const gchar *
as_category_get_directory (AsCategory *self
);
as_category_get_name ()
const gchar *
as_category_get_name (AsCategory *self
);
as_category_set_icon ()
void
as_category_set_icon (AsCategory *self
,
const gchar *value
);
as_category_set_name ()
void
as_category_set_name (AsCategory *self
,
const gchar *value
);
as_category_get_summary ()
const gchar *
as_category_get_summary (AsCategory *self
);
as_category_get_icon ()
const gchar *
as_category_get_icon (AsCategory *self
);
as_category_add_subcategory ()
void
as_category_add_subcategory (AsCategory *self
,
AsCategory *cat
);
as_category_remove_subcategory ()
void
as_category_remove_subcategory (AsCategory *self
,
AsCategory *cat
);
as_category_has_subcategory ()
gboolean
as_category_has_subcategory (AsCategory *self
);
Test for sub-categories.
Returns
TRUE if this category has any subcategory
as_category_set_directory ()
void
as_category_set_directory (AsCategory *self
,
const gchar *value
);
as_category_get_included ()
GList *
as_category_get_included (AsCategory *self
);
Returns
an array of category names.
[element-type utf8][transfer none]
as_category_get_excluded ()
GList *
as_category_get_excluded (AsCategory *self
);
Returns
an array of category names.
[element-type utf8][transfer none]
as_category_get_level ()
gint
as_category_get_level (AsCategory *self
);
as_category_set_level ()
void
as_category_set_level (AsCategory *self
,
gint value
);
as_category_get_subcategories ()
GList *
as_category_get_subcategories (AsCategory *self
);
Returns
an array of category names.
[element-type utf8][transfer none]
Property Details
The “directory”
property
“directory” gchar *
directory.
Flags: Read / Write
Default value: NULL
The “excluded”
property
“excluded” gpointer
excluded.
Flags: Read
The “icon”
property
“icon” gchar *
icon.
Flags: Read / Write
Default value: NULL
The “included”
property
“included” gpointer
included.
Flags: Read
The “level”
property
“level” gint
level.
Flags: Read / Write
Default value: 0
The “name”
property
“name” gchar *
name.
Flags: Read / Write
Default value: NULL
The “subcategories”
property
“subcategories” gpointer
subcategories.
Flags: Read
The “summary”
property
“summary” gchar *
summary.
Flags: Read
Default value: NULL