AsCategory

AsCategory — Representation of a XDG category

Synopsis

#include <appstream.h>

struct              AsCategory;
struct              AsCategoryClass;
AsCategory *        as_category_new                     (void);
AsCategory *        as_category_construct               (GType object_type);
void                as_category_complete                (AsCategory *self);
const gchar *       as_category_get_directory           (AsCategory *self);
const gchar *       as_category_get_name                (AsCategory *self);
void                as_category_set_icon                (AsCategory *self,
                                                         const gchar *value);
void                as_category_set_name                (AsCategory *self,
                                                         const gchar *value);
const gchar *       as_category_get_summary             (AsCategory *self);
const gchar *       as_category_get_icon                (AsCategory *self);
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);
void                as_category_set_directory           (AsCategory *self,
                                                         const gchar *value);
GList *             as_category_get_included            (AsCategory *self);
GList *             as_category_get_excluded            (AsCategory *self);
gint                as_category_get_level               (AsCategory *self);
void                as_category_set_level               (AsCategory *self,
                                                         gint value);
GList *             as_category_get_subcategories       (AsCategory *self);

Object Hierarchy

  GObject
   +----AsCategory

Properties

  "directory"                gchar*                : Read / Write
  "excluded"                 gpointer              : Read
  "icon"                     gchar*                : Read / Write
  "included"                 gpointer              : Read
  "level"                    gint                  : Read / Write
  "name"                     gchar*                : Read / Write
  "subcategories"            gpointer              : Read
  "summary"                  gchar*                : Read

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

Details

struct AsCategory

struct AsCategory;


struct AsCategoryClass

struct AsCategoryClass {
	GObjectClass parent_class;
};


as_category_new ()

AsCategory *        as_category_new                     (void);

Creates a new AsCategory.

Returns :

an AsCategory. [transfer full]

as_category_construct ()

AsCategory *        as_category_construct               (GType object_type);


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);


as_category_get_excluded ()

GList *             as_category_get_excluded            (AsCategory *self);


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);

Property Details

The "directory" property

  "directory"                gchar*                : Read / Write

directory.

Default value: NULL


The "excluded" property

  "excluded"                 gpointer              : Read

excluded.


The "icon" property

  "icon"                     gchar*                : Read / Write

icon.

Default value: NULL


The "included" property

  "included"                 gpointer              : Read

included.


The "level" property

  "level"                    gint                  : Read / Write

level.

Default value: 0


The "name" property

  "name"                     gchar*                : Read / Write

name.

Default value: NULL


The "subcategories" property

  "subcategories"            gpointer              : Read

subcategories.


The "summary" property

  "summary"                  gchar*                : Read

summary.

Default value: NULL