SDL_ExitProcess() was ignoring exit code parameter.
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
25 * Include file for SDL custom system window manager hooks.
31 #include "SDL_stdinc.h"
32 #include "SDL_error.h"
33 #include "SDL_video.h"
34 #include "SDL_version.h"
36 #include "begin_code.h"
37 /* Set up for C function definitions, even when using C++ */
47 * Your application has access to a special type of event ::SDL_SYSWMEVENT,
48 * which contains window-manager specific information and arrives whenever
49 * an unhandled window event occurs. This event is ignored by default, but
50 * you can enable it with SDL_EventState().
52 #ifdef SDL_PROTOTYPES_ONLY
56 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
57 #define WIN32_LEAN_AND_MEAN
61 /* This is the structure for custom window manager events */
62 #if defined(SDL_VIDEO_DRIVER_X11)
63 #if defined(__APPLE__) && defined(__MACH__)
64 /* conflicts with Quickdraw.h */
65 #define Cursor X11Cursor
69 #include <X11/Xatom.h>
71 #if defined(__APPLE__) && defined(__MACH__)
72 /* matches the re-define above */
76 #endif /* defined(SDL_VIDEO_DRIVER_X11) */
78 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
82 #if defined(SDL_VIDEO_DRIVER_COCOA)
84 #include <Cocoa/Cocoa.h>
86 typedef struct _NSWindow NSWindow;
90 #if defined(SDL_VIDEO_DRIVER_UIKIT)
92 #include <UIKit/UIKit.h>
94 typedef struct _UIWindow UIWindow;
99 * These are the various supported windowing subsystems
112 * The custom event structure.
117 SDL_SYSWM_TYPE subsystem;
120 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
122 HWND hwnd; /**< The window for the message */
123 UINT msg; /**< The type of message */
124 WPARAM wParam; /**< WORD message parameter */
125 LPARAM lParam; /**< LONG message parameter */
128 #if defined(SDL_VIDEO_DRIVER_X11)
133 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
138 #if defined(SDL_VIDEO_DRIVER_COCOA)
141 /* No Cocoa window events yet */
144 #if defined(SDL_VIDEO_DRIVER_UIKIT)
147 /* No UIKit window events yet */
150 /* Can't have an empty union */
156 * The custom window manager information structure.
158 * When this structure is returned, it holds information about which
159 * low level system it is using, and will be one of SDL_SYSWM_TYPE.
164 SDL_SYSWM_TYPE subsystem;
167 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
170 HWND window; /**< The window handle */
173 #if defined(SDL_VIDEO_DRIVER_X11)
176 Display *display; /**< The X11 display */
177 Window window; /**< The X11 window */
180 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
183 IDirectFB *dfb; /**< The directfb main interface */
184 IDirectFBWindow *window; /**< The directfb window handle */
185 IDirectFBSurface *surface; /**< The directfb client surface */
188 #if defined(SDL_VIDEO_DRIVER_COCOA)
191 NSWindow *window; /* The Cocoa window */
194 #if defined(SDL_VIDEO_DRIVER_UIKIT)
197 UIWindow *window; /* The UIKit window */
200 /* Can't have an empty union */
205 #endif /* SDL_PROTOTYPES_ONLY */
207 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
209 /* Function prototypes */
211 * \brief This function allows access to driver-dependent window information.
213 * \param window The window about which information is being requested
214 * \param info This structure must be initialized with the SDL version, and is
215 * then filled in with information about the given window.
217 * \return SDL_TRUE if the function is implemented and the version member of
218 * the \c info struct is valid, SDL_FALSE otherwise.
220 * You typically use this function like this:
222 * SDL_SysWMinfo info;
223 * SDL_VERSION(&info.version);
224 * if ( SDL_GetWindowWMInfo(&info) ) { ... }
227 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
228 SDL_SysWMinfo * info);
231 /* Ends C function definitions when using C++ */
237 #include "close_code.h"
239 #endif /* _SDL_syswm_h */
241 /* vi: set ts=4 sw=4 expandtab: */