MacOS: fixes memory management issue. closes #3807
[vlc/solaris.git] / modules / gui / macosx / fspanel.h
blob2c5494a16ff72ddedf5b070d91b748bc99e75cd8
1 /*****************************************************************************
2 * fspanel.h: MacOS X full screen panel
3 *****************************************************************************
4 * Copyright (C) 2006-2007 the VideoLAN team
5 * $Id$
7 * Authors: Jérôme Decoodt <djc at videolan dot org>
8 * Felix Kühne <fkuehne at videolan dot org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 @interface VLCFSPanel : NSWindow
27 NSTimer *fadeTimer,*hideAgainTimer;
28 NSPoint mouseClic;
29 BOOL b_fadeQueued;
30 BOOL b_keptVisible;
31 BOOL b_alreadyCounting;
32 int i_timeToKeepVisibleInSec;
34 BOOL b_nonActive;
35 BOOL b_displayed;
36 BOOL b_voutWasUpdated;
37 int i_device;
39 - (id)initWithContentRect: (NSRect)contentRect
40 styleMask: (NSUInteger)aStyle
41 backing: (NSBackingStoreType)bufferingType
42 defer: (BOOL)flag;
43 - (void)awakeFromNib;
44 - (BOOL)canBecomeKeyWindow;
45 - (void)dealloc;
47 - (void)setPlay;
48 - (void)setPause;
49 - (void)setStreamTitle: (NSString *)o_title;
50 - (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
51 - (void)setSeekable: (BOOL)b_seekable;
52 - (void)setVolumeLevel: (float)f_volumeLevel;
54 - (void)setNonActive: (id)noData;
55 - (void)setActive: (id)noData;
57 - (void)focus: (NSTimer *)timer;
58 - (void)unfocus: (NSTimer *)timer;
59 - (void)mouseExited: (NSEvent *)theEvent;
61 - (void)fadeIn;
62 - (void)fadeOut;
64 - (NSTimer *)fadeTimer;
65 - (void)setFadeTimer: (NSTimer *)timer;
66 - (void)autoHide;
67 - (void)keepVisible: (NSTimer *)timer;
69 - (void)mouseDown: (NSEvent *)theEvent;
70 - (void)mouseDragged: (NSEvent *)theEvent;
72 - (BOOL)isDisplayed;
73 - (void)setVoutWasUpdated: (int)i_screen;
74 @end
76 @interface VLCFSPanelView : NSView
78 NSColor *fillColor;
79 NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
80 NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
81 NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
83 - (id)initWithFrame: (NSRect)frameRect;
84 - (void)drawRect: (NSRect)rect;
86 - (void)setPlay;
87 - (void)setPause;
88 - (void)setStreamTitle: (NSString *)o_title;
89 - (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
90 - (void)setSeekable: (BOOL)b_seekable;
91 - (void)setVolumeLevel: (float)f_volumeLevel;
92 - (IBAction)play:(id)sender;
93 - (IBAction)prev:(id)sender;
94 - (IBAction)next:(id)sender;
95 - (IBAction)forward:(id)sender;
96 - (IBAction)backward:(id)sender;
97 - (IBAction)fsTimeSliderUpdate: (id)sender;
98 - (IBAction)fsVolumeSliderUpdate: (id)sender;
100 @end
102 @interface VLCFSTimeSlider : NSSlider
105 - (void)drawKnobInRect: (NSRect)knobRect;
106 - (void)drawRect: (NSRect)rect;
108 @end
110 @interface VLCFSVolumeSlider : NSSlider
113 - (void)drawKnobInRect: (NSRect)knobRect;
114 - (void)drawRect: (NSRect)rect;
116 @end