diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-17 14:35:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-17 15:43:18 +0300 |
commit | 80d1d624d378d4d8c03fb26ef286baf5479b6497 (patch) | |
tree | d5ae6545d0318d8e0448d3a084a15e72aff6e2a5 /extern/sdlew/include/SDL2/SDL_syswm.h | |
parent | 90bf426554a7cc1d429f2dd9a02edbcbeb51ceec (diff) |
Support dynamic loading of SDL libraries
This is mainly to address old issue when one need to have SDL library installed
in order to use our official builds. Some hip distros already installs SDL,
but it's not quite the same across all the variety of the distros.
We also now switching to SDL-2.0, most of the distros have it in repositories
already, so it shouldn't be huge deal to install it if needed.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D878
Diffstat (limited to 'extern/sdlew/include/SDL2/SDL_syswm.h')
-rw-r--r-- | extern/sdlew/include/SDL2/SDL_syswm.h | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/extern/sdlew/include/SDL2/SDL_syswm.h b/extern/sdlew/include/SDL2/SDL_syswm.h new file mode 100644 index 00000000000..7c4bc3188bc --- /dev/null +++ b/extern/sdlew/include/SDL2/SDL_syswm.h @@ -0,0 +1,171 @@ + +#ifndef _SDL_syswm_h +#define _SDL_syswm_h + +#include "SDL_stdinc.h" +#include "SDL_error.h" +#include "SDL_video.h" +#include "SDL_version.h" + +#include "begin_code.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SDL_PROTOTYPES_ONLY +struct SDL_SysWMinfo; +#else + +#if defined(SDL_VIDEO_DRIVER_WINDOWS) +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#endif + +#if defined(SDL_VIDEO_DRIVER_X11) +#if defined(__APPLE__) && defined(__MACH__) + +#define Cursor X11Cursor +#endif + +#include <X11/Xlib.h> +#include <X11/Xatom.h> + +#if defined(__APPLE__) && defined(__MACH__) + +#undef Cursor +#endif + +#endif + +#if defined(SDL_VIDEO_DRIVER_DIRECTFB) +#include <directfb.h> +#endif + +#if defined(SDL_VIDEO_DRIVER_COCOA) +#ifdef __OBJC__ +#include <Cocoa/Cocoa.h> +#else +typedef struct _NSWindow NSWindow; +#endif +#endif + +#if defined(SDL_VIDEO_DRIVER_UIKIT) +#ifdef __OBJC__ +#include <UIKit/UIKit.h> +#else +typedef struct _UIWindow UIWindow; +#endif +#endif + +typedef enum +{ + SDL_SYSWM_UNKNOWN, + SDL_SYSWM_WINDOWS, + SDL_SYSWM_X11, + SDL_SYSWM_DIRECTFB, + SDL_SYSWM_COCOA, + SDL_SYSWM_UIKIT, +} SDL_SYSWM_TYPE; + +struct SDL_SysWMmsg +{ + SDL_version version; + SDL_SYSWM_TYPE subsystem; + union + { +#if defined(SDL_VIDEO_DRIVER_WINDOWS) + struct { + HWND hwnd; + UINT msg; + WPARAM wParam; + LPARAM lParam; + } win; +#endif +#if defined(SDL_VIDEO_DRIVER_X11) + struct { + XEvent event; + } x11; +#endif +#if defined(SDL_VIDEO_DRIVER_DIRECTFB) + struct { + DFBEvent event; + } dfb; +#endif +#if defined(SDL_VIDEO_DRIVER_COCOA) + struct + { + + } cocoa; +#endif +#if defined(SDL_VIDEO_DRIVER_UIKIT) + struct + { + + } uikit; +#endif + + int dummy; + } msg; +}; + +struct SDL_SysWMinfo +{ + SDL_version version; + SDL_SYSWM_TYPE subsystem; + union + { +#if defined(SDL_VIDEO_DRIVER_WINDOWS) + struct + { + HWND window; + } win; +#endif +#if defined(SDL_VIDEO_DRIVER_X11) + struct + { + Display *display; + Window window; + } x11; +#endif +#if defined(SDL_VIDEO_DRIVER_DIRECTFB) + struct + { + IDirectFB *dfb; + IDirectFBWindow *window; + IDirectFBSurface *surface; + } dfb; +#endif +#if defined(SDL_VIDEO_DRIVER_COCOA) + struct + { + NSWindow *window; + } cocoa; +#endif +#if defined(SDL_VIDEO_DRIVER_UIKIT) + struct + { + UIWindow *window; + } uikit; +#endif + + int dummy; + } info; +}; + +#endif + +typedef struct SDL_SysWMinfo SDL_SysWMinfo; + +typedef SDL_bool SDLCALL tSDL_GetWindowWMInfo(SDL_Window * window, + SDL_SysWMinfo * info); + +extern tSDL_GetWindowWMInfo *SDL_GetWindowWMInfo; + +#ifdef __cplusplus +} +#endif +#include "close_code.h" + +#endif + |