Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
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 )
...
@@ -299,39 +299,72 @@ static int Manage( vout_thread_t *p_vout )
#else
#else
int
ev
;
int
ev
;
#endif
#endif
vlc_value_t
val
;
while
(
caca_get_event
(
p_vout
->
p_sys
->
p_dp
,
while
(
caca_get_event
(
p_vout
->
p_sys
->
p_dp
,
CACA_EVENT_ANY
,
&
ev
,
0
)
)
CACA_EVENT_KEY_PRESS
|
CACA_EVENT_RESIZE
,
&
ev
,
0
)
)
{
{
/* Acknowledge the resize */
playlist_t
*
p_playlist
;
vlc_value_t
val
;
#ifdef CACA_API_VERSION_1
#ifdef CACA_API_VERSION_1
if
(
ev
.
type
==
CACA_EVENT_RESIZE
)
switch
(
ev
.
type
)
#else
#else
if
(
ev
==
CACA_EVENT_RESIZE
)
switch
(
ev
)
#endif
#endif
{
{
caca_refresh_display
(
p_vout
->
p_sys
->
p_dp
);
case
CACA_EVENT_KEY_RELEASE
:
continue
;
}
#ifdef CACA_API_VERSION_1
#ifdef CACA_API_VERSION_1
switch
(
ev
.
data
.
key
.
ch
)
switch
(
ev
.
data
.
key
.
ch
)
#else
#else
switch
(
ev
&
0x00ffffff
)
switch
(
ev
&
0x00ffffff
)
#endif
#endif
{
{
case
'q'
:
case
'q'
:
val
.
i_int
=
KEY_MODIFIER_CTRL
|
'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
;
break
;
case
' '
:
#ifdef CACA_API_VERSION_1
val
.
i_int
=
KEY_SPACE
;
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
;
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:
default:
continue
;
break
;
}
}
var_Set
(
p_vout
->
p_libvlc
,
"key-pressed"
,
val
);
}
}
return
VLC_SUCCESS
;
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