]> git.sesse.net Git - vlc/blob - modules/gui/skins2/macosx/macosx_factory.cpp
* skins2: support for custom popup menus, and win32 implementation.
[vlc] / modules / gui / skins2 / macosx / macosx_factory.cpp
1 /*****************************************************************************
2  * macosx_factory.cpp
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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #ifdef MACOSX_SKINS
25
26 #include "macosx_factory.hpp"
27 #include "macosx_graphics.hpp"
28 #include "macosx_loop.hpp"
29 #include "macosx_timer.hpp"
30 #include "macosx_window.hpp"
31 #include "macosx_tooltip.hpp"
32
33
34 MacOSXFactory::MacOSXFactory( intf_thread_t *pIntf ): OSFactory( pIntf ),
35     m_dirSep( "/" )
36 {
37     // TODO
38 }
39
40
41 MacOSXFactory::~MacOSXFactory()
42 {
43     // TODO
44 }
45
46
47 bool MacOSXFactory::init()
48 {
49     // TODO
50     return true;
51 }
52
53
54 OSGraphics *MacOSXFactory::createOSGraphics( int width, int height )
55 {
56     return new MacOSXGraphics( getIntf(), width, height );
57 }
58
59
60 OSLoop *MacOSXFactory::getOSLoop()
61 {
62     return MacOSXLoop::instance( getIntf() );
63 }
64
65
66 void MacOSXFactory::destroyOSLoop()
67 {
68     MacOSXLoop::destroy( getIntf() );
69 }
70
71 void MacOSXFactory::minimize()
72 {
73     // TODO
74 }
75
76 OSTimer *MacOSXFactory::createOSTimer( const Callback &rCallback )
77 {
78     return new MacOSXTimer( getIntf(), rCallback );
79 }
80
81
82 OSWindow *MacOSXFactory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
83                                       bool playOnDrop, OSWindow *pParent )
84 {
85     return new MacOSXWindow( getIntf(), rWindow, dragDrop,
86                           playOnDrop, (MacOSXWindow*)pParent );
87 }
88
89
90 OSTooltip *MacOSXFactory::createOSTooltip()
91 {
92     return new MacOSXTooltip( getIntf() );
93 }
94
95
96 OSPopup *MacOSXFactory::createOSPopup()
97 {
98     return new MacOSXPopup( getIntf() );
99 }
100
101
102 int MacOSXFactory::getScreenWidth() const
103 {
104     // TODO
105     return 0;
106 }
107
108
109 int MacOSXFactory::getScreenHeight() const
110 {
111     // TODO
112     return 0;
113 }
114
115
116 Rect MacOSXFactory::getWorkArea() const
117 {
118     // XXX
119     return Rect( 0, 0, getScreenWidth(), getScreenHeight() );
120 }
121
122
123 void MacOSXFactory::getMousePos( int &rXPos, int &rYPos ) const
124 {
125     // TODO
126 }
127
128
129 void MacOSXFactory::rmDir( const string &rPath )
130 {
131     // TODO
132 }
133
134
135 #endif