--- sbbs/include/sdl/sdl_syswm.h 2018/04/24 16:41:23 1.1 +++ sbbs/include/sdl/sdl_syswm.h 2018/04/24 16:41:37 1.1.1.2 @@ -1,35 +1,32 @@ /* SDL - Simple DirectMedia Layer - Copyright (C) 1997-2004 Sam Lantinga + Copyright (C) 1997-2006 Sam Lantinga This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Sam Lantinga slouken@libsdl.org */ -#ifdef SAVE_RCSID -static char rcsid = - "@(#) $Id: sdl_syswm.h,v 1.1 2018/04/24 16:41:23 root Exp $"; -#endif - /* Include file for SDL custom system window manager hooks */ #ifndef _SDL_syswm_h #define _SDL_syswm_h +#include "SDL_stdinc.h" +#include "SDL_error.h" #include "SDL_version.h" #include "begin_code.h" @@ -49,13 +46,20 @@ typedef struct SDL_SysWMinfo SDL_SysWMin #else /* This is the structure for custom window manager events */ -#if (defined(unix) || defined(__unix__) || defined(_AIX) || defined(__OpenBSD__) || defined(__NetBSD__)) && \ - (!defined(DISABLE_X11) && !defined(__CYGWIN32__) && !defined(ENABLE_NANOX) && \ - !defined(__QNXNTO__)) - /* AIX is unix, of course, but the native compiler CSet doesn't define unix */ +#if defined(SDL_VIDEO_DRIVER_X11) +#if defined(__APPLE__) && defined(__MACH__) +/* conflicts with Quickdraw.h */ +#define Cursor X11Cursor +#endif + #include #include +#if defined(__APPLE__) && defined(__MACH__) +/* matches the re-define above */ +#undef Cursor +#endif + /* These are the various supported subsystems under UNIX */ typedef enum { SDL_SYSWM_X11 @@ -82,7 +86,8 @@ typedef struct SDL_SysWMinfo { Display *display; /* The X11 display */ Window window; /* The X11 display window */ /* These locking functions should be called around - any X11 functions using the display variable. + any X11 functions using the display variable, + but not the gfxdisplay variable. They lock the event thread, so should not be called around event functions or from event filters. */ @@ -92,11 +97,14 @@ typedef struct SDL_SysWMinfo { /* Introduced in SDL 1.0.2 */ Window fswindow; /* The X11 fullscreen window */ Window wmwindow; /* The X11 managed input window */ + + /* Introduced in SDL 1.2.12 */ + Display *gfxdisplay; /* The X11 display to which rendering is done */ } x11; } info; } SDL_SysWMinfo; -#elif defined(ENABLE_NANOX) +#elif defined(SDL_VIDEO_DRIVER_NANOX) #include /* The generic custom event structure */ @@ -111,7 +119,7 @@ typedef struct SDL_SysWMinfo { GR_WINDOW_ID window ; /* The display window */ } SDL_SysWMinfo; -#elif defined(WIN32) +#elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI) #define WIN32_LEAN_AND_MEAN #include @@ -131,7 +139,7 @@ typedef struct SDL_SysWMinfo { HGLRC hglrc; /* The OpenGL context, if any */ } SDL_SysWMinfo; -#elif defined(__riscos__) +#elif defined(SDL_VIDEO_DRIVER_RISCOS) /* RISC OS custom event structure */ struct SDL_SysWMmsg { @@ -148,7 +156,7 @@ typedef struct SDL_SysWMinfo { int window; /* The RISC OS display window */ } SDL_SysWMinfo; -#elif defined(__QNXNTO__) +#elif defined(SDL_VIDEO_DRIVER_PHOTON) #include #include @@ -178,7 +186,7 @@ typedef struct SDL_SysWMinfo { int data; } SDL_SysWMinfo; -#endif /* OS type */ +#endif /* video driver type */ #endif /* SDL_PROTOTYPES_ONLY */