1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 the VideoLAN team
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #ifndef MACOSX_FACTORY_HPP
25 #define MACOSX_FACTORY_HPP
27 #include "../src/os_factory.hpp"
30 /// Class used to instanciate MacOSX specific objects
31 class MacOSXFactory: public OSFactory
34 MacOSXFactory( intf_thread_t *pIntf );
35 virtual ~MacOSXFactory();
37 /// Initialization method
40 /// Instantiate an object OSGraphics
41 virtual OSGraphics *createOSGraphics( int width, int height );
43 /// Get the instance of the singleton OSLoop
44 virtual OSLoop *getOSLoop();
46 /// Destroy the instance of OSLoop
47 virtual void destroyOSLoop();
49 /// Instantiate an OSTimer with the given callback
50 virtual OSTimer *createOSTimer( const Callback &rCallback );
53 virtual void minimize();
55 /// Instantiate an OSWindow object
56 virtual OSWindow *createOSWindow( GenericWindow &rWindow,
57 bool dragDrop, bool playOnDrop,
60 /// Instantiate an object OSTooltip
61 virtual OSTooltip *createOSTooltip();
63 /// Instantiate an object OSPopup
64 virtual OSPopup *createOSPopup();
66 /// Get the directory separator
67 virtual const string &getDirSeparator() const { return m_dirSep; }
69 /// Get the resource path
70 virtual const list<string> &getResourcePath() const
71 { return m_resourcePath; }
73 /// Get the screen size
74 virtual int getScreenWidth() const;
75 virtual int getScreenHeight() const;
77 /// Get the work area (screen area without taskbars)
78 virtual Rect getWorkArea() const;
80 /// Get the position of the mouse
81 virtual void getMousePos( int &rXPos, int &rYPos ) const;
84 virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
86 /// Delete a directory recursively
87 virtual void rmDir( const string &rPath );
90 /// Directory separator
91 const string m_dirSep;
93 list<string> m_resourcePath;