diff options
author | Ted Gould <ted@canonical.com> | 2008-12-20 00:02:36 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2008-12-20 00:02:36 -0600 |
commit | 8e913de4c33af10f9d37a0994bbe0f13e93528b4 (patch) | |
tree | 77859af3d9e9307f1dc2a861ce5a60ab09333f53 /libindicate | |
parent | 0d28e608426f3ce161eddb619ae5dbf7198e3e5e (diff) | |
download | libayatana-indicator-8e913de4c33af10f9d37a0994bbe0f13e93528b4.tar.gz libayatana-indicator-8e913de4c33af10f9d37a0994bbe0f13e93528b4.tar.bz2 libayatana-indicator-8e913de4c33af10f9d37a0994bbe0f13e93528b4.zip |
Stopping point
Diffstat (limited to 'libindicate')
-rw-r--r-- | libindicate/indicator.h | 16 | ||||
-rw-r--r-- | libindicate/server.h | 36 |
2 files changed, 51 insertions, 1 deletions
diff --git a/libindicate/indicator.h b/libindicate/indicator.h index b2ef02e..d9b8075 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -2,20 +2,34 @@ #ifndef INDICATE_INDICATOR_H_INCLUDED__ #define INDICATE_INDICATOR_H_INCLUDED__ 1 -#define INDICATE_TYPE_INDICATOR (indicator_get_type ()) +/* Boilerplate */ +#define INDICATE_TYPE_INDICATOR (indicate_indicator_get_type ()) #define INDICATE_INDICATOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_INDICATOR, IndicateIndicator)) #define INDICATE_IS_INDICATOR(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), INDICATE_TYPE_INDICATOR)) +/* This is a signal that signals to the indicator that the user + * has done an action where they'd like this indicator to be + * displayed. */ #define INDICATE_INDICATOR_SIGNAL_DISPLAY "user-display" typedef struct _IndicateIndicator IndicateIndicator; IndicateIndicator * indicate_indicator_new (void); + +/* Should these just be GObject properties? */ void indicate_indicator_set_property (IndicateIndicator * indicator, const gchar * property_name, const gchar * property_value); + +/* Show and hide this indicator */ void indicate_indicator_show (IndicateIndicator * indicator); +void indicate_indicator_hide (IndicateIndicator * indicator); +/* Every entry has an ID, here's how to get it */ guint indicate_indicator_get_id (IndicateIndicator * indicator); +/* Every entry has a type. This should be created by the + * subclass and exported through this pretty function */ +const gchar * indicate_indicator_get_type (IndicateIndicator * indicator); + #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ diff --git a/libindicate/server.h b/libindicate/server.h new file mode 100644 index 0000000..e06ee08 --- /dev/null +++ b/libindicate/server.h @@ -0,0 +1,36 @@ + +#ifndef INDICATE_SERVER_H_INCLUDED__ +#define INDICATE_SERVER_H_INCLUDED__ 1 + +/* Boilerplate */ +#define INDICATE_TYPE_SERVER (indicate_server_get_type ()) +#define INDICATE_SERVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_SERVER, IndicateIndicator)) +#define INDICATE_IS_SERVER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), INDICATE_TYPE_SERVER)) + +typedef struct _IndicateServer IndicateServer; + +/* Create a new server */ +IndicateServer * indicate_server_new (void); + +/* Sets the object. By default this is /org/freedesktop/indicators */ +void indicate_server_set_dbus_object (const gchar * obj); + +/* Sets the desktop file to get data like name and description + * out of */ +void indicate_server_set_desktop_file (const gchar * path); + +/* Show and hide the server on DBus, this allows for the server to + * be created, change the object, and then shown. If for some + * reason the app wanted to hide all it's indicators, this is a + * sure fire way to do so. No idea why, but I'm sure I'll learn. */ +void indicate_server_show (IndicateServer * server); +void indicate_server_hide (IndicateServer * server); + +/* The functions to count indicators for simpler displays of the + * indicators in the application */ +guint indicate_server_indicator_count (IndicateServer * server); +guint indicate_server_indicator_count_by_type (IndicateServer * server, const gchar * type); + + +#endif /* INDICATE_INDICATOR_H_INCLUDED__ */ + |