[cairo-commit] cairo-gtk-engine/src Makefile.am, 1.9, 1.10 caligula-rc-style.c, NONE, 1.1 caligula-rc-style.h, NONE, 1.1 caligula-style.c, NONE, 1.1 caligula-style.h, NONE, 1.1 caligula.c, 1.3, 1.4 caligula.h, NONE, 1.1

Carl Worth commit at pdx.freedesktop.org
Thu Feb 10 08:54:55 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo-gtk-engine/src
In directory gabe:/tmp/cvs-serv27817/src

Modified Files:
	Makefile.am caligula.c 
Added Files:
	caligula-rc-style.c caligula-rc-style.h caligula-style.c 
	caligula-style.h caligula.h 
Log Message:

        * src/caligula.c: Split file up into caligula-style.[ch] and
        caligula-rc-style.[ch] for easier maintainability. Fix to actually
        register the types to shut off the annoying: GLib-GObject-WARNING
        **: plugin 'caligula' failed to register type 'CaligulaRCStyle'

Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile.am	9 Feb 2005 22:49:54 -0000	1.9
+++ Makefile.am	10 Feb 2005 16:54:53 -0000	1.10
@@ -29,7 +29,11 @@
 	caligula-draw-grassy.c	 \
 	caligula-draw-grassy.h	 \
 	caligula-rand.c		 \
-	caligula-rand.h
+	caligula-rand.h		 \
+	caligula-rc-style.c	 \
+	caligula-rc-style.h	 \
+	caligula-style.c	 \
+	caligula-style.h
 
 libcaligula_la_LDFLAGS = \
 	-avoid-version -no-undefined -module	\

--- NEW FILE: caligula-rc-style.c ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: caligula-rc-style.h ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: caligula-style.c ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: caligula-style.h ---
(This appears to be a binary file; contents omitted.)

Index: caligula.c
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/caligula.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- caligula.c	9 Feb 2005 03:08:48 -0000	1.3
+++ caligula.c	10 Feb 2005 16:54:53 -0000	1.4
@@ -19,146 +19,24 @@
  * USA
  */
 
-#include <string.h>
-
-#include <gmodule.h>
-#include <gtk/gtk.h>
-
-#include "caligula-draw.h"
-
-GTypeModule *caligula_module;
-
-typedef struct _CaligulaStyle CaligulaStyle;
-struct _CaligulaStyle {
-  GtkStyle parent_instance;
-};
-
-typedef struct _CaligulaStyleClass CaligulaStyleClass;
-struct _CaligulaStyleClass {
-  GtkStyleClass parent_class;
-};
-
-#define CALIGULA_TYPE_STYLE		(caligula_style_get_type ())
-#define CALIGULA_STYLE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), CALIGULA_TYPE_STYLE, CaligulaStyle))
-#define CALIGULA_IS_STYLE(obj)	(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALIGULA_TYPE_STYLE))
-
-static void
-caligula_style_class_init (CaligulaStyleClass *klass)
-{
-    GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
-
-    style_class->draw_box = caligula_draw_box;
-}
-
-static GType
-caligula_style_get_type (void)
-{
-    static GType type;
-
-    if (type == 0)
-      {
-	static const GTypeInfo type_info = {
-	  sizeof (CaligulaStyleClass),
-	  (GBaseInitFunc) NULL,
-	  (GBaseFinalizeFunc) NULL,
-	  (GClassInitFunc) caligula_style_class_init,
-	  NULL,
-	  NULL,
-	  sizeof (CaligulaStyle),
-	  0,
-	  NULL,
-	};
-  
-	type = g_type_module_register_type (caligula_module,
-					    GTK_TYPE_STYLE,
-					    "CaligulaStyle",
-					    &type_info, 0);
-      }
-
-    return type;
-}
-
-typedef struct _CaligulaRcStyle CaligulaRcStyle;
-struct _CaligulaRcStyle {
-  GtkRcStyle parent_instance;
-};
-
-typedef struct _CaligulaRcStyleClass CaligulaRcStyleClass;
-struct _CaligulaRcStyleClass {
-  GtkRcStyleClass parent_class;
-};
-
-#define CALIGULA_TYPE_RC_STYLE		(caligula_rc_style_get_type ())
-#define CALIGULA_RC_STYLE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), CALIGULA_TYPE_RC_STYLE, CaligulaRcStyle))
-#define CALIGULA_IS_RC_STYLE(obj)	(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALIGULA_TYPE_RC_STYLE))
-
-static void      caligula_rc_style_class_init   (CaligulaRcStyleClass *klass);
-static GtkStyle *caligula_rc_style_create_style (GtkRcStyle           *style);
-
-static GType
-caligula_rc_style_get_type (void)
-{
-    static GType type;
-
-    if (type == 0)
-      {
-	  static const GTypeInfo type_info = {
-	    sizeof (CaligulaRcStyleClass),
-	    (GBaseInitFunc) NULL,
-	    (GBaseFinalizeFunc) NULL,
-	    (GClassInitFunc) caligula_rc_style_class_init,
-	    NULL,
-	    NULL,
-	    sizeof (CaligulaRcStyle),
-	    0,
-	    NULL
-	  };
-
-	  type = g_type_module_register_type (caligula_module,
-					      GTK_TYPE_RC_STYLE,
-					      "CaligulaRCStyle",
-					      &type_info, 0);
-      }
-
-    return type;
-}
-
-static void
-caligula_rc_style_class_init (CaligulaRcStyleClass *klass)
-{
-    GtkRcStyleClass *style_class = GTK_RC_STYLE_CLASS (klass);
-
-    style_class->create_style = caligula_rc_style_create_style;
-}
-
-static GtkStyle *
-caligula_rc_style_create_style (GtkRcStyle *style)
-{
-  return g_object_new (CALIGULA_TYPE_STYLE, NULL);
-}
-
-G_MODULE_EXPORT void
-theme_init (GTypeModule * module);
+#include "caligula.h"
+#include "caligula-style.h"
+#include "caligula-rc-style.h"
 
 G_MODULE_EXPORT void
 theme_init (GTypeModule * module)
 {
-  caligula_module = module;
+    caligula_rc_style_register_type (module);
+    caligula_style_register_type (module);
 }
 
 G_MODULE_EXPORT void
-theme_exit (GTypeModule * module);
-
-G_MODULE_EXPORT void
 theme_exit (GTypeModule * module)
 {
 }
 
 G_MODULE_EXPORT GtkRcStyle *
-theme_create_rc_style (void);
-
-G_MODULE_EXPORT GtkRcStyle *
 theme_create_rc_style (void)
 {
-  return g_object_new (CALIGULA_TYPE_RC_STYLE, NULL);
+    return g_object_new (CALIGULA_TYPE_RC_STYLE, NULL);
 }

--- NEW FILE: caligula.h ---
(This appears to be a binary file; contents omitted.)




More information about the cairo-commit mailing list