diff options
author | Ted Gould <ted@gould.cx> | 2010-01-04 22:52:08 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-01-04 22:52:08 -0600 |
commit | 7c0f72c69aeacbfe8bd06f63ef0b0af6f61f4d82 (patch) | |
tree | bc56b26403cb0b50ba46cfe3b1d8b815db3e78bf /src | |
parent | 9434c8a9f162cab1f525ed892a133a688bb3e223 (diff) | |
download | ayatana-indicator-datetime-7c0f72c69aeacbfe8bd06f63ef0b0af6f61f4d82.tar.gz ayatana-indicator-datetime-7c0f72c69aeacbfe8bd06f63ef0b0af6f61f4d82.tar.bz2 ayatana-indicator-datetime-7c0f72c69aeacbfe8bd06f63ef0b0af6f61f4d82.zip |
The base object for the indicator
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-datetime.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index e69de29..9cb78dc 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -0,0 +1,85 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* GStuff */ +#include <glib.h> +#include <glib-object.h> + +/* Indicator Stuff */ +#include <libindicator/indicator.h> +#include <libindicator/indicator-object.h> + + +#define INDICATOR_DATETIME_TYPE (indicator_datetime_get_type ()) +#define INDICATOR_DATETIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_DATETIME_TYPE, IndicatorDatetime)) +#define INDICATOR_DATETIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_DATETIME_TYPE, IndicatorDatetimeClass)) +#define IS_INDICATOR_DATETIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_DATETIME_TYPE)) +#define IS_INDICATOR_DATETIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_DATETIME_TYPE)) +#define INDICATOR_DATETIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_DATETIME_TYPE, IndicatorDatetimeClass)) + +typedef struct _IndicatorDatetime IndicatorDatetime; +typedef struct _IndicatorDatetimeClass IndicatorDatetimeClass; +typedef struct _IndicatorDatetimePrivate IndicatorDatetimePrivate; + +struct _IndicatorDatetimeClass { + IndicatorObjectClass parent_class; +}; + +struct _IndicatorDatetime { + IndicatorObject parent; + IndicatorDatetimePrivate * priv; +}; + +struct _IndicatorDatetimePrivate { + int dummy; +}; + +#define INDICATOR_DATETIME_GET_PRIVATE(o) \ +(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_DATETIME_TYPE, IndicatorDatetimePrivate)) + +GType indicator_datetime_get_type (void); + +static void indicator_datetime_class_init (IndicatorDatetimeClass *klass); +static void indicator_datetime_init (IndicatorDatetime *self); +static void indicator_datetime_dispose (GObject *object); +static void indicator_datetime_finalize (GObject *object); + +G_DEFINE_TYPE (IndicatorDatetime, indicator_datetime, INDICATOR_OBJECT_TYPE); + +static void +indicator_datetime_class_init (IndicatorDatetimeClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (IndicatorDatetimePrivate)); + + object_class->dispose = indicator_datetime_dispose; + object_class->finalize = indicator_datetime_finalize; + + return; +} + +static void +indicator_datetime_init (IndicatorDatetime *self) +{ + self->priv = INDICATOR_DATETIME_GET_PRIVATE(self); + + return; +} + +static void +indicator_datetime_dispose (GObject *object) +{ + + G_OBJECT_CLASS (indicator_datetime_parent_class)->dispose (object); + return; +} + +static void +indicator_datetime_finalize (GObject *object) +{ + + G_OBJECT_CLASS (indicator_datetime_parent_class)->finalize (object); + return; +} |