Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
8329eed8
Commit
8329eed8
authored
Dec 17, 2004
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* skins2: Do not paint on the embedded video output, when a video is
being played in it
parent
744c1b58
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
118 additions
and
18 deletions
+118
-18
modules/gui/skins2/controls/ctrl_button.hpp
modules/gui/skins2/controls/ctrl_button.hpp
+3
-0
modules/gui/skins2/controls/ctrl_checkbox.hpp
modules/gui/skins2/controls/ctrl_checkbox.hpp
+4
-1
modules/gui/skins2/controls/ctrl_generic.hpp
modules/gui/skins2/controls/ctrl_generic.hpp
+3
-0
modules/gui/skins2/controls/ctrl_image.hpp
modules/gui/skins2/controls/ctrl_image.hpp
+4
-1
modules/gui/skins2/controls/ctrl_list.hpp
modules/gui/skins2/controls/ctrl_list.hpp
+3
-0
modules/gui/skins2/controls/ctrl_move.hpp
modules/gui/skins2/controls/ctrl_move.hpp
+3
-0
modules/gui/skins2/controls/ctrl_radialslider.hpp
modules/gui/skins2/controls/ctrl_radialslider.hpp
+4
-1
modules/gui/skins2/controls/ctrl_resize.hpp
modules/gui/skins2/controls/ctrl_resize.hpp
+3
-0
modules/gui/skins2/controls/ctrl_slider.hpp
modules/gui/skins2/controls/ctrl_slider.hpp
+7
-1
modules/gui/skins2/controls/ctrl_text.hpp
modules/gui/skins2/controls/ctrl_text.hpp
+4
-1
modules/gui/skins2/controls/ctrl_video.hpp
modules/gui/skins2/controls/ctrl_video.hpp
+3
-0
modules/gui/skins2/src/generic_layout.cpp
modules/gui/skins2/src/generic_layout.cpp
+39
-1
modules/gui/skins2/src/generic_layout.hpp
modules/gui/skins2/src/generic_layout.hpp
+3
-3
modules/gui/skins2/src/top_window.cpp
modules/gui/skins2/src/top_window.cpp
+19
-0
modules/gui/skins2/src/top_window.hpp
modules/gui/skins2/src/top_window.hpp
+1
-0
modules/gui/skins2/src/vlcproc.hpp
modules/gui/skins2/src/vlcproc.hpp
+4
-1
modules/gui/skins2/src/vout_window.cpp
modules/gui/skins2/src/vout_window.cpp
+10
-2
modules/gui/skins2/win32/win32_loop.cpp
modules/gui/skins2/win32/win32_loop.cpp
+1
-6
No files found.
modules/gui/skins2/controls/ctrl_button.hpp
View file @
8329eed8
...
...
@@ -58,6 +58,9 @@ class CtrlButton: public CtrlGeneric
/// Get the text of the tooltip
virtual
UString
getTooltipText
()
const
{
return
m_tooltip
;
}
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"button"
;
}
private:
/// Finite state machine of the control
FSM
m_fsm
;
...
...
modules/gui/skins2/controls/ctrl_checkbox.hpp
View file @
8329eed8
...
...
@@ -2,7 +2,7 @@
* ctrl_checkbox.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id
: ctrl_checkbox.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp
$
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
...
@@ -65,6 +65,9 @@ class CtrlCheckbox: public CtrlGeneric
/// Get the text of the tooltip XXX
virtual
UString
getTooltipText
()
const
{
return
*
m_pTooltip
;
}
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"checkbox"
;
}
private:
/// Finite state machine of the control
FSM
m_fsm
;
...
...
modules/gui/skins2/controls/ctrl_generic.hpp
View file @
8329eed8
...
...
@@ -78,6 +78,9 @@ class CtrlGeneric: public SkinObject, public Observer<VarBool>
/// Return true if the control is visible
virtual
bool
isVisible
()
const
;
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
""
;
}
protected:
// If pVisible is NULL, the control is always visible
CtrlGeneric
(
intf_thread_t
*
pIntf
,
const
UString
&
rHelp
,
...
...
modules/gui/skins2/controls/ctrl_image.hpp
View file @
8329eed8
...
...
@@ -2,7 +2,7 @@
* ctrl_image.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id
: ctrl_image.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp
$
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
...
@@ -50,6 +50,9 @@ class CtrlImage: public CtrlFlat
/// Draw the control on the given graphics
virtual
void
draw
(
OSGraphics
&
rImage
,
int
xDest
,
int
yDest
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"image"
;
}
private:
/// Bitmap
const
GenericBitmap
&
m_rBitmap
;
...
...
modules/gui/skins2/controls/ctrl_list.hpp
View file @
8329eed8
...
...
@@ -59,6 +59,9 @@ class CtrlList: public CtrlGeneric, public Observer<VarList>,
/// Return true if the control can gain the focus
virtual
bool
isFocusable
()
const
{
return
true
;
}
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"list"
;
}
private:
/// List associated to the control
VarList
&
m_rList
;
...
...
modules/gui/skins2/controls/ctrl_move.hpp
View file @
8329eed8
...
...
@@ -62,6 +62,9 @@ class CtrlMove: public CtrlFlat
static
void
transStillMoving
(
SkinObject
*
pCtrl
);
static
void
transMovingStill
(
SkinObject
*
pCtrl
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
m_rCtrl
.
getType
();
}
private:
FSM
m_fsm
;
/// Window manager
...
...
modules/gui/skins2/controls/ctrl_radialslider.hpp
View file @
8329eed8
...
...
@@ -2,7 +2,7 @@
* ctrl_radialslider.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id
: ctrl_radialslider.hpp,v 1.3 2004/02/29 16:49:55 asmax Exp
$
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
...
...
@@ -57,6 +57,9 @@ class CtrlRadialSlider: public CtrlGeneric, public Observer<VarPercent>
/// Draw the control on the given graphics
virtual
void
draw
(
OSGraphics
&
rImage
,
int
xDest
,
int
yDest
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"radial_slider"
;
}
private:
/// Finite state machine of the control
FSM
m_fsm
;
...
...
modules/gui/skins2/controls/ctrl_resize.hpp
View file @
8329eed8
...
...
@@ -64,6 +64,9 @@ class CtrlResize: public CtrlFlat
static
void
transResizeStill
(
SkinObject
*
pCtrl
);
static
void
transResizeResize
(
SkinObject
*
pCtrl
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
m_rCtrl
.
getType
();
}
private:
FSM
m_fsm
;
/// Decorated CtrlFlat
...
...
modules/gui/skins2/controls/ctrl_slider.hpp
View file @
8329eed8
...
...
@@ -2,7 +2,7 @@
* ctrl_slider.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id
: ctrl_slider.hpp,v 1.4 2004/03/02 21:45:15 ipkiss Exp
$
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
...
...
@@ -63,6 +63,9 @@ class CtrlSliderCursor: public CtrlGeneric, public Observer<VarPercent>
/// Get the text of the tooltip
virtual
UString
getTooltipText
()
const
{
return
m_tooltip
;
}
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"slider_cursor"
;
}
private:
/// Finite state machine of the control
FSM
m_fsm
;
...
...
@@ -125,6 +128,9 @@ class CtrlSliderBg: public CtrlGeneric
/// Handle an event
virtual
void
handleEvent
(
EvtGeneric
&
rEvent
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"slider_bg"
;
}
private:
/// Cursor of the slider
CtrlSliderCursor
&
m_rCursor
;
...
...
modules/gui/skins2/controls/ctrl_text.hpp
View file @
8329eed8
...
...
@@ -2,7 +2,7 @@
* ctrl_text.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id
: ctrl_text.hpp,v 1.2 2004/02/29 16:49:55 asmax Exp
$
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
...
...
@@ -60,6 +60,9 @@ class CtrlText: public CtrlGeneric, public Observer<VarText>
/// This takes effect immediatly
void
setText
(
const
UString
&
rText
,
uint32_t
color
=
0xFFFFFFFF
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"text"
;
}
private:
/// Finite state machine of the control
FSM
m_fsm
;
...
...
modules/gui/skins2/controls/ctrl_video.hpp
View file @
8329eed8
...
...
@@ -48,6 +48,9 @@ class CtrlVideo: public CtrlGeneric
/// Draw the control on the given graphics
virtual
void
draw
(
OSGraphics
&
rImage
,
int
xDest
,
int
yDest
);
/// Get the type of control (custom RTTI)
virtual
string
getType
()
const
{
return
"video"
;
}
private:
/// Vout window
VoutWindow
*
m_pVout
;
...
...
modules/gui/skins2/src/generic_layout.cpp
View file @
8329eed8
...
...
@@ -200,6 +200,7 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
{
// Draw all the controls of the layout
list
<
LayeredControl
>::
const_iterator
iter
;
list
<
LayeredControl
>::
const_iterator
iterVideo
=
m_controlList
.
end
();
for
(
iter
=
m_controlList
.
begin
();
iter
!=
m_controlList
.
end
();
iter
++
)
{
CtrlGeneric
*
pCtrl
=
(
*
iter
).
m_pControl
;
...
...
@@ -207,6 +208,10 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
if
(
pCtrl
->
isVisible
()
&&
pPos
)
{
pCtrl
->
draw
(
*
m_pImage
,
pPos
->
getLeft
(),
pPos
->
getTop
()
);
// Remember the video control (we assume there is at most one video
// control per layout)
if
(
pCtrl
->
getType
()
==
"video"
&&
pCtrl
->
getPosition
()
)
iterVideo
=
iter
;
}
}
...
...
@@ -224,8 +229,41 @@ void GenericLayout::refreshRect( int x, int y, int width, int height )
if
(
y
+
height
>
m_height
)
height
=
m_height
-
y
;
// Refresh the window... but do not paint on a video control!
if
(
iterVideo
==
m_controlList
.
end
()
)
{
// No video control, we can safely repain the rectangle
pWindow
->
refresh
(
x
,
y
,
width
,
height
);
}
else
{
// Bad luck, there is a video control somewhere (not necessarily
// in the repainting zone, btw).
// We will divide the repainting into 4 regions (top, left, bottom
// and right). The overlapping parts (i.e. the corners) of these
// regions will be painted twice, because otherwise the algorithm
// becomes a real mess :)
// Use short variable names for convenience
int
xx
=
iterVideo
->
m_pControl
->
getPosition
()
->
getLeft
();
int
yy
=
iterVideo
->
m_pControl
->
getPosition
()
->
getTop
();
int
ww
=
iterVideo
->
m_pControl
->
getPosition
()
->
getWidth
();
int
hh
=
iterVideo
->
m_pControl
->
getPosition
()
->
getHeight
();
// Top part:
if
(
y
<
yy
)
pWindow
->
refresh
(
x
,
y
,
width
,
yy
-
y
);
// Left part:
if
(
x
<
xx
)
pWindow
->
refresh
(
x
,
y
,
xx
-
x
,
height
);
// Bottom part
if
(
y
+
height
>
yy
+
hh
)
pWindow
->
refresh
(
x
,
yy
+
hh
,
width
,
y
+
height
-
(
yy
+
hh
)
);
// Right part
if
(
x
+
width
>
xx
+
ww
)
pWindow
->
refresh
(
xx
+
ww
,
y
,
x
+
width
-
(
xx
+
ww
),
height
);
}
}
}
...
...
modules/gui/skins2/src/generic_layout.hpp
View file @
8329eed8
...
...
@@ -75,6 +75,9 @@ class GenericLayout: public SkinObject, public Box
/// Refresh the window
virtual
void
refreshAll
();
/// Refresh a rectangular portion of the window
virtual
void
refreshRect
(
int
x
,
int
y
,
int
width
,
int
height
);
/// Get the image of the layout
virtual
OSGraphics
*
getImage
()
const
{
return
m_pImage
;
}
...
...
@@ -119,9 +122,6 @@ class GenericLayout: public SkinObject, public Box
virtual
void
addAnchor
(
Anchor
*
pAnchor
);
private:
/// Refresh a rectangular portion of the window
void
GenericLayout
::
refreshRect
(
int
x
,
int
y
,
int
width
,
int
height
);
/// Parent window of the layout
TopWindow
*
m_pWindow
;
/// Layout size
...
...
modules/gui/skins2/src/top_window.cpp
View file @
8329eed8
...
...
@@ -32,6 +32,7 @@
#include "../commands/cmd_on_top.hpp"
#include "../commands/cmd_dialogs.hpp"
#include "../controls/ctrl_generic.hpp"
#include "../events/evt_refresh.hpp"
#include "../events/evt_enter.hpp"
#include "../events/evt_focus.hpp"
#include "../events/evt_leave.hpp"
...
...
@@ -67,6 +68,24 @@ TopWindow::~TopWindow()
}
void
TopWindow
::
processEvent
(
EvtRefresh
&
rEvtRefresh
)
{
// We override the behaviour defined in GenericWindow, because we don't
// want to draw on a video control!
if
(
m_pActiveLayout
==
NULL
)
{
GenericWindow
::
processEvent
(
rEvtRefresh
);
}
else
{
m_pActiveLayout
->
refreshRect
(
rEvtRefresh
.
getXStart
(),
rEvtRefresh
.
getYStart
(),
rEvtRefresh
.
getWidth
(),
rEvtRefresh
.
getHeight
()
);
}
}
void
TopWindow
::
processEvent
(
EvtFocus
&
rEvtFocus
)
{
// fprintf(stderr, rEvtFocus.getAsString().c_str()) ;
...
...
modules/gui/skins2/src/top_window.hpp
View file @
8329eed8
...
...
@@ -48,6 +48,7 @@ class TopWindow: public GenericWindow
virtual
~
TopWindow
();
/// Methods to process OS events.
virtual
void
processEvent
(
EvtRefresh
&
rEvtRefresh
);
virtual
void
processEvent
(
EvtFocus
&
rEvtFocus
);
virtual
void
processEvent
(
EvtMotion
&
rEvtMotion
);
virtual
void
processEvent
(
EvtMouse
&
rEvtMouse
);
...
...
modules/gui/skins2/src/vlcproc.hpp
View file @
8329eed8
...
...
@@ -65,6 +65,9 @@ class VlcProc: public SkinObject
/// Set the vout window handle
void
setVoutWindow
(
void
*
pVoutWindow
);
/// Indicate whether the embedded video output is currently used
bool
isVoutUsed
()
const
{
return
m_pVout
;
}
protected:
// Protected because it is a singleton
VlcProc
(
intf_thread_t
*
pIntf
);
...
...
@@ -92,7 +95,7 @@ class VlcProc: public SkinObject
VariablePtr
m_cVarStopped
;
VariablePtr
m_cVarPaused
;
VariablePtr
m_cVarSeekable
;
/// Vout window han
ld
e
/// Vout window han
dl
e
void
*
m_pVoutWindow
;
/// Vout thread
vout_thread_t
*
m_pVout
;
...
...
modules/gui/skins2/src/vout_window.cpp
View file @
8329eed8
...
...
@@ -22,6 +22,7 @@
*****************************************************************************/
#include "vout_window.hpp"
#include "vlcproc.hpp"
#include "os_factory.hpp"
#include "os_graphics.hpp"
#include "os_window.hpp"
...
...
@@ -69,7 +70,14 @@ void VoutWindow::refresh( int left, int top, int width, int height )
{
if
(
m_pImage
)
{
m_pImage
->
copyToWindow
(
*
getOSWindow
(),
left
,
top
,
width
,
height
,
left
,
top
);
// Get the VlcProc
VlcProc
*
pVlcProc
=
getIntf
()
->
p_sys
->
p_vlcProc
;
// Refresh only when there is no video!
if
(
pVlcProc
&&
!
pVlcProc
->
isVoutUsed
()
)
{
m_pImage
->
copyToWindow
(
*
getOSWindow
(),
left
,
top
,
width
,
height
,
left
,
top
);
}
}
}
modules/gui/skins2/win32/win32_loop.cpp
View file @
8329eed8
...
...
@@ -129,12 +129,7 @@ void Win32Loop::run()
Infos
.
rcPaint
.
right
-
Infos
.
rcPaint
.
left
+
1
,
Infos
.
rcPaint
.
bottom
-
Infos
.
rcPaint
.
top
+
1
);
EndPaint
(
msg
.
hwnd
,
&
Infos
);
// Ignore all the painting events for the vout window,
// otherwise we are going to screw up the colorkey
if
(
win
.
getType
()
!=
"Vout"
)
{
win
.
processEvent
(
evt
);
}
break
;
}
case
WM_MOUSEMOVE
:
...
...
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