Home | History | Annotate | Download | only in epoc
      1 /*
      2     SDL - Simple DirectMedia Layer
      3     Copyright (C) 1997-2004 Sam Lantinga
      4 
      5     This library is free software; you can redistribute it and/or
      6     modify it under the terms of the GNU Library General Public
      7     License as published by the Free Software Foundation; either
      8     version 2 of the License, or (at your option) any later version.
      9 
     10     This library is distributed in the hope that it will be useful,
     11     but WITHOUT ANY WARRANTY; without even the implied warranty of
     12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13     Library General Public License for more details.
     14 
     15     You should have received a copy of the GNU Library General Public
     16     License along with this library; if not, write to the Free
     17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     18 
     19     Sam Lantinga
     20     slouken (at) libsdl.org
     21 */
     22 #include "SDL_config.h"
     23 
     24 /*
     25     SDL_epocvideo.h
     26     Epoc based SDL video driver implementation
     27 
     28     Epoc version by Hannu Viitala (hannu.j.viitala (at) mbnet.fi)
     29 */
     30 
     31 #ifndef _SDL_epocvideo_h
     32 #define _SDL_epocvideo_h
     33 
     34 extern "C" {
     35 #include "SDL_mouse.h"
     36 #include "../SDL_sysvideo.h"
     37 };
     38 
     39 #include <e32std.h>
     40 #include <bitdev.h>
     41 #include <w32std.h>
     42 
     43 /* Hidden "this" pointer for the video functions */
     44 #define _THIS	SDL_VideoDevice *_this
     45 #define Private	_this->hidden
     46 
     47 #define SDL_NUMMODES	4
     48 
     49 /* Private display data */
     50 struct SDL_PrivateVideoData {
     51 
     52     SDL_Rect            *SDL_modelist[SDL_NUMMODES+1];
     53 
     54 	/* Epoc window server info */
     55 
     56     RWsSession			EPOC_WsSession;
     57 	RWindowGroup		EPOC_WsWindowGroup;
     58     TInt                EPOC_WsWindowGroupID;
     59 	RWindow				EPOC_WsWindow;
     60 	CWsScreenDevice*	EPOC_WsScreen;
     61 	CWindowGc*			EPOC_WindowGc;
     62 	TRequestStatus		EPOC_WsEventStatus;
     63 	TRequestStatus		EPOC_RedrawEventStatus;
     64 	TWsEvent			EPOC_WsEvent;
     65 	TWsRedrawEvent		EPOC_RedrawEvent;
     66     #ifdef __WINS__
     67     CWsBitmap*          EPOC_Bitmap;
     68     #endif
     69     TBool               EPOC_IsWindowFocused; //!!Not used for anything yet!
     70 
     71     /* Screen hardware frame buffer info */
     72 
     73    	TBool				EPOC_HasFrameBuffer;
     74 	TInt				EPOC_BytesPerPixel;
     75 	TInt				EPOC_BytesPerScanLine;
     76 	TDisplayMode		EPOC_DisplayMode;
     77 	TSize				EPOC_ScreenSize;
     78 	TUint8*				EPOC_FrameBuffer;		/* if NULL in HW we can't do direct screen access */
     79     TInt                EPOC_ScreenOffset;
     80 
     81     /* Simulate double screen height */
     82     TBool               EPOC_ShrinkedHeight;
     83 };
     84 
     85 extern "C" {
     86 extern void RedrawWindowL(_THIS);
     87 };
     88 
     89 
     90 #endif /* _SDL_epocvideo_h */
     91