[maemo-commits] [maemo-commits] r8322 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop test

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Mon Nov 27 11:59:53 EET 2006
Author: moimart
Date: 2006-11-27 11:59:52 +0200 (Mon, 27 Nov 2006)
New Revision: 8322

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/libhildondesktop.h
   projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
Log:

        * libhildondesktop/libhildondesktop.h: Added macros for GTypeModule
        declarations
	* ChangeLog updated.



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-11-27 09:22:02 UTC (rev 8321)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2006-11-27 09:59:52 UTC (rev 8322)
@@ -1,10 +1,15 @@
-2006-11-23  Moises Martinez  <moises.martinzes at nokia.com>
+2006-11-27  Moises Martinez  <moises.martinzes at nokia.com>
 
+	* libhildondesktop/libhildondesktop.h: Added macros for GTypeModule 
+	declarations
+
+2006-11-24  Moises Martinez  <moises.martinzes at nokia.com>
+
 	* libhildonwm/hd-wm.c:
 	* libhildonwm/hd-wm-watched-window.c:
 	- Added more emission of signals for appswitchers
 
-2006-11-23  Moises Martinez  <moises.martinzes at nokia.com>
+2006-11-24  Moises Martinez  <moises.martinzes at nokia.com>
 
 	* libhildonwm/hd-wm.[ch]: Moved to a more consistent GObject behavior.
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/libhildondesktop.h
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/libhildondesktop.h	2006-11-27 09:22:02 UTC (rev 8321)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/libhildondesktop.h	2006-11-27 09:59:52 UTC (rev 8322)
@@ -40,6 +40,48 @@
 #include <libhildondesktop/hildon-thumb-menu-item.h>
 #include <libhildondesktop/hildon-home-applet.h>
 #include <libhildondesktop/hildon-home-area.h>
-#include <libhildondesktop/hildon-plugin-list.h>																																								
+#include <libhildondesktop/hildon-plugin-list.h>
+
+#define HD_DEFINE_PLUGIN(TN, t_n, T_P)
+
+#define HD_DEFINE_TYPE(TN, t_n, T_P) HD_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
+
+#define HD_DEFINE_TYPE_MODULE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \
+\
+static GType    type_name##_type_id = 0; \
+static void     type_name##_init              (TypeName        *self); \
+static void     type_name##_class_init        (TypeName##Class *klass); \
+static gpointer type_name##_parent_class = NULL; \
+static void     type_name##_class_intern_init (gpointer klass) \
+{ \
+  type_name##_parent_class = g_type_class_peek_parent (klass); \
+  type_name##_class_init ((TypeName##Class*) klass); \
+} \
+\
+GType \
+type_name##_get_type (GTypeModule *module) \
+{ \
+  if (G_UNLIKELY (type_name##_type_id == 0)) \
+  { \
+    static const GTypeInfo g_define_type_info = \
+    { \
+      sizeof (TypeName##Class), \
+      (GBaseInitFunc) NULL, \
+      (GBaseFinalizeFunc) NULL, \
+      (GClassInitFunc) type_name##_class_intern_init, \
+      (GClassFinalizeFunc) NULL, \
+      NULL,   /* class_data */ \
+      sizeof (TypeName), \
+      0,      /* n_preallocs */ \
+      (GInstanceInitFunc) type_name##_init, \
+      NULL    /* value_table */ \
+    }; \
+      g_define_type_id = \
+	g_type_module_register_type (module, TYPE_PARENT, g_intern_static_string (#TypeName), &g_define_type_info, (GTypeFlags) flags); \
+      { CODE ; } \
+  } \
+  return g_define_type_id; \
+}
+
 #endif/*__LIBDESKTOP_H__*/
 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c	2006-11-27 09:22:02 UTC (rev 8321)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/test/test4.c	2006-11-27 09:59:52 UTC (rev 8322)
@@ -3,7 +3,7 @@
 void 
 generic_callback (HDWM *hdwm, HDEntryInfo *info, gpointer data)
 {
-  g_debug ("ACTION: %s app name: %s",data,hd_entry_info_peek_app_name (info));
+  g_debug ("ACTION: %s app name: %s",data,hd_entry_info_get_title (info));
 }
 
 int 


More information about the maemo-commits mailing list