]> git.sesse.net Git - vlc/blob - modules/gui/macosx/fspanel.h
macosx: implemented scroll wheel behaviour for fullscreen volume slider, too
[vlc] / modules / gui / macosx / fspanel.h
1 /*****************************************************************************
2  * fspanel.h: MacOS X full screen panel
3  *****************************************************************************
4  * Copyright (C) 2006-2012 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 - (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;
46
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: (int)i_volumeLevel;
53
54 - (void)setNonActive: (id)noData;
55 - (void)setActive: (id)noData;
56
57 - (void)focus: (NSTimer *)timer;
58 - (void)unfocus: (NSTimer *)timer;
59 - (void)mouseExited: (NSEvent *)theEvent;
60
61 - (void)fadeIn;
62 - (void)fadeOut;
63
64 - (NSTimer *)fadeTimer;
65 - (void)setFadeTimer: (NSTimer *)timer;
66 - (void)autoHide;
67 - (void)keepVisible: (NSTimer *)timer;
68
69 - (void)mouseDown: (NSEvent *)theEvent;
70 - (void)mouseDragged: (NSEvent *)theEvent;
71
72 - (void)setVoutWasUpdated: (int)i_screen;
73 @end
74
75 @interface VLCFSPanelView : NSView
76 {
77     NSColor *fillColor;
78     NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
79     NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
80     NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
81     NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img;
82     NSTimeInterval last_fwd_event;
83     NSTimeInterval last_bwd_event;
84 }
85 - (id)initWithFrame: (NSRect)frameRect;
86 - (void)drawRect: (NSRect)rect;
87
88 - (void)setPlay;
89 - (void)setPause;
90 - (void)setStreamTitle: (NSString *)o_title;
91 - (void)setStreamPos: (float)f_pos andTime: (NSString *)o_time;
92 - (void)setSeekable: (BOOL)b_seekable;
93 - (void)setVolumeLevel: (int)i_volumeLevel;
94 - (IBAction)play:(id)sender;
95 - (IBAction)prev:(id)sender;
96 - (IBAction)next:(id)sender;
97 - (IBAction)forward:(id)sender;
98 - (IBAction)backward:(id)sender;
99 - (IBAction)fsTimeSliderUpdate: (id)sender;
100 - (IBAction)fsVolumeSliderUpdate: (id)sender;
101
102 @end
103
104 @interface VLCFSTimeSlider : NSSlider
105 {
106 }
107 - (void)drawKnobInRect: (NSRect)knobRect;
108 - (void)drawRect: (NSRect)rect;
109
110 @end
111
112 @interface VLCFSVolumeSlider : VLCVolumeSliderCommon
113 {
114 }
115 - (void)drawKnobInRect: (NSRect)knobRect;
116 - (void)drawRect: (NSRect)rect;
117
118 @end