]> git.sesse.net Git - vlc/blob - modules/gui/skins2/macosx/macosx_factory.hpp
Qt/EPG: Remove the update button. Improve the window layout.
[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 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  *****************************************************************************/
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( CmdGeneric &rCmd );
51
52     /// Minimize all the windows
53     virtual void minimize();
54
55     /// Restore the minimized windows
56     virtual void restore();
57
58     /// Add an icon in the system tray
59     virtual void addInTray();
60
61     /// Remove the icon from the system tray
62     virtual void removeFromTray();
63
64     /// Show the task in the task bar
65     virtual void addInTaskBar();
66
67     /// Remove the task from the task bar
68     virtual void removeFromTaskBar();
69
70     /// Instantiate an OSWindow object
71     virtual OSWindow *createOSWindow( GenericWindow &rWindow,
72                                       bool dragDrop, bool playOnDrop,
73                                       OSWindow *pParent );
74
75     /// Instantiate an object OSTooltip
76     virtual OSTooltip *createOSTooltip();
77
78     /// Instantiate an object OSPopup
79     virtual OSPopup *createOSPopup();
80
81     /// Get the directory separator
82     virtual const string &getDirSeparator() const { return m_dirSep; }
83
84     /// Get the resource path
85     virtual const list<string> &getResourcePath() const
86         { return m_resourcePath; }
87
88     /// Get the screen size
89     virtual int getScreenWidth() const;
90     virtual int getScreenHeight() const;
91
92     /// Get the work area (screen area without taskbars)
93     virtual SkinsRect getWorkArea() const;
94
95     /// Get the position of the mouse
96     virtual void getMousePos( int &rXPos, int &rYPos ) const;
97
98     /// Change the cursor
99     virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
100
101     /// Delete a directory recursively
102     virtual void rmDir( const string &rPath );
103
104 private:
105     /// Directory separator
106     const string m_dirSep;
107     /// Resource path
108     list<string> m_resourcePath;
109 };
110
111 #endif