]> git.sesse.net Git - vlc/blob - modules/gui/macosx/fspanel.h
macosx: add visual markers for 100% of the volume (refs #8628)
[vlc] / modules / gui / macosx / fspanel.h
1 /*****************************************************************************
2  * fspanel.h: MacOS X full screen panel
3  *****************************************************************************
4  * Copyright (C) 2006-2013 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  *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 @class VLCWindow;
27
28 @interface VLCFSPanel : NSWindow
29 {
30     NSTimer *fadeTimer,*hideAgainTimer;
31     NSPoint mouseClic;
32     BOOL b_fadeQueued;
33     BOOL b_keptVisible;
34     BOOL b_alreadyCounting;
35     int i_timeToKeepVisibleInSec;
36
37     BOOL b_nonActive;
38     BOOL b_displayed;
39     BOOL b_voutWasUpdated;
40     int i_device;
41
42     VLCWindow *o_vout_window;
43 }
44 - (id)initWithContentRect: (NSRect)contentRect
45                 styleMask: (NSUInteger)aStyle
46                   backing: (NSBackingStoreType)bufferingType
47                     defer: (BOOL)flag;
48 - (void)awakeFromNib;
49 - (BOOL)canBecomeKeyWindow;
50 - (void)dealloc;
51
52 - (void)setPlay;
53 - (void)setPause;
54 - (void)setStreamTitle: (NSString *)o_title;
55 - (void)updatePositionAndTime;
56 - (void)setSeekable: (BOOL)b_seekable;
57 - (void)setVolumeLevel: (int)i_volumeLevel;
58
59 - (void)setNonActive: (id)noData;
60 - (void)setActive: (id)noData;
61
62 - (void)focus: (NSTimer *)timer;
63 - (void)unfocus: (NSTimer *)timer;
64 - (void)mouseExited: (NSEvent *)theEvent;
65
66 - (void)fadeIn;
67 - (void)fadeOut;
68
69 - (NSTimer *)fadeTimer;
70 - (void)setFadeTimer: (NSTimer *)timer;
71 - (void)autoHide;
72 - (void)keepVisible: (NSTimer *)timer;
73
74 - (void)mouseDown: (NSEvent *)theEvent;
75 - (void)mouseDragged: (NSEvent *)theEvent;
76
77 - (void)setVoutWasUpdated: (VLCWindow *)o_window;
78 @end
79
80 @class VLCProgressView;
81 @class VLCFSVolumeSlider;
82
83 @interface VLCFSPanelView : NSView
84 {
85     NSColor *fillColor;
86     NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
87     NSTextField *o_streamTitle_txt;
88     VLCTimeField *o_streamPosition_txt, *o_streamLength_txt;
89     NSSlider *o_fs_timeSlider;
90     VLCFSVolumeSlider *o_fs_volumeSlider;
91     VLCProgressView *o_progress_view;
92     NSImage *o_background_img, *o_vol_sld_img, *o_vol_mute_img, *o_vol_max_img, *o_time_sld_img;
93     NSTimeInterval last_fwd_event;
94     NSTimeInterval last_bwd_event;
95 }
96 - (id)initWithFrame: (NSRect)frameRect;
97 - (void)drawRect: (NSRect)rect;
98
99 - (void)setPlay;
100 - (void)setPause;
101 - (void)setStreamTitle: (NSString *)o_title;
102 - (void)updatePositionAndTime;
103 - (void)setSeekable: (BOOL)b_seekable;
104 - (void)setVolumeLevel: (int)i_volumeLevel;
105 - (IBAction)play:(id)sender;
106 - (IBAction)prev:(id)sender;
107 - (IBAction)next:(id)sender;
108 - (IBAction)forward:(id)sender;
109 - (IBAction)backward:(id)sender;
110 - (IBAction)fsTimeSliderUpdate: (id)sender;
111 - (IBAction)fsVolumeSliderUpdate: (id)sender;
112
113 @end
114
115 @interface VLCFSTimeSlider : NSSlider
116 {
117 }
118 - (void)drawKnobInRect: (NSRect)knobRect;
119 - (void)drawRect: (NSRect)rect;
120
121 @end
122
123 @interface VLCFSVolumeSlider : VLCVolumeSliderCommon
124 {
125 }
126 - (void)drawKnobInRect: (NSRect)knobRect;
127 - (void)drawRect: (NSRect)rect;
128
129 @end