intf.h 4.12 KB
Newer Older
1
/*****************************************************************************
2
 * intf.h: MacOS X interface module
3
 *****************************************************************************
4
 * Copyright (C) 2002-2014 VLC authors and VideoLAN
5
 * $Id$
6 7
 *
 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8
 *          Derk-Jan Hartman <hartman at videolan dot org>
9
 *          Felix Paul Kühne <fkuehne at videolan dot org>
10
 *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
11
 *          Pierre d'Herbemont <pdherbemont # videolan org>
12 13 14 15 16
 *
 * 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.
17
 *
18 19 20 21 22 23 24
 * 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
dionoea's avatar
dionoea committed
25
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26 27
 *****************************************************************************/

Rafaël Carré's avatar
Rafaël Carré committed
28 29 30 31
#ifdef HAVE_CONFIG_H
#   include "config.h"
#endif

32 33 34 35 36 37
#import <vlc_common.h>
#import <vlc_interface.h>
#import <vlc_playlist.h>
#import <vlc_vout.h>
#import <vlc_aout.h>
#import <vlc_input.h>
38
#import <vlc_vout_window.h>
39

40
#import <Cocoa/Cocoa.h>
41
#import "SPMediaKeyTap.h"                   /* for the media key support */
42
#import "misc.h"
43
#import "MainWindow.h"
44
#import "VLCVoutWindowController.h"
45
#import "StringUtility.h"
46

47
/*****************************************************************************
hartman's avatar
hartman committed
48
 * Local prototypes.
49
 *****************************************************************************/
50
#define VLCIntf [[VLCMain sharedInstance] intf]
51

52 53 54
// You need to release those objects after use
input_thread_t *getInput(void);
vout_thread_t *getVout(void);
55
vout_thread_t *getVoutForActiveWindow(void);
56
audio_output_t *getAout(void);
57

58
static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
59 60

/*****************************************************************************
61
 * VLCMain interface
62
 *****************************************************************************/
63
@class AppleRemote;
64
@class VLCInfo;
65
@class VLCControls;
66
@class VLCMainMenu;
67
@class VLCPlaylist;
68
@class InputManager;
69
@class ResumeDialogController;
70

71
@interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
72
{
73
    IBOutlet VLCMainWindow *o_mainwindow;            /* VLCMainWindow */
74

75 76
    IBOutlet VLCControls * o_controls;     /* VLCControls    */
    IBOutlet VLCPlaylist * o_playlist;     /* VLCPlaylist    */
77 78
}

79
@property (readonly) VLCVoutWindowController* voutController;
80
@property (readonly) BOOL nativeFullscreenMode;
81
@property (nonatomic, readwrite) BOOL playlistUpdatedSelectorInQueue;
hartman's avatar
hartman committed
82 83
+ (VLCMain *)sharedInstance;

84
- (intf_thread_t *)intf;
hartman's avatar
hartman committed
85 86
- (void)setIntf:(intf_thread_t *)p_mainintf;

87
- (VLCMainMenu *)mainMenu;
88
- (VLCMainWindow *)mainWindow;
89
- (id)controls;
90 91
- (id)bookmarks;
- (id)open;
92 93
- (id)simplePreferences;
- (id)preferences;
94
- (VLCPlaylist *)playlist;
95
- (id)coreDialogProvider;
96
- (ResumeDialogController *)resumeDialog;
97
- (id)eyeTVController;
98
- (id)appleRemoteController;
99 100
- (void)setActiveVideoPlayback:(BOOL)b_value;
- (BOOL)activeVideoPlayback;
101
- (void)applicationWillTerminate:(NSNotification *)notification;
102
- (void)updateCurrentlyUsedHotkeys;
103
- (BOOL)hasDefinedShortcutKey:(NSEvent *)o_event force:(BOOL)b_force;
104

105
- (void)plItemUpdated;
106
- (void)playbackModeUpdated;
Felix Paul Kühne's avatar
Felix Paul Kühne committed
107
- (void)showFullscreenController;
108

109 110
- (void)updateTogglePlaylistState;

111
- (void)mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)event;
112 113 114

- (void)resetAndReinitializeUserDefaults;

115 116
- (BOOL)isTerminating;

117 118
@end

119 120 121 122 123 124

/*****************************************************************************
 * VLCApplication interface
 *****************************************************************************/

@interface VLCApplication : NSApplication
Felix Paul Kühne's avatar
Felix Paul Kühne committed
125

126
@end