Platform_Win32_Screen.h
Go to the documentation of this file.00001 00010 #ifndef __Platform_Win32_Screen_H__ 00011 #define __Platform_Win32_Screen_H__ 00012 00013 // Includes 00014 #include "Platform_Screen.h" 00015 00016 // Forward declares 00017 class Platform_Win32_OS; 00018 class Platform_Win32_Screen_Technology; 00019 00020 00021 // Platform_Win32_Screen 00022 class Platform_Win32_Screen:public Platform_Screen, PlatformEventListener 00023 { 00024 00025 public: 00026 00027 Platform_Win32_Screen(Platform_Win32_OS* os); 00028 virtual ~Platform_Win32_Screen(); 00029 00030 virtual void Present( 00031 unsigned short* bitmapData, 00032 int bitmapWidth, 00033 int bitmapHeight, 00034 unsigned short modulate = 0xffff, 00035 unsigned short backgroundColor = 0x0000 00036 ); 00037 00038 00039 virtual void SetInterpolationMode(bool enabled); 00040 00041 virtual bool GetInterpolationMode(); 00042 00043 virtual void SetFullscreen(bool fullscreen); 00044 00045 virtual bool GetFullscreen(); 00046 00047 virtual void SetSize(int width, int height); 00048 00049 virtual int GetWidth(); 00050 00051 virtual int GetHeight(); 00052 00053 virtual void TransformCursorCoordinates(float& x, float& y); 00054 00055 void OnWmSize(int width, int height); 00056 00057 void OnMinimize(); 00058 00059 void OnRestore(); 00060 00061 void OnLoseFocus(); 00062 00063 void OnGainFocus(); 00064 00065 virtual void OnCustomEvent(const char* eventId, void* userData); 00066 00067 private: 00068 void SetWindowSize(); 00069 00070 enum Technology 00071 { 00072 Technology_D3D9, 00073 Technology_DDraw, 00074 Technology_GDI, 00075 Technology_Undefined, 00076 }; 00077 00078 void SetTechnology( 00079 Technology technology 00080 ); 00081 00082 void FirstTimeInitialize(); 00083 00084 void DowngradeTechnology(); 00085 00086 bool IsRunningOnWine(); 00087 00088 void DebugText(unsigned short* colorData, int hPitch, int vPitch, int x, int y, const char* text, unsigned short color); 00089 void BlitCharacter(unsigned short* colorData, int hPitch, int vPitch, int sx, int sy, int dx, int dy, unsigned short color); 00090 00091 private: 00092 static unsigned int Platform_Win32_Screen::DebugFontData[]; 00093 struct HWND__* windowHandle_; 00094 Technology technology_; 00095 Platform_Win32_Screen_Technology* technologyInstance_; 00096 bool fullscreen_; 00097 int windowedX_; 00098 int windowedY_; 00099 int windowedWidth_; 00100 int windowedHeight_; 00101 int fullscreenWidth_; 00102 int fullscreenHeight_; 00103 int disableOnWmSize_; 00104 bool showfps_; 00105 bool interpolationMode_; 00106 bool ignoreNextOnWmSize_; 00107 bool forceddraw_; 00108 bool forcegdi_; 00109 bool firstTimeInitializeCalled_; 00110 }; 00111 00112 00113 #endif /* __Platform_Win32_Screen_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
