From: Alexander Larsson Date: Fri, 11 Feb 2011 14:27:54 +0000 (+0100) Subject: Merge branch 'master' into broadway X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=d4add8cefa6fa5c29bdb50f18e31cbfbfb38cc2b;hp=-c;p=~andy%2Fgtk Merge branch 'master' into broadway --- d4add8cefa6fa5c29bdb50f18e31cbfbfb38cc2b diff --combined configure.ac index bac94f563,d9fb2775b..417c3f29f --- a/configure.ac +++ b/configure.ac @@@ -8,10 -8,10 +8,10 @@@ # if backwards compatibility has been broken, # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0. - m4_define([gtk_major_version], [2]) - m4_define([gtk_minor_version], [99]) - m4_define([gtk_micro_version], [3]) - m4_define([gtk_interface_age], [0]) + m4_define([gtk_major_version], [3]) + m4_define([gtk_minor_version], [0]) + m4_define([gtk_micro_version], [1]) + m4_define([gtk_interface_age], [1]) m4_define([gtk_binary_age], [m4_eval(100 * gtk_minor_version + gtk_micro_version)]) m4_define([gtk_version], @@@ -38,22 -38,25 +38,25 @@@ AC_CONFIG_MACRO_DIR([m4] m4_define([gtk_binary_version], [3.0.0]) # required versions of other packages - m4_define([glib_required_version], [2.27.5]) + m4_define([glib_required_version], [2.28.0]) m4_define([pango_required_version], [1.20]) - m4_define([atk_required_version], [1.29.2]) + m4_define([atk_required_version], [1.30]) m4_define([cairo_required_version], [1.10.0]) - m4_define([gdk_pixbuf_required_version], [2.21.0]) + m4_define([gdk_pixbuf_required_version], [2.22.0]) + m4_define([introspection_required_version], [0.10.1]) GLIB_REQUIRED_VERSION=glib_required_version PANGO_REQUIRED_VERSION=pango_required_version ATK_REQUIRED_VERSION=atk_required_version CAIRO_REQUIRED_VERSION=cairo_required_version GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version + INTROSPECTION_REQUIRED_VERSION=introspection_required_version + AC_SUBST(GLIB_REQUIRED_VERSION) AC_SUBST(PANGO_REQUIRED_VERSION) AC_SUBST(ATK_REQUIRED_VERSION) AC_SUBST(CAIRO_REQUIRED_VERSION) AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION) - + AC_SUBST(INTROSPECTION_REQUIRED_VERSION) # Save this value here, since automake will set cflags later cflags_set=${CFLAGS+set} @@@ -170,12 -173,16 +173,16 @@@ dn AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc) AC_LANG_PUSH([C++]) - AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], + [[class a { int b; } c;]])], + [],[CXX=]) AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "") gtk_save_cxxflags="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -x objective-c++" - AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@interface Foo @end]], + [[]])], + [OBJC=yes],[OBJC=no]) AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes") CXXFLAGS="$gtk_save_cxxflags" AC_LANG_POP([C++]) @@@ -233,67 -240,63 +240,67 @@@ m4_define([debug_default] dnl declare --enable-* args and collect ac_help strings AC_ARG_ENABLE(debug, - AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], - [turn on debugging @<:@default=debug_default@:>@]),, - enable_debug=debug_default) + [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@], + [turn on debugging @<:@default=debug_default@:>@])],, + [enable_debug=debug_default]) AC_ARG_ENABLE(rebuilds, - [AC_HELP_STRING([--disable-rebuilds], + [AS_HELP_STRING([--disable-rebuilds], [disable all source autogeneration rules])],, [enable_rebuilds=yes]) AC_ARG_ENABLE(gtk2-dependency, - AC_HELP_STRING([--enable-gtk2-dependency], - [Do not build gtk-update-icon-cache and other shared tools]),, + [AS_HELP_STRING([--enable-gtk2-dependency], + [Do not build gtk-update-icon-cache and other shared tools])],, [enable_gtk2_dependency=no]) AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno]) AC_ARG_ENABLE(xkb, - [AC_HELP_STRING([--enable-xkb], + [AS_HELP_STRING([--enable-xkb], [support XKB extension [default=maybe]])],, [enable_xkb="maybe"]) AC_ARG_ENABLE(xinerama, - [AC_HELP_STRING([--enable-xinerama], + [AS_HELP_STRING([--enable-xinerama], [support Xinerama extension if available [default=maybe]])],, [enable_xinerama="maybe"]) AC_ARG_ENABLE(xinput, - [AC_HELP_STRING([--enable-xinput], + [AS_HELP_STRING([--enable-xinput], [support XInput extension if available [default=yes]])],, [enable_xinput="maybe"]) AC_ARG_ENABLE(xrandr, - [AC_HELP_STRING([--enable-xrandr], + [AS_HELP_STRING([--enable-xrandr], [support XRandR extension if available [default=maybe]])],, [enable_xrandr="maybe"]) AC_ARG_ENABLE(xfixes, - [AC_HELP_STRING([--enable-xfixes], + [AS_HELP_STRING([--enable-xfixes], [support XFixes extension if available [default=maybe]])],, [enable_xfixes="maybe"]) AC_ARG_ENABLE(xcomposite, - [AC_HELP_STRING([--enable-xcomposite], + [AS_HELP_STRING([--enable-xcomposite], [support X Composite extension if available [default=maybe]])],, [enable_xcomposite="maybe"]) AC_ARG_ENABLE(xdamage, - [AC_HELP_STRING([--enable-xdamage], + [AS_HELP_STRING([--enable-xdamage], [support X Damage extension if available [default=maybe]])],, [enable_xdamage="maybe"]) AC_ARG_ENABLE(x11-backend, - [AC_HELP_STRING([--enable-x11-backend], + [AS_HELP_STRING([--enable-x11-backend], [enable the X11 gdk backend])], [backend_set=yes]) AC_ARG_ENABLE(win32-backend, - [AC_HELP_STRING([--enable-win32-backend], + [AS_HELP_STRING([--enable-win32-backend], [enable the Win32 gdk backend])], [backend_set=yes]) AC_ARG_ENABLE(quartz-backend, - [AC_HELP_STRING([--enable-quartz-backend], + [AS_HELP_STRING([--enable-quartz-backend], [enable the quartz gdk backend])], [backend_set=yes]) +AC_ARG_ENABLE(broadway-backend, + [AC_HELP_STRING([--enable-broadway-backend], + [enable the broadway (HTML5) gdk backend])], + [backend_set=yes]) if test -z "$backend_set"; then if test "$platform_win32" = yes; then @@@ -330,7 -333,6 +337,6 @@@ if test "x$enable_win32_backend" == xye GDK_BACKENDS="$GDK_BACKENDS win32" backend_immodules="$backend_immodules,ime" GDK_WINDOWING="$GDK_WINDOWING - #define GDK_NATIVE_WINDOW_POINTER #define GDK_WINDOWING_WIN32" GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid" AM_CONDITIONAL(USE_WIN32, true) @@@ -350,17 -352,6 +356,17 @@@ els AM_CONDITIONAL(USE_QUARTZ, false) fi +if test "x$enable_broadway_backend" == xyes; then + GDK_BACKENDS="$GDK_BACKENDS broadway" + cairo_backends="$cairo_backends cairo" + GDK_WINDOWING="$GDK_WINDOWING +#define GDK_WINDOWING_BROADWAY" + GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz" + AM_CONDITIONAL(USE_BROADWAY, true) +else + AM_CONDITIONAL(USE_BROADWAY, false) +fi + # strip leading space GDK_BACKENDS=${GDK_BACKENDS/# } @@@ -478,7 -469,7 +484,7 @@@ dnl * See whether to include shared lib dnl ****************************************************** AC_ARG_ENABLE(explicit-deps, - [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@], + [AS_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@], [use explicit dependencies in .pc files [default=auto]])],, [enable_explicit_deps=auto]) @@@ -649,18 -640,6 +655,6 @@@ case $host_os i ;; esac - dnl NeXTStep cc seems to need this - AC_MSG_CHECKING([for extra flags for POSIX compliance]) - AC_TRY_COMPILE([#include ], [DIR *dir;], - AC_MSG_RESULT(none needed), - gtk_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -posix" - AC_TRY_COMPILE([#include ], [DIR *dir;], - AC_MSG_RESULT(-posix), - AC_MSG_RESULT() - CFLAGS="$gtk_save_CFLAGS" - AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)]))) - # # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working # @@@ -705,9 -684,11 +699,11 @@@ AC_CHECK_HEADERS(ftw.h [Define to 1 if ftw.h is available])) AC_MSG_CHECKING([for GNU ftw extensions]) - AC_TRY_COMPILE([#define _XOPEN_SOURCE 500 - #define _GNU_SOURCE - #include ], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _XOPEN_SOURCE 500 + #define _GNU_SOURCE + #include ]], + [[int flags = FTW_ACTIONRETVAL;]])], + [gtk_ok=yes],[gtk_ok=no]) if test $gtk_ok = yes; then AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw]) @@@ -719,14 -700,7 +715,7 @@@ saved_cflags="$CFLAGS saved_ldflags="$LDFLAGS" - # Checks for header files. - AC_HEADER_STDC - - # Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST - # Checks for library functions. - AC_TYPE_SIGNAL AC_FUNC_MMAP AC_CHECK_FUNCS(mallinfo) @@@ -735,8 -709,9 +724,9 @@@ AC_TYPE_UID_ # Check if needs to be included for fd_set AC_MSG_CHECKING([for fd_set]) - AC_TRY_COMPILE([#include ], - [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[fd_set readMask, writeMask;]])], + [gtk_ok=yes],[gtk_ok=no]) if test $gtk_ok = yes; then AC_MSG_RESULT([yes, found in sys/types.h]) else @@@ -767,7 -742,7 +757,7 @@@ AC_CHECK_FUNCS(_NSGetEnviron AC_MSG_CHECKING(whether to build dynamic modules) AC_ARG_ENABLE(modules, - [AC_HELP_STRING([--disable-modules], + [AS_HELP_STRING([--disable-modules], [disable dynamic module loading])]) dynworks=false @@@ -816,13 -791,9 +806,9 @@@ AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $ # AC_MSG_CHECKING(immodules to build) - dnl due to an autoconf bug, commas in the first arg to - dnl AC_HELP_STRING cause problems. - dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...], - dnl [build the specified input method modules into gtk]) AC_ARG_WITH(included_immodules, - AC_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...], - [build the specified input methods into gtk])) + [AS_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...], + [build the specified input methods into gtk])]) if $dynworks; then : @@@ -879,10 -850,6 +865,6 @@@ AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes]) AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes]) - AC_HEADER_SYS_WAIT - - AC_TYPE_SIGNAL - # Checks to see whether we should include mediaLib # support. # @@@ -990,17 -957,17 +972,17 @@@ if test "x$enable_x11_backend" == xyes # Check for xReply AC_MSG_CHECKING([if is needed for xReply]) - AC_TRY_COMPILE([#include ], - [xReply *rep;], - [AC_MSG_RESULT([no])], - [AC_TRY_COMPILE([#include - #include ], - [xReply *rep;], - [AC_MSG_RESULT([yes]) - AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1, - [Define if needed for xReply])], - [AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([xReply type unavailable. X11 is too old])])]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[xReply *rep;]])], + [AC_MSG_RESULT([no])], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], + [[xReply *rep;]])], + [AC_MSG_RESULT([yes]) + AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1], + [Define if needed for xReply])], + [AC_MSG_RESULT([unknown]) + AC_MSG_ERROR([xReply type unavailable. X11 is too old])])]) # Check for XConvertCase, XInternAtoms (X11R6 specific) @@@ -1382,7 -1349,7 +1364,7 @@@ LIBS="$old_LIBS PRINT_BACKENDS="file lpr" AC_ARG_ENABLE(cups, - [AC_HELP_STRING([--disable-cups], + [AS_HELP_STRING([--disable-cups], [disable cups print backend])],, [enable_cups=auto]) @@@ -1424,10 -1391,11 +1406,11 @@@ els gtk_save_cflags="$CFLAGS" CFLAGS="$CUPS_CFLAGS" - AC_TRY_COMPILE([#include ], - [http_t http; char *s = http.authstring;], - [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [], - [Define if cups http_t authstring field is accessible])],) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[http_t http; char *s = http.authstring;]])], + [AC_DEFINE([HAVE_HTTP_AUTHSTRING], [], + [Define if cups http_t authstring field is accessible])], + []) CFLAGS="$gtk_save_cflags" AC_SUBST(HAVE_HTTP_AUTHSTRING) @@@ -1443,9 -1411,9 +1426,9 @@@ f # AC_ARG_ENABLE(papi, - [AC_HELP_STRING([--disable-papi], + [AS_HELP_STRING([--disable-papi], [disable papi print backend])],, - [enable_papi=auto]) + [enable_papi=auto]) if test "x$enable_papi" = "xno"; then AM_CONDITIONAL(HAVE_PAPI, false) @@@ -1487,7 -1455,7 +1470,7 @@@ CPPFLAGS="$gtk_save_cppflags AC_ARG_ENABLE(test-print-backend, - [AC_HELP_STRING([--enable-test-print-backend], + [AS_HELP_STRING([--enable-test-print-backend], [build test print backend])],, [enable_test_print_backend=no]) if test "x$enable_test_print_backend" != "xno" ; then @@@ -1526,15 -1494,15 +1509,15 @@@ GLIB_GSETTING # GObject introspection ################################################## - GOBJECT_INTROSPECTION_CHECK([0.9.3]) + GOBJECT_INTROSPECTION_CHECK(introspection_required_version) ################################################## # Packagekit module ################################################# AC_ARG_ENABLE(packagekit, - AC_HELP_STRING([--disable-packagekit], - [build packagekit open-with module])) + [AS_HELP_STRING([--disable-packagekit], + [build packagekit open-with module])]) build_packagekit=no if test "os_win32" != "yes"; then @@@ -1556,9 -1524,10 +1539,10 @@@ AC_CHECK_PROG(DB2HTML, db2html, true, f AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) AC_ARG_ENABLE(man, - [AC_HELP_STRING([--enable-man], - [regenerate man pages from Docbook [default=no]])],enable_man=yes, - enable_man=no) + [AS_HELP_STRING([--enable-man], + [regenerate man pages from Docbook [default=no]])], + [enable_man=yes], + [enable_man=no]) if test "${enable_man}" != no; then dnl @@@ -1631,7 -1600,7 +1615,7 @@@ dnl Check for -Bsymbolic-functions link dnl intra-library PLT jumps, if available. dnl AC_ARG_ENABLE(Bsymbolic, - [AC_HELP_STRING([--disable-Bsymbolic], + [AS_HELP_STRING([--disable-Bsymbolic], [avoid linking with -Bsymbolic])],, [SAVED_LDFLAGS="${LDFLAGS}" AC_MSG_CHECKING([for -Bsymbolic-functions linker flag]) @@@ -1679,7 -1648,6 +1663,7 @@@ build/Makefil build/win32/Makefile build/win32/vs9/Makefile gdk/Makefile +gdk/broadway/Makefile gdk/x11/Makefile gdk/win32/Makefile gdk/win32/rc/Makefile @@@ -1690,7 -1658,6 +1674,6 @@@ gtk/Makefil gtk/makefile.msc gtk/gtkversion.h gtk/gtk-win32.rc - gtk/theme-bits/Makefile gtk/tests/Makefile modules/Makefile modules/other/Makefile @@@ -1718,7 -1685,10 +1701,10 @@@ AC_OUTPU included_immodules=${included_immodules//,/ } included_immodules=${included_immodules:-none} - echo "configuration:" + echo "" + echo " GTK+ $GTK_VERSION" + echo " ===========" + echo "" echo " GDK backends: $GDK_BACKENDS" if test "x$enable_x11_backend" = "xyes"; then echo " X11 extensions: $X_EXTENSIONS" diff --combined gdk/Makefile.am index 90b4520cd,1e51edd02..01d3232ce --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@@ -11,7 -11,7 +11,7 @@@ INTROSPECTION_COMPILER_ARGS = SUBDIRS = $(GDK_BACKENDS) . tests -DIST_SUBDIRS = win32 x11 quartz tests +DIST_SUBDIRS = win32 x11 quartz broadway tests CLEANFILES = @@@ -157,29 -157,25 +157,29 @@@ common_sources = gdkmarshalers.c \ gdkmarshalers.h - libgdk_3_0_la_SOURCES = $(common_sources) - libgdk_3_0_la_LIBADD = $(GDK_DEP_LIBS) - libgdk_3_0_la_LDFLAGS = $(LDADD) + libgdk_3_la_SOURCES = $(common_sources) + libgdk_3_la_LIBADD = $(GDK_DEP_LIBS) + libgdk_3_la_LDFLAGS = $(LDADD) if USE_X11 - libgdk_3_0_la_LIBADD += x11/libgdk-x11.la + libgdk_3_la_LIBADD += x11/libgdk-x11.la endif # USE_X11 if USE_QUARTZ - libgdk_3_0_la_LIBADD += quartz/libgdk-quartz.la + libgdk_3_la_LIBADD += quartz/libgdk-quartz.la endif # USE_QUARTZ if USE_WIN32 - libgdk_3_0_la_SOURCES += gdkkeynames.c - libgdk_3_0_la_LIBADD += win32/libgdk-win32.la - libgdk_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def - libgdk_3_0_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def + libgdk_3_la_SOURCES += gdkkeynames.c + libgdk_3_la_LIBADD += win32/libgdk-win32.la + libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def + libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def endif # USE_WIN32 +if USE_BROADWAY +libgdk_3_0_la_LIBADD += broadway/libgdk-broadway.la +endif # USE_BROADWAY + if HAVE_INTROSPECTION introspection_files = \ @@@ -188,11 -184,11 +188,11 @@@ gdkenumtypes.c \ gdkenumtypes.h - Gdk-3.0.gir: libgdk-3.0.la Makefile + Gdk-3.0.gir: libgdk-3.la Makefile Gdk_3_0_gir_SCANNERFLAGS = \ --c-include="gdk/gdk.h" Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0 - Gdk_3_0_gir_LIBS = libgdk-3.0.la + Gdk_3_0_gir_LIBS = libgdk-3.la Gdk_3_0_gir_FILES = $(introspection_files) Gdk_3_0_gir_CFLAGS = $(INCLUDES) Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0 @@@ -239,13 -235,13 +239,13 @@@ x11_introspection_files = x11/gdkx11visual.h \ x11/gdkx11window.h - GdkX11-3.0.gir: libgdk-3.0.la Gdk-3.0.gir Makefile + GdkX11-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile GdkX11_3_0_gir_SCANNERFLAGS = \ - --strip-prefix=Gdk \ + --identifier-prefix=Gdk \ --c-include="gdk/gdkx.h" \ --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir - GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0 - GdkX11_3_0_gir_LIBS = libgdk-3.0.la + GdkX11_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0 + GdkX11_3_0_gir_LIBS = libgdk-3.la GdkX11_3_0_gir_FILES = $(x11_introspection_files) GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk GdkX11_3_0_gir_EXPORT_PACKAGES = gdk-x11-3.0 @@@ -301,7 -297,7 +301,7 @@@ if OS_LINU TESTS = abicheck.sh endif - lib_LTLIBRARIES = libgdk-3.0.la + lib_LTLIBRARIES = libgdk-3.la MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h EXTRA_DIST += $(gdk_built_sources) @@@ -309,7 -305,7 +309,7 @@@ EXTRA_HEADERS install-exec-hook: if DISABLE_EXPLICIT_DEPS - $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.0.la + $(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.la endif #note: not gdkconfig.h @@@ -353,7 -349,7 +353,7 @@@ stamp-gc-h: $(top_builddir)/config.stat dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin - for F in $(libgdk_3_0_la_SOURCES); do \ + for F in $(libgdk_3_la_SOURCES); do \ case $$F in \ *.c) echo ' ' \ ;; \ diff --combined gdk/gdkdisplaymanager.c index 452f70005,508d60910..43dff5b68 --- a/gdk/gdkdisplaymanager.c +++ b/gdk/gdkdisplaymanager.c @@@ -44,10 -44,6 +44,10 @@@ #include "quartz/gdkquartzdisplaymanager.h" #endif +#ifdef GDK_WINDOWING_BROADWAY +#include "broadway/gdkbroadwaydisplaymanager.h" +#endif + #ifdef GDK_WINDOWING_WIN32 #include "win32/gdkwin32.h" #endif @@@ -60,6 -56,43 +60,43 @@@ * The purpose of the #GdkDisplayManager singleton object is to offer * notification when displays appear or disappear or the default display * changes. + * + * You can use gdk_display_manager_get() to obtain the GdkDisplayManager + * singleton, but that should be rarely necessary. Typically, initializing + * GTK+ opens a display that you can work with without ever accessing the + * GdkDisplayManager. + * + * The GDK library can be built with support for multiple backends. + * The GdkDisplayManager object determines which backend is used + * at runtime. + * + * When writing backend-specific code that is supposed to work with + * multiple GDK backends, you have to consider both compile time and + * runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32 + * macros, etc. to find out which backends are present in the GDK library + * you are building your application against. At runtime, use type-check + * macros like GDK_IS_X11_DISPLAY() to find out which backend is in use: + * + * + * Backend-specific code + * + * #ifdef GDK_WINDOWING_X11 + * if (GDK_IS_X11_DISPLAY (display)) + * { + * /* make X11-specific calls here */ + * } + * else + * #endif + * #ifdef GDK_WINDOWING_QUARTZ + * if (GDK_IS_QUARTZ_DISPLAY (display)) + * { + * /* make Quartz-specific calls here */ + * } + * else + * #endif + * g_error ("Unsupported GDK backend"); + * + * */ @@@ -172,9 -205,9 +209,9 @@@ gdk_display_manager_get_property (GObje * Gets the singleton #GdkDisplayManager object. * * When called for the first time, this function consults the - * GDK_BACKEND to find out which of the supported - * GDK backends to use (in case GDK has been compiled with multiple - * backends). + * GDK_BACKEND environment variable to find out which + * of the supported GDK backends to use (in case GDK has been compiled + * with multiple backends). * * Returns: (transfer none): The global #GdkDisplayManager singleton; * gdk_parse_args(), gdk_init(), or gdk_init_check() must have @@@ -206,11 -239,6 +243,11 @@@ gdk_display_manager_get (void if (backend == NULL || strcmp (backend, "win32") == 0) manager = g_object_new (gdk_win32_display_manager_get_type (), NULL); else +#endif +#ifdef GDK_WINDOWING_BROADWAY + if (backend == NULL || strcmp (backend, "broadway") == 0) + manager = g_object_new (gdk_broadway_display_manager_get_type (), NULL); + else #endif if (backend != NULL) g_error ("Unsupported GDK backend: %s", backend); @@@ -344,7 -372,7 +381,7 @@@ gdk_display_manager_open_display (GdkDi * * Finds or creates an atom corresponding to a given string. * - * Returns: the atom corresponding to @atom_name. + * Returns: (transfer none): the atom corresponding to @atom_name. */ GdkAtom gdk_atom_intern (const gchar *atom_name, @@@ -370,7 -398,7 +407,7 @@@ * ever unload the module again (e.g. do not use this function in * GTK+ theme engines). * - * Returns: the atom corresponding to @atom_name + * Returns: (transfer none): the atom corresponding to @atom_name * * Since: 2.10 */ diff --combined tests/testsocket_common.c index 6dcabb35d,510d6ffdb..84faa1467 --- a/tests/testsocket_common.c +++ b/tests/testsocket_common.c @@@ -21,7 -21,7 +21,7 @@@ #include "config.h" #include #if defined (GDK_WINDOWING_X11) - #include "x11/gdkx.h" + #include #elif defined (GDK_WINDOWING_WIN32) #include "win32/gdkwin32.h" #endif @@@ -280,8 -280,6 +280,8 @@@ create_child_plug (guint32 xid return GDK_WINDOW_XID (gtk_widget_get_window (window)); #elif defined (GDK_WINDOWING_WIN32) return (guint32) GDK_WINDOW_HWND (gtk_widget_get_window (window)); +#elif defined (GDK_WINDOWING_BROADWAY) + return (guint32) 0; /* Child windows not supported */ #endif else return 0;