From bf1efc1c4c15401798a7d3a3b8ebb9533a9e79a5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 19 Oct 2009 14:11:58 -0500 Subject: Header comments and a new signal that we'll need to deal with. --- src/libcustomindicator/custom-indicator.h | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index 0ac8808..a311c63 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -52,12 +52,46 @@ typedef enum { /*< prefix=CUSTOM_INDICATOR_STATUS >*/ typedef struct _CustomIndicator CustomIndicator; typedef struct _CustomIndicatorClass CustomIndicatorClass; +/** + CustomIndicatorClass: + @parent_class: Mia familia + @connection_changed: Slot for #CustomIndicator::connection-changed. + @custom_indicator_reserved_1: Reserved for future use. + @custom_indicator_reserved_2: Reserved for future use. + @custom_indicator_reserved_3: Reserved for future use. + @custom_indicator_reserved_4: Reserved for future use. + + The signals and external functions that make up the #CustomIndicator + class object. +*/ struct _CustomIndicatorClass { + /* Parent */ GObjectClass parent_class; + + /* Signals */ + void (* connection_changed) (CustomIndicator * indicator, + gboolean connected, + gpointer user_data); + + /* Reserved */ + void (*custom_indicator_reserved_1)(void); + void (*custom_indicator_reserved_2)(void); + void (*custom_indicator_reserved_3)(void); + void (*custom_indicator_reserved_4)(void); }; +/** + CustomIndicator: + @parent: Parent object. + + A custom indicator represents the values that are needed to show a + unique status in the panel for an application. In general, applications + should try to fit in the other indicators that are available on the + panel before using this. But, sometimes it is necissary. +*/ struct _CustomIndicator { GObject parent; + /* None. We're a very private object. */ }; /* GObject Stuff */ -- cgit v1.2.3 From 6587e75ac6f1c20b53b37afd49c936c59eaa99d1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 19 Oct 2009 14:35:26 -0500 Subject: Adding in the dbus signals from that interface. --- src/libcustomindicator/custom-indicator.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index a311c63..d9322e7 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -55,6 +55,9 @@ typedef struct _CustomIndicatorClass CustomIndicatorClass; /** CustomIndicatorClass: @parent_class: Mia familia + @new_icon: Slot for #CustomIndicator::new-icon. + @new_attention_icon: Slot for #CustomIndicator::new-attention-icon. + @new_status: Slot for #CustomIndicator::new-status. @connection_changed: Slot for #CustomIndicator::connection-changed. @custom_indicator_reserved_1: Reserved for future use. @custom_indicator_reserved_2: Reserved for future use. @@ -68,7 +71,16 @@ struct _CustomIndicatorClass { /* Parent */ GObjectClass parent_class; - /* Signals */ + /* DBus Signals */ + void (* new_icon) (CustomIndicator * indicator, + gpointer user_data); + void (* new_attention_icon) (CustomIndicator * indicator, + gpointer user_data); + void (* new_status) (CustomIndicator * indicator, + gchar * status_string, + gpointer user_data); + + /* Local Signals */ void (* connection_changed) (CustomIndicator * indicator, gboolean connected, gpointer user_data); -- cgit v1.2.3 From 9dbe19dd59b0d42a4b4c33150bed0db4c31295f2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 19 Oct 2009 16:22:24 -0500 Subject: Boom, there are some signals. --- src/libcustomindicator/custom-indicator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index d9322e7..a4fc3f1 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -13,6 +13,11 @@ G_BEGIN_DECLS #define IS_CUSTOM_INDICATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CUSTOM_INDICATOR_TYPE)) #define CUSTOM_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CUSTOM_INDICATOR_TYPE, CustomIndicatorClass)) +#define CUSTOM_INDICATOR_SIGNAL_NEW_ICON "new-icon" +#define CUSTOM_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon" +#define CUSTOM_INDICATOR_SIGNAL_NEW_STATUS "new-status" +#define CUSTOM_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed" + /** CustomIndicatorCategory: @CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS: The indicator is used to display the status of the application. -- cgit v1.2.3 From 08c19ed67d51834c079f4f1ccf12393628740731 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 20 Oct 2009 17:18:48 -0500 Subject: Filling out some prototypes. --- src/libcustomindicator/custom-indicator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index a4fc3f1..b6bb228 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -3,6 +3,7 @@ #include #include +#include G_BEGIN_DECLS @@ -134,7 +135,7 @@ CustomIndicatorCategory custom_indicator_get_category (CustomIndic CustomIndicatorStatus custom_indicator_get_status (CustomIndicator * ci); const gchar * custom_indicator_get_icon (CustomIndicator * ci); const gchar * custom_indicator_get_attention_icon (CustomIndicator * ci); -void * custom_indicator_get_menu (CustomIndicator * ci); +DbusmenuServer * custom_indicator_get_menu (CustomIndicator * ci); G_END_DECLS -- cgit v1.2.3 From e932bfa4e6ba766d12fb4193cd4d2e7c24645784 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 20 Oct 2009 22:07:29 -0500 Subject: Fleshing out the set functions. --- src/libcustomindicator/custom-indicator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index b6bb228..fd2ddc7 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -127,7 +127,7 @@ void custom_indicator_set_icon (CustomIndic void custom_indicator_set_attention_icon (CustomIndicator * ci, const gchar * icon_name); void custom_indicator_set_menu (CustomIndicator * ci, - void * menu); + DbusmenuServer * menu); /* Get properties */ const gchar * custom_indicator_get_id (CustomIndicator * ci); -- cgit v1.2.3 From 0df50d723494e795aa7447c02ac0f15611b2bfd8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 21 Oct 2009 15:42:13 -0500 Subject: Change the enums to match the KDE ones to make life simpler even though I dislike the names. --- src/libcustomindicator/custom-indicator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libcustomindicator/custom-indicator.h') diff --git a/src/libcustomindicator/custom-indicator.h b/src/libcustomindicator/custom-indicator.h index fd2ddc7..2e9045c 100644 --- a/src/libcustomindicator/custom-indicator.h +++ b/src/libcustomindicator/custom-indicator.h @@ -40,8 +40,8 @@ typedef enum { /*< prefix=CUSTOM_INDICATOR_CATEGORY >*/ /** CustomIndicatorStatus: - @CUSTOM_INDICATOR_STATUS_OFF: The indicator should not be shown to the user. - @CUSTOM_INDICATOR_STATUS_ON: The indicator should be shown in it's default state. + @CUSTOM_INDICATOR_STATUS_PASSIVE: The indicator should not be shown to the user. + @CUSTOM_INDICATOR_STATUS_ACTIVE: The indicator should be shown in it's default state. @CUSTOM_INDICATOR_STATUS_ATTENTION: The indicator should show it's attention icon. These are the states that the indicator can be on in @@ -50,8 +50,8 @@ typedef enum { /*< prefix=CUSTOM_INDICATOR_CATEGORY >*/ shown by setting it to @CUSTOM_INDICATOR_STATUS_ON. */ typedef enum { /*< prefix=CUSTOM_INDICATOR_STATUS >*/ - CUSTOM_INDICATOR_STATUS_OFF, - CUSTOM_INDICATOR_STATUS_ON, + CUSTOM_INDICATOR_STATUS_PASSIVE, + CUSTOM_INDICATOR_STATUS_ACTIVE, CUSTOM_INDICATOR_STATUS_ATTENTION } CustomIndicatorStatus; -- cgit v1.2.3