Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0d05deab
Commit
0d05deab
authored
Aug 24, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/CoreInteraction: modernize getters and setters API
parent
f76f40b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
23 deletions
+19
-23
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+7
-11
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+4
-4
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+1
-1
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+3
-3
modules/gui/macosx/applescript.m
modules/gui/macosx/applescript.m
+2
-2
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+2
-2
No files found.
modules/gui/macosx/CoreInteraction.h
View file @
0d05deab
...
...
@@ -29,6 +29,13 @@
int
i_currentPlaybackRate
;
}
+
(
VLCCoreInteraction
*
)
sharedInstance
;
@property
(
readwrite
)
int
volume
;
@property
(
readwrite
)
int
playbackRate
;
@property
(
nonatomic
,
readwrite
)
BOOL
aspectRatioIsLocked
;
@property
(
readonly
)
int
durationOfCurrentPlaylistItem
;
@property
(
readonly
)
NSURL
*
URLOfCurrentPlaylistItem
;
@property
(
readonly
)
NSString
*
nameOfCurrentPlaylistItem
;
@property
(
nonatomic
,
readwrite
)
BOOL
mute
;
-
(
void
)
play
;
-
(
void
)
pause
;
...
...
@@ -37,13 +44,8 @@
-
(
void
)
slower
;
-
(
void
)
normalSpeed
;
-
(
void
)
toggleRecord
;
-
(
void
)
setPlaybackRate
:(
int
)
i_value
;
-
(
int
)
playbackRate
;
-
(
void
)
next
;
-
(
void
)
previous
;
-
(
int
)
durationOfCurrentPlaylistItem
;
-
(
NSURL
*
)
URLOfCurrentPlaylistItem
;
-
(
NSString
*
)
nameOfCurrentPlaylistItem
;
-
(
void
)
forward
;
//LEGACY SUPPORT
-
(
void
)
backward
;
//LEGACY SUPPORT
-
(
void
)
forwardExtraShort
;
...
...
@@ -62,15 +64,9 @@
-
(
void
)
volumeUp
;
-
(
void
)
volumeDown
;
-
(
void
)
mute
;
-
(
BOOL
)
isMuted
;
-
(
int
)
volume
;
-
(
void
)
setVolume
:(
int
)
i_value
;
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
;
-
(
void
)
setAspectRatioLocked
:(
BOOL
)
b_value
;
-
(
BOOL
)
aspectRatioIsLocked
;
-
(
void
)
toggleFullscreen
;
-
(
BOOL
)
fixPreferences
;
...
...
modules/gui/macosx/CoreInteraction.m
View file @
0d05deab
...
...
@@ -446,16 +446,16 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
aout_VolumeDown
(
pl_Get
(
p_intf
),
1
,
NULL
);
}
-
(
void
)
mut
e
-
(
void
)
setMute
:(
BOOL
)
b_valu
e
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_intf
)
return
;
aout_Mute
Toggle
(
pl_Get
(
p_intf
)
);
aout_Mute
Set
(
pl_Get
(
p_intf
),
b_value
);
}
-
(
BOOL
)
isMuted
-
(
BOOL
)
mute
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_intf
)
...
...
@@ -544,7 +544,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
#pragma mark -
#pragma mark video output stuff
-
(
void
)
setAspectRatioLocked
:(
BOOL
)
b_value
-
(
void
)
setAspectRatio
Is
Locked
:(
BOOL
)
b_value
{
config_PutInt
(
VLCIntf
,
"macosx-lock-aspect-ratio"
,
b_value
);
}
...
...
modules/gui/macosx/MainMenu.m
View file @
0d05deab
...
...
@@ -1293,7 +1293,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
}
else
if
(
[
o_title
isEqualToString
:
_NS
(
"Mute"
)]
)
{
[
o_mi
setState
:
[[
VLCCoreInteraction
sharedInstance
]
isMuted
]
?
NSOnState
:
NSOffState
];
[
o_mi
setState
:
[[
VLCCoreInteraction
sharedInstance
]
mute
]
?
NSOnState
:
NSOffState
];
[
self
setupMenus
];
/* Make sure audio menu is up to date */
}
else
if
(
[
o_title
isEqualToString
:
_NS
(
"Half Size"
)]
||
...
...
modules/gui/macosx/MainWindow.m
View file @
0d05deab
...
...
@@ -329,7 +329,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_play_btn
setAlternateImage
:
o_play_pressed_img
];
[
o_detached_play_btn
setImage
:
o_play_img
];
[
o_detached_play_btn
setAlternateImage
:
o_play_pressed_img
];
BOOL
b_mute
=
!
[[
VLCCoreInteraction
sharedInstance
]
isMuted
];
BOOL
b_mute
=
!
[[
VLCCoreInteraction
sharedInstance
]
mute
];
[
o_volume_sld
setEnabled
:
b_mute
];
[
o_volume_up_btn
setEnabled
:
b_mute
];
...
...
@@ -1207,7 +1207,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
[
sender
intValue
]];
else
if
(
sender
==
o_volume_down_btn
)
{
[[
VLCCoreInteraction
sharedInstance
]
mute
];
[[
VLCCoreInteraction
sharedInstance
]
setMute
:
YES
];
}
else
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
AOUT_VOLUME_MAX
];
...
...
@@ -1593,7 +1593,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
int
i_volume
=
lroundf
(
aout_VolumeGet
(
p_playlist
)
*
AOUT_VOLUME_DEFAULT
);
BOOL
b_muted
=
[[
VLCCoreInteraction
sharedInstance
]
isMuted
];
BOOL
b_muted
=
[[
VLCCoreInteraction
sharedInstance
]
mute
];
if
(
!
b_muted
)
{
...
...
modules/gui/macosx/applescript.m
View file @
0d05deab
...
...
@@ -118,7 +118,7 @@
}
else
if
(
[
o_command
isEqualToString
:
@"mute"
]
)
{
[[
VLCCoreInteraction
sharedInstance
]
mute
];
[[
VLCCoreInteraction
sharedInstance
]
setMute
:
YES
];
}
else
if
(
[
o_command
isEqualToString
:
@"volumeUp"
]
)
{
...
...
@@ -220,7 +220,7 @@
}
-
(
BOOL
)
muted
{
return
[[
VLCCoreInteraction
sharedInstance
]
isMuted
];
return
[[
VLCCoreInteraction
sharedInstance
]
mute
];
}
-
(
BOOL
)
playing
{
...
...
modules/gui/macosx/controls.m
View file @
0d05deab
...
...
@@ -146,7 +146,7 @@
-
(
IBAction
)
mute
:(
id
)
sender
{
[[
VLCCoreInteraction
sharedInstance
]
mute
];
[[
VLCCoreInteraction
sharedInstance
]
setMute
:
YES
];
}
-
(
IBAction
)
volumeSliderUpdated
:(
id
)
sender
...
...
@@ -209,7 +209,7 @@
-
(
IBAction
)
lockVideosAspectRatio
:(
id
)
sender
{
[[
VLCCoreInteraction
sharedInstance
]
setAspectRatioLocked
:
!
[
sender
state
]];
[[
VLCCoreInteraction
sharedInstance
]
setAspectRatio
Is
Locked
:
!
[
sender
state
]];
[
sender
setState
:
[[
VLCCoreInteraction
sharedInstance
]
aspectRatioIsLocked
]];
}
...
...
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