MainWindow.h 4.12 KB
Newer Older
1 2 3
/*****************************************************************************
 * MainWindow.h: MacOS X interface module
 *****************************************************************************
4
 * Copyright (C) 2002-2011 VideoLAN
5 6 7
 * $Id$
 *
 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8 9 10
 *          Jon Lech Johansen <jon-vl@nanocrew.net>
 *          Christophe Massiot <massiot@via.ecp.fr>
 *          Derk-Jan Hartman <hartman at videolan.org>
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * 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.
 *
 * 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.
 *****************************************************************************/

#import <Cocoa/Cocoa.h>
28
#import "PXSourceList.h"
29
#import <vlc_input.h>
30

31 32 33 34 35
#ifndef MAC_OS_X_VERSION_10_6
@protocol NSWindowDelegate <NSObject> @end
#endif

@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate> {
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
    IBOutlet id o_play_btn;
    IBOutlet id o_bwd_btn;
    IBOutlet id o_fwd_btn;
    IBOutlet id o_stop_btn;
    IBOutlet id o_playlist_btn;
    IBOutlet id o_repeat_btn;
    IBOutlet id o_shuffle_btn;
    IBOutlet id o_effects_btn;
    IBOutlet id o_fullscreen_btn;
    IBOutlet id o_search_fld;
    IBOutlet id o_volume_sld;
    IBOutlet id o_volume_track_view;
    IBOutlet id o_volume_down_btn;
    IBOutlet id o_volume_up_btn;
    IBOutlet id o_time_sld;
51
    IBOutlet id o_time_sld_fancygradient_view;
52 53 54 55 56 57 58 59 60
    IBOutlet id o_time_fld;
    IBOutlet id o_progress_bar;
    IBOutlet id o_bottombar_view;
    IBOutlet id o_time_sld_left_view;
    IBOutlet id o_time_sld_middle_view;
    IBOutlet id o_time_sld_right_view;
    // TODO Playlist table, additional ui stuff at the top of the window
    IBOutlet id o_playlist_table;
    IBOutlet id o_video_view;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
61 62
    IBOutlet id o_split_view;
    IBOutlet id o_sidebar_view;
63
    IBOutlet id o_chosen_category_lbl;
64

65
    BOOL b_dark_interface;
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
    BOOL b_video_playback_enabled;
    int i_lastShownVolume;
    BOOL b_mute;
    input_state_e cachedInputState;

    NSImage * o_pause_img;
    NSImage * o_pause_pressed_img;
    NSImage * o_play_img;
    NSImage * o_play_pressed_img;
    NSImage * o_repeat_img;
    NSImage * o_repeat_pressed_img;
    NSImage * o_repeat_all_img;
    NSImage * o_repeat_all_pressed_img;
    NSImage * o_repeat_one_img;
    NSImage * o_repeat_one_pressed_img;
    NSImage * o_shuffle_img;
    NSImage * o_shuffle_pressed_img;
    NSImage * o_shuffle_on_img;
    NSImage * o_shuffle_on_pressed_img;
85 86 87 88 89

    NSTimeInterval last_fwd_event;
    NSTimeInterval last_bwd_event;
    BOOL just_triggered_next;
    BOOL just_triggered_previous;
90
    NSMutableArray *o_sidebaritems;
91
}
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
+ (VLCMainWindow *)sharedInstance;

- (IBAction)play:(id)sender;
- (IBAction)bwd:(id)sender;
- (IBAction)fwd:(id)sender;
- (IBAction)stop:(id)sender;
- (IBAction)togglePlaylist:(id)sender;
- (IBAction)repeat:(id)sender;
- (IBAction)shuffle:(id)sender;
- (IBAction)timeSliderAction:(id)sender;
- (IBAction)volumeAction:(id)sender;
- (IBAction)effects:(id)sender;
- (IBAction)fullscreen:(id)sender;

- (id)videoView;
107
- (void)setVideoplayEnabled;
108 109 110
- (void)updateTimeSlider;
- (void)updateVolumeSlider;
- (void)updateWindow;
111
- (void)updateName;
112 113
- (void)setPause;
- (void)setPlay;
114 115 116 117
- (void)setRepeatOne;
- (void)setRepeatAll;
- (void)setRepeatOff;
- (void)setShuffle;
118

119 120 121 122 123 124 125 126 127 128
- (void)drawFancyGradientEffectForTimeSlider;

@end

@interface VLCProgressBarGradientEffect : NSView {
    NSImage * o_time_sld_gradient_left_img;
    NSImage * o_time_sld_gradient_middle_img;
    NSImage * o_time_sld_gradient_right_img;
}
- (void)loadImagesInDarkStyle:(BOOL)b_value;
129
@end