forked from AuroraMiddleware/gtk
Extend the C++ keyword test to include internal GDK headers (#449016).
2007-06-22 Mathias Hasselmann <mathias.hasselmann@gmx.de> * configure.in, tests/Makefile.am, tests/autotestkeywords.cc, tests/dummy-headers/*: Extend the C++ keyword test to include internal GDK headers (#449016). svn path=/trunk/; revision=18244
This commit is contained in:
parent
dac4d35211
commit
07946bd70d
@ -1,3 +1,9 @@
|
||||
2007-06-22 Mathias Hasselmann <mathias.hasselmann@gmx.de>
|
||||
|
||||
* configure.in, tests/Makefile.am, tests/autotestkeywords.cc,
|
||||
tests/dummy-headers/*: Extend the C++ keyword test
|
||||
to include internal GDK headers (#449016).
|
||||
|
||||
2007-06-26 Mathias Hasselmann <mathias.hasselmann@gmx.de>
|
||||
|
||||
* ChangeLog, configure.in, tests/Makefile.am,
|
||||
|
@ -142,8 +142,15 @@ dnl
|
||||
AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_TRY_COMPILE(,[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)
|
||||
AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" == "yes")
|
||||
CXXFLAGS="$gtk_save_cxxflags"
|
||||
AC_LANG_RESTORE
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
|
@ -26,10 +26,6 @@ endif
|
||||
|
||||
TESTS = floatingtest buildertest
|
||||
|
||||
if HAVE_CXX
|
||||
TESTS += autotestkeywords
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
autotestfilechooser \
|
||||
autotestkeywords \
|
||||
@ -95,7 +91,19 @@ noinst_PROGRAMS = \
|
||||
testtooltips \
|
||||
testvolumebutton
|
||||
|
||||
if HAVE_CXX
|
||||
noinst_PROGRAMS += autotestkeywords
|
||||
TESTS += autotestkeywords
|
||||
|
||||
autotestkeywords_SOURCES = autotestkeywords.cc
|
||||
autotestkeywords_CPPFLAGS = -I$(srcdir)/dummy-headers
|
||||
|
||||
if HAVE_OBJC
|
||||
autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1
|
||||
autotestkeywords_CXXFLAGS = -x objective-c++
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
autotestfilechooser_DEPENDENCIES = $(TEST_DEPS)
|
||||
simple_DEPENDENCIES = $(TEST_DEPS)
|
||||
|
@ -1,2 +1,35 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define gdk_display gdk_display_directfb
|
||||
#include <gdk/directfb/gdkdirectfb.h>
|
||||
#undef gdk_display
|
||||
#undef GDK_DISPLAY
|
||||
#undef GDK_ROOT_WINDOW
|
||||
|
||||
#define gdk_display gdk_display_linuxfb
|
||||
#include <gdk/linux-fb/gdkfb.h>
|
||||
#undef gdk_display
|
||||
#undef GDK_DISPLAY
|
||||
#undef GDK_ROOT_WINDOW
|
||||
|
||||
#if HAVE_OBJC
|
||||
#define gdk_display gdk_display_quartz
|
||||
#include <gdk/quartz/gdkquartz.h>
|
||||
#undef gdk_display
|
||||
#undef GDK_DISPLAY
|
||||
#undef GDK_ROOT_WINDOW
|
||||
#endif
|
||||
|
||||
#define gdk_display gdk_display_win32
|
||||
#include <gdk/win32/gdkwin32.h>
|
||||
#undef gdk_display
|
||||
#undef GDK_DISPLAY
|
||||
#undef GDK_ROOT_WINDOW
|
||||
|
||||
#define gdk_display gdk_display_x11
|
||||
#include <gdk/x11/gdkx.h>
|
||||
#undef gdk_display
|
||||
#undef GDK_DISPLAY
|
||||
#undef GDK_ROOT_WINDOW
|
||||
|
||||
int main() { return 0; }
|
||||
|
24
tests/dummy-headers/AppKit/AppKit.h
Normal file
24
tests/dummy-headers/AppKit/AppKit.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* Dummy header for the Quartz backend. */
|
||||
|
||||
typedef int NSTrackingRectTag;
|
||||
|
||||
@interface NSAutoreleasePool {}
|
||||
@end
|
||||
|
||||
@interface NSCursor {}
|
||||
@end
|
||||
|
||||
@interface NSEvent {}
|
||||
@end
|
||||
|
||||
@interface NSImage {}
|
||||
@end
|
||||
|
||||
@interface NSView {}
|
||||
@end
|
||||
|
||||
@interface NSWindow {}
|
||||
@end
|
||||
|
||||
@protocol NSDraggingInfo
|
||||
@end
|
@ -0,0 +1,8 @@
|
||||
/* Dummy header for the Quartz backend. */
|
||||
|
||||
typedef bool BOOL;
|
||||
|
||||
typedef void *CGContextRef;
|
||||
typedef void *CGImageRef;
|
||||
typedef void *CGPatternRef;
|
||||
|
17
tests/dummy-headers/X11/Xlib.h
Normal file
17
tests/dummy-headers/X11/Xlib.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* Dummy header for the Xlib backend. */
|
||||
|
||||
typedef unsigned long CARD32;
|
||||
|
||||
typedef CARD32 XID;
|
||||
|
||||
typedef XID Atom;
|
||||
typedef XID Colormap;
|
||||
typedef XID Cursor;
|
||||
typedef XID Window;
|
||||
typedef XID VisualID;
|
||||
|
||||
typedef struct _Display Display;
|
||||
typedef struct _GC GC;
|
||||
typedef struct _Screen Screen;
|
||||
typedef struct _Visual Visual;
|
||||
typedef struct _XImage XImage;
|
1
tests/dummy-headers/X11/Xutil.h
Normal file
1
tests/dummy-headers/X11/Xutil.h
Normal file
@ -0,0 +1 @@
|
||||
/* Dummy header for the Xlib backend. */
|
1
tests/dummy-headers/commctrl.h
Normal file
1
tests/dummy-headers/commctrl.h
Normal file
@ -0,0 +1 @@
|
||||
/* Dummy header for the Win32 backend. */
|
10
tests/dummy-headers/directfb.h
Normal file
10
tests/dummy-headers/directfb.h
Normal file
@ -0,0 +1,10 @@
|
||||
/* Dummy header for the DirectFB backend. */
|
||||
|
||||
typedef int DFBColor;
|
||||
typedef int DFBSurfaceCapabilities;
|
||||
typedef int DFBSurfacePixelFormat;
|
||||
typedef int DFBWindowCapabilities;
|
||||
typedef int DFBWindowOptions;
|
||||
|
||||
typedef struct IDirectFBWindow IDirectFBWindow;
|
||||
typedef struct IDirectFBSurface IDirectFBSurface;
|
1
tests/dummy-headers/ft2build.h
Normal file
1
tests/dummy-headers/ft2build.h
Normal file
@ -0,0 +1 @@
|
||||
/* Dummy header for the Linux framebuffer backend. */
|
1
tests/dummy-headers/linux/fb.h
Normal file
1
tests/dummy-headers/linux/fb.h
Normal file
@ -0,0 +1 @@
|
||||
/* Dummy header for the Linux framebuffer backend. */
|
6
tests/dummy-headers/windows.h
Normal file
6
tests/dummy-headers/windows.h
Normal file
@ -0,0 +1,6 @@
|
||||
/* Dummy header for the Win32 backend. */
|
||||
|
||||
typedef void *HDC;
|
||||
typedef void *HGDIOBJ;
|
||||
typedef void *HICON;
|
||||
typedef void *HWND;
|
Loading…
Reference in New Issue
Block a user