Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

os_factory.hpp

00001 /*****************************************************************************
00002  * os_factory.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: os_factory.hpp 12207 2005-08-15 15:54:32Z asmax $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
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 class GenericWindow;
00034 class CmdGeneric;
00035 class OSBitmap;
00036 class OSGraphics;
00037 class OSLoop;
00038 class OSWindow;
00039 class OSTooltip;
00040 class OSTimer;
00041 
00042 
00044 class OSFactory: public SkinObject
00045 {
00046     public:
00047         typedef enum
00048         {
00049             kDefaultArrow,
00050             kResizeNS,
00051             kResizeWE,
00052             kResizeNWSE,
00053             kResizeNESW
00054         } CursorType_t;
00055 
00058         virtual bool init() { return true; }
00059 
00062         static OSFactory *instance( intf_thread_t *pIntf );
00063 
00065         static void destroy( intf_thread_t *pIntf );
00066 
00068         virtual OSGraphics *createOSGraphics( int width, int height ) = 0;
00069 
00071         virtual OSLoop *getOSLoop() = 0;
00072 
00074         virtual void destroyOSLoop() = 0;
00075 
00077         virtual void minimize() = 0;
00078 
00080         virtual OSTimer *createOSTimer( CmdGeneric &rCmd ) = 0;
00081 
00083         virtual OSWindow *createOSWindow( GenericWindow &rWindow,
00084                                           bool dragDrop, bool playOnDrop,
00085                                           OSWindow *pParent ) = 0;
00086 
00088         virtual OSTooltip *createOSTooltip() = 0;
00089 
00091         virtual const string &getDirSeparator() const = 0;
00092 
00094         virtual const list<string> &getResourcePath() const = 0;
00095 
00097         virtual int getScreenWidth() const = 0;
00098         virtual int getScreenHeight() const = 0;
00099 
00101         virtual Rect getWorkArea() const = 0;
00102 
00104         virtual void getMousePos( int &rXPos, int &rYPos ) const = 0;
00105 
00107         virtual void changeCursor( CursorType_t type ) const = 0;
00108 
00110         virtual void rmDir( const string &rPath ) = 0;
00111 
00112    protected:
00113         // Protected because it's a singleton.
00114         OSFactory( intf_thread_t* pIntf ): SkinObject( pIntf ) {}
00115         virtual ~OSFactory() {}
00116 };
00117 
00118 
00119 #endif

Generated on Tue Dec 20 10:14:42 2005 for vlc-0.8.4a by  doxygen 1.4.2