Re: [GtkGLExt] GObject Introspection
- From: "B. Clausius" <barcc gmx de>
- To: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] GObject Introspection
- Date: Thu, 24 May 2012 00:43:41 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have a new patch. compared what gtk does [1][2] and picked up some
minor things.
Am 22.05.2012 18:50, schrieb Thomas Zimmermann:
> Hi,
>
> Thank you for the patch!
>
> You can find a review below. Please address the points and I'll put
> your patch into my tree. For submitting your patch and writing a
> commit message, please follow the guide at [1].
>
>
>> === modified file 'Makefile.am' --- Makefile.am 2012-03-13
>> 20:40:48 +0000 +++ Makefile.am 2012-05-22 09:22:18 +0000 @@ -4,7
>> +4,7 @@ SUBDIRS = gdk gtk docs examples
>>
>> ACLOCAL_AMFLAGS = -I m4macros -DISTCHECK_CONFIGURE_FLAGS =
>> --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
>> --enable-introspection
>>
>> EXTRA_DIST = \ README.win32 \
>>
>> === modified file 'configure.ac' --- configure.ac
>> 2012-03-13 20:40:48 +0000 +++ configure.ac 2012-05-22
>> 09:22:18 +0000 @@ -114,6 +114,12 @@ AC_PATH_PROGS([PERL], [perl5
>> perl])
>>
>> ################################################## +# GObject
>> introspection
>> +################################################## +
>> +GOBJECT_INTROSPECTION_CHECK([1.30.0]) +
>> +################################################## # Checks for
>> gtk-doc and docbook-tools
>> ##################################################
>>
>>
>> === modified file 'gdk/Makefile.am' --- gdk/Makefile.am
>> 2012-03-26 18:49:10 +0000 +++ gdk/Makefile.am 2012-05-22
>> 09:22:18 +0000 @@ -4,6 +4,8 @@ SUBDIRS = $(GDKGLEXT_BACKENDS)
>> DIST_SUBDIRS = x11 win32
>>
>> +CLEANFILES = +
>
> Why is this empty? Either this is missing a value, or it shouldn't
> be here at all. If you need to clear CLEANFILES here, put a comment
> above that says why.
This is a matter of style. Either empty it at beginning and fill it
with += later as gtk does [1][2] or set it with = when is first used.
Now I've done the latter.
>>
>> EXTRA_DIST = \ gdkglversion.h.in \ gdkglext.def @@ -177,5
>> +179,49 @@ gtkglenumtypes.c.template
>>
>> # +# Introspection +# + +-include $(INTROSPECTION_MAKEFILE)
>> +INTROSPECTION_GIRS = +INTROSPECTION_SCANNER_ARGS =
>> +INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) + +if
>> HAVE_INTROSPECTION +introspection_sources = \ +
>> $(filter-out gdkgldebug.h gdkglglext.h, $(gdkglext_headers)) \ +
>> $(gdkglext_c_sources) \ + $(gdkglext_built_c_sources) + +if
>> USE_X11 +introspection_sources += \ + x11/gdkglconfig-x11.c
>> \ + x11/gdkglcontext-x11.c \ + x11/gdkglquery-x11.c
>> \ + x11/gdkglwindow-x11.c +endif # USE_X11 +
>> +GdkGLExt-1.0.gir: $(gdkglext_targetlib)
>> +GdkGLExt_1_0_gir_INCLUDES = Gdk-3.0
>> +GdkGLExt_1_0_gir_SCANNERFLAGS = \ + --warn-all \ +
>> --identifier-prefix=GdkGL \ + --symbol-prefix=gdk_gl \ +
>> --symbol-prefix=gdk +GdkGLExt_1_0_gir_CFLAGS =
>> $(common_includes) +GdkGLExt_1_0_gir_LIBS =
>> $(gdkglext_targetlib) +GdkGLExt_1_0_gir_FILES =
>> $(introspection_sources) +INTROSPECTION_GIRS += GdkGLExt-1.0.gir
>
> I don't know much about introspection, but I'd expect the version
> numbers to match the major and minor version of the source code,
> right? All these GdkGLExt_1.0_*s and friends should then be
> replaced by GdkGLExt_@API_MJ@_@API_MI@_*.
done
>
>
>> + +girdir = $(datadir)/gir-1.0 +gir_DATA = $(INTROSPECTION_GIRS)
>> + +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA =
>> $(INTROSPECTION_GIRS:.gir=.typelib) + +CLEANFILES += $(gir_DATA)
>> $(typelib_DATA) +endif # HAVE_INTROSPECTION + +# # Extra rules #
>>
...
>> === modified file 'gtk/gtkglwidget.c'
>>
>
> I don't like patches that touch too many unrelated files. There
> should be separate patch for the C file before the build-system
> patch.
>
This one line was just to get the Python example running, but I will
fix more annotations.
>>
>> --- gtk/gtkglwidget.c 2012-03-22 17:42:49 +0000 +++
>> gtk/gtkglwidget.c 2012-05-22 09:26:58 +0000 @@ -235,7 +235,7
>> @@ * gtk_widget_set_gl_capability: * @widget: the #GtkWidget to
>> be used as the rendering area. * @glconfig: a #GdkGLConfig. - *
>> @share_list: the #GdkGLContext with which to share display lists
>> and texture + * @share_list: (allow-none): the #GdkGLContext with
>> which to share display lists and texture * objects.
>> NULL indicates that no sharing is to take place. * @direct:
>> whether rendering is to be done with a direct connection to *
>> the graphics system.
>
>
> Best regards Thomas
>
> [1] https://live.gnome.org/GnomeLove/SubmittingPatches
>
>
>
>
>
> _______________________________________________ gtkglext-list
> mailing list gtkglext-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkglext-list
Thanks for the review.
Best regards, B.C.
[1] http://git.gnome.org/browse/gtk+/tree/gdk/Makefile.am#n187
[2] http://git.gnome.org/browse/gtk+/tree/gtk/Makefile.am#n1224
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJPvWgcAAoJEEDg0A3D0GN4DN4P/29B6BQet363pDCtqx1yNYch
A5gAwps0anvFiG8/cW//fQ4Diba/Ki6994vq2+Kok+45veSDF5gXMtONG/teF/C9
8jUdC3BMcofy6r3C+98udxZxF2u5+1GPCY1Q25pD4maFergQvpQHeNFUljE6qTcg
gZRfynWZ3iYbXgWi3iCHWQHss3Rcc+07L2Naah5pyq2FQtuiI2MBKhMKxLtBxQ2X
4lOGDpfEzVFy9Idio9my5FEb8w8rVK8wbRWatQvRY6X+YRvH+P38uGu0LX8ouWmR
OURqx1Cjohg3p+sippVQQrOyQBPI2APQJY6bPYLAhpc7u/qGWVAdvO1B7TZm2Mwf
Wsc9kIKfpHRx/qQ4clEAL5s7Y86B9hRG5sTJ0hUzWtbbyPwoNz6qWg/sLcGPP5dv
fF0sixx6cJlyk0Nsy9UkaEUmggbFPjDUgg2kulIHqzKvDARYumWkDNoJ2YIga+lS
0yk7miUl0x3cukM/mvzoCwkiKoW+hCEBY5VHgVSw5a8uaLH3nswY7M0Ujc+nuyey
L2DpegDpKOuiN/5If5KsKGAM95o81JWVwI3EoVmPJBPT3xx4OyEol793dYFxdfZI
31cni0Dp5ij22Ag4VSQHhsbU7KuLCzRys3gIBb0RxXzwz+mkgt1oC+RlfEnj02aI
lw9KKokHo7kpII6wR4r9
=OBYQ
-----END PGP SIGNATURE-----
>From 59cb33dad9cfcb817df9ebff60706f7824daa443 Mon Sep 17 00:00:00 2001
From: "B. Clausius" <barcc gmx de>
Date: Wed, 23 May 2012 23:27:57 +0200
Subject: [PATCH] added gobject-introspection support
These files are built:
gdk/GdkGLExt-3.0.gir
gdk/GdkGLExt-3.0.typelib
gtk/GtkGLExt-3.0.gir
gtk/GtkGLExt-3.0.typelib
---
Makefile.am | 2 +-
configure.ac | 6 ++++++
gdk/Makefile.am | 43 +++++++++++++++++++++++++++++++++++++++++++
gtk/Makefile.am | 34 ++++++++++++++++++++++++++++++++++
4 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 1dcce16..dfce0b0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@
SUBDIRS = gdk gtk docs examples
ACLOCAL_AMFLAGS = -I m4macros
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
EXTRA_DIST = \
README.win32 \
diff --git a/configure.ac b/configure.ac
index 4683250..80d85b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,12 @@ AC_PROG_LN_S
AC_PATH_PROGS([PERL], [perl5 perl])
##################################################
+# GObject introspection
+##################################################
+
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
+##################################################
# Checks for gtk-doc and docbook-tools
##################################################
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index b74c8ec..c04ffe5 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -177,5 +177,48 @@ EXTRA_DIST += \
gtkglenumtypes.c.template
#
+# Introspection
+#
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+ $(filter-out gdkgldebug.h gdkglglext.h, $(gdkglext_headers)) \
+ $(gdkglext_c_sources) \
+ $(gdkglext_built_c_sources)
+
+if USE_X11
+introspection_sources += \
+ x11/gdkglconfig-x11.c \
+ x11/gdkglcontext-x11.c \
+ x11/gdkglquery-x11.c \
+ x11/gdkglwindow-x11.c
+endif # USE_X11
+
+GdkGLExt-@API_MJ@.@API_MI@.gir: $(gdkglext_targetlib) Makefile
+GdkGLExt_@API_MJ@_@API_MI@_gir_SCANNERFLAGS = \
+ --identifier-prefix=GdkGL \
+ --symbol-prefix=gdk_gl \
+ --symbol-prefix=gdk
+GdkGLExt_@API_MJ@_@API_MI@_gir_INCLUDES = Gdk-3.0
+GdkGLExt_@API_MJ@_@API_MI@_gir_LIBS = $(gdkglext_targetlib)
+GdkGLExt_@API_MJ@_@API_MI@_gir_FILES = $(introspection_sources)
+GdkGLExt_@API_MJ@_@API_MI@_gir_CFLAGS = $(AM_CPPFLAGS)
+INTROSPECTION_GIRS += GdkGLExt-@API_MJ@.@API_MI@.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
+endif # HAVE_INTROSPECTION
+
+#
# Extra rules
#
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index fe41c27..2e09e38 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -84,3 +84,37 @@ lib_LTLIBRARIES = libgtkglext-@API_MJ@.@API_MI@.la
libgtkglext_@API_MJ@_@API_MI@_la_SOURCES = $(gtkglext_sources)
libgtkglext_@API_MJ@_@API_MI@_la_LDFLAGS = $(common_ldflags)
libgtkglext_@API_MJ@_@API_MI@_la_LIBADD = $(common_libadd)
+
+#
+# Introspection
+#
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=../gdk --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=../gdk
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+ $(gtkglext_public_h_sources) \
+ $(gtkglext_c_sources)
+
+GtkGLExt-@API_MJ@.@API_MI@.gir: $(gtkglext_targetlib) Makefile
+GtkGLExt_@API_MJ@_@API_MI@_gir_SCANNERFLAGS = \
+ --identifier-prefix=GtkGL \
+ --symbol-prefix=gtk_gl \
+ --symbol-prefix=gtk
+GtkGLExt_@API_MJ@_@API_MI@_gir_INCLUDES = Gtk-3.0 GdkGLExt-@API_MJ@.@API_MI@
+GtkGLExt_@API_MJ@_@API_MI@_gir_LIBS = $(gtkglext_targetlib)
+GtkGLExt_@API_MJ@_@API_MI@_gir_FILES = $(introspection_sources)
+GtkGLExt_@API_MJ@_@API_MI@_gir_CFLAGS = $(AM_CPPFLAGS)
+INTROSPECTION_GIRS += GtkGLExt-@API_MJ@.@API_MI@.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
+endif # HAVE_INTROSPECTION
--
1.7.9.5
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]