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
f4fd4afc
Commit
f4fd4afc
authored
Nov 01, 2006
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Mouse motion and mouse click support in the libcaca vout.
parent
b0966945
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
20 deletions
+53
-20
modules/video_output/caca.c
modules/video_output/caca.c
+53
-20
No files found.
modules/video_output/caca.c
View file @
f4fd4afc
...
...
@@ -299,39 +299,72 @@ static int Manage( vout_thread_t *p_vout )
#else
int
ev
;
#endif
vlc_value_t
val
;
while
(
caca_get_event
(
p_vout
->
p_sys
->
p_dp
,
CACA_EVENT_KEY_PRESS
|
CACA_EVENT_RESIZE
,
&
ev
,
0
)
)
while
(
caca_get_event
(
p_vout
->
p_sys
->
p_dp
,
CACA_EVENT_ANY
,
&
ev
,
0
)
)
{
/* Acknowledge the resize */
playlist_t
*
p_playlist
;
vlc_value_t
val
;
#ifdef CACA_API_VERSION_1
if
(
ev
.
type
==
CACA_EVENT_RESIZE
)
switch
(
ev
.
type
)
#else
if
(
ev
==
CACA_EVENT_RESIZE
)
switch
(
ev
)
#endif
{
caca_refresh_display
(
p_vout
->
p_sys
->
p_dp
);
continue
;
}
case
CACA_EVENT_KEY_RELEASE
:
#ifdef CACA_API_VERSION_1
switch
(
ev
.
data
.
key
.
ch
)
switch
(
ev
.
data
.
key
.
ch
)
#else
switch
(
ev
&
0x00ffffff
)
switch
(
ev
&
0x00ffffff
)
#endif
{
case
'q'
:
val
.
i_int
=
KEY_MODIFIER_CTRL
|
'q'
;
{
case
'q'
:
val
.
i_int
=
KEY_MODIFIER_CTRL
|
'q'
;
break
;
case
' '
:
val
.
i_int
=
KEY_SPACE
;
break
;
default:
continue
;
}
var_Set
(
p_vout
->
p_libvlc
,
"key-pressed"
,
val
);
break
;
case
CACA_EVENT_RESIZE
:
/* Acknowledge the resize */
caca_refresh_display
(
p_vout
->
p_sys
->
p_dp
);
break
;
case
' '
:
val
.
i_int
=
KEY_SPACE
;
#ifdef CACA_API_VERSION_1
case
CACA_EVENT_MOUSE_MOTION
:
val
.
i_int
=
ev
.
data
.
mouse
.
x
*
p_vout
->
render
.
i_width
/
cucul_get_canvas_width
(
p_vout
->
p_sys
->
p_cv
);
var_Set
(
p_vout
,
"mouse-x"
,
val
);
val
.
i_int
=
ev
.
data
.
mouse
.
y
*
p_vout
->
render
.
i_height
/
cucul_get_canvas_height
(
p_vout
->
p_sys
->
p_cv
);
var_Set
(
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-moved"
,
val
);
break
;
case
CACA_EVENT_MOUSE_RELEASE
:
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-clicked"
,
val
);
break
;
case
CACA_EVENT_QUIT
:
{
p_playlist
=
vlc_object_find
(
p_vout
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
playlist_Stop
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
p_vout
->
p_libvlc
->
b_die
=
VLC_TRUE
;
break
;
}
#endif
default:
continue
;
break
;
}
var_Set
(
p_vout
->
p_libvlc
,
"key-pressed"
,
val
);
}
return
VLC_SUCCESS
;
...
...
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