]> git.sesse.net Git - vlc/blob - modules/gui/skins2/macosx/macosx_factory.hpp
FSF address change.
[vlc] / modules / gui / skins2 / macosx / macosx_factory.hpp
1 /*****************************************************************************
2  * macosx_factory.hpp
3  *****************************************************************************
4  * Copyright (C) 2003 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
8  *
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.
13  *
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.
18  *
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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef MACOSX_FACTORY_HPP
25 #define MACOSX_FACTORY_HPP
26
27 #include "../src/os_factory.hpp"
28
29
30 /// Class used to instanciate MacOSX specific objects
31 class MacOSXFactory: public OSFactory
32 {
33     public:
34         MacOSXFactory( intf_thread_t *pIntf );
35         virtual ~MacOSXFactory();
36
37         /// Initialization method
38         virtual bool init();
39
40         /// Instantiate an object OSGraphics
41         virtual OSGraphics *createOSGraphics( int width, int height );
42
43         /// Get the instance of the singleton OSLoop
44         virtual OSLoop *getOSLoop();
45
46         /// Destroy the instance of OSLoop
47         virtual void destroyOSLoop();
48
49         /// Instantiate an OSTimer with the given callback
50         virtual OSTimer *createOSTimer( const Callback &rCallback );
51
52         ///
53         virtual void minimize();
54
55         /// Instantiate an OSWindow object
56         virtual OSWindow *createOSWindow( GenericWindow &rWindow,
57                                           bool dragDrop, bool playOnDrop,
58                                           OSWindow *pParent );
59
60         /// Instantiate an object OSTooltip
61         virtual OSTooltip *createOSTooltip();
62
63         /// Instantiate an object OSPopup
64         virtual OSPopup *createOSPopup();
65
66         /// Get the directory separator
67         virtual const string &getDirSeparator() const { return m_dirSep; }
68
69         /// Get the resource path
70         virtual const list<string> &getResourcePath() const
71             { return m_resourcePath; }
72
73         /// Get the screen size
74         virtual int getScreenWidth() const;
75         virtual int getScreenHeight() const;
76
77         /// Get the work area (screen area without taskbars)
78         virtual Rect getWorkArea() const;
79
80         /// Get the position of the mouse
81         virtual void getMousePos( int &rXPos, int &rYPos ) const;
82
83         /// Change the cursor
84         virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
85
86         /// Delete a directory recursively
87         virtual void rmDir( const string &rPath );
88
89     private:
90         /// Directory separator
91         const string m_dirSep;
92         /// Resource path
93         list<string> m_resourcePath;
94 };
95
96 #endif