00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef WIN32_FACTORY_HPP
00026 #define WIN32_FACTORY_HPP
00027
00028 #ifndef _WIN32_WINNT
00029 # define _WIN32_WINNT 0x0500
00030 #endif
00031
00032 #include <windows.h>
00033 #include <shellapi.h>
00034 #include "../src/os_factory.hpp"
00035 #include <map>
00036
00037
00038
00039 class Win32Factory: public OSFactory
00040 {
00041 public:
00042 Win32Factory( intf_thread_t *pIntf );
00043 virtual ~Win32Factory();
00044
00045
00046 virtual bool init();
00047
00048
00049 virtual OSGraphics *createOSGraphics( int width, int height );
00050
00051
00052 virtual OSLoop *getOSLoop();
00053
00054
00055 virtual void destroyOSLoop();
00056
00057
00058 virtual void minimize();
00059
00060
00061 virtual void restore();
00062
00063
00064 virtual void addInTray();
00065
00066
00067 virtual void removeFromTray();
00068
00069
00070 virtual void addInTaskBar();
00071
00072
00073 virtual void removeFromTaskBar();
00074
00075
00076 virtual OSTimer *createOSTimer( CmdGeneric &rCmd );
00077
00078
00079 virtual OSWindow *createOSWindow( GenericWindow &rWindow,
00080 bool dragDrop, bool playOnDrop,
00081 OSWindow *pParent );
00082
00083
00084 virtual OSTooltip *createOSTooltip();
00085
00086
00087 virtual OSPopup *createOSPopup();
00088
00089
00090 virtual const string &getDirSeparator() const { return m_dirSep; }
00091
00092
00093 virtual const list<string> &getResourcePath() const
00094 { return m_resourcePath; }
00095
00096
00097 virtual int getScreenWidth() const;
00098 virtual int getScreenHeight() const;
00099
00100
00101 virtual SkinsRect getWorkArea() const;
00102
00103
00104 virtual void getMousePos( int &rXPos, int &rYPos ) const;
00105
00106
00107 virtual void changeCursor( CursorType_t type ) const;
00108
00109
00110 virtual void rmDir( const string &rPath );
00111
00112
00113 map<HWND, GenericWindow*> m_windowMap;
00114
00115
00116
00117
00118 BOOL (WINAPI *TransparentBlt)( HDC, int, int, int, int,
00119 HDC, int, int, int, int, UINT );
00120 BOOL (WINAPI *AlphaBlend)( HDC, int, int, int, int,
00121 HDC, int, int, int, int, BLENDFUNCTION );
00122
00123
00124 BOOL (WINAPI *SetLayeredWindowAttributes)( HWND, COLORREF,
00125 BYTE, DWORD );
00126
00127 private:
00128
00129 HINSTANCE m_hInst;
00130
00131 HWND m_hParentWindow;
00132
00133 NOTIFYICONDATA m_trayIcon;
00134
00135 HINSTANCE m_hMsimg32;
00136
00137 HINSTANCE m_hUser32;
00138
00139 const string m_dirSep;
00140
00141 list<string> m_resourcePath;
00142 };
00143
00144
00145 #endif