aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-04-13 16:23:09 -0500
committerTed Gould <ted@canonical.com>2009-04-13 16:23:09 -0500
commit53b477561da7b49fcf208cf615a42e3b0820c0b8 (patch)
tree3da0050d550ec59a6f1a78301fc649c57cfbe800 /libdbusmenu-glib
parent7fde4447bc484c9ff2752740e8bb375d3f2df87a (diff)
downloadlibdbusmenu-53b477561da7b49fcf208cf615a42e3b0820c0b8.tar.gz
libdbusmenu-53b477561da7b49fcf208cf615a42e3b0820c0b8.tar.bz2
libdbusmenu-53b477561da7b49fcf208cf615a42e3b0820c0b8.zip
Putting in more gobject based examples and getting all the libraries tied in to make them work.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/Makefile.am8
-rw-r--r--libdbusmenu-glib/menuitem.c48
-rw-r--r--libdbusmenu-glib/menuitem.h33
-rw-r--r--libdbusmenu-glib/test.c4
-rw-r--r--libdbusmenu-glib/test.h2
5 files changed, 85 insertions, 10 deletions
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am
index c94231b..758de05 100644
--- a/libdbusmenu-glib/Makefile.am
+++ b/libdbusmenu-glib/Makefile.am
@@ -8,10 +8,10 @@ lib_LTLIBRARIES = \
libdbusmenu_glibincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-glib/
libdbusmenu_glibinclude_HEADERS = \
- test.h
+ menuitem.h
libdbusmenu_glib_la_SOURCES = \
- test.c
+ menuitem.c
libdbusmenu_glib_la_LDFLAGS = \
-version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
@@ -19,10 +19,10 @@ libdbusmenu_glib_la_LDFLAGS = \
-export-symbols-regex "^[^_].*"
libdbusmenu_glib_la_CFLAGS = \
- $(LIBDBUSMENU_GLIB_CFLAGS)
+ $(DBUSMENUGLIB_CFLAGS)
libdbusmenu_glib_la_LIBADD = \
- $(LIBDBUSMENU_GLIB_LIBS)
+ $(DBUSMENUGLIB_LIBS)
pkgconfig_DATA = dbusmenu-glib.pc
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
new file mode 100644
index 0000000..080372a
--- /dev/null
+++ b/libdbusmenu-glib/menuitem.c
@@ -0,0 +1,48 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "menuitem.h"
+
+typedef struct _DbusmenuMenuitemPrivate DbusmenuMenuitemPrivate;
+
+struct _DbusmenuMenuitemPrivate
+{
+};
+
+#define DBUSMENU_MENUITEM_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_MENUITEM_TYPE, DbusmenuMenuitemPrivate))
+
+static void dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass);
+static void dbusmenu_menuitem_init (DbusmenuMenuitem *self);
+static void dbusmenu_menuitem_dispose (GObject *object);
+static void dbusmenu_menuitem_finalize (GObject *object);
+
+G_DEFINE_TYPE (DbusmenuMenuitem, dbusmenu_menuitem, G_TYPE_OBJECT);
+
+static void
+dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass)
+{
+GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+g_type_class_add_private (klass, sizeof (DbusmenuMenuitemPrivate));
+
+object_class->dispose = dbusmenu_menuitem_dispose;
+object_class->finalize = dbusmenu_menuitem_finalize;
+}
+
+static void
+dbusmenu_menuitem_init (DbusmenuMenuitem *self)
+{
+}
+
+static void
+dbusmenu_menuitem_dispose (GObject *object)
+{
+G_OBJECT_CLASS (dbusmenu_menuitem_parent_class)->dispose (object);
+}
+
+static void
+dbusmenu_menuitem_finalize (GObject *object)
+{
+G_OBJECT_CLASS (dbusmenu_menuitem_parent_class)->finalize (object);
+}
diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h
new file mode 100644
index 0000000..4e87ba5
--- /dev/null
+++ b/libdbusmenu-glib/menuitem.h
@@ -0,0 +1,33 @@
+#ifndef __DBUSMENU_MENUITEM_H__
+#define __DBUSMENU_MENUITEM_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define DBUSMENU_MENUITEM_TYPE (dbusmenu_menuitem_get_type ())
+#define DBUSMENU_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_MENUITEM_TYPE, DbusmenuMenuitem))
+#define DBUSMENU_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_MENUITEM_TYPE, DbusmenuMenuitemClass))
+#define DBUSMENU_IS_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_MENUITEM_TYPE))
+#define DBUSMENU_IS_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_MENUITEM_TYPE))
+#define DBUSMENU_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_MENUITEM_TYPE, DbusmenuMenuitemClass))
+
+typedef struct _DbusmenuMenuitem DbusmenuMenuitem;
+typedef struct _DbusmenuMenuitemClass DbusmenuMenuitemClass;
+
+struct _DbusmenuMenuitemClass
+{
+GObjectClass parent_class;
+};
+
+struct _DbusmenuMenuitem
+{
+GObject parent;
+};
+
+GType dbusmenu_menuitem_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/libdbusmenu-glib/test.c b/libdbusmenu-glib/test.c
deleted file mode 100644
index 8ebb3f7..0000000
--- a/libdbusmenu-glib/test.c
+++ /dev/null
@@ -1,4 +0,0 @@
-
-void mysymbol (void) {
- return;
-}
diff --git a/libdbusmenu-glib/test.h b/libdbusmenu-glib/test.h
deleted file mode 100644
index ad000af..0000000
--- a/libdbusmenu-glib/test.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-void mysymbol (void);