19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/*
29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    SDL - Simple DirectMedia Layer
39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    Copyright (C) 1997-2012 Sam Lantinga
49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    This library is free software; you can redistribute it and/or
69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    modify it under the terms of the GNU Lesser General Public
79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    License as published by the Free Software Foundation; either
89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    version 2.1 of the License, or (at your option) any later version.
99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    This library is distributed in the hope that it will be useful,
119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    but WITHOUT ANY WARRANTY; without even the implied warranty of
129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    Lesser General Public License for more details.
149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    You should have received a copy of the GNU Lesser General Public
169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    License along with this library; if not, write to the Free Software
179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    Sam Lantinga
209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall    slouken@libsdl.org
219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*/
229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** @file SDL_syswm.h
249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  Include file for SDL custom system window manager hooks
259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */
269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef _SDL_syswm_h
289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define _SDL_syswm_h
299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_stdinc.h"
319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_error.h"
329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_version.h"
339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "begin_code.h"
359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Set up for C function definitions, even when using C++ */
369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern "C" {
389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** @file SDL_syswm.h
419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  Your application has access to a special type of event 'SDL_SYSWMEVENT',
429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  which contains window-manager specific information and arrives whenever
439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  an unhandled window event occurs.  This event is ignored by default, but
449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  you can enable it with SDL_EventState()
459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */
469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef SDL_PROTOTYPES_ONLY
479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMinfo;
489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo SDL_SysWMinfo;
499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#else
509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This is the structure for custom window manager events */
529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if defined(SDL_VIDEO_DRIVER_X11)
539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if defined(__APPLE__) && defined(__MACH__)
549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* conflicts with Quickdraw.h */
559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define Cursor X11Cursor
569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <X11/Xlib.h>
599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <X11/Xatom.h>
609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#if defined(__APPLE__) && defined(__MACH__)
629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* matches the re-define above */
639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef Cursor
649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** These are the various supported subsystems under UNIX */
679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef enum {
689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_SYSWM_X11
699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SYSWM_TYPE;
709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The UNIX custom event structure */
729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_SYSWM_TYPE subsystem;
759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	union {
769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    XEvent xevent;
779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	} event;
789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The UNIX custom window manager information structure.
819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  When this structure is returned, it holds information about which
829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *  low level system it is using, and will be one of SDL_SYSWM_TYPE.
839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */
849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_SYSWM_TYPE subsystem;
879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	union {
889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    struct {
899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    	Display *display;	/**< The X11 display */
909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    	Window window;		/**< The X11 display window */
919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		/** These locking functions should be called around
929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                 *  any X11 functions using the display variable,
939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                 *  but not the gfxdisplay variable.
949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                 *  They lock the event thread, so should not be
959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 *  called around event functions or from event filters.
969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		 */
979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@{*/
989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		void (*lock_func)(void);
999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		void (*unlock_func)(void);
1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@}*/
1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		/** @name Introduced in SDL 1.0.2 */
1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@{*/
1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    	Window fswindow;	/**< The X11 fullscreen window */
1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    	Window wmwindow;	/**< The X11 managed input window */
1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@}*/
1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		/** @name Introduced in SDL 1.2.12 */
1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@{*/
1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall		Display *gfxdisplay;	/**< The X11 display to which rendering is done */
1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall                /*@}*/
1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	    } x11;
1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	} info;
1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#elif defined(SDL_VIDEO_DRIVER_NANOX)
1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <microwin/nano-X.h>
1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The generic custom event structure */
1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int data;
1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The windows custom window manager information structure */
1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version ;
1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	GR_WINDOW_ID window ;	/* The display window */
1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI)
1327891dd35fa2439a70f43ab8572778a398365bf24David 'Digit' Turner#define WIN32_LEAN_AND_MEAN 1
1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <windows.h>
1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The windows custom event structure */
1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	HWND hwnd;			/**< The window for the message */
1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	UINT msg;			/**< The type of message */
1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	WPARAM wParam;			/**< WORD message parameter */
1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	LPARAM lParam;			/**< LONG message parameter */
1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The windows custom window manager information structure */
1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	HWND window;			/**< The Win32 display window */
1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	HGLRC hglrc;			/**< The OpenGL context, if any */
1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#elif defined(SDL_VIDEO_DRIVER_RISCOS)
1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** RISC OS custom event structure */
1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int eventCode;		/**< The window for the message */
1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int pollBlock[64];
1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The RISC OS custom window manager information structure */
1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int wimpVersion;    /**< Wimp version running under */
1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int taskHandle;     /**< The RISC OS task handle */
1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int window;		/**< The RISC OS display window */
1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#elif defined(SDL_VIDEO_DRIVER_PHOTON)
1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <sys/neutrino.h>
1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include <Ph.h>
1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The QNX custom event structure */
1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int data;
1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The QNX custom window manager information structure */
1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int data;
1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
184e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall#elif defined(SDL_VIDEO_DRIVER_QUARTZ)
185e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall
186e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hallstruct SDL_SysWMmsg {
187e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall	SDL_version version;
188e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall	int data;
189e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall};
190e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall
191e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Halltypedef struct SDL_SysWMinfo {
192e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall	SDL_version version;
193e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall	void* nsWindowPtr;
194e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall} SDL_SysWMinfo;
195e4c5d95ed37611acc6a186522315195b4ebfb9efJesse Hall
1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#else
1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The generic custom event structure */
1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct SDL_SysWMmsg {
2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int data;
2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall};
2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/** The generic custom window manager information structure */
2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct SDL_SysWMinfo {
2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	SDL_version version;
2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall	int data;
2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} SDL_SysWMinfo;
2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* video driver type */
2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* SDL_PROTOTYPES_ONLY */
2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Function prototypes */
2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/**
2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * This function gives you custom hooks into the window manager information.
2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * It fills the structure pointed to by 'info' with custom information and
2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * returns 0 if the function is not implemented, 1 if the function is
2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * implemented and no error occurred, and -1 if the version member of
2209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * the 'info' structure is not filled in or not supported.
2219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall *
2229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * You typically use this function like this:
2239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * @code
2249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * SDL_SysWMinfo info;
2259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * SDL_VERSION(&info.version);
2269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * if ( SDL_GetWMInfo(&info) ) { ... }
2279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * @endcode
2289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */
2299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallextern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info);
2309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* Ends C function definitions when using C++ */
2339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef __cplusplus
2349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall}
2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif
2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "close_code.h"
2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall
2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* _SDL_syswm_h */
239