From 1f822bf64b8891dab03937060dd47b8003bb8ab5 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 6 Oct 2009 15:28:41 -0400 Subject: Building a base object. --- libindicator/indicator-object.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 libindicator/indicator-object.h (limited to 'libindicator/indicator-object.h') diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h new file mode 100644 index 0000000..9c6c103 --- /dev/null +++ b/libindicator/indicator-object.h @@ -0,0 +1,33 @@ +#ifndef __INDICATOR_OBJECT_H__ +#define __INDICATOR_OBJECT_H__ + +#include +#include + +G_BEGIN_DECLS + +#define INDICATOR_OBJECT_TYPE (indicator_object_get_type ()) +#define INDICATOR_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_OBJECT_TYPE, IndicatorObject)) +#define INDICATOR_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_OBJECT_TYPE, IndicatorObjectClass)) +#define IS_INDICATOR_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_OBJECT_TYPE)) +#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; + +struct _IndicatorObjectClass { + GObjectClass parent_class; + +}; + +struct _IndicatorObject { + GObject parent; + +}; + +GType indicator_object_get_type (void); + +G_END_DECLS + +#endif -- cgit v1.2.3 From b4d20eb0049cc36dbdd03754f820bd46df6e60ec Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 17:09:21 -0400 Subject: Adding a function to create an object from a file --- libindicator/indicator-object.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libindicator/indicator-object.h') diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index 9c6c103..fd7f470 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -27,6 +27,7 @@ struct _IndicatorObject { }; GType indicator_object_get_type (void); +IndicatorObject * indicator_object_new_from_file (const gchar * file); G_END_DECLS -- cgit v1.2.3 From 5144944dbe90e1eaf65bfeedbd6057b858880abc Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 20:47:19 -0400 Subject: Adding some accessor functions for the various GTK objects. --- libindicator/indicator-object.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libindicator/indicator-object.h') diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index fd7f470..d06355b 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -29,6 +29,10 @@ struct _IndicatorObject { 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); + G_END_DECLS #endif -- cgit v1.2.3 From 755adf0afbb0b0478f6c9f3534f04f21bcdea910 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 28 Oct 2009 16:41:34 -0500 Subject: Oh, legal headers. Fun, fun. --- libindicator/indicator-object.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libindicator/indicator-object.h') diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index d06355b..cb01b85 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -1,3 +1,25 @@ +/* +An interface for indicators to link to for creation. + +Copyright 2009 Canonical Ltd. + +Authors: + Ted Gould + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +version 3.0 as published by the Free Software Foundation. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License version 3.0 for more details. + +You should have received a copy of the GNU General Public +License along with this library. If not, see +. +*/ + #ifndef __INDICATOR_OBJECT_H__ #define __INDICATOR_OBJECT_H__ -- cgit v1.2.3 From 07c7bb1b4870184989d7dd79cc3fcd63338aada2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 3 Nov 2009 09:31:53 -0600 Subject: Comments in the copyright statements updated. --- libindicator/indicator-object.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libindicator/indicator-object.h') diff --git a/libindicator/indicator-object.h b/libindicator/indicator-object.h index cb01b85..fa6373d 100644 --- a/libindicator/indicator-object.h +++ b/libindicator/indicator-object.h @@ -1,5 +1,6 @@ /* -An interface for indicators to link to for creation. +An object to represent loadable indicator modules to make loading +them easy and objectified. Copyright 2009 Canonical Ltd. -- cgit v1.2.3