aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-05-20 11:31:54 +0200
committerTed Gould <ted@canonical.com>2009-05-20 11:31:54 +0200
commit3cd0f472e1e79d185681b87dced59559de9df4ff (patch)
tree0bc43325a720add7f9f697b69a9cc377c7efb54a /libdbusmenu-gtk
parentc645d1c4e08f8c92d0c8fde7c609aa25892cf6f8 (diff)
downloadlibdbusmenu-3cd0f472e1e79d185681b87dced59559de9df4ff.tar.gz
libdbusmenu-3cd0f472e1e79d185681b87dced59559de9df4ff.tar.bz2
libdbusmenu-3cd0f472e1e79d185681b87dced59559de9df4ff.zip
Cleaning up the name space and making it clear where we are. Now we have an object
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/menu.c46
-rw-r--r--libdbusmenu-gtk/menu.h33
2 files changed, 42 insertions, 37 deletions
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c
index 420414a..8e4f53b 100644
--- a/libdbusmenu-gtk/menu.c
+++ b/libdbusmenu-gtk/menu.c
@@ -6,46 +6,54 @@
#include "menu.h"
-typedef struct _MenuPrivate MenuPrivate;
+typedef struct _DbusmenuGtkMenuPrivate DbusmenuGtkMenuPrivate;
-struct _MenuPrivate
+struct _DbusmenuGtkMenuPrivate
{
};
-#define MENU_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), MENU_TYPE, MenuPrivate))
+#define DBUSMENU_GTKMENU_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_GTKMENU_TYPE, DbusmenuGtkMenuPrivate))
-static void menu_class_init (MenuClass *klass);
-static void menu_init (Menu *self);
-static void menu_dispose (GObject *object);
-static void menu_finalize (GObject *object);
+static void dbusmenu_gtkmenu_class_init (DbusmenuGtkMenuClass *klass);
+static void dbusmenu_gtkmenu_init (DbusmenuGtkMenu *self);
+static void dbusmenu_gtkmenu_dispose (GObject *object);
+static void dbusmenu_gtkmenu_finalize (GObject *object);
-G_DEFINE_TYPE (Menu, menu, GTK_TYPE_MENU);
+G_DEFINE_TYPE (DbusmenuGtkMenu, dbusmenu_gtkmenu, GTK_TYPE_MENU);
static void
-menu_class_init (MenuClass *klass)
+dbusmenu_gtkmenu_class_init (DbusmenuGtkMenuClass *klass)
{
-GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
-g_type_class_add_private (klass, sizeof (MenuPrivate));
+ g_type_class_add_private (klass, sizeof (DbusmenuGtkMenuPrivate));
-object_class->dispose = menu_dispose;
-object_class->finalize = menu_finalize;
+ object_class->dispose = dbusmenu_gtkmenu_dispose;
+ object_class->finalize = dbusmenu_gtkmenu_finalize;
+
+ return;
}
static void
-menu_init (Menu *self)
+dbusmenu_gtkmenu_init (DbusmenuGtkMenu *self)
{
+
+ return;
}
static void
-menu_dispose (GObject *object)
+dbusmenu_gtkmenu_dispose (GObject *object)
{
-G_OBJECT_CLASS (menu_parent_class)->dispose (object);
+
+ G_OBJECT_CLASS (dbusmenu_gtkmenu_parent_class)->dispose (object);
+ return;
}
static void
-menu_finalize (GObject *object)
+dbusmenu_gtkmenu_finalize (GObject *object)
{
-G_OBJECT_CLASS (menu_parent_class)->finalize (object);
+
+ G_OBJECT_CLASS (dbusmenu_gtkmenu_parent_class)->finalize (object);
+ return;
}
diff --git a/libdbusmenu-gtk/menu.h b/libdbusmenu-gtk/menu.h
index 783737a..6d9c6ff 100644
--- a/libdbusmenu-gtk/menu.h
+++ b/libdbusmenu-gtk/menu.h
@@ -1,32 +1,29 @@
-#ifndef __MENU_H__
-#define __MENU_H__
+#ifndef __DBUSMENU_GTKMENU_H__
+#define __DBUSMENU_GTKMENU_H__
#include <glib.h>
#include <glib-object.h>
G_BEGIN_DECLS
-#define MENU_TYPE (menu_get_type ())
-#define MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MENU_TYPE, Menu))
-#define MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MENU_TYPE, MenuClass))
-#define IS_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MENU_TYPE))
-#define IS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MENU_TYPE))
-#define MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MENU_TYPE, MenuClass))
+#define DBUSMENU_GTKMENU_TYPE (dbusmenu_gtkmenu_get_type ())
+#define DBUSMENU_GTKMENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_GTKMENU_TYPE, DbusmenuGtkMenu))
+#define DBUSMENU_GTKMENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_GTKMENU_TYPE, DbusmenuGtkMenuClass))
+#define DBUSMENU_IS_GTKMENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_GTKMENU_TYPE))
+#define DBUSMENU_IS_GTKMENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_GTKMENU_TYPE))
+#define DBUSMENU_GTKMENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_GTKMENU_TYPE, DbusmenuGtkMenuClass))
-typedef struct _Menu Menu;
-typedef struct _MenuClass MenuClass;
-
-struct _MenuClass
-{
-GtkMenuClass parent_class;
+typedef struct _DbusmenuGtkMenuClass DbusmenuGtkMenuClass;
+struct _DbusmenuGtkMenuClass {
+ GtkMenuClass parent_class;
};
-struct _Menu
-{
-GtkMenu parent;
+typedef struct _DbusmenuGtkMenu DbusmenuGtkMenu;
+struct _DbusmenuGtkMenu {
+ GtkMenu parent;
};
-GType menu_get_type (void);
+GType dbusmenu_gtkmenu_get_type (void);
G_END_DECLS