1 /*****************************************************************************
2 * MainWindow.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2011 VideoLAN
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8 * Jon Lech Johansen <jon-vl@nanocrew.net>
9 * Christophe Massiot <massiot@via.ecp.fr>
10 * Derk-Jan Hartman <hartman at videolan.org>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 #import <Cocoa/Cocoa.h>
28 #import "PXSourceList.h"
31 #ifndef MAC_OS_X_VERSION_10_6
32 @protocol NSWindowDelegate <NSObject> @end
35 @interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate> {
36 IBOutlet id o_play_btn;
37 IBOutlet id o_bwd_btn;
38 IBOutlet id o_fwd_btn;
39 IBOutlet id o_stop_btn;
40 IBOutlet id o_playlist_btn;
41 IBOutlet id o_repeat_btn;
42 IBOutlet id o_shuffle_btn;
43 IBOutlet id o_effects_btn;
44 IBOutlet id o_fullscreen_btn;
45 IBOutlet id o_search_fld;
46 IBOutlet id o_volume_sld;
47 IBOutlet id o_volume_track_view;
48 IBOutlet id o_volume_down_btn;
49 IBOutlet id o_volume_up_btn;
50 IBOutlet id o_time_sld;
51 IBOutlet id o_time_sld_fancygradient_view;
52 IBOutlet id o_time_fld;
53 IBOutlet id o_progress_bar;
54 IBOutlet id o_bottombar_view;
55 IBOutlet id o_time_sld_left_view;
56 IBOutlet id o_time_sld_middle_view;
57 IBOutlet id o_time_sld_right_view;
58 // TODO Playlist table, additional ui stuff at the top of the window
59 IBOutlet id o_playlist_table;
60 IBOutlet id o_video_view;
61 IBOutlet id o_split_view;
62 IBOutlet id o_sidebar_view;
63 IBOutlet id o_chosen_category_lbl;
65 BOOL b_dark_interface;
66 BOOL b_video_playback_enabled;
67 int i_lastShownVolume;
69 input_state_e cachedInputState;
71 NSImage * o_pause_img;
72 NSImage * o_pause_pressed_img;
74 NSImage * o_play_pressed_img;
75 NSImage * o_repeat_img;
76 NSImage * o_repeat_pressed_img;
77 NSImage * o_repeat_all_img;
78 NSImage * o_repeat_all_pressed_img;
79 NSImage * o_repeat_one_img;
80 NSImage * o_repeat_one_pressed_img;
81 NSImage * o_shuffle_img;
82 NSImage * o_shuffle_pressed_img;
83 NSImage * o_shuffle_on_img;
84 NSImage * o_shuffle_on_pressed_img;
86 NSTimeInterval last_fwd_event;
87 NSTimeInterval last_bwd_event;
88 BOOL just_triggered_next;
89 BOOL just_triggered_previous;
90 NSMutableArray *o_sidebaritems;
92 + (VLCMainWindow *)sharedInstance;
94 - (IBAction)play:(id)sender;
95 - (IBAction)bwd:(id)sender;
96 - (IBAction)fwd:(id)sender;
97 - (IBAction)stop:(id)sender;
98 - (IBAction)togglePlaylist:(id)sender;
99 - (IBAction)repeat:(id)sender;
100 - (IBAction)shuffle:(id)sender;
101 - (IBAction)timeSliderAction:(id)sender;
102 - (IBAction)volumeAction:(id)sender;
103 - (IBAction)effects:(id)sender;
104 - (IBAction)fullscreen:(id)sender;
107 - (void)setVideoplayEnabled;
108 - (void)updateTimeSlider;
109 - (void)updateVolumeSlider;
110 - (void)updateWindow;
114 - (void)setRepeatOne;
115 - (void)setRepeatAll;
116 - (void)setRepeatOff;
119 - (void)drawFancyGradientEffectForTimeSlider;
123 @interface VLCProgressBarGradientEffect : NSView {
124 NSImage * o_time_sld_gradient_left_img;
125 NSImage * o_time_sld_gradient_middle_img;
126 NSImage * o_time_sld_gradient_right_img;
128 - (void)loadImagesInDarkStyle:(BOOL)b_value;