1 /*****************************************************************************
2 * embeddedwindow.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2005-2007 the VideoLAN team
7 * Authors: Benjamin Pracht <bigben at videolan dot org>
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.
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.
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 *****************************************************************************/
24 /*****************************************************************************
25 * VLCEmbeddedWindow interface
26 *****************************************************************************/
30 #ifndef MAC_OS_X_VERSION_10_6
31 @protocol NSAnimationDelegate <NSObject> @end
34 @interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
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;
53 IBOutlet id o_scrollfield;
54 IBOutlet id o_horizontal_split;
55 IBOutlet id o_vertical_split;
56 IBOutlet id o_videosubview;
58 IBOutlet id o_background_view;
59 IBOutlet id o_searchfield;
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;
68 NSImage * o_img_play_pressed;
69 NSImage * o_img_pause;
70 NSImage * o_img_pause_pressed;
72 VLCWindow * o_fullscreen_window;
73 NSViewAnimation * o_fullscreen_anim1;
74 NSViewAnimation * o_fullscreen_anim2;
75 NSViewAnimation * o_makekey_anim;
77 /* set to yes if we are fullscreen and all animations are over */
79 NSRecursiveLock * o_animation_lock;
81 BOOL b_window_is_invisible;
84 NSInteger originalLevel;
87 - (void)controlTintChanged;
91 - (void)setTime: (NSString *)o_arg_ime position: (float)f_position;
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;
100 - (void)setScrollString:(NSString *)o_string;
102 - (void)setVolumeSlider:(float)f_level;
104 - (void)setVideoRatio:(NSSize)ratio;
106 - (NSView *)mainView;
108 - (IBAction)togglePlaylist:(id)sender;
110 - (BOOL)isFullscreen;
112 - (void)lockFullscreenAnimation;
113 - (void)unlockFullscreenAnimation;
115 - (void)enterFullscreen;
116 - (void)leaveFullscreen;
117 /* Allows leaving fullscreen by simply fading out the display */
118 - (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
121 - (void)hasEndedFullscreen;
122 - (void)hasBecomeFullscreen;
124 - (void)setFrameOnMainThread:(NSData*)packedargs;
127 /*****************************************************************************
129 *****************************************************************************/
132 @interface embeddedbackground : NSView
134 IBOutlet id o_window;
135 IBOutlet id o_timeslider;
136 IBOutlet id o_main_pgbar;
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;
158 /*****************************************************************************
160 *****************************************************************************/
163 @interface statusbar : NSView