]> git.sesse.net Git - vlc/blob - modules/gui/macosx/embeddedwindow.h
macosx: merge Eric Dudiak's code from GSoC 2008
[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 @interface VLCEmbeddedWindow : NSWindow
31 {
32     IBOutlet id o_btn_backward;
33     IBOutlet id o_btn_forward;
34     IBOutlet id o_btn_fullscreen;
35     IBOutlet id o_btn_equalizer;
36     IBOutlet id o_btn_playlist;
37     IBOutlet id o_btn_play;
38     IBOutlet id o_btn_prev;
39     IBOutlet id o_btn_stop;
40     IBOutlet id o_btn_next;
41     IBOutlet id o_btn_volume_down;
42     IBOutlet id o_volumeslider;
43     IBOutlet id o_btn_volume_up;
44     IBOutlet id o_timeslider;
45     IBOutlet id o_main_pgbar;
46     IBOutlet id o_time;
47     IBOutlet id o_scrollfield;
48     IBOutlet id o_horizontal_split;
49     IBOutlet id o_vertical_split;
50     IBOutlet id o_videosubview;
51     IBOutlet id o_sidebar_list;
52     IBOutlet id o_view;
53     IBOutlet id o_background_view;
54         IBOutlet id o_searchfield;
55         IBOutlet id o_status;
56         IBOutlet id o_playlist;
57         IBOutlet id o_playlist_view;
58         IBOutlet id o_playlist_table;
59         IBOutlet id o_vlc_main;
60
61     NSImage * o_img_play;
62     NSImage * o_img_play_pressed;
63     NSImage * o_img_pause;
64     NSImage * o_img_pause_pressed;
65
66     VLCWindow       * o_fullscreen_window;
67     NSViewAnimation * o_fullscreen_anim1;
68     NSViewAnimation * o_fullscreen_anim2;
69     NSView          * o_temp_view;
70     /* set to yes if we are fullscreen and all animations are over */
71     BOOL              b_fullscreen;
72     NSRecursiveLock * o_animation_lock;
73
74     BOOL              b_window_is_invisible;
75
76     NSSize videoRatio;
77     NSInteger originalLevel;
78 }
79
80 - (void)controlTintChanged;
81
82 - (void)setTime: (NSString *)o_arg_ime position: (float)f_position;
83 - (id)getPgbar;
84 - (void)playStatusUpdated: (int)i_status;
85 - (void)setSeekable: (BOOL)b_seekable;
86 - (void)setStop:(BOOL)b_input;
87 - (void)setPrev:(BOOL)b_input;
88 - (void)setNext:(BOOL)b_input;
89 - (void)setVolumeEnabled:(BOOL)b_input;
90
91 - (void)setScrollString:(NSString *)o_string;
92
93 - (void)setVolumeSlider:(float)f_level;
94
95 - (void)setVideoRatio:(NSSize)ratio;
96
97 - (NSView *)mainView;
98
99 - (IBAction)togglePlaylist:(id)sender;
100
101 - (BOOL)isFullscreen;
102
103 - (void)lockFullscreenAnimation;
104 - (void)unlockFullscreenAnimation;
105
106 - (void)enterFullscreen;
107 - (void)leaveFullscreen;
108 /* Allows to leave fullscreen by simply fading out the display */
109 - (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
110
111 /* private */
112 - (void)hasEndedFullscreen;
113 - (void)hasBecomeFullscreen;
114
115 - (void)setFrameOnMainThread:(NSData*)packedargs;
116 @end
117
118 /*****************************************************************************
119  * embeddedbackground
120  *****************************************************************************/
121
122
123 @interface embeddedbackground : NSView
124 {
125     IBOutlet id o_window;
126     IBOutlet id o_timeslider;
127     IBOutlet id o_main_pgbar;
128     IBOutlet id o_time;
129     IBOutlet id o_scrollfield;
130     IBOutlet id o_searchfield;
131     IBOutlet id o_btn_backward;
132     IBOutlet id o_btn_forward;
133     IBOutlet id o_btn_fullscreen;
134     IBOutlet id o_btn_equalizer;
135     IBOutlet id o_btn_playlist;
136     IBOutlet id o_btn_play;
137     IBOutlet id o_btn_prev;
138     IBOutlet id o_btn_stop;
139     IBOutlet id o_btn_next;
140     IBOutlet id o_btn_volume_down;
141     IBOutlet id o_volumeslider;
142     IBOutlet id o_btn_volume_up;
143     
144     NSPoint dragStart;
145 }
146
147 @end
148
149 /*****************************************************************************
150  * statusbar
151  *****************************************************************************/
152
153
154 @interface statusbar : NSView
155 {
156     IBOutlet id o_text;
157         
158         BOOL mainwindow;
159 }
160
161 @end