![]() |
![]() |
![]() |
katze Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <katze/katze.h> struct KatzeItem; struct KatzeItemClass; KatzeItem * katze_item_new (void
); constgchar * katze_item_get_name (KatzeItem *item
);void katze_item_set_name (KatzeItem *item
,const
); constgchar *namegchar * katze_item_get_text (KatzeItem *item
);void katze_item_set_text (KatzeItem *item
,const
); constgchar *textgchar * katze_item_get_uri (KatzeItem *item
);void katze_item_set_uri (KatzeItem *item
,const
); constgchar *urigchar * katze_item_get_icon (KatzeItem *item
);void katze_item_set_icon (KatzeItem *item
,const
);gchar *iconGdkPixbuf * katze_item_get_pixbuf (KatzeItem *item
,);
GtkWidget *widgetGtkWidget * katze_item_get_image (KatzeItem *item
,); const
GtkWidget *widgetgchar * katze_item_get_token (KatzeItem *item
);void katze_item_set_token (KatzeItem *item
,const
);gchar *tokengint64 katze_item_get_added (KatzeItem *item
);void katze_item_set_added (KatzeItem *item
,);
gint64 addedGList * katze_item_get_meta_keys (KatzeItem *item
); constgchar * katze_item_get_meta_string (KatzeItem *item
,const
);gchar *keyvoid katze_item_set_meta_string (KatzeItem *item
,const
,gchar *keyconst
);gchar *valuegint64 katze_item_get_meta_integer (KatzeItem *item
,const
);gchar *keygboolean katze_item_get_meta_boolean (KatzeItem *item
,const
);gchar *keyvoid katze_item_set_meta_integer (KatzeItem *item
,const
,gchar *key);
gint64 valuegpointer katze_item_get_parent (KatzeItem *item
);void katze_item_set_parent (KatzeItem *item
,); KatzeItem * katze_item_copy (
gpointer parentKatzeItem *item
);
KatzeItem is a particularly useful item that provides several commonly needed properties.
struct KatzeItem { GObject parent_instance; gchar* name; gchar* text; gchar* uri; gchar* token; gint64 added; GHashTable* metadata; KatzeItem* parent; };
struct KatzeItemClass { GObjectClass parent_class; gpointer (*copy) (KatzeItem* item); };
KatzeItem * katze_item_new (void
);
Creates a new KatzeItem.
Returns : |
a new KatzeItem. [transfer full] |
constgchar * katze_item_get_name (KatzeItem *item
);
Retrieves the name of item
.
|
a KatzeItem |
Returns : |
the name of the item |
void katze_item_set_name (KatzeItem *item
,const
);gchar *name
Sets the name of item
.
|
a KatzeItem |
|
a string |
constgchar * katze_item_get_text (KatzeItem *item
);
Retrieves the descriptive text of item
.
|
a KatzeItem |
Returns : |
the text of the item |
void katze_item_set_text (KatzeItem *item
,const
);gchar *text
Sets the descriptive text of item
.
|
a KatzeItem |
|
a string |
constgchar * katze_item_get_uri (KatzeItem *item
);
Retrieves the URI of item
.
|
a KatzeItem |
Returns : |
the URI of the item |
void katze_item_set_uri (KatzeItem *item
,const
);gchar *uri
Sets the URI of item
.
|
a KatzeItem |
|
a string |
constgchar * katze_item_get_icon (KatzeItem *item
);
Retrieves the icon of item
.
|
a KatzeItem |
Returns : |
the icon of the item |
void katze_item_set_icon (KatzeItem *item
,const
);gchar *icon
Sets the icon of item
.
|
a KatzeItem |
|
a string |
GdkPixbuf * katze_item_get_pixbuf (KatzeItem *item
,);
GtkWidget *widget
Creates a item
.
|
a KatzeItem |
|
a NULL |
Returns : |
the icon of the item, or NULL |
Since 0.4.6
GtkWidget * katze_item_get_image (KatzeItem *item
,);
GtkWidget *widget
Creates a item
.
|
a KatzeItem |
|
a NULL |
Returns : |
the icon of the item. [transfer floating] |
Since 0.4.4
constgchar * katze_item_get_token (KatzeItem *item
);
Retrieves the token of item
.
|
a KatzeItem |
Returns : |
the token of the item |
void katze_item_set_token (KatzeItem *item
,const
);gchar *token
Sets the token of item
.
|
a KatzeItem |
|
a string |
gint64 katze_item_get_added (KatzeItem *item
);
Determines when item
was added.
|
a KatzeItem |
Returns : |
a timestamp |
void katze_item_set_added (KatzeItem *item
,);
gint64 added
Sets when item
was added.
|
a KatzeItem |
|
a timestamp |
GList * katze_item_get_meta_keys (KatzeItem *item
);
Retrieves a list of all meta keys.
|
a KatzeItem |
Returns : |
a newly allocated |
Since 0.1.8
constgchar * katze_item_get_meta_string (KatzeItem *item
,const
);gchar *key
Retrieves a string value by the specified key from the meta data of the item.
Specify "namespace:key" or "key" to use the default namespace.
|
a KatzeItem |
|
the name of an integer value |
Returns : |
a string, or NULL |
Since 0.1.8
void katze_item_set_meta_string (KatzeItem *item
,const
,gchar *keyconst
);gchar *value
Saves the specified string value in the meta data of the item under the specified key.
Specify "namespace:key" or "key" to use the default namespace.
|
a KatzeItem |
|
the name of a string value |
|
the value as a string |
Since 0.1.8
gint64 katze_item_get_meta_integer (KatzeItem *item
,const
);gchar *key
Retrieves an integer value by the specified key from the meta data of the item.
If the key is present but not representable as an integer, -1 is returned.
|
a KatzeItem |
|
the name of an integer value |
Returns : |
an integer value, or -1 |
Since 0.1.8
gboolean katze_item_get_meta_boolean (KatzeItem *item
,const
);gchar *key
The Value should be set with katze_item_set_meta_integer()
.
If the value is set and not 0, TRUE
|
a KatzeItem |
|
the name of a boolean value |
Since 0.2.7
void katze_item_set_meta_integer (KatzeItem *item
,const
,gchar *key);
gint64 value
Saves the specified integer value in the meta data of the item under the specified key.
A value of -1 is intepreted as unset.
|
a KatzeItem |
|
the name of an integer value |
Since 0.1.8
gpointer katze_item_get_parent (KatzeItem *item
);
Determines the parent of item
.
Since 0.1.2 you can monitor the "parent" property.
|
a KatzeItem |
Returns : |
the parent of the item. [type GObject][transfer none] |
void katze_item_set_parent (KatzeItem *item
,);
gpointer parent
Sets the parent of item
.
This is intended for item container implementations. Notably the new parent will not be notified of the change.
Since 0.1.2 you can monitor the "parent" property, so unsetting the parent is actually safe if the parent supports it.
|
a KatzeItem |
|
the new parent |