diff options
author | Ted Gould <ted@canonical.com> | 2009-08-06 15:22:47 +0100 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-06 15:22:47 +0100 |
commit | 78afa2e5ac7a98282bae867b2b68612ad3a01cba (patch) | |
tree | f3eed3992cef940062c3c54d60e955d8fa29b624 /src | |
parent | e988b52dbade0b020a5c58b13a67a43a17ac4293 (diff) | |
download | ayatana-indicator-session-78afa2e5ac7a98282bae867b2b68612ad3a01cba.tar.gz ayatana-indicator-session-78afa2e5ac7a98282bae867b2b68612ad3a01cba.tar.bz2 ayatana-indicator-session-78afa2e5ac7a98282bae867b2b68612ad3a01cba.zip |
Adding a couple of signals in here.
Diffstat (limited to 'src')
-rw-r--r-- | src/status-service-dbus.c | 44 | ||||
-rw-r--r-- | src/status-service-dbus.h | 5 |
2 files changed, 49 insertions, 0 deletions
diff --git a/src/status-service-dbus.c b/src/status-service-dbus.c index 5096bfe..24c164a 100644 --- a/src/status-service-dbus.c +++ b/src/status-service-dbus.c @@ -17,6 +17,16 @@ static void _status_service_server_pretty_user_name (void); #include "status-service-server.h" +/* Signals */ +enum { + USER_CHANGED, + STATUS_ICONS_CHANGED, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0 }; + +/* GObject Boilerplate */ G_DEFINE_TYPE (StatusServiceDbus, status_service_dbus, G_TYPE_OBJECT); static void @@ -27,6 +37,40 @@ status_service_dbus_class_init (StatusServiceDbusClass *klass) object_class->dispose = status_service_dbus_dispose; object_class->finalize = status_service_dbus_finalize; + /** + StatusServiceDbus::user-changed: + @arg0: The #StatusServiceDbus object. + @arg1: The place to put the new user name + + Signals that the user name has changed and gives the + new user name. + */ + signals[USER_CHANGED] = g_signal_new("user-changed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(StatusServiceDbusClass, user_changed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + + /** + StatusServiceDbus::status-icons-changed: + @arg0: The #StatusServiceDbus object. + @arg1: The list of icon names representing the statuses in + the order they should be displayed. Left to right. + + Signals that the user status set has changed and that + new icons may need to be loaded. The list of icons will + always be complete. + */ + signals[STATUS_ICONS_CHANGED] = g_signal_new("status-icons-changed", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(StatusServiceDbusClass, status_icons_changed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); + dbus_g_object_type_install_info(STATUS_SERVICE_DBUS_TYPE, &dbus_glib__status_service_server_object_info); return; diff --git a/src/status-service-dbus.h b/src/status-service-dbus.h index 1805dc5..e320104 100644 --- a/src/status-service-dbus.h +++ b/src/status-service-dbus.h @@ -18,6 +18,11 @@ typedef struct _StatusServiceDbusClass StatusServiceDbusClass; struct _StatusServiceDbusClass { GObjectClass parent_class; + + /* Signals */ + gboolean (*user_changed) (StatusServiceDbus * self, gchar ** name, gpointer user_data); + gboolean (*status_icons_changed) (StatusServiceDbus * self, GArray ** icons, gpointer user_data); + }; struct _StatusServiceDbus { |