Commit 8e2a972b authored by Sam Lantinga's avatar Sam Lantinga

attached is a patch to support DirectFB in include/SDL_syswm.h. It

defines SDL_SYSWM_DIRECTFB as a subsystem.
This allows developers to e.g. access DirectFB's video and picture
providers.

Kind regards,

André
parent e2b5e827
...@@ -55,6 +55,7 @@ struct SDL_SysWMinfo; ...@@ -55,6 +55,7 @@ struct SDL_SysWMinfo;
#else #else
/* This is the structure for custom window manager events */ /* This is the structure for custom window manager events */
#if defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_DIRECTFB)
#if defined(SDL_VIDEO_DRIVER_X11) #if defined(SDL_VIDEO_DRIVER_X11)
#if defined(__APPLE__) && defined(__MACH__) #if defined(__APPLE__) && defined(__MACH__)
/* conflicts with Quickdraw.h */ /* conflicts with Quickdraw.h */
...@@ -69,12 +70,22 @@ struct SDL_SysWMinfo; ...@@ -69,12 +70,22 @@ struct SDL_SysWMinfo;
#undef Cursor #undef Cursor
#endif #endif
#endif /* defined(SDL_VIDEO_DRIVER_X11) */
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
#include <directfb/directfb.h>
#endif
/** /**
* These are the various supported subsystems under UNIX. * These are the various supported subsystems under UNIX.
*/ */
typedef enum typedef enum
{ {
SDL_SYSWM_X11 #if defined(SDL_VIDEO_DRIVER_X11)
SDL_SYSWM_X11,
#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
SDL_SYSWM_DIRECTFB,
#endif
} SDL_SYSWM_TYPE; } SDL_SYSWM_TYPE;
/** /**
...@@ -86,7 +97,12 @@ struct SDL_SysWMmsg ...@@ -86,7 +97,12 @@ struct SDL_SysWMmsg
SDL_SYSWM_TYPE subsystem; SDL_SYSWM_TYPE subsystem;
union union
{ {
#if defined(SDL_VIDEO_DRIVER_X11)
XEvent xevent; XEvent xevent;
#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
DFBEvent dfb_event;
#endif
} event; } event;
}; };
...@@ -102,11 +118,21 @@ struct SDL_SysWMinfo ...@@ -102,11 +118,21 @@ struct SDL_SysWMinfo
SDL_SYSWM_TYPE subsystem; SDL_SYSWM_TYPE subsystem;
union union
{ {
#if defined(SDL_VIDEO_DRIVER_X11)
struct struct
{ {
Display *display; /**< The X11 display */ Display *display; /**< The X11 display */
Window window; /**< The X11 display window */ Window window; /**< The X11 display window */
} x11; } x11;
#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct
{
IDirectFB *dfb; /**< The directfb main interface */
IDirectFBWindow *window; /**< The directfb window handle */
IDirectFBSurface *surface; /**< The directfb client surface */
} directfb;
#endif
} info; } info;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment