From e9e03b2d8a92adf458dc7b0dd849d99c36e77492 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 21 Feb 2011 15:34:51 -0600 Subject: Adding in a defaults object --- .bzrignore | 1 + libdbusmenu-glib/Makefile.am | 2 ++ libdbusmenu-glib/defaults.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ libdbusmenu-glib/defaults.h | 31 ++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 libdbusmenu-glib/defaults.c create mode 100644 libdbusmenu-glib/defaults.h diff --git a/.bzrignore b/.bzrignore index 39be2d5..c5cc6ff 100644 --- a/.bzrignore +++ b/.bzrignore @@ -227,3 +227,4 @@ libdbusmenu-gtk/libdbusmenu_gtk_la-parser.lo test-gtk-parser test-gtk-parser-test test-gtk-parser.xml +libdbusmenu-glib/libdbusmenu_glib_la-defaults.lo diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am index 92de502..5ddbeb8 100644 --- a/libdbusmenu-glib/Makefile.am +++ b/libdbusmenu-glib/Makefile.am @@ -24,6 +24,8 @@ libdbusmenu_glibinclude_HEADERS = \ libdbusmenu_glib_la_SOURCES = \ dbus-menu-clean.xml.h \ dbus-menu-clean.xml.c \ + defaults.h \ + defaults.c \ menuitem.h \ menuitem.c \ menuitem-marshal.h \ diff --git a/libdbusmenu-glib/defaults.c b/libdbusmenu-glib/defaults.c new file mode 100644 index 0000000..cbd9bfa --- /dev/null +++ b/libdbusmenu-glib/defaults.c @@ -0,0 +1,49 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "defaults.h" + +typedef struct _DbusmenuDefaultsPrivate DbusmenuDefaultsPrivate; + +struct _DbusmenuDefaultsPrivate +{ +}; + +#define DBUSMENU_DEFAULTS_GET_PRIVATE(o) \ +(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_DEFAULTS_TYPE, DbusmenuDefaultsPrivate)) + +static void dbusmenu_defaults_class_init (DbusmenuDefaultsClass *klass); +static void dbusmenu_defaults_init (DbusmenuDefaults *self); +static void dbusmenu_defaults_dispose (GObject *object); +static void dbusmenu_defaults_finalize (GObject *object); + +G_DEFINE_TYPE (DbusmenuDefaults, dbusmenu_defaults, G_TYPE_OBJECT); + +static void +dbusmenu_defaults_class_init (DbusmenuDefaultsClass *klass) +{ +GObjectClass *object_class = G_OBJECT_CLASS (klass); + +g_type_class_add_private (klass, sizeof (DbusmenuDefaultsPrivate)); + +object_class->dispose = dbusmenu_defaults_dispose; +object_class->finalize = dbusmenu_defaults_finalize; +} + +static void +dbusmenu_defaults_init (DbusmenuDefaults *self) +{ +} + +static void +dbusmenu_defaults_dispose (GObject *object) +{ +G_OBJECT_CLASS (dbusmenu_defaults_parent_class)->dispose (object); +} + +static void +dbusmenu_defaults_finalize (GObject *object) +{ +G_OBJECT_CLASS (dbusmenu_defaults_parent_class)->finalize (object); +} diff --git a/libdbusmenu-glib/defaults.h b/libdbusmenu-glib/defaults.h new file mode 100644 index 0000000..a440371 --- /dev/null +++ b/libdbusmenu-glib/defaults.h @@ -0,0 +1,31 @@ +#ifndef __DBUSMENU_DEFAULTS_H__ +#define __DBUSMENU_DEFAULTS_H__ + +#include +#include + +G_BEGIN_DECLS + +#define DBUSMENU_TYPE_DEFAULTS (dbusmenu_defaults_get_type ()) +#define DBUSMENU_DEFAULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaults)) +#define DBUSMENU_DEFAULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaultsClass)) +#define IS_DBUSMENU_DEFAULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_TYPE_DEFAULTS)) +#define IS_DBUSMENU_DEFAULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_DEFAULTS)) +#define DBUSMENU_DEFAULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_DEFAULTS, DbusmenuDefaultsClass)) + +typedef struct _DbusmenuDefaults DbusmenuDefaults; +typedef struct _DbusmenuDefaultsClass DbusmenuDefaultsClass; + +struct _DbusmenuDefaultsClass { + GObjectClass parent_class; +}; + +struct _DbusmenuDefaults { + GObject parent; +}; + +GType dbusmenu_defaults_get_type (void); + +G_END_DECLS + +#endif -- cgit v1.2.3