src/video/nanox/SDL_nxvideo.h
author Ryan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2006 13:20:10 +0000
changeset 1234 73676c1f56ee
parent 769 b8d311d90021
child 1361 19418e4422cb
permissions -rw-r--r--
For sanity's sake, removed the '&' when passing copy_row array to asm.
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2004 Sam Lantinga
     4     Copyright (C) 2001  Hsieh-Fu Tsai
     5 
     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.
    10 
    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.
    15 
    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
    19 
    20     Sam Lantinga
    21     slouken@libsdl.org
    22     
    23     Hsieh-Fu Tsai
    24     clare@setabox.com
    25 */
    26 
    27 #ifndef _SDL_nxvideo_h
    28 #define _SDL_nxvideo_h
    29 
    30 #include <microwin/nano-X.h>
    31 
    32 #include "SDL_sysvideo.h"
    33 
    34 #ifdef ENABLE_NANOX_DEBUG
    35 #define Dprintf printf
    36 #else
    37 #define Dprintf(ignore...)
    38 #endif
    39 
    40 // Hidden "this" pointer for the video functions
    41 #define _THIS   SDL_VideoDevice * this
    42 
    43 // Private display data
    44 typedef struct NX_SDL_VISUAL {
    45     int    bpp ;
    46     Uint32 red_mask ;
    47     Uint32 green_mask ;
    48     Uint32 blue_mask ;
    49 } nx_sdl_visual_t ;
    50 
    51 struct SDL_PrivateVideoData {
    52     GR_WINDOW_ID    SDL_Window ;
    53     GR_WINDOW_ID    FSwindow ;
    54     // Flag: true if we have been passed a window
    55     char            * SDL_windowid ;
    56     GR_GC_ID        GC ;
    57     unsigned char   * Image ;
    58     unsigned char   * Image_buff ;	/* for GrArea*/
    59     unsigned char   * Clientfb;		/* for DirectFB*/
    60     nx_sdl_visual_t SDL_Visual ;
    61     // The current list of available video modes
    62     SDL_Rect        ** modelist ;
    63     int             currently_fullscreen ;
    64     // for fullscreen
    65     int             OffsetX, OffsetY ;
    66     // for GammaRamp
    67     Uint16          * GammaRamp_R, * GammaRamp_G, * GammaRamp_B ;
    68     // for GrArea, r_mask, g_mask, b_mask
    69     int             pixel_type ;
    70 #ifdef ENABLE_NANOX_DIRECT_FB
    71     GR_WINDOW_FB_INFO fbinfo;
    72 #endif
    73 } ;
    74 
    75 #define SDL_Window           (this -> hidden -> SDL_Window)
    76 #define FSwindow             (this -> hidden -> FSwindow)
    77 #define SDL_windowid         (this -> hidden -> SDL_windowid)
    78 #define SDL_GC               (this -> hidden -> GC)
    79 #define SDL_Image            (this -> hidden -> Image)
    80 #define Image_buff           (this -> hidden -> Image_buff)
    81 #define Clientfb             (this -> hidden -> Clientfb)
    82 #define SDL_Visual           (this -> hidden -> SDL_Visual)
    83 #define SDL_modelist         (this -> hidden -> modelist)
    84 #define currently_fullscreen (this -> hidden -> currently_fullscreen)
    85 #define OffsetX              (this -> hidden -> OffsetX)
    86 #define OffsetY              (this -> hidden -> OffsetY)
    87 #define GammaRamp_R          (this -> hidden -> GammaRamp_R)
    88 #define GammaRamp_G          (this -> hidden -> GammaRamp_G)
    89 #define GammaRamp_B          (this -> hidden -> GammaRamp_B)
    90 #define pixel_type           (this -> hidden -> pixel_type)
    91 #define fbinfo               (this -> hidden -> fbinfo)
    92 
    93 #define CI_SIZE 256   // color index size
    94 
    95 #endif  // _SDL_nxvideo_h