Commit 0eaddd99 authored by David Fuhrmann's avatar David Fuhrmann

macosx: Move input-related code to own class

parent d3b385e2
/*****************************************************************************
* InputManager.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2015 VLC authors and VideoLAN
* $Id$
*
* 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>
#include <vlc_common.h>
#import <vlc_interface.h>
#import <IOKit/pwr_mgt/IOPMLib.h> /* for sleep prevention */
@class VLCMain;
@interface InputManager : NSObject
{
intf_thread_t *p_intf;
VLCMain *o_main;
input_thread_t *p_current_input;
dispatch_queue_t informInputChangedQueue;
/* sleep management */
IOPMAssertionID systemSleepAssertionID;
IOPMAssertionID userActivityAssertionID;
/* iTunes/Spotify play/pause support */
BOOL b_has_itunes_paused;
BOOL b_has_spotify_paused;
NSTimer *o_itunes_play_timer;
}
- (id)initWithMain:(VLCMain *)o_mainObj;
- (void)inputThreadChanged;
- (void)playbackStatusUpdated;
- (void)resumeItunesPlayback:(id)sender;
- (BOOL)hasInput;
@end
This diff is collapsed.
......@@ -38,7 +38,8 @@ libmacosx_plugin_la_SOURCES = \
ExtensionsManager.h ExtensionsManager.m \
eyetv.h eyetv.m \
fspanel.h fspanel.m \
intf.m intf.h \
intf.h intf.m \
InputManager.h InputManager.m \
iTunes.h \
KeyboardBacklight.h KeyboardBacklight.m \
macosx.m \
......
......@@ -44,8 +44,6 @@
#import "VLCVoutWindowController.h"
#import "StringUtility.h"
#import <IOKit/pwr_mgt/IOPMLib.h> /* for sleep prevention */
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
......@@ -63,22 +61,24 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
* VLCMain interface
*****************************************************************************/
@class AppleRemote;
@class VLCInfo;
@class VLCControls;
@class VLCMainMenu;
@class VLCPlaylist;
@class InputManager;
@interface VLCMain : NSObject <NSWindowDelegate, NSApplicationDelegate>
{
intf_thread_t *p_intf; /* The main intf object */
input_thread_t *p_current_input;
BOOL launched; /* finishedLaunching */
int items_at_launch; /* items in playlist after launch */
id o_mainmenu; /* VLCMainMenu */
VLCMainMenu *o_mainmenu; /* VLCMainMenu */
id o_prefs; /* VLCPrefs */
id o_sprefs; /* VLCSimplePrefs */
id o_open; /* VLCOpen */
id o_wizard; /* VLCWizard */
id o_coredialogs; /* VLCCoreDialogProvider */
id o_info; /* VLCInformation */
VLCInfo *o_info; /* VLCInformation */
id o_eyetv; /* VLCEyeTVController */
id o_bookmarks; /* VLCBookmarks */
id o_coreinteraction; /* VLCCoreInteraction */
......@@ -111,18 +111,9 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
NSArray *o_usedHotkeys;
/* sleep management */
IOPMAssertionID systemSleepAssertionID;
IOPMAssertionID userActivityAssertionID;
VLCVoutWindowController *o_vout_controller;
/* iTunes/Spotify play/pause support */
BOOL b_has_itunes_paused;
BOOL b_has_spotify_paused;
NSTimer *o_itunes_play_timer;
dispatch_queue_t informInputChangedQueue;
InputManager *o_input_manager;
}
@property (readonly) VLCVoutWindowController* voutController;
......@@ -133,15 +124,15 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
- (intf_thread_t *)intf;
- (void)setIntf:(intf_thread_t *)p_mainintf;
- (id)mainMenu;
- (VLCMainMenu *)mainMenu;
- (VLCMainWindow *)mainWindow;
- (id)controls;
- (id)bookmarks;
- (id)open;
- (id)simplePreferences;
- (id)preferences;
- (id)playlist;
- (id)info;
- (VLCPlaylist *)playlist;
- (VLCInfo *)info;
- (id)wizard;
- (id)coreDialogProvider;
- (id)eyeTVController;
......@@ -152,16 +143,12 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
- (void)updateCurrentlyUsedHotkeys;
- (BOOL)hasDefinedShortcutKey:(NSEvent *)o_event force:(BOOL)b_force;
- (void)inputThreadChanged;
- (void)plItemUpdated;
- (void)playbackStatusUpdated;
- (void)sendDistributedNotificationWithUpdatedPlaybackStatus;
- (void)playbackModeUpdated;
- (void)updateVolume;
- (void)updatePlaybackPosition;
- (void)updateName;
- (void)updateRecordState: (BOOL)b_value;
- (void)updateMetaAndInfo;
- (void)updateMainMenu;
- (void)updateMainWindow;
- (void)showMainWindow;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment