2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
4 Copyright (C) 2001 Hsieh-Fu Tsai
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "SDL_config.h"
28 #ifndef _SDL_nxvideo_h
29 #define _SDL_nxvideo_h
31 #include <microwin/nano-X.h>
33 #include "../SDL_sysvideo.h"
35 #ifdef ENABLE_NANOX_DEBUG
36 #define Dprintf printf
38 #define Dprintf(ignore...)
41 // Hidden "this" pointer for the video functions
42 #define _THIS SDL_VideoDevice * this
44 // Private display data
45 typedef struct NX_SDL_VISUAL {
52 struct SDL_PrivateVideoData {
53 GR_WINDOW_ID SDL_Window ;
54 GR_WINDOW_ID FSwindow ;
55 // Flag: true if we have been passed a window
58 unsigned char * Image ;
59 unsigned char * Image_buff ; /* for GrArea*/
60 unsigned char * Clientfb; /* for DirectFB*/
61 nx_sdl_visual_t SDL_Visual ;
62 // The current list of available video modes
63 SDL_Rect ** modelist ;
64 int currently_fullscreen ;
66 int OffsetX, OffsetY ;
68 Uint16 * GammaRamp_R, * GammaRamp_G, * GammaRamp_B ;
69 // for GrArea, r_mask, g_mask, b_mask
71 #ifdef ENABLE_NANOX_DIRECT_FB
72 GR_WINDOW_FB_INFO fbinfo;
76 #define SDL_Window (this -> hidden -> SDL_Window)
77 #define FSwindow (this -> hidden -> FSwindow)
78 #define SDL_windowid (this -> hidden -> SDL_windowid)
79 #define SDL_GC (this -> hidden -> GC)
80 #define SDL_Image (this -> hidden -> Image)
81 #define Image_buff (this -> hidden -> Image_buff)
82 #define Clientfb (this -> hidden -> Clientfb)
83 #define SDL_Visual (this -> hidden -> SDL_Visual)
84 #define SDL_modelist (this -> hidden -> modelist)
85 #define currently_fullscreen (this -> hidden -> currently_fullscreen)
86 #define OffsetX (this -> hidden -> OffsetX)
87 #define OffsetY (this -> hidden -> OffsetY)
88 #define GammaRamp_R (this -> hidden -> GammaRamp_R)
89 #define GammaRamp_G (this -> hidden -> GammaRamp_G)
90 #define GammaRamp_B (this -> hidden -> GammaRamp_B)
91 #define pixel_type (this -> hidden -> pixel_type)
92 #define fbinfo (this -> hidden -> fbinfo)
94 #define CI_SIZE 256 // color index size
96 #endif // _SDL_nxvideo_h