test/testnative.h
changeset 3059 79b061c4f316
child 3061 94dd49f6b005
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/testnative.h	Mon Feb 09 06:28:45 2009 +0000
     1.3 @@ -0,0 +1,37 @@
     1.4 +
     1.5 +/* Definitions for platform dependent windowing functions to test SDL
     1.6 +   integration with native windows
     1.7 +*/
     1.8 +
     1.9 +#include "SDL.h"
    1.10 +
    1.11 +/* This header includes all the necessary system headers for native windows */
    1.12 +#include "SDL_syswm.h"
    1.13 +
    1.14 +typedef struct
    1.15 +{
    1.16 +    const char *tag;
    1.17 +    void *(*CreateWindow) (int w, int h);
    1.18 +    void (*DestroyWindow) (void *window);
    1.19 +} NativeWindowFactory;
    1.20 +
    1.21 +#ifdef SDL_VIDEO_DRIVER_WIN32
    1.22 +#define TEST_NATIVE_WIN32
    1.23 +extern NativeWindowFactory Win32WindowFactory;
    1.24 +#endif
    1.25 +
    1.26 +#ifdef SDL_VIDEO_DRIVER_X11
    1.27 +#define TEST_NATIVE_X11
    1.28 +extern NativeWindowFactory X11WindowFactory;
    1.29 +#endif
    1.30 +
    1.31 +#ifdef SDL_VIDEO_DRIVER_COCOA
    1.32 +/* Actually, we don't really do this, since it involves adding Objective C
    1.33 +   support to the build system, which is a little tricky.  You can uncomment
    1.34 +   it manually though and link testnativecocoa.m into the test application.
    1.35 +*/
    1.36 +#if 1
    1.37 +#define TEST_NATIVE_COCOA
    1.38 +extern NativeWindowFactory CocoaWindowFactory;
    1.39 +#endif
    1.40 +#endif