src/video/SDL_sysvideo.h
changeset 8477 ad08f0d710f3
parent 8460 f483e8bdae3c
parent 7558 0614504d2265
child 8535 e8ee0708ef5c
     1.1 --- a/src/video/SDL_sysvideo.h	Sat Jun 08 14:34:09 2013 -0400
     1.2 +++ b/src/video/SDL_sysvideo.h	Mon Aug 12 22:29:55 2013 -0400
     1.3 @@ -25,6 +25,7 @@
     1.4  
     1.5  #include "SDL_messagebox.h"
     1.6  #include "SDL_shape.h"
     1.7 +#include "SDL_thread.h"
     1.8  
     1.9  /* The SDL video driver */
    1.10  
    1.11 @@ -35,19 +36,19 @@
    1.12  
    1.13  /* Define the SDL window-shaper structure */
    1.14  struct SDL_WindowShaper
    1.15 -{   
    1.16 +{
    1.17      /* The window associated with the shaper */
    1.18      SDL_Window *window;
    1.19 -    
    1.20 +
    1.21      /* The user's specified coordinates for the window, for once we give it a shape. */
    1.22      Uint32 userx,usery;
    1.23 -    
    1.24 +
    1.25      /* The parameters for shape calculation. */
    1.26      SDL_WindowShapeMode mode;
    1.27 -    
    1.28 +
    1.29      /* Has this window been assigned a shape? */
    1.30      SDL_bool hasshape;
    1.31 -    
    1.32 +
    1.33      void *driverdata;
    1.34  };
    1.35  
    1.36 @@ -72,6 +73,7 @@
    1.37      const void *magic;
    1.38      Uint32 id;
    1.39      char *title;
    1.40 +    SDL_Surface *icon;
    1.41      int x, y;
    1.42      int w, h;
    1.43      int min_w, min_h;
    1.44 @@ -82,7 +84,7 @@
    1.45      SDL_Rect windowed;
    1.46  
    1.47      SDL_DisplayMode fullscreen_mode;
    1.48 -    
    1.49 +
    1.50      float brightness;
    1.51      Uint16 *gamma;
    1.52      Uint16 *saved_gamma;        /* (just offset into gamma) */
    1.53 @@ -128,7 +130,7 @@
    1.54  struct SDL_SysWMinfo;
    1.55  
    1.56  /* Define the SDL video driver structure */
    1.57 -#define _THIS	SDL_VideoDevice *_this
    1.58 +#define _THIS   SDL_VideoDevice *_this
    1.59  
    1.60  struct SDL_VideoDevice
    1.61  {
    1.62 @@ -201,6 +203,7 @@
    1.63      int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch);
    1.64      int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects);
    1.65      void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);
    1.66 +    void (*OnWindowEnter) (_THIS, SDL_Window * window);
    1.67  
    1.68      /* * * */
    1.69      /*
    1.70 @@ -241,10 +244,10 @@
    1.71      void (*SetTextInputRect) (_THIS, SDL_Rect *rect);
    1.72  
    1.73      /* Screen keyboard */
    1.74 -    SDL_bool (*SDL_HasScreenKeyboardSupport) (_THIS);
    1.75 -    void (*SDL_ShowScreenKeyboard) (_THIS, SDL_Window *window);
    1.76 -    void (*SDL_HideScreenKeyboard) (_THIS, SDL_Window *window);
    1.77 -    SDL_bool (*SDL_IsScreenKeyboardShown) (_THIS, SDL_Window *window);
    1.78 +    SDL_bool (*HasScreenKeyboardSupport) (_THIS);
    1.79 +    void (*ShowScreenKeyboard) (_THIS, SDL_Window *window);
    1.80 +    void (*HideScreenKeyboard) (_THIS, SDL_Window *window);
    1.81 +    SDL_bool (*IsScreenKeyboardShown) (_THIS, SDL_Window *window);
    1.82  
    1.83      /* Clipboard */
    1.84      int (*SetClipboardText) (_THIS, const char *text);
    1.85 @@ -298,8 +301,13 @@
    1.86  
    1.87      /* * * */
    1.88      /* Cache current GL context; don't call the OS when it hasn't changed. */
    1.89 +    /* We have the global pointers here so Cocoa continues to work the way
    1.90 +       it always has, and the thread-local storage for the general case.
    1.91 +     */
    1.92      SDL_Window *current_glwin;
    1.93      SDL_GLContext current_glctx;
    1.94 +    SDL_TLSID current_glwin_tls;
    1.95 +    SDL_TLSID current_glctx_tls;
    1.96  
    1.97      /* * * */
    1.98      /* Data private to this driver */
    1.99 @@ -370,12 +378,14 @@
   1.100  extern void SDL_OnWindowResized(SDL_Window * window);
   1.101  extern void SDL_OnWindowMinimized(SDL_Window * window);
   1.102  extern void SDL_OnWindowRestored(SDL_Window * window);
   1.103 +extern void SDL_OnWindowEnter(SDL_Window * window);
   1.104 +extern void SDL_OnWindowLeave(SDL_Window * window);
   1.105  extern void SDL_OnWindowFocusGained(SDL_Window * window);
   1.106  extern void SDL_OnWindowFocusLost(SDL_Window * window);
   1.107  extern void SDL_UpdateWindowGrab(SDL_Window * window);
   1.108  extern SDL_Window * SDL_GetFocusWindow(void);
   1.109  
   1.110 -extern SDL_bool SDL_ShouldAllowTopmost();
   1.111 +extern SDL_bool SDL_ShouldAllowTopmost(void);
   1.112  
   1.113  #endif /* _SDL_sysvideo_h */
   1.114