fspanel.h 3.5 KB
Newer Older
1 2 3
/*****************************************************************************
 * fspanel.h: MacOS X full screen panel
 *****************************************************************************
4
 * Copyright (C) 2006-2007 the VideoLAN team
5 6 7 8 9 10 11 12 13
 * $Id$
 *
 * Authors: Jrme Decoodt <djc at videolan dot org>
 *          Felix Khne <fkuehne at videolan dot org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
14
 *
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

@interface VLCFSPanel : NSWindow
{
    NSTimer *fadeTimer,*hideAgainTimer;
    NSPoint mouseClic;
    BOOL b_fadeQueued;
    BOOL b_keptVisible;
    BOOL b_alreadyCounting;
    int i_timeToKeepVisibleInSec;
33

34
    BOOL b_nonActive;
35 36
    BOOL b_displayed;
    BOOL b_voutWasUpdated;
hartman's avatar
hartman committed
37
    int i_device;
38
}
39 40
- (id)initWithContentRect: (NSRect)contentRect
                styleMask: (unsigned int)aStyle
41 42 43 44 45 46 47 48 49
                  backing: (NSBackingStoreType)bufferingType
                    defer: (BOOL)flag;
- (void)awakeFromNib;
- (BOOL)canBecomeKeyWindow;
- (void)dealloc;

- (void)setPlay;
- (void)setPause;
- (void)setStreamTitle:(NSString *)o_title;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
50 51
- (void)setStreamPos:(float) f_pos andTime:(NSString *)o_time;
- (void)setSeekable:(BOOL) b_seekable;
52
- (void)setVolumeLevel: (float)f_volumeLevel;
53

54 55 56
- (void)setNonActive:(id)noData;
- (void)setActive:(id)noData;

57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
- (void)focus:(NSTimer *)timer;
- (void)unfocus:(NSTimer *)timer;
- (void)mouseExited:(NSEvent *)theEvent;

- (void)fadeIn;
- (void)fadeOut;

- (NSTimer *)fadeTimer;
- (void)setFadeTimer:(NSTimer *)timer;
- (void)autoHide;
- (void)keepVisible:(NSTimer *)timer;

- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;

72
- (BOOL)isDisplayed;
hartman's avatar
hartman committed
73
- (void)setVoutWasUpdated: (int) i_screen;
74 75 76 77 78
@end

@interface VLCFSPanelView : NSView
{
    NSColor *fillColor;
79
    NSButton *o_prev, *o_next, *o_bwd, *o_fwd, *o_play, *o_fullscreen;
80 81
    NSTextField *o_streamTitle_txt, *o_streamPosition_txt;
    NSSlider *o_fs_timeSlider, *o_fs_volumeSlider;
82 83 84 85
}
- (id)initWithFrame:(NSRect)frameRect;
- (void)drawRect:(NSRect)rect;

Felix Paul Kühne's avatar
Felix Paul Kühne committed
86 87 88
- (void)setPlay;
- (void)setPause;
- (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 93 94
- (IBAction)play:(id)sender;
- (IBAction)prev:(id)sender;
- (IBAction)next:(id)sender;
95 96
- (IBAction)forward:(id)sender;
- (IBAction)backward:(id)sender;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
97
- (IBAction)fsTimeSliderUpdate:(id)sender;
98
- (IBAction)fsVolumeSliderUpdate:(id)sender;
99 100 101 102

@end

@interface VLCFSTimeSlider : NSSlider
103 104 105 106 107 108 109 110 111 112 113
{
}
- (void)drawKnobInRect:(NSRect)knobRect;
- (void)drawRect:(NSRect)rect;

@end

@interface VLCFSVolumeSlider : NSSlider
{
}
- (void)drawKnobInRect:(NSRect)knobRect;
114 115 116
- (void)drawRect:(NSRect)rect;

@end