![]() |
![]() |
![]() |
katze Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <katze/katze.h> struct KatzeItem; struct KatzeItemClass; KatzeItem * katze_item_copy (KatzeItem *item
);gint64 katze_item_get_added (KatzeItem *item
); constgchar * katze_item_get_icon (KatzeItem *item
);GtkWidget * katze_item_get_image (KatzeItem *item
,);
GtkWidget *widgetgboolean katze_item_get_meta_boolean (KatzeItem *item
,const
);gchar *keygint64 katze_item_get_meta_integer (KatzeItem *item
,const
);gchar *keyGList * katze_item_get_meta_keys (KatzeItem *item
); constgchar * katze_item_get_meta_string (KatzeItem *item
,const
); constgchar *keygchar * katze_item_get_name (KatzeItem *item
);gpointer katze_item_get_parent (KatzeItem *item
);GdkPixbuf * katze_item_get_pixbuf (KatzeItem *item
,); const
GtkWidget *widgetgchar * katze_item_get_text (KatzeItem *item
); constgchar * katze_item_get_token (KatzeItem *item
); constgchar * katze_item_get_uri (KatzeItem *item
); KatzeItem * katze_item_new (void
);void katze_item_set_added (KatzeItem *item
,);
gint64 addedvoid katze_item_set_icon (KatzeItem *item
,const
);gchar *iconvoid katze_item_set_meta_integer (KatzeItem *item
,const
,gchar *key);
gint64 valuevoid katze_item_set_meta_string (KatzeItem *item
,const
,gchar *keyconst
);gchar *valuevoid katze_item_set_name (KatzeItem *item
,const
);gchar *namevoid katze_item_set_parent (KatzeItem *item
,);
gpointer parentvoid katze_item_set_text (KatzeItem *item
,const
);gchar *textvoid katze_item_set_token (KatzeItem *item
,const
);gchar *tokenvoid katze_item_set_uri (KatzeItem *item
,const
);gchar *uri
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_copy (KatzeItem *item
);
Creates an exact copy of item
.
Note that subclass specific features will only be preserved if the class implements it.
Since 0.4.3 meta data is copied.
Since 0.1.3
gint64 katze_item_get_added (KatzeItem *item
);
Determines when item
was added.
|
a KatzeItem |
Returns : |
a timestamp |
constgchar * katze_item_get_icon (KatzeItem *item
);
Retrieves the icon of item
.
|
a KatzeItem |
Returns : |
the icon of the item |
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
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
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
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
constgchar * katze_item_get_name (KatzeItem *item
);
Retrieves the name of item
.
|
a KatzeItem |
Returns : |
the name of the item |
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] |
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
constgchar * katze_item_get_text (KatzeItem *item
);
Retrieves the descriptive text of item
.
|
a KatzeItem |
Returns : |
the text of the item |
constgchar * katze_item_get_token (KatzeItem *item
);
Retrieves the token of item
.
|
a KatzeItem |
Returns : |
the token of the item |
constgchar * katze_item_get_uri (KatzeItem *item
);
Retrieves the URI of item
.
|
a KatzeItem |
Returns : |
the URI of the item |
KatzeItem * katze_item_new (void
);
Creates a new KatzeItem.
Returns : |
a new KatzeItem |
void katze_item_set_added (KatzeItem *item
,);
gint64 added
Sets when item
was added.
|
a KatzeItem |
|
a timestamp |
void katze_item_set_icon (KatzeItem *item
,const
);gchar *icon
Sets the icon of item
.
|
a KatzeItem |
|
a string |
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
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
void katze_item_set_name (KatzeItem *item
,const
);gchar *name
Sets the name of item
.
|
a KatzeItem |
|
a string |
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 |
void katze_item_set_text (KatzeItem *item
,const
);gchar *text
Sets the descriptive text of item
.
|
a KatzeItem |
|
a string |
void katze_item_set_token (KatzeItem *item
,const
);gchar *token
Sets the token of item
.
|
a KatzeItem |
|
a string |