![]() |
![]() |
![]() |
LibAppStream Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define AS_TYPE_CATEGORY void as_category_add_subcategory (AsCategory *self
,AsCategory *cat
); void as_category_remove_subcategory (AsCategory *self
,AsCategory *cat
); gboolean as_category_has_subcategory (AsCategory *self
); AsCategory * as_category_new (void
); const gchar * as_category_get_name (AsCategory *self
); const gchar * as_category_get_summary (AsCategory *self
); const gchar * as_category_get_icon (AsCategory *self
); const gchar * as_category_get_directory (AsCategory *self
); GList * as_category_get_included (AsCategory *self
); GList * as_category_get_excluded (AsCategory *self
); gint as_category_get_level (AsCategory *self
); GList * as_category_get_subcategories (AsCategory *self
); struct AsCategory; struct AsCategoryClass; #define AS_TYPE_MENU_PARSER GList * as_menu_parser_parse (AsMenuParser *self
); AsMenuParser * as_menu_parser_new (void
); AsMenuParser * as_menu_parser_new_from_file (const gchar *menu_file
); gboolean as_menu_parser_get_update_category_data (AsMenuParser *self
); void as_menu_parser_set_update_category_data (AsMenuParser *self
,gboolean value
); struct AsMenuParser; gpointer as_menu_parser_ref (gpointer instance
); void as_menu_parser_unref (gpointer instance
); GParamSpec * as_param_spec_menu_parser (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType object_type
,GParamFlags flags
); void as_value_set_menu_parser (GValue *value
,gpointer v_object
); gpointer as_value_get_menu_parser (const GValue *value
); void as_value_take_menu_parser (GValue *value
,gpointer v_object
); struct AsMenuParserClass; GList * as_get_system_categories (void
);
void as_category_add_subcategory (AsCategory *self
,AsCategory *cat
);
|
the AsCategory instance |
|
void as_category_remove_subcategory (AsCategory *self
,AsCategory *cat
);
|
the AsCategory instance |
|
gboolean as_category_has_subcategory (AsCategory *self
);
|
the AsCategory instance |
Returns : |
TRUE if this category has any subcategory |
const gchar * as_category_get_name (AsCategory *self
);
Get and return the current value of the "name" property.
|
the AsCategory instance to query |
Returns : |
the value of the "name" property |
const gchar * as_category_get_summary (AsCategory *self
);
Get and return the current value of the "summary" property.
|
the AsCategory instance to query |
Returns : |
the value of the "summary" property |
const gchar * as_category_get_icon (AsCategory *self
);
Get and return the current value of the "icon" property.
|
the AsCategory instance to query |
Returns : |
the value of the "icon" property |
const gchar * as_category_get_directory (AsCategory *self
);
Get and return the current value of the "directory" property.
|
the AsCategory instance to query |
Returns : |
the value of the "directory" property |
GList * as_category_get_included (AsCategory *self
);
Get and return the current value of the "included" property.
|
the AsCategory instance to query |
Returns : |
the value of the "included" property |
GList * as_category_get_excluded (AsCategory *self
);
Get and return the current value of the "excluded" property.
|
the AsCategory instance to query |
Returns : |
the value of the "excluded" property |
gint as_category_get_level (AsCategory *self
);
Get and return the current value of the "level" property.
|
the AsCategory instance to query |
Returns : |
the value of the "level" property |
GList * as_category_get_subcategories (AsCategory *self
);
Get and return the current value of the "subcategories" property.
|
the AsCategory instance to query |
Returns : |
the value of the "subcategories" property |
struct AsCategory { GObject parent_instance; AsCategoryPrivate * priv; };
Description of an XDG Menu category
struct AsCategoryClass { GObjectClass parent_class; };
The class structure for AS_TYPE_CATEGORY
. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
#define AS_TYPE_MENU_PARSER (as_menu_parser_get_type ())
The type for AsMenuParser.
GList * as_menu_parser_parse (AsMenuParser *self
);
Parse the menu file
|
the AsMenuParser instance |
Returns : |
GList of Category objects found in the Menu, or NULL if there was an error |
AsMenuParser * as_menu_parser_new (void
);
Create a new MenuParser for the generic AppStream categories list
AsMenuParser * as_menu_parser_new_from_file (const gchar *menu_file
);
Create a new MenuParser for an arbitrary menu file
|
gboolean as_menu_parser_get_update_category_data
(AsMenuParser *self
);
Get and return the current value of the "update-category-data" property.
|
the AsMenuParser instance to query |
Returns : |
the value of the "update-category-data" property |
void as_menu_parser_set_update_category_data (AsMenuParser *self
,gboolean value
);
Set the value of the "update-category-data" property to value
.
|
the AsMenuParser instance to modify |
|
the new value of the "update-category-data" property |
struct AsMenuParser { GTypeInstance parent_instance; volatile int ref_count; AsMenuParserPrivate * priv; };
Parser for XDG Menu files
gpointer as_menu_parser_ref (gpointer instance
);
Increases the reference count of object
.
|
a AsMenuParser. |
Returns : |
the same object
|
void as_menu_parser_unref (gpointer instance
);
Decreases the reference count of object
. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).
|
a AsMenuParser. |
GParamSpec * as_param_spec_menu_parser (const gchar *name
,const gchar *nick
,const gchar *blurb
,GType object_type
,GParamFlags flags
);
Creates a new GParamSpecBoxed instance specifying a AS_TYPE_MENU_PARSER
derived property.
See
for details on property names.
g_param_spec_internal()
|
canonical name of the property specified |
|
nick name for the property specified |
|
description of the property specified |
|
AS_TYPE_MENU_PARSER derived type of this property |
|
flags for the property specified |
void as_value_set_menu_parser (GValue *value
,gpointer v_object
);
Set the contents of a AS_TYPE_MENU_PARSER
derived GValue to v_object
.
as_value_set_menu_parser()
increases the reference count of v_object
(the GValue holds a reference to v_object
). If you do not wish to increase the reference count of the object (i.e. you wish to pass your current reference to the GValue because you no longer need it), use as_value_take_menu_parser()
instead.
It is important that your GValue holds a reference to v_object
(either its own, or one it has taken) to ensure that the object won't be destroyed while the GValue still exists).
|
a valid GValue of AS_TYPE_MENU_PARSER derived type |
|
object value to be set |
gpointer as_value_get_menu_parser (const GValue *value
);
Get the contents of a AS_TYPE_MENU_PARSER
derived GValue.
|
a valid GValue of AS_TYPE_MENU_PARSER derived type |
Returns : |
object contents of value
|
void as_value_take_menu_parser (GValue *value
,gpointer v_object
);
Sets the contents of a AS_TYPE_MENU_PARSER
derived GValue to v_object
and takes over the ownership of the callers reference to v_object
; the caller doesn't have to unref it any more (i.e. the reference count of the object is not increased).
If you want the GValue to hold its own reference to v_object
, use as_value_set_menu_parser()
instead.
|
a valid GValue of AS_TYPE_MENU_PARSER derived type |
|
object value to be set |
struct AsMenuParserClass { GTypeClass parent_class; void (*finalize) (AsMenuParser *self); };
The class structure for AS_TYPE_MENU_PARSER
. All the fields in this structure are private and should never be accessed directly.
GTypeClass |
the parent class structure |
GList * as_get_system_categories (void
);
Get a GList of the default AppStream categories
|
the (null) instance |