]> git.sesse.net Git - vlc/blob - modules/gui/macosx/vout.h
macosx: Fix the detached window. Fix fullscreen. Use a borderless window.
[vlc] / modules / gui / macosx / vout.h
1 /*****************************************************************************
2  * vout.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2001-2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Colin Delacroix <colin@zoy.org>
8  *          Florian G. Pflug <fgp@phlo.org>
9  *          Jon Lech Johansen <jon-vl@nanocrew.net>
10  *          Eric Petit <titer@m0k.org>
11  *          Benjamin Pracht <bigben at videolan dot org>
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26  *****************************************************************************/
27
28 #import "misc.h"
29 /*****************************************************************************
30  * VLCEmbeddedList interface
31  *****************************************************************************/
32 @interface VLCEmbeddedList : NSObject
33 {
34     NSMutableArray * o_embedded_array;
35 }
36
37 - (id)getEmbeddedVout;
38 - (void)releaseEmbeddedVout: (id)o_vout_view;
39 - (void)addEmbeddedVout: (id)o_vout_view;
40 - (BOOL)windowContainsEmbedded: (id)o_window;
41 - (id)getViewForWindow: (id)o_window;
42
43 @end
44
45 /*****************************************************************************
46  * VLCVoutView interface
47  *****************************************************************************/
48 @protocol VLCVoutViewResetting
49 + (void)resetVout: (vout_thread_t *)p_vout;
50 @end
51
52 @interface VLCVoutView : NSView
53 {
54     vout_thread_t * p_vout;
55     NSRect        * s_frame;
56
57     NSView <VLCVoutViewResetting> * o_view;
58
59     vout_thread_t * p_real_vout;
60     id              o_window;
61 }
62 - (BOOL)setVout: (vout_thread_t *) p_arg_vout subView: (NSView *) view
63                      frame: (NSRect *) s_arg_frame;
64 - (void)closeVout;
65 - (void)updateTitle;
66 - (void)manage;
67 - (void)scaleWindowWithFactor: (float)factor animate: (BOOL)animate;
68 - (void)setOnTop:(BOOL)b_on_top;
69 - (void)toggleFloatOnTop;
70 - (void)toggleFullscreen;
71 - (BOOL)isFullscreen;
72 - (void)snapshot;
73 - (id)getWindow;
74
75 + (id)getVoutView: (vout_thread_t *)p_vout subView: (NSView *) view
76             frame: (NSRect *) s_frame;
77 + (vout_thread_t *)getRealVout: (vout_thread_t *)p_vout;
78
79 - (void)enterFullscreen;
80 - (void)leaveFullscreen;
81 @end
82
83 /*****************************************************************************
84  * VLCVoutDetachedView interface
85  *****************************************************************************/
86
87 @interface VLCDetachedVoutView : VLCVoutView
88 {
89     mtime_t i_time_mouse_last_moved;
90 }
91
92 - (void)hideMouse: (BOOL)b_hide;
93
94 @end
95
96 /*****************************************************************************
97  * VLCEmbeddedView interface
98  *****************************************************************************/
99
100 @interface VLCEmbeddedVoutView : VLCVoutView
101 {
102     BOOL b_used;
103     id o_embeddedwindow;
104 }
105
106 - (void)setUsed: (BOOL)b_new_used;
107 - (BOOL)isUsed;
108
109 @end
110
111 /*****************************************************************************
112  * VLCVoutWindow interface
113  *****************************************************************************/
114 @interface VLCVoutWindow : VLCWindow
115 {
116     vout_thread_t * p_vout;
117     VLCVoutView   * o_view;
118     NSRect        * s_frame;
119
120     bool      b_init_ok;
121     BOOL      fullscreen;
122     NSRect    initialFrame;
123 }
124
125 - (id) initWithVout: (vout_thread_t *) p_vout view: (VLCVoutView *) view
126                      frame: (NSRect *) s_frame;
127 - (id)initMainThread: (id) sender;
128 - (void)leaveFullscreen;
129 - (void)enterFullscreen;
130 - (id)getVoutView;
131 @end