diff options
author | Ted Gould <ted@canonical.com> | 2009-01-15 10:39:51 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-01-15 10:39:51 -0600 |
commit | ccac9b84bae42b0ad622d282dc12a65c3f7c7b11 (patch) | |
tree | 5dcaeaabf4efae093f0c31cfb6ad8d57c00ef2b3 /libindicate/listener.h | |
parent | 48277fb0df0d455db8f1e953a591200fd650c202 (diff) | |
download | libayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.tar.gz libayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.tar.bz2 libayatana-indicator-ccac9b84bae42b0ad622d282dc12a65c3f7c7b11.zip |
Adding in the base object for the listener.
Diffstat (limited to 'libindicate/listener.h')
-rw-r--r-- | libindicate/listener.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libindicate/listener.h b/libindicate/listener.h new file mode 100644 index 0000000..1f0c870 --- /dev/null +++ b/libindicate/listener.h @@ -0,0 +1,53 @@ + +#ifndef INDICATE_LISTENER_H_INCLUDED__ +#define INDICATE_LISTENER_H_INCLUDED__ 1 + +#include <glib.h> +#include <glib-object.h> + +#include "indicator.h" +#include "server.h" + +G_BEGIN_DECLS + +/* Boilerplate */ +#define INDICATE_TYPE_LISTENER (indicate_server_get_type ()) +#define INDICATE_LISTENER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_LISTENER, IndicateListener)) +#define INDICATE_IS_LISTENER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), INDICATE_TYPE_LISTENER)) +#define INDICATE_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), INDICATE_TYPE_LISTENER, IndicateListenerClass)) +#define INDICATE_IS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), INDICATE_TYPE_LISTENER)) +#define INDICATE_LISTENER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), INDICATE_TYPE_LISTENER, IndicateListenerClass)) + +typedef struct _IndicateListener IndicateListener; +struct _IndicateListener { + GObject parent; + +}; + +typedef struct _IndicateListenerClass IndicateListenerClass; +struct _IndicateListenerClass { + GObjectClass parent; + + /* Signals */ + void (* indicator_added) (IndicateServer * server, IndicateIndicator * indicator, gchar * type); + void (* indicator_removed) (IndicateServer * server, IndicateIndicator * indicator, gchar * type); + void (* indicator_modified) (IndicateServer * server, IndicateIndicator * indicator, gchar * property); + + void (* server_added) (IndicateServer * server); + void (* server_removed) (IndicateServer * server); + +}; + +GType indicate_listener_get_type (void) G_GNUC_CONST; + +/* Create a new server */ +IndicateListener * indicate_listener_new (void); + + + + + +G_END_DECLS + +#endif /* INDICATE_LISTENER_H_INCLUDED__ */ + |