include/SDL_syswm.h
changeset 4899 5d529386db73
parent 4895 fd27410a5db0
child 4900 69d9db65f248
     1.1 --- a/include/SDL_syswm.h	Mon Sep 27 00:49:56 2010 -0700
     1.2 +++ b/include/SDL_syswm.h	Mon Sep 27 00:50:46 2010 -0700
     1.3 @@ -55,6 +55,7 @@
     1.4  #else
     1.5  
     1.6  /* This is the structure for custom window manager events */
     1.7 +#if defined(SDL_VIDEO_DRIVER_X11) || defined(SDL_VIDEO_DRIVER_DIRECTFB)
     1.8  #if defined(SDL_VIDEO_DRIVER_X11)
     1.9  #if defined(__APPLE__) && defined(__MACH__)
    1.10  /* conflicts with Quickdraw.h */
    1.11 @@ -69,12 +70,22 @@
    1.12  #undef Cursor
    1.13  #endif
    1.14  
    1.15 +#endif /* defined(SDL_VIDEO_DRIVER_X11) */
    1.16 +
    1.17 +#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.18 +#include <directfb/directfb.h>
    1.19 +#endif
    1.20  /** 
    1.21   *  These are the various supported subsystems under UNIX.
    1.22   */
    1.23  typedef enum
    1.24  {
    1.25 -    SDL_SYSWM_X11
    1.26 +#if defined(SDL_VIDEO_DRIVER_X11)
    1.27 +    SDL_SYSWM_X11,
    1.28 +#endif
    1.29 +#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.30 +    SDL_SYSWM_DIRECTFB,
    1.31 +#endif
    1.32  } SDL_SYSWM_TYPE;
    1.33  
    1.34  /**
    1.35 @@ -86,7 +97,12 @@
    1.36      SDL_SYSWM_TYPE subsystem;
    1.37      union
    1.38      {
    1.39 +#if defined(SDL_VIDEO_DRIVER_X11)
    1.40          XEvent xevent;
    1.41 +#endif
    1.42 +#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.43 +        DFBEvent dfb_event;
    1.44 +#endif
    1.45      } event;
    1.46  };
    1.47  
    1.48 @@ -102,11 +118,21 @@
    1.49      SDL_SYSWM_TYPE subsystem;
    1.50      union
    1.51      {
    1.52 +#if defined(SDL_VIDEO_DRIVER_X11)
    1.53          struct
    1.54          {
    1.55              Display *display;   /**< The X11 display */
    1.56              Window window;      /**< The X11 display window */
    1.57          } x11;
    1.58 +#endif
    1.59 +#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
    1.60 +        struct
    1.61 +        {
    1.62 +        	IDirectFB *dfb;   			/**< The directfb main interface */
    1.63 +        	IDirectFBWindow *window;    /**< The directfb window handle */
    1.64 +        	IDirectFBSurface *surface;  /**< The directfb client surface */
    1.65 +        } directfb;
    1.66 +#endif
    1.67      } info;
    1.68  };
    1.69