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
9bd016fc
Commit
9bd016fc
authored
Mar 06, 2001
by
Richard Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes to interface
parent
6ac3e63d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
14 deletions
+33
-14
plugins/beos/intf_beos.cpp
plugins/beos/intf_beos.cpp
+29
-12
plugins/beos/vout_beos.cpp
plugins/beos/vout_beos.cpp
+4
-2
No files found.
plugins/beos/intf_beos.cpp
View file @
9bd016fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
* intf_beos.cpp: beos interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.1
6 2001/03/05 22:29:02
richards Exp $
* $Id: intf_beos.cpp,v 1.1
7 2001/03/06 01:26:06
richards Exp $
*
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Samuel Hocevar <sam@zoy.org>
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include <MenuBar.h>
#include <MenuBar.h>
#include <MenuItem.h>
#include <MenuItem.h>
#include <FilePanel.h>
#include <FilePanel.h>
#include <Screen.h>
#include <malloc.h>
#include <malloc.h>
#include <string.h>
#include <string.h>
...
@@ -102,8 +103,8 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
...
@@ -102,8 +103,8 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
file_panel
=
NULL
;
file_panel
=
NULL
;
p_intf
=
p_interface
;
p_intf
=
p_interface
;
BRect
ButtonRect
;
BRect
ButtonRect
;
float
xStart
=
2
.0
;
float
xStart
=
5
.0
;
float
yStart
=
4
0.0
;
float
yStart
=
2
0.0
;
SetName
(
"interface"
);
SetName
(
"interface"
);
SetTitle
(
VOUT_TITLE
" (BeOS interface)"
);
SetTitle
(
VOUT_TITLE
" (BeOS interface)"
);
...
@@ -127,7 +128,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
...
@@ -127,7 +128,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
rect
.
top
+=
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
;
rect
.
top
+=
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
;
BBox
*
p_view
;
BBox
*
p_view
;
p_view
=
new
BBox
(
rect
,
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
p_view
=
new
BBox
(
rect
,
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
,
B_PLAIN_BORDER
);
p_view
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
p_view
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
/* Buttons */
/* Buttons */
...
@@ -195,14 +196,14 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
...
@@ -195,14 +196,14 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
/* Seek Status */
/* Seek Status */
rgb_color
fill_color
=
{
0
,
255
,
0
};
rgb_color
fill_color
=
{
0
,
255
,
0
};
p_seek
=
new
SeekSlider
(
BRect
(
5
,
10
,
250
,
30
),
this
,
0
,
100
,
p_seek
=
new
SeekSlider
(
BRect
(
5
,
2
,
255
,
15
),
this
,
0
,
100
,
B_TRIANGLE_THUMB
);
B_TRIANGLE_THUMB
);
p_seek
->
SetValue
(
0
);
p_seek
->
SetValue
(
0
);
p_seek
->
UseFillColor
(
true
,
&
fill_color
);
p_seek
->
UseFillColor
(
true
,
&
fill_color
);
p_view
->
AddChild
(
p_seek
);
p_view
->
AddChild
(
p_seek
);
/* Volume Slider */
/* Volume Slider */
p_vol
=
new
MediaSlider
(
BRect
(
xStart
,
40
,
250
,
6
0
),
new
BMessage
(
VOLUME_CHG
),
p_vol
=
new
MediaSlider
(
BRect
(
xStart
,
20
,
255
,
3
0
),
new
BMessage
(
VOLUME_CHG
),
0
,
VOLUME_MAX
);
0
,
VOLUME_MAX
);
p_vol
->
SetValue
(
VOLUME_DEFAULT
);
p_vol
->
SetValue
(
VOLUME_DEFAULT
);
p_vol
->
UseFillColor
(
true
,
&
fill_color
);
p_vol
->
UseFillColor
(
true
,
&
fill_color
);
...
@@ -210,7 +211,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
...
@@ -210,7 +211,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
/* Set size and Show */
/* Set size and Show */
AddChild
(
p_view
);
AddChild
(
p_view
);
ResizeTo
(
260
,
7
0
+
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
);
ResizeTo
(
260
,
5
0
+
menu_bar
->
Bounds
().
IntegerHeight
()
+
1
);
Show
();
Show
();
}
}
...
@@ -225,8 +226,8 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
...
@@ -225,8 +226,8 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
{
int
vol_val
=
p_vol
->
Value
();
// remember the current volume
int
vol_val
=
p_vol
->
Value
();
// remember the current volume
static
int
playback_status
;
// remember playback state
static
int
playback_status
;
// remember playback state
BAlert
*
alert
;
BAlert
*
alert
;
Activate
();
Activate
();
switch
(
p_message
->
what
)
switch
(
p_message
->
what
)
{
{
...
@@ -242,7 +243,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
...
@@ -242,7 +243,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
break
;
break
;
case
OPEN_DVD
:
case
OPEN_DVD
:
alert
=
new
BAlert
(
VOUT_TITLE
,
"
Opening DVD
not yet supported"
,
"Bummer"
);
alert
=
new
BAlert
(
VOUT_TITLE
,
"
Play DVD from menu
not yet supported"
,
"Bummer"
);
alert
->
Go
();
alert
->
Go
();
//intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, "dvd:/dev/disk/ide/atapi/1/master/0/raw" );
//intf_PlstAdd( p_main->p_playlist, PLAYLIST_END, "dvd:/dev/disk/ide/atapi/1/master/0/raw" );
break
;
break
;
...
@@ -411,12 +412,19 @@ void MediaSlider::DrawThumb(void)
...
@@ -411,12 +412,19 @@ void MediaSlider::DrawThumb(void)
BRect
r
;
BRect
r
;
BView
*
v
;
BView
*
v
;
rgb_color
black
=
{
0
,
0
,
0
};
r
=
ThumbFrame
();
r
=
ThumbFrame
();
v
=
OffscreenView
();
v
=
OffscreenView
();
v
->
SetHighColor
(
0
,
0
,
0
);
if
(
IsEnabled
())
v
->
SetHighColor
(
black
);
else
v
->
SetHighColor
(
tint_color
(
black
,
B_LIGHTEN_2_TINT
));
r
.
InsetBy
(
r
.
IntegerWidth
()
/
4
,
r
.
IntegerHeight
()
/
6
);
r
.
InsetBy
(
r
.
IntegerWidth
()
/
4
,
r
.
IntegerHeight
()
/
6
);
v
->
StrokeEllipse
(
r
);
v
->
StrokeEllipse
(
r
);
v
->
SetHighColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
if
(
IsEnabled
())
v
->
SetHighColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
));
else
v
->
SetHighColor
(
tint_color
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
),
B_LIGHTEN_2_TINT
));
r
.
InsetBy
(
1
,
1
);
r
.
InsetBy
(
1
,
1
);
v
->
FillEllipse
(
r
);
v
->
FillEllipse
(
r
);
}
}
...
@@ -516,6 +524,15 @@ static int intf_Probe( probedata_t *p_data )
...
@@ -516,6 +524,15 @@ static int intf_Probe( probedata_t *p_data )
*****************************************************************************/
*****************************************************************************/
static
int
intf_Open
(
intf_thread_t
*
p_intf
)
static
int
intf_Open
(
intf_thread_t
*
p_intf
)
{
{
BScreen
*
screen
;
screen
=
new
BScreen
();
BRect
rect
=
screen
->
Frame
();
rect
.
top
=
rect
.
bottom
-
100
;
rect
.
bottom
-=
50
;
rect
.
left
+=
50
;
rect
.
right
=
rect
.
left
+
350
;
delete
screen
;
/* Allocate instance and initialize some members */
/* Allocate instance and initialize some members */
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
p_intf
->
p_sys
==
NULL
)
if
(
p_intf
->
p_sys
==
NULL
)
...
@@ -527,7 +544,7 @@ static int intf_Open( intf_thread_t *p_intf )
...
@@ -527,7 +544,7 @@ static int intf_Open( intf_thread_t *p_intf )
/* Create the interface window */
/* Create the interface window */
p_intf
->
p_sys
->
p_window
=
p_intf
->
p_sys
->
p_window
=
new
InterfaceWindow
(
BRect
(
50
,
50
,
400
,
100
)
,
new
InterfaceWindow
(
rect
,
VOUT_TITLE
" (BeOS interface)"
,
p_intf
);
VOUT_TITLE
" (BeOS interface)"
,
p_intf
);
if
(
p_intf
->
p_sys
->
p_window
==
0
)
if
(
p_intf
->
p_sys
->
p_window
==
0
)
{
{
...
...
plugins/beos/vout_beos.cpp
View file @
9bd016fc
...
@@ -142,7 +142,7 @@ int32 DrawingThread(void *data)
...
@@ -142,7 +142,7 @@ int32 DrawingThread(void *data)
*****************************************************************************/
*****************************************************************************/
VideoWindow
::
VideoWindow
(
BRect
frame
,
const
char
*
name
,
vout_thread_t
*
p_video_output
)
VideoWindow
::
VideoWindow
(
BRect
frame
,
const
char
*
name
,
vout_thread_t
*
p_video_output
)
:
BWindow
(
frame
,
name
,
B_
TITLED
_WINDOW
,
NULL
)
:
BWindow
(
frame
,
name
,
B_
DOCUMENT
_WINDOW
,
NULL
)
{
{
float
minWidth
,
minHeight
,
maxWidth
,
maxHeight
;
float
minWidth
,
minHeight
,
maxWidth
,
maxHeight
;
...
@@ -247,6 +247,7 @@ void VideoWindow::Zoom(BPoint origin, float width, float height )
...
@@ -247,6 +247,7 @@ void VideoWindow::Zoom(BPoint origin, float width, float height )
{
{
if
(
is_zoomed
)
if
(
is_zoomed
)
{
{
SetLook
(
B_DOCUMENT_WINDOW_LOOK
);
MoveTo
(
rect
.
left
,
rect
.
top
);
MoveTo
(
rect
.
left
,
rect
.
top
);
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
be_app
->
ShowCursor
();
be_app
->
ShowCursor
();
...
@@ -258,6 +259,7 @@ else
...
@@ -258,6 +259,7 @@ else
screen
=
new
BScreen
(
this
);
screen
=
new
BScreen
(
this
);
BRect
rect
=
screen
->
Frame
();
BRect
rect
=
screen
->
Frame
();
delete
screen
;
delete
screen
;
SetLook
(
B_NO_BORDER_WINDOW_LOOK
);
MoveTo
(
0
,
0
);
MoveTo
(
0
,
0
);
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
ResizeTo
(
rect
.
IntegerWidth
(),
rect
.
IntegerHeight
());
be_app
->
HideCursor
();
be_app
->
HideCursor
();
...
@@ -500,7 +502,7 @@ void vout_Display( vout_thread_t *p_vout )
...
@@ -500,7 +502,7 @@ void vout_Display( vout_thread_t *p_vout )
static
int
BeosOpenDisplay
(
vout_thread_t
*
p_vout
)
static
int
BeosOpenDisplay
(
vout_thread_t
*
p_vout
)
{
{
p_vout
->
p_sys
->
p_window
=
p_vout
->
p_sys
->
p_window
=
new
VideoWindow
(
BRect
(
50
,
180
,
50
+
p_vout
->
i_width
-
1
,
18
0
+
p_vout
->
i_height
-
1
),
NULL
,
p_vout
);
new
VideoWindow
(
BRect
(
80
,
50
,
80
+
p_vout
->
i_width
-
1
,
5
0
+
p_vout
->
i_height
-
1
),
NULL
,
p_vout
);
if
(
p_vout
->
p_sys
->
p_window
==
0
)
if
(
p_vout
->
p_sys
->
p_window
==
0
)
{
{
free
(
p_vout
->
p_sys
);
free
(
p_vout
->
p_sys
);
...
...
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