aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-03 13:19:25 -0600
committerTed Gould <ted@canonical.com>2009-11-03 13:19:25 -0600
commit0575b91145b07ecc7fc861bcb8648296fbd74bb4 (patch)
tree87849c9b9a90fa12bc8064f6d88a5037bbd2c29b /libindicator
parente2ce2dd0c4f34c806c371d9595ce01390b11785a (diff)
downloadlibayatana-indicator-0575b91145b07ecc7fc861bcb8648296fbd74bb4.tar.gz
libayatana-indicator-0575b91145b07ecc7fc861bcb8648296fbd74bb4.tar.bz2
libayatana-indicator-0575b91145b07ecc7fc861bcb8648296fbd74bb4.zip
Redefining the interface. Now this object should get subclassed by folks.
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-object.h71
1 files changed, 64 insertions, 7 deletions
diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h
index fa6373d..6637f05 100644
--- a/libindicator/indicator-object.h
+++ b/libindicator/indicator-object.h
@@ -36,25 +36,82 @@ G_BEGIN_DECLS
#define IS_INDICATOR_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_OBJECT_TYPE))
#define INDICATOR_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_OBJECT_TYPE, IndicatorObjectClass))
-typedef struct _IndicatorObject IndicatorObject;
-typedef struct _IndicatorObjectClass IndicatorObjectClass;
-
+typedef struct _IndicatorObject IndicatorObject;
+typedef struct _IndicatorObjectClass IndicatorObjectClass;
+typedef struct _IndicatorObjectPrivate IndicatorObjectPrivate;
+typedef struct _IndicatorObjectEntry IndicatorObjectEntry;
+
+/**
+ IndicatorObjectClass:
+ @parent_class: #GObjectClass
+ @get_label: Gets the label for this object. Should be set
+ to #NULL if @get_entries is set. Should NOT ref the
+ object.
+ @get_image: Gets the image for this object. Should be set
+ to #NULL if @get_entries is set. Should NOT ref the
+ object.
+ @get_menu: Gets the image for this object. Should be set
+ to #NULL if @get_entries is set. Should NOT ref the
+ object.
+ @get_entires: Gets all of the entires for this object returning
+ a #GList of #IndicatorObjectEntries. The list should be
+ under the ownership of the caller but the entires will
+ not be.
+ @entry_added: Slot for #IndicatorObject::entry-added
+ @entry_removed: Slot for #IndicatorObject::entry-removed
+ @indicator_object_reserved_1: Reserved for future use
+ @indicator_object_reserved_2: Reserved for future use
+ @indicator_object_reserved_3: Reserved for future use
+ @indicator_object_reserved_4: Reserved for future use
+*/
struct _IndicatorObjectClass {
GObjectClass parent_class;
-
+
+ /* Virtual Functions */
+ GtkLabel * get_label (IndicatorObject * io);
+ GtkImage * get_image (IndicatorObject * io);
+ GtkMenu * get_menu (IndicatorObject * io);
+
+ GList * get_entries (IndicatorObject * io);
+
+ /* Signals */
+ void entry_added (IndicatorObject * io, IndicatorEntry * entry, gpointer user_data);
+ void entry_removed (IndicatorObject * io, IndicatorEntry * entry, gpointer user_data);
+
+ /* Reserved */
+ void (* indicator_object_reserved_1) (void);
+ void (* indicator_object_reserved_2) (void);
+ void (* indicator_object_reserved_3) (void);
+ void (* indicator_object_reserved_4) (void);
};
+/**
+ IndicatorObject:
+ @parent: #GObject
+ @priv: A cached reference to the private data for the
+ instance.
+*/
struct _IndicatorObject {
GObject parent;
+ IndicatorObjectPrivate * priv;
+};
+/**
+ IndicatorObjectEntry:
+ @label: The label to be shown on the panel
+ @image: The image to be shown on the panel
+ @menu: The menu to be added to the menubar
+*/
+struct _IndicatorObjectEntry {
+ GtkLabel * label;
+ GtkImage * image;
+ GtkMenu * menu;
};
GType indicator_object_get_type (void);
IndicatorObject * indicator_object_new_from_file (const gchar * file);
-GtkLabel * indicator_object_get_label (IndicatorObject * io);
-GtkImage * indicator_object_get_icon (IndicatorObject * io);
-GtkMenu * indicator_object_get_menu (IndicatorObject * io);
+GList * indicator_object_get_entries (IndicatorObject * io);
G_END_DECLS