2001-04-26 16:45:43 +00:00
|
|
|
/*
|
2011-04-08 13:03:26 -07:00
|
|
|
Simple DirectMedia Layer
|
2014-02-02 00:53:27 -08:00
|
|
|
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
This software is provided 'as-is', without any express or implied
|
|
|
|
warranty. In no event will the authors be held liable for any damages
|
|
|
|
arising from the use of this software.
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
Permission is granted to anyone to use this software for any purpose,
|
|
|
|
including commercial applications, and to alter it and redistribute it
|
|
|
|
freely, subject to the following restrictions:
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2011-04-08 13:03:26 -07:00
|
|
|
1. The origin of this software must not be misrepresented; you must not
|
|
|
|
claim that you wrote the original software. If you use this software
|
|
|
|
in a product, an acknowledgment in the product documentation would be
|
|
|
|
appreciated but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must not be
|
|
|
|
misrepresented as being the original software.
|
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
2001-04-26 16:45:43 +00:00
|
|
|
*/
|
|
|
|
|
2006-07-10 21:04:37 +00:00
|
|
|
/**
|
2009-10-19 13:31:58 +00:00
|
|
|
* \file SDL_syswm.h
|
2013-05-18 14:17:52 -07:00
|
|
|
*
|
2009-10-19 13:31:58 +00:00
|
|
|
* Include file for SDL custom system window manager hooks.
|
2006-07-10 21:04:37 +00:00
|
|
|
*/
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
#ifndef _SDL_syswm_h
|
|
|
|
#define _SDL_syswm_h
|
|
|
|
|
2006-02-10 03:19:02 +00:00
|
|
|
#include "SDL_stdinc.h"
|
2006-02-10 06:48:43 +00:00
|
|
|
#include "SDL_error.h"
|
2006-07-10 21:04:37 +00:00
|
|
|
#include "SDL_video.h"
|
2001-04-26 16:45:43 +00:00
|
|
|
#include "SDL_version.h"
|
|
|
|
|
|
|
|
#include "begin_code.h"
|
|
|
|
/* Set up for C function definitions, even when using C++ */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-10-19 13:31:58 +00:00
|
|
|
/**
|
|
|
|
* \file SDL_syswm.h
|
2013-05-18 14:17:52 -07:00
|
|
|
*
|
2009-10-19 13:31:58 +00:00
|
|
|
* Your application has access to a special type of event ::SDL_SYSWMEVENT,
|
|
|
|
* which contains window-manager specific information and arrives whenever
|
|
|
|
* an unhandled window event occurs. This event is ignored by default, but
|
|
|
|
* you can enable it with SDL_EventState().
|
|
|
|
*/
|
2001-04-26 16:45:43 +00:00
|
|
|
#ifdef SDL_PROTOTYPES_ONLY
|
|
|
|
struct SDL_SysWMinfo;
|
|
|
|
#else
|
|
|
|
|
2011-01-20 18:04:05 -08:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
2010-09-27 01:24:05 -07:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
/* This is the structure for custom window manager events */
|
Fixed bug #176
[I'm fixing this for the public headers, but I'm not going to bother for the SDL library code (yet)]
To clarify: Normaly, GCC (or, to be precise, the preprocessor) will ignore
this, and compile the code happily. However, one can specify -Wundef to get a
warning about this.
One can probably argue whether to consider this a bug or not; but I think that
(a) from a semantic point of view, using "#if FOO" when FOO is not defined is
strange, and (b) since it is possible to trigger a warning about this, and a
trivial fix exists, it should be corrected.
I can think of two alternative patches, BTW:
1) Simply use #define HAVE_FOO 0, instead of not defining HAVE_FOO at all
2) Change
#if HAVE_FOO
to
#if HAVE_FOO+0
which always does the right thing.
But I think I still prefer the attached patch :-).
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401633
2006-04-13 13:38:40 +00:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
#if defined(__APPLE__) && defined(__MACH__)
|
2006-03-09 06:33:21 +00:00
|
|
|
/* conflicts with Quickdraw.h */
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
#define Cursor X11Cursor
|
|
|
|
#endif
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
#if defined(__APPLE__) && defined(__MACH__)
|
2006-03-09 06:33:21 +00:00
|
|
|
/* matches the re-define above */
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
#undef Cursor
|
|
|
|
#endif
|
|
|
|
|
2010-09-27 00:50:46 -07:00
|
|
|
#endif /* defined(SDL_VIDEO_DRIVER_X11) */
|
|
|
|
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
2011-02-05 16:07:10 -08:00
|
|
|
#include <directfb.h>
|
2010-09-27 00:50:46 -07:00
|
|
|
#endif
|
2010-09-27 01:24:05 -07:00
|
|
|
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
|
|
|
#ifdef __OBJC__
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
#else
|
|
|
|
typedef struct _NSWindow NSWindow;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2011-01-20 16:05:59 -08:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
|
|
|
#ifdef __OBJC__
|
|
|
|
#include <UIKit/UIKit.h>
|
|
|
|
#else
|
|
|
|
typedef struct _UIWindow UIWindow;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2013-05-18 14:17:52 -07:00
|
|
|
/**
|
2010-09-27 01:24:05 -07:00
|
|
|
* These are the various supported windowing subsystems
|
2009-10-19 13:31:58 +00:00
|
|
|
*/
|
2006-07-10 21:04:37 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2010-09-27 01:24:05 -07:00
|
|
|
SDL_SYSWM_UNKNOWN,
|
|
|
|
SDL_SYSWM_WINDOWS,
|
2010-09-27 00:50:46 -07:00
|
|
|
SDL_SYSWM_X11,
|
|
|
|
SDL_SYSWM_DIRECTFB,
|
2010-09-27 01:24:05 -07:00
|
|
|
SDL_SYSWM_COCOA,
|
2011-01-20 16:05:59 -08:00
|
|
|
SDL_SYSWM_UIKIT,
|
2014-01-28 09:13:46 -03:00
|
|
|
SDL_SYSWM_WAYLAND,
|
2014-02-02 23:41:46 -05:00
|
|
|
SDL_SYSWM_MIR,
|
2001-04-26 16:45:43 +00:00
|
|
|
} SDL_SYSWM_TYPE;
|
|
|
|
|
2009-10-19 13:31:58 +00:00
|
|
|
/**
|
2010-09-27 01:24:05 -07:00
|
|
|
* The custom event structure.
|
2009-10-19 13:31:58 +00:00
|
|
|
*/
|
2006-07-10 21:04:37 +00:00
|
|
|
struct SDL_SysWMmsg
|
|
|
|
{
|
|
|
|
SDL_version version;
|
|
|
|
SDL_SYSWM_TYPE subsystem;
|
|
|
|
union
|
|
|
|
{
|
2011-01-20 18:04:05 -08:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct {
|
|
|
|
HWND hwnd; /**< The window for the message */
|
|
|
|
UINT msg; /**< The type of message */
|
|
|
|
WPARAM wParam; /**< WORD message parameter */
|
|
|
|
LPARAM lParam; /**< LONG message parameter */
|
|
|
|
} win;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct {
|
|
|
|
XEvent event;
|
|
|
|
} x11;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct {
|
|
|
|
DFBEvent event;
|
|
|
|
} dfb;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* No Cocoa window events yet */
|
|
|
|
} cocoa;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
2011-01-20 16:05:59 -08:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
/* No UIKit window events yet */
|
|
|
|
} uikit;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
2011-01-20 18:09:55 -08:00
|
|
|
/* Can't have an empty union */
|
|
|
|
int dummy;
|
2011-01-20 16:05:59 -08:00
|
|
|
} msg;
|
2001-04-26 16:45:43 +00:00
|
|
|
};
|
|
|
|
|
2009-10-19 13:31:58 +00:00
|
|
|
/**
|
2010-09-27 01:24:05 -07:00
|
|
|
* The custom window manager information structure.
|
2009-10-19 13:31:58 +00:00
|
|
|
*
|
|
|
|
* When this structure is returned, it holds information about which
|
|
|
|
* low level system it is using, and will be one of SDL_SYSWM_TYPE.
|
2001-04-26 16:45:43 +00:00
|
|
|
*/
|
2006-07-10 21:04:37 +00:00
|
|
|
struct SDL_SysWMinfo
|
|
|
|
{
|
|
|
|
SDL_version version;
|
|
|
|
SDL_SYSWM_TYPE subsystem;
|
|
|
|
union
|
|
|
|
{
|
2011-01-20 18:04:05 -08:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct
|
|
|
|
{
|
2010-09-29 21:24:50 -07:00
|
|
|
HWND window; /**< The window handle */
|
2010-09-27 01:24:05 -07:00
|
|
|
} win;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
2006-07-10 21:04:37 +00:00
|
|
|
struct
|
|
|
|
{
|
2010-09-27 01:24:05 -07:00
|
|
|
Display *display; /**< The X11 display */
|
2010-09-29 21:24:50 -07:00
|
|
|
Window window; /**< The X11 window */
|
2006-07-10 21:04:37 +00:00
|
|
|
} x11;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
|
2010-09-27 00:50:46 -07:00
|
|
|
struct
|
|
|
|
{
|
2010-09-29 21:24:50 -07:00
|
|
|
IDirectFB *dfb; /**< The directfb main interface */
|
|
|
|
IDirectFBWindow *window; /**< The directfb window handle */
|
|
|
|
IDirectFBSurface *surface; /**< The directfb client surface */
|
2010-09-27 01:24:05 -07:00
|
|
|
} dfb;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
2010-09-27 01:24:05 -07:00
|
|
|
struct
|
|
|
|
{
|
2010-09-29 21:24:50 -07:00
|
|
|
NSWindow *window; /* The Cocoa window */
|
2010-09-27 01:24:05 -07:00
|
|
|
} cocoa;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
2011-01-20 16:05:59 -08:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
UIWindow *window; /* The UIKit window */
|
|
|
|
} uikit;
|
2014-01-28 09:13:46 -03:00
|
|
|
#endif
|
|
|
|
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
struct wl_display *display; /**< Wayland display */
|
|
|
|
struct wl_surface *surface; /**< Wayland surface */
|
|
|
|
struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
|
|
|
|
} wl;
|
2011-01-21 11:23:19 -08:00
|
|
|
#endif
|
2011-01-20 18:09:55 -08:00
|
|
|
/* Can't have an empty union */
|
|
|
|
int dummy;
|
2011-01-20 16:05:59 -08:00
|
|
|
} info;
|
2006-07-10 21:04:37 +00:00
|
|
|
};
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
#endif /* SDL_PROTOTYPES_ONLY */
|
|
|
|
|
2006-07-10 21:04:37 +00:00
|
|
|
typedef struct SDL_SysWMinfo SDL_SysWMinfo;
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
/* Function prototypes */
|
2006-07-10 21:04:37 +00:00
|
|
|
/**
|
2009-10-19 13:31:58 +00:00
|
|
|
* \brief This function allows access to driver-dependent window information.
|
2013-05-18 14:17:52 -07:00
|
|
|
*
|
2010-07-17 22:59:28 -07:00
|
|
|
* \param window The window about which information is being requested
|
2013-05-18 14:17:52 -07:00
|
|
|
* \param info This structure must be initialized with the SDL version, and is
|
2009-10-19 13:31:58 +00:00
|
|
|
* then filled in with information about the given window.
|
2013-05-18 14:17:52 -07:00
|
|
|
*
|
|
|
|
* \return SDL_TRUE if the function is implemented and the version member of
|
2009-10-19 13:31:58 +00:00
|
|
|
* the \c info struct is valid, SDL_FALSE otherwise.
|
2013-05-18 14:17:52 -07:00
|
|
|
*
|
2009-10-19 13:31:58 +00:00
|
|
|
* You typically use this function like this:
|
|
|
|
* \code
|
2010-09-25 17:06:41 -07:00
|
|
|
* SDL_SysWMinfo info;
|
2009-10-19 13:31:58 +00:00
|
|
|
* SDL_VERSION(&info.version);
|
2013-07-14 11:57:01 -07:00
|
|
|
* if ( SDL_GetWindowWMInfo(window, &info) ) { ... }
|
2009-10-19 13:31:58 +00:00
|
|
|
* \endcode
|
2001-04-26 16:45:43 +00:00
|
|
|
*/
|
2010-01-21 06:21:52 +00:00
|
|
|
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
|
2006-07-10 21:04:37 +00:00
|
|
|
SDL_SysWMinfo * info);
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Ends C function definitions when using C++ */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#include "close_code.h"
|
|
|
|
|
|
|
|
#endif /* _SDL_syswm_h */
|
2006-07-10 21:04:37 +00:00
|
|
|
|
|
|
|
/* vi: set ts=4 sw=4 expandtab: */
|