1 /*****************************************************************************
2 * fspanel.h: MacOS X full screen panel
3 *****************************************************************************
4 * Copyright (C) 2006-2013 VLC authors and VideoLAN
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>
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.
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.
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 *****************************************************************************/
28 @interface VLCFSPanel : NSWindow
30 NSTimer *fadeTimer,*hideAgainTimer;
34 BOOL b_alreadyCounting;
35 int i_timeToKeepVisibleInSec;
39 BOOL b_voutWasUpdated;
42 VLCWindow *o_vout_window;
44 - (id)initWithContentRect: (NSRect)contentRect
45 styleMask: (NSUInteger)aStyle
46 backing: (NSBackingStoreType)bufferingType
49 - (BOOL)canBecomeKeyWindow;
54 - (void)setStreamTitle: (NSString *)o_title;
55 - (void)updatePositionAndTime;
56 - (void)setSeekable: (BOOL)b_seekable;
57 - (void)setVolumeLevel: (int)i_volumeLevel;
59 - (void)setNonActive: (id)noData;
60 - (void)setActive: (id)noData;
62 - (void)focus: (NSTimer *)timer;
63 - (void)unfocus: (NSTimer *)timer;
64 - (void)mouseExited: (NSEvent *)theEvent;
69 - (NSTimer *)fadeTimer;
70 - (void)setFadeTimer: (NSTimer *)timer;
72 - (void)keepVisible: (NSTimer *)timer;
74 - (void)mouseDown: (NSEvent *)theEvent;
75 - (void)mouseDragged: (NSEvent *)theEvent;
77 - (void)setVoutWasUpdated: (VLCWindow *)o_window;
80 @class VLCProgressView;
81 @class VLCFSVolumeSlider;
83 @interface VLCFSPanelView : NSView
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;
96 - (id)initWithFrame: (NSRect)frameRect;
97 - (void)drawRect: (NSRect)rect;
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;
115 @interface VLCFSTimeSlider : NSSlider
118 - (void)drawKnobInRect: (NSRect)knobRect;
119 - (void)drawRect: (NSRect)rect;
123 @interface VLCFSVolumeSlider : VLCVolumeSliderCommon
126 - (void)drawKnobInRect: (NSRect)knobRect;
127 - (void)drawRect: (NSRect)rect;