]> git.sesse.net Git - vlc/blob - modules/gui/macosx/embeddedwindow.h
macosx: fail the video output if Quartz Extreme isn't supported, removed specific...
[vlc] / modules / gui / macosx / embeddedwindow.h
1 /*****************************************************************************
2  * embeddedwindow.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2005-2007 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Benjamin Pracht <bigben at videolan dot org>
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 /*****************************************************************************
25  * VLCEmbeddedWindow interface
26  *****************************************************************************/
27
28 #import "misc.h"
29
30 #ifndef MAC_OS_X_VERSION_10_6
31 @protocol NSAnimationDelegate <NSObject> @end
32 #endif
33
34 @interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
35 {
36     IBOutlet id o_btn_backward;
37     IBOutlet id o_btn_forward;
38     IBOutlet id o_btn_fullscreen;
39     IBOutlet id o_btn_equalizer;
40     IBOutlet id o_btn_playlist;
41     IBOutlet id o_btn_play;
42     IBOutlet id o_btn_prev;
43     IBOutlet id o_btn_stop;
44     IBOutlet id o_btn_next;
45     IBOutlet id o_btn_volume_down;
46     IBOutlet id o_volumeslider;
47     IBOutlet id o_btn_volume_up;
48     IBOutlet id o_backgroundimg_right;
49     IBOutlet id o_backgroundimg_middle;
50     IBOutlet id o_timeslider;
51     IBOutlet id o_main_pgbar;
52     IBOutlet id o_time;
53     IBOutlet id o_scrollfield;
54     IBOutlet id o_horizontal_split;
55     IBOutlet id o_vertical_split;
56     IBOutlet id o_videosubview;
57     IBOutlet id o_view;
58     IBOutlet id o_background_view;
59         IBOutlet id o_searchfield;
60         IBOutlet id o_status;
61         IBOutlet id o_playlist;
62         IBOutlet id o_playlist_view;
63         IBOutlet id o_playlist_table;
64         IBOutlet id o_vlc_main;
65     IBOutlet id o_video_view;
66
67     NSImage * o_img_play;
68     NSImage * o_img_play_pressed;
69     NSImage * o_img_pause;
70     NSImage * o_img_pause_pressed;
71
72     VLCWindow       * o_fullscreen_window;
73     NSViewAnimation * o_fullscreen_anim1;
74     NSViewAnimation * o_fullscreen_anim2;
75     NSViewAnimation * o_makekey_anim;
76     NSView          * o_temp_view;
77     /* set to yes if we are fullscreen and all animations are over */
78     BOOL              b_fullscreen;
79     NSRecursiveLock * o_animation_lock;
80
81     BOOL              b_window_is_invisible;
82
83     NSSize videoRatio;
84     NSInteger originalLevel;
85 }
86
87 - (void)controlTintChanged;
88
89 - (id)videoView;
90
91 - (void)setTime: (NSString *)o_arg_ime position: (float)f_position;
92 - (id)getPgbar;
93 - (void)playStatusUpdated: (int)i_status;
94 - (void)setSeekable: (BOOL)b_seekable;
95 - (void)setStop:(BOOL)b_input;
96 - (void)setPrev:(BOOL)b_input;
97 - (void)setNext:(BOOL)b_input;
98 - (void)setVolumeEnabled:(BOOL)b_input;
99
100 - (void)setScrollString:(NSString *)o_string;
101
102 - (void)setVolumeSlider:(float)f_level;
103
104 - (void)setVideoRatio:(NSSize)ratio;
105
106 - (NSView *)mainView;
107
108 - (IBAction)togglePlaylist:(id)sender;
109
110 - (BOOL)isFullscreen;
111
112 - (void)lockFullscreenAnimation;
113 - (void)unlockFullscreenAnimation;
114
115 - (void)enterFullscreen;
116 - (void)leaveFullscreen;
117 /* Allows leaving fullscreen by simply fading out the display */
118 - (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
119
120 /* private */
121 - (void)hasEndedFullscreen;
122 - (void)hasBecomeFullscreen;
123
124 - (void)setFrameOnMainThread:(NSData*)packedargs;
125 @end
126
127 /*****************************************************************************
128  * embeddedbackground
129  *****************************************************************************/
130
131
132 @interface embeddedbackground : NSView
133 {
134     IBOutlet id o_window;
135     IBOutlet id o_timeslider;
136     IBOutlet id o_main_pgbar;
137     IBOutlet id o_time;
138     IBOutlet id o_scrollfield;
139     IBOutlet id o_searchfield;
140     IBOutlet id o_btn_backward;
141     IBOutlet id o_btn_forward;
142     IBOutlet id o_btn_fullscreen;
143     IBOutlet id o_btn_equalizer;
144     IBOutlet id o_btn_playlist;
145     IBOutlet id o_btn_play;
146     IBOutlet id o_btn_prev;
147     IBOutlet id o_btn_stop;
148     IBOutlet id o_btn_next;
149     IBOutlet id o_btn_volume_down;
150     IBOutlet id o_volumeslider;
151     IBOutlet id o_btn_volume_up;
152     
153     NSPoint dragStart;
154 }
155
156 @end
157
158 /*****************************************************************************
159  * statusbar
160  *****************************************************************************/
161
162
163 @interface statusbar : NSView
164 {
165     IBOutlet id o_text;
166         
167         BOOL mainwindow;
168 }
169
170 @end