Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0eaddd99
Commit
0eaddd99
authored
Jun 27, 2015
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: Move input-related code to own class
parent
d3b385e2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
487 additions
and
368 deletions
+487
-368
modules/gui/macosx/InputManager.h
modules/gui/macosx/InputManager.h
+62
-0
modules/gui/macosx/InputManager.m
modules/gui/macosx/InputManager.m
+399
-0
modules/gui/macosx/Makefile.am
modules/gui/macosx/Makefile.am
+2
-1
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+9
-22
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+15
-345
No files found.
modules/gui/macosx/InputManager.h
0 → 100644
View file @
0eaddd99
/*****************************************************************************
* 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
modules/gui/macosx/InputManager.m
0 → 100644
View file @
0eaddd99
This diff is collapsed.
Click to expand it.
modules/gui/macosx/Makefile.am
View file @
0eaddd99
...
@@ -38,7 +38,8 @@ libmacosx_plugin_la_SOURCES = \
...
@@ -38,7 +38,8 @@ libmacosx_plugin_la_SOURCES = \
ExtensionsManager.h ExtensionsManager.m
\
ExtensionsManager.h ExtensionsManager.m
\
eyetv.h eyetv.m
\
eyetv.h eyetv.m
\
fspanel.h fspanel.m
\
fspanel.h fspanel.m
\
intf.m intf.h
\
intf.h intf.m
\
InputManager.h InputManager.m
\
iTunes.h
\
iTunes.h
\
KeyboardBacklight.h KeyboardBacklight.m
\
KeyboardBacklight.h KeyboardBacklight.m
\
macosx.m
\
macosx.m
\
...
...
modules/gui/macosx/intf.h
View file @
0eaddd99
...
@@ -44,8 +44,6 @@
...
@@ -44,8 +44,6 @@
#import "VLCVoutWindowController.h"
#import "VLCVoutWindowController.h"
#import "StringUtility.h"
#import "StringUtility.h"
#import <IOKit/pwr_mgt/IOPMLib.h>
/* for sleep prevention */
/*****************************************************************************
/*****************************************************************************
* Local prototypes.
* Local prototypes.
*****************************************************************************/
*****************************************************************************/
...
@@ -63,22 +61,24 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
...
@@ -63,22 +61,24 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
* VLCMain interface
* VLCMain interface
*****************************************************************************/
*****************************************************************************/
@class
AppleRemote
;
@class
AppleRemote
;
@class
VLCInfo
;
@class
VLCControls
;
@class
VLCControls
;
@class
VLCMainMenu
;
@class
VLCPlaylist
;
@class
VLCPlaylist
;
@class
InputManager
;
@interface
VLCMain
:
NSObject
<
NSWindowDelegate
,
NSApplicationDelegate
>
@interface
VLCMain
:
NSObject
<
NSWindowDelegate
,
NSApplicationDelegate
>
{
{
intf_thread_t
*
p_intf
;
/* The main intf object */
intf_thread_t
*
p_intf
;
/* The main intf object */
input_thread_t
*
p_current_input
;
BOOL
launched
;
/* finishedLaunching */
BOOL
launched
;
/* finishedLaunching */
int
items_at_launch
;
/* items in playlist after launch */
int
items_at_launch
;
/* items in playlist after launch */
id
o_mainmenu
;
/* VLCMainMenu */
VLCMainMenu
*
o_mainmenu
;
/* VLCMainMenu */
id
o_prefs
;
/* VLCPrefs */
id
o_prefs
;
/* VLCPrefs */
id
o_sprefs
;
/* VLCSimplePrefs */
id
o_sprefs
;
/* VLCSimplePrefs */
id
o_open
;
/* VLCOpen */
id
o_open
;
/* VLCOpen */
id
o_wizard
;
/* VLCWizard */
id
o_wizard
;
/* VLCWizard */
id
o_coredialogs
;
/* VLCCoreDialogProvider */
id
o_coredialogs
;
/* VLCCoreDialogProvider */
id
o_info
;
/* VLCInformation */
VLCInfo
*
o_info
;
/* VLCInformation */
id
o_eyetv
;
/* VLCEyeTVController */
id
o_eyetv
;
/* VLCEyeTVController */
id
o_bookmarks
;
/* VLCBookmarks */
id
o_bookmarks
;
/* VLCBookmarks */
id
o_coreinteraction
;
/* VLCCoreInteraction */
id
o_coreinteraction
;
/* VLCCoreInteraction */
...
@@ -111,18 +111,9 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
...
@@ -111,18 +111,9 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
NSArray
*
o_usedHotkeys
;
NSArray
*
o_usedHotkeys
;
/* sleep management */
IOPMAssertionID
systemSleepAssertionID
;
IOPMAssertionID
userActivityAssertionID
;
VLCVoutWindowController
*
o_vout_controller
;
VLCVoutWindowController
*
o_vout_controller
;
/* iTunes/Spotify play/pause support */
InputManager
*
o_input_manager
;
BOOL
b_has_itunes_paused
;
BOOL
b_has_spotify_paused
;
NSTimer
*
o_itunes_play_timer
;
dispatch_queue_t
informInputChangedQueue
;
}
}
@property
(
readonly
)
VLCVoutWindowController
*
voutController
;
@property
(
readonly
)
VLCVoutWindowController
*
voutController
;
...
@@ -133,15 +124,15 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
...
@@ -133,15 +124,15 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
-
(
intf_thread_t
*
)
intf
;
-
(
intf_thread_t
*
)
intf
;
-
(
void
)
setIntf
:(
intf_thread_t
*
)
p_mainintf
;
-
(
void
)
setIntf
:(
intf_thread_t
*
)
p_mainintf
;
-
(
id
)
mainMenu
;
-
(
VLCMainMenu
*
)
mainMenu
;
-
(
VLCMainWindow
*
)
mainWindow
;
-
(
VLCMainWindow
*
)
mainWindow
;
-
(
id
)
controls
;
-
(
id
)
controls
;
-
(
id
)
bookmarks
;
-
(
id
)
bookmarks
;
-
(
id
)
open
;
-
(
id
)
open
;
-
(
id
)
simplePreferences
;
-
(
id
)
simplePreferences
;
-
(
id
)
preferences
;
-
(
id
)
preferences
;
-
(
id
)
playlist
;
-
(
VLCPlaylist
*
)
playlist
;
-
(
id
)
info
;
-
(
VLCInfo
*
)
info
;
-
(
id
)
wizard
;
-
(
id
)
wizard
;
-
(
id
)
coreDialogProvider
;
-
(
id
)
coreDialogProvider
;
-
(
id
)
eyeTVController
;
-
(
id
)
eyeTVController
;
...
@@ -152,16 +143,12 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
...
@@ -152,16 +143,12 @@ static NSString * VLCInputChangedNotification = @"VLCInputChangedNotification";
-
(
void
)
updateCurrentlyUsedHotkeys
;
-
(
void
)
updateCurrentlyUsedHotkeys
;
-
(
BOOL
)
hasDefinedShortcutKey
:(
NSEvent
*
)
o_event
force
:(
BOOL
)
b_force
;
-
(
BOOL
)
hasDefinedShortcutKey
:(
NSEvent
*
)
o_event
force
:(
BOOL
)
b_force
;
-
(
void
)
inputThreadChanged
;
-
(
void
)
plItemUpdated
;
-
(
void
)
plItemUpdated
;
-
(
void
)
playbackStatusUpdated
;
-
(
void
)
sendDistributedNotificationWithUpdatedPlaybackStatus
;
-
(
void
)
playbackModeUpdated
;
-
(
void
)
playbackModeUpdated
;
-
(
void
)
updateVolume
;
-
(
void
)
updateVolume
;
-
(
void
)
updatePlaybackPosition
;
-
(
void
)
updatePlaybackPosition
;
-
(
void
)
updateName
;
-
(
void
)
updateName
;
-
(
void
)
updateRecordState
:
(
BOOL
)
b_value
;
-
(
void
)
updateRecordState
:
(
BOOL
)
b_value
;
-
(
void
)
updateMetaAndInfo
;
-
(
void
)
updateMainMenu
;
-
(
void
)
updateMainMenu
;
-
(
void
)
updateMainWindow
;
-
(
void
)
updateMainWindow
;
-
(
void
)
showMainWindow
;
-
(
void
)
showMainWindow
;
...
...
modules/gui/macosx/intf.m
View file @
0eaddd99
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment