os_factory.hpp
Go to the documentation of this file.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 OS_FACTORY_HPP
00026 #define OS_FACTORY_HPP
00027
00028 #include "skin_common.hpp"
00029 #include "../utils/position.hpp"
00030 #include <string>
00031 #include <list>
00032
00033 #include "../src/generic_window.hpp"
00034 class CmdGeneric;
00035 class OSBitmap;
00036 class OSGraphics;
00037 class OSLoop;
00038 class OSWindow;
00039 class OSTooltip;
00040 class OSPopup;
00041 class OSTimer;
00042
00043
00044
00045 class OSFactory: public SkinObject
00046 {
00047 public:
00048 enum CursorType_t
00049 {
00050 kDefaultArrow,
00051 kResizeNS,
00052 kResizeWE,
00053 kResizeNWSE,
00054 kResizeNESW
00055 };
00056
00057
00058
00059
00060
00061 virtual bool init() { return true; }
00062
00063
00064
00065
00066
00067 static OSFactory *instance( intf_thread_t *pIntf );
00068
00069
00070 static void destroy( intf_thread_t *pIntf );
00071
00072
00073 virtual OSGraphics *createOSGraphics( int width, int height ) = 0;
00074
00075
00076 virtual OSLoop *getOSLoop() = 0;
00077
00078
00079 virtual void destroyOSLoop() = 0;
00080
00081
00082 virtual void minimize() = 0;
00083
00084
00085 virtual void restore() = 0;
00086
00087
00088 virtual void addInTray() = 0;
00089
00090
00091 virtual void removeFromTray() = 0;
00092
00093
00094 virtual void addInTaskBar() = 0;
00095
00096
00097 virtual void removeFromTaskBar() = 0;
00098
00099
00100 virtual OSTimer *createOSTimer( CmdGeneric &rCmd ) = 0;
00101
00102
00103 virtual OSWindow *createOSWindow( GenericWindow &rWindow,
00104 bool dragDrop, bool playOnDrop,
00105 OSWindow *pParent, GenericWindow::WindowType_t ) = 0;
00106
00107
00108 virtual OSTooltip *createOSTooltip() = 0;
00109
00110
00111 virtual OSPopup *createOSPopup() = 0;
00112
00113
00114 virtual const string &getDirSeparator() const = 0;
00115
00116
00117 virtual const list<string> &getResourcePath() const = 0;
00118
00119
00120 virtual int getScreenWidth() const = 0;
00121 virtual int getScreenHeight() const = 0;
00122
00123
00124 virtual SkinsRect getWorkArea() const = 0;
00125
00126
00127 virtual void getMousePos( int &rXPos, int &rYPos ) const = 0;
00128
00129
00130 virtual void changeCursor( CursorType_t type ) const = 0;
00131
00132
00133 virtual void rmDir( const string &rPath ) = 0;
00134
00135 protected:
00136
00137 OSFactory( intf_thread_t* pIntf ): SkinObject( pIntf ) { }
00138 virtual ~OSFactory() { }
00139 };
00140
00141
00142 #endif