Re: gtkmarshal.h? [PATCH]



OK, Here's my patch to fix the situation. I've omitted some 
3000 lines of changes to widgets to s/gtk_marshal/_gtk_marshal/
and add gtkmarshal.h includes.

What it does is:

 - Generates all marshalers as _gtk_marshal
 - Doesn't install or include gtkmarshal.h
 - Uses a separate list of "compat marshals" to generate gtkmarshalcompat.h
   which is installed and included from gtksignal.h. This list is
   exactly that from gtk-1.2 with the exceptions of a few marshallers
   with the type C_CALLBACK which is no longer supported at all.

I probably should have gone with gtkmarshalintern.h and gtkmarshal.h
for the compat header in case people are including gtkmarshal.h
directly, but I'm not sure I have the energy to go and change that
at this point ;-)
 
Regards,
                                        Owen

Index: gtk/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/Makefile.am,v
retrieving revision 1.189
diff -u -p -u -r1.189 Makefile.am
--- gtk/Makefile.am	2001/10/29 21:50:05	1.189
+++ gtk/Makefile.am	2001/11/05 21:33:34
@@ -409,7 +409,7 @@ endif
 
 # built sources that get installed with the header files
 gtk_built_public_sources = @STRIP_BEGIN@ \
-	gtkmarshal.h		\
+	gtkmarshalcompat.h	\
 	gtktypebuiltins.h	\
 @STRIP_END@
 # built sources that don't get installed
@@ -421,6 +421,8 @@ gtk_built_sources = @STRIP_BEGIN@ \
 	gtktypebuiltins_ids.c	\
 	gtktypebuiltins_evals.c	\
 	gtkmarshal.c		\
+	gtkmarshal.h		\
+	gtkmarshalcompat.c	\
 	gtk.defs		\
 	${gtk_built_public_sources} \
 @STRIP_END@
@@ -485,7 +487,7 @@ $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ 
 	   *) glib_genmarshal= GLIB_GENMARSHAL@ ;;							\
 	esac;												\
 	cd $(srcdir) \
-	&& $$glib_genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
+	&& $$glib_genmarshal --prefix=_gtk_marshal gtkmarshal.list --header >> xgen-gmh \
 	&& (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
 	&& rm -f xgen-gmh xgen-gmh~ \
 	&& echo timestamp > $(@F)
@@ -495,9 +497,29 @@ $(srcdir)/gtkmarshal.c: @REBUILD@ $(srcd
 	   *) glib_genmarshal= GLIB_GENMARSHAL@ ;;							\
 	esac;												\
 	cd $(srcdir) \
-	&& $$glib_genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
+	&& $$glib_genmarshal --prefix=_gtk_marshal gtkmarshal.list --body >> xgen-gmc \
 	&& cp xgen-gmc gtkmarshal.c \
 	&& rm -f xgen-gmc xgen-gmc~
+$(srcdir)/gtkmarshalcompat.h: @REBUILD@ gtkmarshalcompat.list
+	case @GLIB_GENMARSHAL@ in									\
+	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
+	   *) glib_genmarshal= GLIB_GENMARSHAL@ ;;							\
+	esac;												\
+	cd $(srcdir) \
+	&& echo "#ifndef GTK_DISABLE_DEPRECATED" > xgen-gmch						\
+        && $$glib_genmarshal --prefix=gtk_marshal gtkmarshalcompat.list --header >> xgen-gmch 		\
+	&& echo "#endif /* GTK_DISABLE_DEPRECATED */" >> xgen-gmch					\
+	&& cp xgen-gmch gtkmarshalcompat.h \
+	&& rm -f xgen-gmch xgen-gmch~
+$(srcdir)/gtkmarshalcompat.c: @REBUILD@ gtkmarshalcompat.h
+	case @GLIB_GENMARSHAL@ in									\
+	   .*) glib_genmarshal=`pwd`/@GLIB_GENMARSHAL@ ;;				\
+	   *) glib_genmarshal= GLIB_GENMARSHAL@ ;;							\
+	esac;												\
+	cd $(srcdir) \
+	&& $$glib_genmarshal --prefix=gtk_marshal gtkmarshalcompat.list --body >> xgen-gmcc \
+	&& cp xgen-gmcc gtkmarshalcompat.c \
+	&& rm -f xgen-gmcc xgen-gmcc~
 $(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk $(srcdir)/stamp-gtk.defs gtktypebuiltins.h
 	cd $(srcdir) \
 	&& LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
Index: gtk/gtkmarshal.list
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmarshal.list,v
retrieving revision 1.41
diff -u -p -u -r1.41 gtkmarshal.list
--- gtk/gtkmarshal.list	2001/11/04 19:57:17	1.41
+++ gtk/gtkmarshal.list	2001/11/05 21:33:35
@@ -30,9 +30,8 @@ BOOLEAN:OBJECT,BOXED,BOXED
 BOOLEAN:INT,INT
 BOOLEAN:VOID
 BOOLEAN:BOOLEAN
-ENUM:ENUM
 INT:POINTER
-NONE:BOOL
+NONE:BOOLEAN
 NONE:ENUM
 NONE:INT
 NONE:INT,INT
@@ -45,16 +44,13 @@ VOID:BOOLEAN,BOOLEAN,BOOLEAN
 VOID:BOXED
 VOID:BOXED,BOXED
 VOID:BOXED,BOXED,POINTER
-VOID:BOXED,POINTER
 VOID:BOXED,OBJECT
 VOID:BOXED,STRING,INT
 VOID:BOXED,UINT
-VOID:BOXED,UINT,FLAGS
 VOID:BOXED,UINT,UINT
 VOID:ENUM
-VOID:ENUM,ENUM
 VOID:ENUM,FLOAT
-VOID:ENUM,FLOAT,BOOL
+VOID:ENUM,FLOAT,BOOLEAN
 VOID:ENUM,INT
 VOID:ENUM,INT,BOOLEAN
 VOID:INT
@@ -78,7 +74,6 @@ VOID:POINTER,UINT
 VOID:STRING
 VOID:STRING,STRING
 VOID:STRING,INT,POINTER
-VOID:UINT,BOXED,UINT,FLAGS,FLAGS
 VOID:UINT,OBJECT,UINT,FLAGS,FLAGS
 VOID:UINT,STRING
 VOID:VOID
Index: gtk/gtksignal.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtksignal.h,v
retrieving revision 1.38
diff -u -p -u -r1.38 gtksignal.h
--- gtk/gtksignal.h	2001/10/22 14:31:05	1.38
+++ gtk/gtksignal.h	2001/11/05 21:33:36
@@ -30,14 +30,13 @@
 
 #include <gtk/gtkenums.h>
 #include <gtk/gtkobject.h>
-#include <gtk/gtkmarshal.h>
+#include <gtk/gtkmarshalcompat.h>
 
-
 G_BEGIN_DECLS
   
 #ifndef GTK_DISABLE_DEPRECATED
 
-#define	gtk_signal_default_marshaller	gtk_marshal_VOID__VOID
+#define	gtk_signal_default_marshaller	g_cclosure_marshal_VOID__VOID
 
 
 /* --- compat defines --- */
Index: gtkmarshalcompat.list
===================================================================
RCS file: gtkmarshalcompat.list
diff -N gtkmarshalcompat.list
--- /dev/null	Tue May  5 16:32:27 1998
+++ gtkmarshalcompat.list	Mon Nov  5 16:36:37 2001
@@ -0,0 +1,36 @@
+BOOL:NONE
+BOOL:POINTER
+BOOL:POINTER,POINTER,INT,INT
+BOOL:POINTER,INT,INT
+BOOL:POINTER,INT,INT,UINT
+BOOL:POINTER,STRING,STRING,POINTER
+ENUM:ENUM
+INT:POINTER
+INT:POINTER,CHAR,CHAR
+NONE:BOOL
+NONE:BOXED
+NONE:ENUM
+NONE:ENUM,FLOAT
+NONE:ENUM,FLOAT,BOOL
+NONE:INT
+NONE:INT,INT
+NONE:INT,INT,POINTER
+NONE:NONE
+NONE:OBJECT
+NONE:POINTER
+NONE:POINTER,INT
+NONE:POINTER,POINTER
+NONE:POINTER,POINTER,POINTER
+NONE:POINTER,STRING,STRING
+NONE:POINTER,UINT
+NONE:POINTER,UINT,ENUM
+NONE:POINTER,POINTER,UINT,UINT
+NONE:POINTER,INT,INT,POINTER,UINT,UINT
+NONE:POINTER,UINT,UINT
+NONE:POINTER,UINT,UINT
+NONE:STRING
+NONE:STRING,INT,POINTER
+NONE:UINT
+NONE:UINT,POINTER,UINT,ENUM,ENUM,POINTER
+NONE:UINT,POINTER,UINT,UINT,ENUM
+NONE:UINT,STRING



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]