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 /// Get the directory separator
64 virtual const string &getDirSeparator() const { return m_dirSep; }
66 /// Get the resource path
67 virtual const list<string> &getResourcePath() const
68 { return m_resourcePath; }
70 /// Get the screen size
71 virtual int getScreenWidth() const;
72 virtual int getScreenHeight() const;
74 /// Get the work area (screen area without taskbars)
75 virtual Rect getWorkArea() const;
77 /// Get the position of the mouse
78 virtual void getMousePos( int &rXPos, int &rYPos ) const;
81 virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
83 /// Delete a directory recursively
84 virtual void rmDir( const string &rPath );
87 /// Directory separator
88 const string m_dirSep;
90 list<string> m_resourcePath;