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
ea90ac95
Commit
ea90ac95
authored
Jun 25, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: implement magnification gesture as an additional fullscreen toggle
close #6926
parent
1085ee39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
modules/gui/macosx/VideoView.h
modules/gui/macosx/VideoView.h
+1
-0
modules/gui/macosx/VideoView.m
modules/gui/macosx/VideoView.m
+26
-0
No files found.
modules/gui/macosx/VideoView.h
View file @
ea90ac95
...
...
@@ -30,5 +30,6 @@
*****************************************************************************/
@interface
VLCVoutView
:
NSView
{
CGFloat
f_cumulated_magnification
;
}
@end
modules/gui/macosx/VideoView.m
View file @
ea90ac95
...
...
@@ -40,6 +40,12 @@
#import <vlc_common.h>
#import <vlc_keys.h>
#import <AppKit/NSEvent.h>
@interface
NSEvent
(
Undocumented
)
+
(
CGFloat
)
standardMagnificationThreshold
;
@end
/*****************************************************************************
* DeviceCallback: Callback triggered when the video-device variable is changed
*****************************************************************************/
...
...
@@ -75,6 +81,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
-
(
void
)
awakeFromNib
{
[
self
registerForDraggedTypes
:[
NSArray
arrayWithObject
:
NSFilenamesPboardType
]];
f_cumulated_magnification
=
0
.
0
;
}
-
(
NSDragOperation
)
draggingEntered
:(
id
<
NSDraggingInfo
>
)
sender
...
...
@@ -252,4 +260,22 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[[
self
window
]
makeFirstResponder
:
subview
];
}
-
(
void
)
magnifyWithEvent
:(
NSEvent
*
)
event
{
f_cumulated_magnification
+=
[
event
magnification
];
CGFloat
f_threshold
=
[
NSEvent
standardMagnificationThreshold
];
BOOL
b_fullscreen
=
[[
VLCMainWindow
sharedInstance
]
isFullscreen
];
if
(
(
f_cumulated_magnification
>
f_threshold
&&
!
b_fullscreen
)
||
(
f_cumulated_magnification
<
-
f_threshold
&&
b_fullscreen
)
)
{
f_cumulated_magnification
=
0
.
0
;
[[
VLCCoreInteraction
sharedInstance
]
toggleFullscreen
];
}
}
-
(
void
)
beginGestureWithEvent
:(
NSEvent
*
)
event
{
f_cumulated_magnification
=
0
.
0
;
}
@end
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