Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

clanwindowscreen.h

Go to the documentation of this file.
00001 /*
00002         $Id: clanwindowscreen.h,v 1.1 2001/03/06 15:09:17 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 
00016 #ifndef header_clanwindowscreen
00017 #define header_clanwindowscreen
00018 
00019 #include <WindowScreen.h>
00020 #include <SupportDefs.h>
00021 
00022 typedef int32 (*rect8_hook)(int32,int32,int32,int32,uint8);
00023 typedef int32 (*rect16_hook)(int32,int32,int32,int32,uint16);
00024 typedef int32 (*rect32_hook)(int32,int32,int32,int32,uint32);
00025 typedef int32 (*sync_hook)();
00026 
00027 class ClanWindowScreen : public BWindowScreen
00028 {
00029 public:
00030         ClanWindowScreen(status_t*);
00031         void set_videomode(int width, int height, int bpp, bool fullscreen, bool allow_resize, bool video_memory);
00032         void flip_display();
00033         void put_display(const class CL_Rect &rect);
00034         uint8* get_data();
00035         int get_frames() { return frames; }
00036         bool get_connected() { return connected; }
00037         int get_width() { return width; }
00038         int get_height() { return height; }
00039         int get_depth() { return bpp; }
00040         int get_pitch() { return line_length; }
00041         bool is_connected() { return connected; }
00042         bool fill_rect_accelerated();
00043 
00044         rect8_hook fill_rect8;
00045         rect16_hook fill_rect16;
00046         rect32_hook fill_rect32;
00047         sync_hook sync;
00048 
00049         int write_frame;
00050 
00051 protected:
00052         virtual void MessageReceived(BMessage *message);
00053         virtual void ScreenConnected(bool);
00054         uint32 find_space();
00055         void init_accelerations();
00056         
00057         uint8* save_buffer;
00058         uint8* frame_buffer;
00059         ulong line_length;
00060         int frames;
00061         int width, height, bpp;
00062         bool fullscreen, allow_resize;
00063         bool connected;
00064         bool acc_fill_rect;
00065 };
00066 
00067 #endif

Generated at Wed Apr 4 19:53:59 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001