]> git.sesse.net Git - vlc/blob - modules/gui/macosx/fspanel.h
macosx: fixes a memory leak.
[vlc] / modules / gui / macosx / fspanel.h
1 /*****************************************************************************
2  * fspanel.h: MacOS X full screen panel
3  *****************************************************************************
4  * Copyright (C) 2006-2011 VLC authors and VideoLAN
5  * $Id$
6  *
7  * Authors: Jérôme Decoodt <djc at videolan dot org>
8  *          Felix Paul Kühne <fkuehne at videolan dot org>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 @interface VLCFSPanel : NSWindow
26 {
27     NSTimer *fadeTimer,*hideAgainTimer;
28     NSPoint mouseClic;
29     BOOL b_fadeQueued;
30     BOOL b_keptVisible;
31     BOOL b_alreadyCounting;
32     int i_timeToKeepVisibleInSec;
33
34     BOOL b_nonActive;
35     BOOL b_displayed;
36     BOOL b_voutWasUpdated;
37     int i_device;
38
39     BOOL b_usingBigScreen;
40 }
41 - (id)initWithContentRect: (NSRect)contentRect
42                 styleMask: (NSUInteger)aStyle
43                   backing: (NSBackingStoreType)bufferingType
44                     defer: (BOOL)flag;
45 - (void)awakeFromNib;
46 - (BOOL)canBecomeKeyWindow;
47 - (void)dealloc;
48
49 - (void)setPlay;
50 - (void)setPause;
51 - (void)setStreamTitle: (NSString *)o_title;
52 - (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
53 - (void)setSeekable: (BOOL)b_seekable;
54 - (void)setVolumeLevel: (float)f_volumeLevel;
55
56 - (void)setNonActive: (id)noData;
57 - (void)setActive: (id)noData;
58
59 - (void)focus: (NSTimer *)timer;
60 - (void)unfocus: (NSTimer *)timer;
61 - (void)mouseExited: (NSEvent *)theEvent;
62
63 - (void)fadeIn;
64 - (void)fadeOut;
65
66 - (NSTimer *)fadeTimer;
67 - (void)setFadeTimer: (NSTimer *)timer;
68 - (void)autoHide;
69 - (void)keepVisible: (NSTimer *)timer;
70
71 - (void)mouseDown: (NSEvent *)theEvent;
72 - (void)mouseDragged: (NSEvent *)theEvent;
73
74 - (BOOL)isDisplayed;
75 - (void)setVoutWasUpdated: (int)i_screen;
76 - (void)adaptWindowSizeToScreen;
77 @end
78
79 @interface VLCFSPanelView : NSView
80 {
81     NSColor *fillColor;
82     NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
83     NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
84     NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
85
86     BOOL b_usingBigScreen;
87 }
88 - (id)initWithFrame: (NSRect)frameRect;
89 - (void)drawRect: (NSRect)rect;
90
91 - (void)setPlay;
92 - (void)setPause;
93 - (void)setStreamTitle: (NSString *)o_title;
94 - (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
95 - (void)setSeekable: (BOOL)b_seekable;
96 - (void)setVolumeLevel: (float)f_volumeLevel;
97 - (IBAction)play:(id)sender;
98 - (IBAction)prev:(id)sender;
99 - (IBAction)next:(id)sender;
100 - (IBAction)forward:(id)sender;
101 - (IBAction)backward:(id)sender;
102 - (IBAction)fsTimeSliderUpdate: (id)sender;
103 - (IBAction)fsVolumeSliderUpdate: (id)sender;
104 - (void)adaptViewSizeToScreen: (BOOL)b_value;
105
106 @end
107
108 @interface VLCFSTimeSlider : NSSlider
109 {
110 }
111 - (void)drawKnobInRect: (NSRect)knobRect;
112 - (void)drawRect: (NSRect)rect;
113
114 @end
115
116 @interface VLCFSVolumeSlider : NSSlider
117 {
118 }
119 - (void)drawKnobInRect: (NSRect)knobRect;
120 - (void)drawRect: (NSRect)rect;
121
122 @end