Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
39e14fc7
Commit
39e14fc7
authored
May 08, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac OS X gui: Send mouse wheel left/right event to vlc. This is a bit hackish and need some tuning.
parent
fc4af29c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+19
-8
No files found.
modules/gui/macosx/controls.m
View file @
39e14fc7
...
...
@@ -468,19 +468,30 @@
-
(
void
)
scrollWheel
:(
NSEvent
*
)
theEvent
{
intf_thread_t
*
p_intf
=
VLCIntf
;
float
f_absvalue
=
[
theEvent
deltaY
]
>
0
.
0
f
?
[
theEvent
deltaY
]
:
-
[
theEvent
deltaY
];
int
i
,
i_vlckey
;
f_absvalue
=
f_absvalue
/
2
.
0
f
+
1
.
0
f
;
float
f_yabsvalue
=
[
theEvent
deltaY
]
>
0
.
0
f
?
[
theEvent
deltaY
]
:
-
[
theEvent
deltaY
];
float
f_xabsvalue
=
[
theEvent
deltaX
]
>
0
.
0
f
?
[
theEvent
deltaX
]
:
-
[
theEvent
deltaX
];
int
i
,
i_yvlckey
,
i_xvlckey
;
if
([
theEvent
deltaY
]
<
0
.
0
f
)
i_vlckey
=
KEY_MOUSEWHEELDOWN
;
i_yvlckey
=
KEY_MOUSEWHEELDOWN
;
else
i_yvlckey
=
KEY_MOUSEWHEELUP
;
if
([
theEvent
deltaX
]
<
0
.
0
f
)
i_xvlckey
=
KEY_MOUSEWHEELRIGHT
;
else
i_
vlckey
=
KEY_MOUSEWHEELUP
;
i_
xvlckey
=
KEY_MOUSEWHEELLEFT
;
/* Send multiple key event, depending on the intensity of the event */
for
(
i
=
0
;
i
<
(
int
)
f_absvalue
;
i
++
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-pressed"
,
i_vlckey
);
for
(
i
=
0
;
i
<
(
int
)(
f_yabsvalue
/
4
.
+
1
.)
&&
f_yabsvalue
>
0
.
05
;
i
++
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-pressed"
,
i_yvlckey
);
/* Prioritize Y event (sound volume) over X event */
if
(
f_yabsvalue
<
0
.
05
)
{
for
(
i
=
0
;
i
<
(
int
)(
f_xabsvalue
/
6
.
+
1
.)
&&
f_xabsvalue
>
0
.
05
;
i
++
)
var_SetInteger
(
p_intf
->
p_libvlc
,
"key-pressed"
,
i_xvlckey
);
}
}
-
(
BOOL
)
keyEvent
:(
NSEvent
*
)
o_event
...
...
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