]> git.sesse.net Git - vlc/blob - modules/gui/macosx/ControlsBar.h
macosx: use VLCDropView for the controls bar drop area
[vlc] / modules / gui / macosx / ControlsBar.h
1 /*****************************************************************************
2  * ControlsBar.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2012-2014 VLC authors and VideoLAN
5  * $Id$
6  *
7  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8  *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
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 #import <Cocoa/Cocoa.h>
26 #import "misc.h"
27
28 @class VLCFSPanel;
29
30 /*****************************************************************************
31  * VLCControlsBarCommon
32  *
33  *  Holds all outlets, actions and code common for controls bar in detached
34  *  and in main window.
35  *****************************************************************************/
36
37 @interface VLCControlsBarCommon : NSObject
38 {
39     IBOutlet id o_bottombar_view;
40     IBOutlet VLCDragDropView *o_drop_view;
41
42     IBOutlet id o_play_btn;
43     IBOutlet id o_bwd_btn;
44     IBOutlet id o_fwd_btn;
45
46     IBOutlet id o_progress_view;
47     IBOutlet id o_time_sld;
48     IBOutlet id o_time_sld_fancygradient_view;
49     IBOutlet id o_time_sld_background;
50     IBOutlet id o_progress_bar;
51
52     IBOutlet id o_time_fld;
53     IBOutlet id o_fullscreen_btn;
54     IBOutlet id o_resize_view;
55
56     NSImage * o_pause_img;
57     NSImage * o_pause_pressed_img;
58     NSImage * o_play_img;
59     NSImage * o_play_pressed_img;
60
61     NSTimeInterval last_fwd_event;
62     NSTimeInterval last_bwd_event;
63     BOOL just_triggered_next;
64     BOOL just_triggered_previous;
65
66     BOOL b_nativeFullscreenMode;
67     BOOL b_dark_interface;
68
69 }
70
71 @property (readonly) id bottomBarView;
72
73 - (CGFloat)height;
74 - (void)toggleForwardBackwardMode:(BOOL)b_alt;
75
76 - (IBAction)play:(id)sender;
77 - (IBAction)bwd:(id)sender;
78 - (IBAction)fwd:(id)sender;
79
80 - (IBAction)timeSliderAction:(id)sender;
81 - (IBAction)fullscreen:(id)sender;
82
83
84 - (void)updateTimeSlider;
85 - (void)drawFancyGradientEffectForTimeSlider;
86 - (void)updateControls;
87 - (void)setPause;
88 - (void)setPlay;
89 - (void)setFullscreenState:(BOOL)b_fullscreen;
90
91 @end
92
93
94 /*****************************************************************************
95  * VLCMainWindowControlsBar
96  *
97  *  Holds all specific outlets, actions and code for the main window controls bar.
98  *****************************************************************************/
99
100 @interface VLCMainWindowControlsBar : VLCControlsBarCommon
101 {
102     IBOutlet id o_stop_btn;
103
104     IBOutlet id o_playlist_btn;
105     IBOutlet id o_repeat_btn;
106     IBOutlet id o_shuffle_btn;
107
108     IBOutlet VLCVolumeSliderCommon * o_volume_sld;
109     IBOutlet id o_volume_track_view;
110     IBOutlet id o_volume_down_btn;
111     IBOutlet id o_volume_up_btn;
112
113     IBOutlet id o_effects_btn;
114
115     NSImage * o_repeat_img;
116     NSImage * o_repeat_pressed_img;
117     NSImage * o_repeat_all_img;
118     NSImage * o_repeat_all_pressed_img;
119     NSImage * o_repeat_one_img;
120     NSImage * o_repeat_one_pressed_img;
121     NSImage * o_shuffle_img;
122     NSImage * o_shuffle_pressed_img;
123     NSImage * o_shuffle_on_img;
124     NSImage * o_shuffle_on_pressed_img;
125
126     NSButton * o_prev_btn;
127     NSButton * o_next_btn;
128
129     BOOL b_show_jump_buttons;
130     BOOL b_show_playmode_buttons;
131 }
132
133 - (IBAction)stop:(id)sender;
134
135 - (IBAction)shuffle:(id)sender;
136 - (IBAction)volumeAction:(id)sender;
137 - (IBAction)effects:(id)sender;
138
139
140 - (void)setRepeatOne;
141 - (void)setRepeatAll;
142 - (void)setRepeatOff;
143 - (IBAction)repeat:(id)sender;
144
145 - (void)setShuffle;
146 - (IBAction)shuffle:(id)sender;
147
148 - (IBAction)togglePlaylist:(id)sender;
149
150 - (void)toggleEffectsButton;
151 - (void)toggleJumpButtons;
152 - (void)togglePlaymodeButtons;
153
154 - (void)updateVolumeSlider;
155 - (void)updateControls;
156
157 @end
158