src/video/x11/SDL_x11video.h
changeset 1895 c121d94672cb
parent 1791 5652192b9c8b
     1.1 --- a/src/video/x11/SDL_x11video.h	Thu Jul 06 18:01:37 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11video.h	Mon Jul 10 21:04:37 2006 +0000
     1.3 @@ -36,7 +36,7 @@
     1.4  #endif
     1.5  #if SDL_VIDEO_DRIVER_X11_XINERAMA
     1.6  #include "../Xext/extensions/Xinerama.h"
     1.7 -#endif 
     1.8 +#endif
     1.9  #if SDL_VIDEO_DRIVER_X11_XRANDR
    1.10  #include <X11/extensions/Xrandr.h>
    1.11  #endif
    1.12 @@ -56,20 +56,21 @@
    1.13  #define _THIS	SDL_VideoDevice *this
    1.14  
    1.15  /* Private display data */
    1.16 -struct SDL_PrivateVideoData {
    1.17 -    int local_X11;		/* Flag: true if local display */
    1.18 -    Display *X11_Display;	/* Used for events and window management */
    1.19 -    Display *GFX_Display;	/* Used for graphics and colormap stuff */
    1.20 -    Visual *SDL_Visual;		/* The visual used by our window */
    1.21 -    Window WMwindow;		/* Input window, managed by window manager */
    1.22 -    Window FSwindow;		/* Fullscreen window, completely unmanaged */
    1.23 -    Window SDL_Window;		/* Shared by both displays (no X security?) */
    1.24 -    Atom WM_DELETE_WINDOW;	/* "close-window" protocol atom */
    1.25 -    WMcursor *BlankCursor;	/* The invisible cursor */
    1.26 -    XIM X11_IM;		/* Used to communicate with the input method (IM) server */
    1.27 -    XIC X11_IC;		/* Used for retaining the state, properties, and semantics of communication with                                                  the input method (IM) server */
    1.28 +struct SDL_PrivateVideoData
    1.29 +{
    1.30 +    int local_X11;              /* Flag: true if local display */
    1.31 +    Display *X11_Display;       /* Used for events and window management */
    1.32 +    Display *GFX_Display;       /* Used for graphics and colormap stuff */
    1.33 +    Visual *SDL_Visual;         /* The visual used by our window */
    1.34 +    Window WMwindow;            /* Input window, managed by window manager */
    1.35 +    Window FSwindow;            /* Fullscreen window, completely unmanaged */
    1.36 +    Window SDL_Window;          /* Shared by both displays (no X security?) */
    1.37 +    Atom WM_DELETE_WINDOW;      /* "close-window" protocol atom */
    1.38 +    WMcursor *BlankCursor;      /* The invisible cursor */
    1.39 +    XIM X11_IM;                 /* Used to communicate with the input method (IM) server */
    1.40 +    XIC X11_IC;                 /* Used for retaining the state, properties, and semantics of communication with                                                  the input method (IM) server */
    1.41  
    1.42 -    char *SDL_windowid;		/* Flag: true if we have been passed a window */
    1.43 +    char *SDL_windowid;         /* Flag: true if we have been passed a window */
    1.44  
    1.45      /* Direct Graphics Access extension information */
    1.46      int using_dga;
    1.47 @@ -81,55 +82,56 @@
    1.48  #endif
    1.49  
    1.50      /* The variables used for displaying graphics */
    1.51 -    XImage *Ximage;		/* The X image for our window */
    1.52 -    GC	gc;			/* The graphic context for drawing */
    1.53 +    XImage *Ximage;             /* The X image for our window */
    1.54 +    GC gc;                      /* The graphic context for drawing */
    1.55  
    1.56      /* The current width and height of the fullscreen mode */
    1.57      int window_w;
    1.58      int window_h;
    1.59  
    1.60      /* Support for internal mouse warping */
    1.61 -    struct {
    1.62 +    struct
    1.63 +    {
    1.64          int x;
    1.65          int y;
    1.66      } mouse_last;
    1.67 -    struct {
    1.68 +    struct
    1.69 +    {
    1.70          int numerator;
    1.71          int denominator;
    1.72          int threshold;
    1.73      } mouse_accel;
    1.74      int mouse_relative;
    1.75  
    1.76 -    /* The current list of available video modes */
    1.77 -    SDL_Rect **modelist;
    1.78 -
    1.79      /* available visuals of interest to us, sorted deepest first */
    1.80 -    struct {
    1.81 -	Visual *visual;
    1.82 -	int depth;		/* number of significant bits/pixel */
    1.83 -	int bpp;		/* pixel quantum in bits */
    1.84 -    } visuals[2*5];		/* at most 2 entries for 8, 15, 16, 24, 32 */
    1.85 +    struct
    1.86 +    {
    1.87 +        Visual *visual;
    1.88 +        int depth;              /* number of significant bits/pixel */
    1.89 +        int bpp;                /* pixel quantum in bits */
    1.90 +    } visuals[2 * 5];           /* at most 2 entries for 8, 15, 16, 24, 32 */
    1.91      int nvisuals;
    1.92  
    1.93 -    Visual *vis;		/* current visual in use */
    1.94 -    int depth;			/* current visual depth (not bpp) */
    1.95 +    Visual *vis;                /* current visual in use */
    1.96 +    int depth;                  /* current visual depth (not bpp) */
    1.97  
    1.98      /* Variables used by the X11 video mode code */
    1.99  #if SDL_VIDEO_DRIVER_X11_XINERAMA
   1.100 -    SDL_NAME(XineramaScreenInfo) xinerama_info;
   1.101 +      SDL_NAME(XineramaScreenInfo) * xinerama;
   1.102  #endif
   1.103  #if SDL_VIDEO_DRIVER_X11_XRANDR
   1.104 -    XRRScreenConfiguration* screen_config;
   1.105 +    XRRScreenConfiguration *screen_config;
   1.106      int saved_size_id;
   1.107      Rotation saved_rotation;
   1.108  #endif
   1.109  #if SDL_VIDEO_DRIVER_X11_VIDMODE
   1.110 -    SDL_NAME(XF86VidModeModeInfo) saved_mode;
   1.111 -    struct {
   1.112 +      SDL_NAME(XF86VidModeModeInfo) saved_mode;
   1.113 +    struct
   1.114 +    {
   1.115          int x, y;
   1.116      } saved_view;
   1.117  #endif
   1.118 -#if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */
   1.119 +#if SDL_VIDEO_DRIVER_X11_XME    /* XiG XME fullscreen */
   1.120      XiGMiscResolutionInfo saved_res;
   1.121  #endif
   1.122  
   1.123 @@ -147,13 +149,13 @@
   1.124      int blit_queued;
   1.125  
   1.126      /* Colormap handling */
   1.127 -    Colormap DisplayColormap;	/* The default display colormap */
   1.128 -    Colormap XColorMap;		/* The current window colormap */
   1.129 -    int *XPixels;		/* pixels value allocation counts */
   1.130 -    float gamma_saved[3];	/* Saved gamma values for VidMode gamma */
   1.131 -    int gamma_changed;		/* flag: has VidMode gamma been modified? */
   1.132 +    Colormap DisplayColormap;   /* The default display colormap */
   1.133 +    Colormap XColorMap;         /* The current window colormap */
   1.134 +    int *XPixels;               /* pixels value allocation counts */
   1.135 +    float gamma_saved[3];       /* Saved gamma values for VidMode gamma */
   1.136 +    int gamma_changed;          /* flag: has VidMode gamma been modified? */
   1.137  
   1.138 -    short *iconcolors;		/* List of colors used by the icon */
   1.139 +    short *iconcolors;          /* List of colors used by the icon */
   1.140  
   1.141      /* Screensaver settings */
   1.142      int screensaver_timeout;
   1.143 @@ -186,7 +188,7 @@
   1.144  #define mouse_accel		(this->hidden->mouse_accel)
   1.145  #define mouse_relative		(this->hidden->mouse_relative)
   1.146  #define SDL_modelist		(this->hidden->modelist)
   1.147 -#define xinerama_info		(this->hidden->xinerama_info)
   1.148 +#define xinerama		(this->hidden->xinerama)
   1.149  #define saved_mode		(this->hidden->saved_mode)
   1.150  #define saved_view		(this->hidden->saved_view)
   1.151  #define saved_res		(this->hidden->saved_res)
   1.152 @@ -216,3 +218,4 @@
   1.153   (VendorRelease(SDL_Display) condition buggy_version))
   1.154  
   1.155  #endif /* _SDL_x11video_h */
   1.156 +/* vi: set ts=4 sw=4 expandtab: */