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
8ac54d15
Commit
8ac54d15
authored
Jan 17, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout ios: use long touch instead of double tap gesture to control on screen elements
parent
014a0202
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
modules/video_output/ios2.m
modules/video_output/ios2.m
+12
-12
No files found.
modules/video_output/ios2.m
View file @
8ac54d15
...
...
@@ -100,7 +100,7 @@ struct vout_display_sys_t
{
VLCOpenGLES2VideoView
*
glESView
;
UIView
*
viewContainer
;
UI
TapGestureRecognizer
*
tap
Recognizer
;
UI
LongPressGestureRecognizer
*
longTouch
Recognizer
;
vlc_gl_t
gl
;
vout_display_opengl_t
*
vgl
;
...
...
@@ -159,16 +159,16 @@ static int Open(vlc_object_t *this)
waitUntilDone:
YES
];
/* add tap gesture recognizer for DVD menus and stuff */
sys
->
tapRecognizer
=
[[
UITap
GestureRecognizer
alloc
]
initWithTarget
:
sys
->
glESView
action:
@selector
(
tap
Recognized
:)];
sys
->
tapRecognizer
.
numberOfTapsRequired
=
2
;
sys
->
longTouchRecognizer
=
[[
UILongPress
GestureRecognizer
alloc
]
initWithTarget
:
sys
->
glESView
action:
@selector
(
longTouch
Recognized
:)];
sys
->
longTouchRecognizer
.
allowableMovement
=
20
.
;
if
(
sys
->
viewContainer
.
window
)
{
if
(
sys
->
viewContainer
.
window
.
rootViewController
)
{
if
(
sys
->
viewContainer
.
window
.
rootViewController
.
view
)
[
sys
->
viewContainer
.
superview
addGestureRecognizer
:
sys
->
tap
Recognizer
];
[
sys
->
viewContainer
.
superview
addGestureRecognizer
:
sys
->
longTouch
Recognizer
];
}
}
sys
->
tapRecognizer
.
cancelsTouchesInView
=
NO
;
sys
->
longTouchRecognizer
.
cancelsTouchesInView
=
YES
;
/* Initialize common OpenGL video display */
sys
->
gl
.
lock
=
OpenglESClean
;
...
...
@@ -232,9 +232,9 @@ void Close (vlc_object_t *this)
vout_display_t
*
vd
=
(
vout_display_t
*
)
this
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
if
(
sys
->
tap
Recognizer
)
{
[
sys
->
glESView
removeGestureRecognizer
:
sys
->
tap
Recognizer
];
[
sys
->
tap
Recognizer
release
];
if
(
sys
->
longTouch
Recognizer
)
{
[
sys
->
glESView
removeGestureRecognizer
:
sys
->
longTouch
Recognizer
];
[
sys
->
longTouch
Recognizer
release
];
}
[
sys
->
glESView
setVoutDisplay
:
nil
];
...
...
@@ -504,10 +504,10 @@ static void OpenglESSwap(vlc_gl_t *gl)
glViewport
(
place
.
x
,
place
.
y
,
place
.
width
,
place
.
height
);
}
-
(
void
)
tapRecognized
:(
UITapGestureRecognizer
*
)
tap
Recognizer
-
(
void
)
longTouchRecognized
:(
UITapGestureRecognizer
*
)
longTouch
Recognizer
{
UIGestureRecognizerState
state
=
[
tap
Recognizer
state
];
CGPoint
touchPoint
=
[
tap
Recognizer
locationInView
:
self
];
UIGestureRecognizerState
state
=
[
longTouch
Recognizer
state
];
CGPoint
touchPoint
=
[
longTouch
Recognizer
locationInView
:
self
];
CGFloat
scaleFactor
=
self
.
contentScaleFactor
;
vout_display_SendMouseMovedDisplayCoordinates
(
_voutDisplay
,
ORIENT_NORMAL
,
(
int
)
touchPoint
.
x
*
scaleFactor
,
(
int
)
touchPoint
.
y
*
scaleFactor
,
...
...
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