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
99bf84ee
Commit
99bf84ee
authored
Dec 03, 2002
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* added mouse management in the BeOS video output.
Now DVD menus work thanks to libdvdplay.
parent
7b68278e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
modules/gui/beos/VideoOutput.cpp
modules/gui/beos/VideoOutput.cpp
+28
-3
modules/gui/beos/VideoWindow.h
modules/gui/beos/VideoWindow.h
+5
-2
No files found.
modules/gui/beos/VideoOutput.cpp
View file @
99bf84ee
...
...
@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: VideoOutput.cpp,v 1.
6 2002/11/22 19:37:25
titer Exp $
* $Id: VideoOutput.cpp,v 1.
7 2002/12/03 02:00:37
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -169,7 +169,7 @@ VideoWindow::VideoWindow(int v_width, int v_height, BRect frame,
p_vout
=
p_videoout
;
// create the view to do the display
view
=
new
VLCView
(
Bounds
()
);
view
=
new
VLCView
(
Bounds
()
,
p_vout
);
// create background view
BView
*
mainView
=
new
BackgroundView
(
Bounds
(),
view
);
...
...
@@ -862,13 +862,14 @@ VideoWindow::_save_screen_shot( void* cookie )
/*****************************************************************************
* VLCView::VLCView
*****************************************************************************/
VLCView
::
VLCView
(
BRect
bounds
)
VLCView
::
VLCView
(
BRect
bounds
,
vout_thread_t
*
p_vout_instance
)
:
BView
(
bounds
,
"video view"
,
B_FOLLOW_NONE
,
B_WILL_DRAW
|
B_PULSE_NEEDED
),
fLastMouseMovedTime
(
system_time
()),
fCursorHidden
(
false
),
fCursorInside
(
false
),
fIgnoreDoubleClick
(
false
)
{
p_vout
=
p_vout_instance
;
SetViewColor
(
B_TRANSPARENT_32_BIT
);
}
...
...
@@ -899,6 +900,7 @@ VLCView::MouseDown(BPoint where)
{
VideoWindow
*
videoWindow
=
dynamic_cast
<
VideoWindow
*>
(
Window
());
BMessage
*
msg
=
Window
()
->
CurrentMessage
();
msg
->
PrintToStream
();
int32
clicks
;
uint32
buttons
;
msg
->
FindInt32
(
"clicks"
,
&
clicks
);
...
...
@@ -995,6 +997,17 @@ VLCView::MouseDown(BPoint where)
fCursorHidden
=
false
;
}
/*****************************************************************************
* VLCVIew::MouseUp
*****************************************************************************/
void
VLCView
::
MouseUp
(
BPoint
where
)
{
vlc_value_t
val
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-clicked"
,
val
);
}
/*****************************************************************************
* VLCVIew::MouseMoved
*****************************************************************************/
...
...
@@ -1004,6 +1017,18 @@ VLCView::MouseMoved(BPoint point, uint32 transit, const BMessage* dragMessage)
fLastMouseMovedTime
=
system_time
();
fCursorHidden
=
false
;
fCursorInside
=
(
transit
==
B_INSIDE_VIEW
||
transit
==
B_ENTERED_VIEW
);
/* DVD navigation */
unsigned
int
i_width
,
i_height
,
i_x
,
i_y
;
vout_PlacePicture
(
p_vout
,
(
unsigned
int
)
Bounds
().
Width
(),
(
unsigned
int
)
Bounds
().
Height
(),
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
vlc_value_t
val
;
val
.
i_int
=
(
(
int
)
point
.
x
-
i_x
)
*
p_vout
->
render
.
i_width
/
i_width
;
var_Set
(
p_vout
,
"mouse-x"
,
val
);
val
.
i_int
=
(
(
int
)
point
.
y
-
i_y
)
*
p_vout
->
render
.
i_height
/
i_height
;
var_Set
(
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_vout
,
"mouse-moved"
,
val
);
}
/*****************************************************************************
...
...
modules/gui/beos/VideoWindow.h
View file @
99bf84ee
...
...
@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.
3 2002/10/28 16:55:05
titer Exp $
* $Id: VideoWindow.h,v 1.
4 2002/12/03 02:00:38
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
...
...
@@ -59,11 +59,12 @@ colorcombo colspace[]=
class
VLCView
:
public
BView
{
public:
VLCView
(
BRect
bounds
);
VLCView
(
BRect
bounds
,
vout_thread_t
*
p_vout
);
virtual
~
VLCView
();
virtual
void
AttachedToWindow
();
virtual
void
MouseDown
(
BPoint
where
);
virtual
void
MouseUp
(
BPoint
where
);
virtual
void
MouseMoved
(
BPoint
where
,
uint32
transit
,
const
BMessage
*
dragMessage
);
virtual
void
Pulse
();
...
...
@@ -71,6 +72,8 @@ class VLCView : public BView
virtual
void
KeyDown
(
const
char
*
bytes
,
int32
numBytes
);
private:
vout_thread_t
*
p_vout
;
bigtime_t
fLastMouseMovedTime
;
bool
fCursorHidden
;
bool
fCursorInside
;
...
...
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