On 1/20/06, Matthias Clasen <[EMAIL PROTECTED]> wrote: > The patch looks ok in general, some comments: > > --- ../../gtk/gtkplug-stub.c.orig 2006-01-08 21:52:05.000000000 +0100 > +++ ../../gtk/gtkplug-stub.c 2006-01-08 21:53:14.000000000 +0100 > @@ -25,6 +25,7 @@ > * GTK+ at ftp://ftp.gtk.org/pub/gtk/. > */ > > +#include <gtk.h> > #include "gtkplugprivate.h" > > GdkNativeWindow > =================================================================== > --- ../../gtk/gtksocket-stub.c.orig 2006-01-08 21:53:36.000000000 +0100 > +++ ../../gtk/gtksocket-stub.c 2006-01-08 21:54:20.000000000 +0100 > @@ -25,6 +25,7 @@ > * GTK+ at ftp://ftp.gtk.org/pub/gtk/. > */ > > +#include <gtk.h> > #include "gtksocketprivate.h" > > > > Why is this necessary ? gtk sources usually just include the > individual headers they need. > > I fixed this now only include #include "gtksocket.h"
> > =================================================================== > --- ../../gdk/gdk.symbols.orig 2006-01-08 21:40:54.000000000 +0100 > +++ ../../gdk/gdk.symbols 2006-01-08 21:43:29.000000000 +0100 > @@ -326,10 +326,10 @@ > #if IN_FILE(__GDK_COLOR_X11_C__) > gdk_colormap_new > gdk_colormap_get_type G_GNUC_CONST > +#ifndef GDK_DISABLE_DEPRECATED > gdk_colormap_change > gdk_colors_alloc > gdk_colors_free > -#ifndef GDK_DISABLE_DEPRECATED > gdk_colormap_get_system_size > gdk_color_change > #endif > @@ -530,6 +530,8 @@ > gdk_drawable_ref > gdk_drawable_unref > gdk_draw_string > +gdk_draw_text > +gdk_draw_text_wc > #endif > gdk_drawable_get_depth > gdk_drawable_get_display > @@ -553,8 +555,6 @@ > gdk_draw_polygon > gdk_draw_rectangle > gdk_draw_segments > -gdk_draw_text > -gdk_draw_text_wc > gdk_draw_trapezoids > #endif > #endif > @@ -806,12 +806,15 @@ > > > These are independent bugfixes > > > @@ -806,12 +806,15 @@ > gdk_keymap_get_for_display > gdk_keymap_lookup_key > gdk_keymap_translate_keyboard_state > +#ifndef GDK_WINDOWING_DIRECTFB > gdk_keyval_convert_case > +#endif > gdk_keyval_from_name > gdk_keyval_name G_GNUC_CONST > #endif > #endif > > > The directfb backend needs to implement gdk_keyval_convert_case. > > The problem is in the file gdkkeys.c this is defined and does not compile with the original strategy. In my case HAVE_XCONVERTCASE is not defined. Now this ifdef could be moved int the x11 implementation and I could use the same fallback implementation. The win32 backend does not define it either it uses the fallback. Since the directfb backend is following the x11 one for the most part. I'm not sure how else to get this to work. Maybe use HAVE_XCONVERTCASE ? #ifndef HAVE_XCONVERTCASE #include "gdkkeysyms.h" /* compatibility function from X11R6.3, since XConvertCase is not * supplied by X11R5. */ /** * gdk_keyval_convert_case: * @symbol: a keyval * @lower: return location for lowercase version of @symbol * @upper: return location for uppercase version of @symbol * * Obtains the upper- and lower-case versions of the keyval @symbol. * Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc. * **/ void gdk_keyval_convert_case (guint symbol, guint *lower, guint *upper) >+if $gdktarget" = "xdirectfb"; then > + DIRECTFB_REQUIRED_VERSION=0.9.21 > + AC_MSG_CHECKING(for DirectFB) > + > + if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then > + AC_MSG_RESULT(found) > + GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags directfb` $GDK_EXTRA_CFLAGS" > + GDK_EXTRA_LIBS="`$PKG_CONFIG --libs directfb` $GDK_EXTRA_LIBS" > + else > + AC_MSG_ERROR([ > +*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest > +*** version of DirectFB is always available from http://www.directfb.org/. > + > > > The definition of DIRECTFB_REQUIRED_VERSION should probably be move up to the > other required versions at the top of configure.in. > Moved it. > > Matthias > Attached is a new patch that address everything but the gdk_keyval_convert_case problem. Mike
--- ../../docs/tools/Makefile.am.orig 2006-01-08 21:50:30.000000000 +0100 +++ ../../docs/tools/Makefile.am 2006-01-08 21:51:22.000000000 +0100 @@ -17,7 +17,7 @@ $(top_builddir)/gtk/$(gtktargetlib) \ $(GTK_DEP_LIBS) -if OS_UNIX +if USE_X11 noinst_PROGRAMS = \ doc-shooter endif =================================================================== --- ../../gtk/Makefile.am.orig 2006-01-08 21:38:20.000000000 +0100 +++ ../../gtk/Makefile.am 2006-01-08 21:39:30.000000000 +0100 @@ -666,20 +666,23 @@ libgtk_x11_2_0_la_SOURCES = $(gtk_c_sources) libgtk_linux_fb_2_0_la_SOURCES = $(gtk_c_sources) libgtk_win32_2_0_la_SOURCES = $(gtk_c_sources) +libgtk_directfb_2_0_la_SOURCES = $(gtk_c_sources) libgtk_x11_2_0_la_LDFLAGS = $(libtool_opts) libgtk_linux_fb_2_0_la_LDFLAGS = $(libtool_opts) libgtk_win32_2_0_la_LDFLAGS = $(libtool_opts) +libgtk_directfb_2_0_la_LDFLAGS = $(libtool_opts) libgtk_x11_2_0_la_LIBADD = $(libadd) libgtk_linux_fb_2_0_la_LIBADD = $(libadd) libgtk_win32_2_0_la_LIBADD = $(libadd) -lole32 -lgdi32 libgtk_win32_2_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32_res) +libgtk_directfb_2_0_la_LIBADD = $(libadd) if USE_WIN32 libgtk_target_ldflags = $(gtk_win32_res_ldflag) $(gtk_win32_symbols) endif -EXTRA_LTLIBRARIES = libgtk-x11-2.0.la libgtk-linux-fb-2.0.la libgtk-win32-2.0.la +EXTRA_LTLIBRARIES = libgtk-x11-2.0.la libgtk-linux-fb-2.0.la libgtk-win32-2.0.la libgtk-directfb-2.0.la install-exec-hook: if DISABLE_EXPLICIT_DEPS =================================================================== --- ../../gtk/gtkplug-stub.c.orig 2006-01-08 21:52:05.000000000 +0100 +++ ../../gtk/gtkplug-stub.c 2006-01-08 21:53:14.000000000 +0100 @@ -25,6 +25,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include <gtk.h> #include "gtkplugprivate.h" GdkNativeWindow =================================================================== --- ../../gtk/gtksocket-stub.c.orig 2006-01-08 21:53:36.000000000 +0100 +++ ../../gtk/gtksocket-stub.c 2006-01-08 21:54:20.000000000 +0100 @@ -25,6 +25,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include <gtk.h> #include "gtksocketprivate.h" GdkNativeWindow =================================================================== --- ../../gdk/gdk.symbols.orig 2006-01-08 21:40:54.000000000 +0100 +++ ../../gdk/gdk.symbols 2006-01-08 21:43:29.000000000 +0100 @@ -326,10 +326,10 @@ #if IN_FILE(__GDK_COLOR_X11_C__) gdk_colormap_new gdk_colormap_get_type G_GNUC_CONST +#ifndef GDK_DISABLE_DEPRECATED gdk_colormap_change gdk_colors_alloc gdk_colors_free -#ifndef GDK_DISABLE_DEPRECATED gdk_colormap_get_system_size gdk_color_change #endif @@ -530,6 +530,8 @@ gdk_drawable_ref gdk_drawable_unref gdk_draw_string +gdk_draw_text +gdk_draw_text_wc #endif gdk_drawable_get_depth gdk_drawable_get_display @@ -553,8 +555,6 @@ gdk_draw_polygon gdk_draw_rectangle gdk_draw_segments -gdk_draw_text -gdk_draw_text_wc gdk_draw_trapezoids #endif #endif @@ -806,12 +806,15 @@ gdk_keymap_get_for_display gdk_keymap_lookup_key gdk_keymap_translate_keyboard_state +#ifndef GDK_WINDOWING_DIRECTFB gdk_keyval_convert_case +#endif gdk_keyval_from_name gdk_keyval_name G_GNUC_CONST #endif #endif + #if IN_HEADER(__GDK_VISUAL_H__) #if IN_FILE(__GDK_VISUAL_C__) gdk_list_visuals =================================================================== --- ../../gdk/Makefile.am.orig 2006-01-08 21:47:57.000000000 +0100 +++ ../../gdk/Makefile.am 2006-01-08 21:49:51.000000000 +0100 @@ -1,7 +1,7 @@ ## Makefile.am for gtk+/gdk SUBDIRS = $(gdktarget) -DIST_SUBDIRS = linux-fb win32 x11 +DIST_SUBDIRS = directfb linux-fb win32 x11 EXTRA_DIST = \ keynames.txt \ @@ -134,6 +134,11 @@ gdkenumtypes.c \ gdkmarshalers.h +libgdk_directfb_2_0_la_SOURCES = $(common_sources) +libgdk_directfb_2_0_la_LIBADD = directfb/libgdk-directfb.la $(GDK_DEP_LIBS) \ + $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la +libgdk_directfb_2_0_la_LDFLAGS = $(LDADD) + libgdk_x11_2_0_la_SOURCES = $(common_sources) libgdk_x11_2_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS) \ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la @@ -198,7 +203,7 @@ lib_LTLIBRARIES = $(gdktargetlib) -EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la +EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-directfb-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la MAINTAINERCLEANFILES = gdkenumtypes.h stamp-gdkenumtypes.h gdkenumtypes.c \ gdkmarshalers.h gdkmarshalers.c =================================================================== --- ../../configure.in.orig 2006-01-08 21:04:07.000000000 +0100 +++ ../../configure.in 2006-01-08 21:08:05.000000000 +0100 @@ -224,13 +224,13 @@ gdktarget=x11 fi -AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select non-default GDK target], +AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/directfb/win32]] select non-default GDK target], gdktarget=$with_gdktarget) AC_SUBST(gdktarget) case $gdktarget in - x11|linux-fb|win32) ;; - *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb or win32.]);; + x11|linux-fb|directfb|win32) ;; + *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb, directfb or win32.]);; esac gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la @@ -1351,6 +1351,27 @@ AM_CONDITIONAL(ENABLE_FB_MANAGER, false) fi +if test "x$gdktarget" = "xdirectfb"; then + DIRECTFB_REQUIRED_VERSION=0.9.21 + AC_MSG_CHECKING(for DirectFB) + + if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then + AC_MSG_RESULT(found) + GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags directfb` $GDK_EXTRA_CFLAGS" + GDK_EXTRA_LIBS="`$PKG_CONFIG --libs directfb` $GDK_EXTRA_LIBS" + else + AC_MSG_ERROR([ +*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest +*** version of DirectFB is always available from http://www.directfb.org/. + ]) + fi + + AM_CONDITIONAL(USE_DIRECTFB, true) +else + AM_CONDITIONAL(USE_DIRECTFB, false) +fi + + # Check for Pango flags if test "x$gdktarget" = "xwin32"; then @@ -1568,6 +1589,9 @@ gdk_windowing=' #define GDK_WINDOWING_FB #define GDK_NATIVE_WINDOW_POINTER' +elif test "x$gdktarget" = "xdirectfb" ; then + gdk_windowing=' +#define GDK_WINDOWING_DIRECTFB' fi if test x$gdk_wchar_h = xyes; then @@ -1624,6 +1648,7 @@ gdk/win32/rc/Makefile gdk/win32/rc/gdk.rc gdk/linux-fb/Makefile +gdk/directfb/Makefile gtk/Makefile gtk/makefile.msc gtk/gtkversion.h ===================================================================
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list