MacOS: fixes memory management issue. closes #3807
[vlc/solaris.git] / modules / gui / macosx / embeddedwindow.h
blob695ce6014283611c5480b0676ea20e63c864eeba
1 /*****************************************************************************
2 * embeddedwindow.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2005-2007 the VideoLAN team
5 * $Id$
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 *****************************************************************************/
28 #import "misc.h"
30 @interface VLCEmbeddedWindow : NSWindow
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;
61 NSImage * o_img_play;
62 NSImage * o_img_play_pressed;
63 NSImage * o_img_pause;
64 NSImage * o_img_pause_pressed;
66 VLCWindow * o_fullscreen_window;
67 NSViewAnimation * o_fullscreen_anim1;
68 NSViewAnimation * o_fullscreen_anim2;
69 NSViewAnimation * o_makekey_anim;
70 NSView * o_temp_view;
71 /* set to yes if we are fullscreen and all animations are over */
72 BOOL b_fullscreen;
73 NSRecursiveLock * o_animation_lock;
75 BOOL b_window_is_invisible;
77 NSSize videoRatio;
78 NSInteger originalLevel;
81 - (void)controlTintChanged;
83 - (void)setTime: (NSString *)o_arg_ime position: (float)f_position;
84 - (id)getPgbar;
85 - (void)playStatusUpdated: (int)i_status;
86 - (void)setSeekable: (BOOL)b_seekable;
87 - (void)setStop:(BOOL)b_input;
88 - (void)setPrev:(BOOL)b_input;
89 - (void)setNext:(BOOL)b_input;
90 - (void)setVolumeEnabled:(BOOL)b_input;
92 - (void)setScrollString:(NSString *)o_string;
94 - (void)setVolumeSlider:(float)f_level;
96 - (void)setVideoRatio:(NSSize)ratio;
98 - (NSView *)mainView;
100 - (IBAction)togglePlaylist:(id)sender;
102 - (BOOL)isFullscreen;
104 - (void)lockFullscreenAnimation;
105 - (void)unlockFullscreenAnimation;
107 - (void)enterFullscreen;
108 - (void)leaveFullscreen;
109 /* Allows to leave fullscreen by simply fading out the display */
110 - (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
112 /* private */
113 - (void)hasEndedFullscreen;
114 - (void)hasBecomeFullscreen;
116 - (void)setFrameOnMainThread:(NSData*)packedargs;
117 @end
119 /*****************************************************************************
120 * embeddedbackground
121 *****************************************************************************/
124 @interface embeddedbackground : NSView
126 IBOutlet id o_window;
127 IBOutlet id o_timeslider;
128 IBOutlet id o_main_pgbar;
129 IBOutlet id o_time;
130 IBOutlet id o_scrollfield;
131 IBOutlet id o_searchfield;
132 IBOutlet id o_btn_backward;
133 IBOutlet id o_btn_forward;
134 IBOutlet id o_btn_fullscreen;
135 IBOutlet id o_btn_equalizer;
136 IBOutlet id o_btn_playlist;
137 IBOutlet id o_btn_play;
138 IBOutlet id o_btn_prev;
139 IBOutlet id o_btn_stop;
140 IBOutlet id o_btn_next;
141 IBOutlet id o_btn_volume_down;
142 IBOutlet id o_volumeslider;
143 IBOutlet id o_btn_volume_up;
145 NSPoint dragStart;
148 @end
150 /*****************************************************************************
151 * statusbar
152 *****************************************************************************/
155 @interface statusbar : NSView
157 IBOutlet id o_text;
159 BOOL mainwindow;
162 @end