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 along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 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( CmdGeneric &rCmd );
52 /// Minimize all the windows
53 virtual void minimize();
55 /// Restore the minimized windows
56 virtual void restore();
58 /// Add an icon in the system tray
59 virtual void addInTray();
61 /// Remove the icon from the system tray
62 virtual void removeFromTray();
64 /// Show the task in the task bar
65 virtual void addInTaskBar();
67 /// Remove the task from the task bar
68 virtual void removeFromTaskBar();
70 /// Instantiate an OSWindow object
71 virtual OSWindow *createOSWindow( GenericWindow &rWindow,
72 bool dragDrop, bool playOnDrop,
75 /// Instantiate an object OSTooltip
76 virtual OSTooltip *createOSTooltip();
78 /// Instantiate an object OSPopup
79 virtual OSPopup *createOSPopup();
81 /// Get the directory separator
82 virtual const string &getDirSeparator() const { return m_dirSep; }
84 /// Get the resource path
85 virtual const list<string> &getResourcePath() const
86 { return m_resourcePath; }
88 /// Get the screen size
89 virtual int getScreenWidth() const;
90 virtual int getScreenHeight() const;
92 /// Get the work area (screen area without taskbars)
93 virtual SkinsRect getWorkArea() const;
95 /// Get the position of the mouse
96 virtual void getMousePos( int &rXPos, int &rYPos ) const;
99 virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
101 /// Delete a directory recursively
102 virtual void rmDir( const string &rPath );
105 /// Directory separator
106 const string m_dirSep;
108 list<string> m_resourcePath;