diff options
author | Ted Gould <ted@canonical.com> | 2009-10-06 15:28:41 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-06 15:28:41 -0400 |
commit | 1f822bf64b8891dab03937060dd47b8003bb8ab5 (patch) | |
tree | ba0addb7f510a9a1d85e6a721fb42e7a7e716219 /libindicator | |
parent | 1c30efea4d348d8bf9f74c1b821b9dfe16d890b9 (diff) | |
download | libayatana-indicator-1f822bf64b8891dab03937060dd47b8003bb8ab5.tar.gz libayatana-indicator-1f822bf64b8891dab03937060dd47b8003bb8ab5.tar.bz2 libayatana-indicator-1f822bf64b8891dab03937060dd47b8003bb8ab5.zip |
Building a base object.
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/Makefile.am | 10 | ||||
-rw-r--r-- | libindicator/indicator-object.c | 55 | ||||
-rw-r--r-- | libindicator/indicator-object.h | 33 |
3 files changed, 97 insertions, 1 deletions
diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index be68721..29b7bb5 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -4,11 +4,19 @@ EXTRA_DIST = \ libindicatorincludedir=$(includedir)/libindicator-0.1/libindicator indicator_headers = \ - indicator.h + indicator.h \ + indicator-object.h libindicatorinclude_HEADERS = \ $(indicator_headers) +lib_LTLIBRARIES = \ + libindicator.la + +libindicator_la_SOURCES = \ + $(indicator_headers) \ + indicator-object.c + pkgconfig_DATA = indicator.pc pkgconfigdir = $(libdir)/pkgconfig diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c new file mode 100644 index 0000000..772110b --- /dev/null +++ b/libindicator/indicator-object.c @@ -0,0 +1,55 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "indicator-object.h" + +typedef struct _IndicatorObjectPrivate IndicatorObjectPrivate; +struct _IndicatorObjectPrivate { +}; + +#define INDICATOR_OBJECT_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_OBJECT_TYPE, IndicatorObjectPrivate)) + +static void indicator_object_class_init (IndicatorObjectClass *klass); +static void indicator_object_init (IndicatorObject *self); +static void indicator_object_dispose (GObject *object); +static void indicator_object_finalize (GObject *object); + +G_DEFINE_TYPE (IndicatorObject, indicator_object, G_TYPE_OBJECT); + +static void +indicator_object_class_init (IndicatorObjectClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (IndicatorObjectPrivate)); + + object_class->dispose = indicator_object_dispose; + object_class->finalize = indicator_object_finalize; + + return; +} + +static void +indicator_object_init (IndicatorObject *self) +{ + + return; +} + +static void +indicator_object_dispose (GObject *object) +{ + + G_OBJECT_CLASS (indicator_object_parent_class)->dispose (object); + return; +} + +static void +indicator_object_finalize (GObject *object) +{ + + G_OBJECT_CLASS (indicator_object_parent_class)->finalize (object); + return; +} 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 <glib.h> +#include <glib-object.h> + +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 |