Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
ef59c8fc
Commit
ef59c8fc
authored
Apr 30, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* enable basic-skins for GTK2 (not tested yet ;)
parent
c7b39fc6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
31 deletions
+60
-31
build-vlc
build-vlc
+1
-0
config.in
config.in
+1
-0
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/gtk2/gtk2_run.cpp
+18
-4
modules/gui/skins/src/window.cpp
modules/gui/skins/src/window.cpp
+3
-2
modules/gui/skins/x11/x11_bitmap.cpp
modules/gui/skins/x11/x11_bitmap.cpp
+4
-5
modules/gui/skins/x11/x11_graphics.cpp
modules/gui/skins/x11/x11_graphics.cpp
+26
-14
modules/gui/skins/x11/x11_graphics.h
modules/gui/skins/x11/x11_graphics.h
+7
-6
No files found.
build-vlc
View file @
ef59c8fc
...
@@ -6,6 +6,7 @@ GNOME2 gnome2
...
@@ -6,6 +6,7 @@ GNOME2 gnome2
GTK gtk
GTK gtk
GTK2 gtk2
GTK2 gtk2
SKINS skins
SKINS skins
BASIC_SKINS basic-skins
FAMILIAR familiar
FAMILIAR familiar
WXWINDOWS wxwindows
WXWINDOWS wxwindows
QT qt
QT qt
...
...
config.in
View file @
ef59c8fc
...
@@ -16,6 +16,7 @@ dep_bool ' Gnome interface support' CONFIG_GNOME $CONFIG_GTK
...
@@ -16,6 +16,7 @@ dep_bool ' Gnome interface support' CONFIG_GNOME $CONFIG_GTK
bool 'GTK2 support' CONFIG_GTK2
bool 'GTK2 support' CONFIG_GTK2
dep_bool ' Gnome2 support' CONFIG_GNOME2 $CONFIG_GTK2
dep_bool ' Gnome2 support' CONFIG_GNOME2 $CONFIG_GTK2
bool 'Skins module' CONFIG_SKINS
bool 'Skins module' CONFIG_SKINS
bool 'Basic skins module (without wxWindows)' CONFIG_BASIC_SKINS
bool 'Familiar GTK+ support' CONFIG_FAMILIAR
bool 'Familiar GTK+ support' CONFIG_FAMILIAR
bool 'wxWindows support' CONFIG_WXWINDOWS
bool 'wxWindows support' CONFIG_WXWINDOWS
bool 'Qt interface support' CONFIG_QT
bool 'Qt interface support' CONFIG_QT
...
...
modules/gui/skins/gtk2/gtk2_run.cpp
View file @
ef59c8fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk2_run.cpp:
* gtk2_run.cpp:
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.2
1 2003/04/28 12:00:13
asmax Exp $
* $Id: gtk2_run.cpp,v 1.2
2 2003/04/30 21:16:24
asmax Exp $
*
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Authors: Cyril Deguet <asmax@videolan.org>
*
*
...
@@ -30,7 +30,9 @@
...
@@ -30,7 +30,9 @@
#include <gtk/gtk.h>
#include <gtk/gtk.h>
//--- WWWINDOWS -------------------------------------------------------------
//--- WWWINDOWS -------------------------------------------------------------
#ifndef BASIC_SKINS
#include <wx/wx.h>
#include <wx/wx.h>
#endif
//--- VLC -------------------------------------------------------------------
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
#include <vlc/intf.h>
...
@@ -46,7 +48,9 @@
...
@@ -46,7 +48,9 @@
#include "../os_theme.h"
#include "../os_theme.h"
#include "../src/skin_common.h"
#include "../src/skin_common.h"
#include "../src/vlcproc.h"
#include "../src/vlcproc.h"
#ifndef BASIC_SKINS
#include "../src/wxdialogs.h"
#include "../src/wxdialogs.h"
#endif
// include the icon graphic
// include the icon graphic
#include "share/vlc32x32.xpm"
#include "share/vlc32x32.xpm"
...
@@ -69,6 +73,7 @@ int SkinManage( intf_thread_t *p_intf );
...
@@ -69,6 +73,7 @@ int SkinManage( intf_thread_t *p_intf );
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Local classes declarations.
// Local classes declarations.
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef BASIC_SKINS
class
Instance
:
public
wxApp
class
Instance
:
public
wxApp
{
{
public:
public:
...
@@ -82,6 +87,7 @@ private:
...
@@ -82,6 +87,7 @@ private:
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
CallBackObjects
*
callbackobj
;
CallBackObjects
*
callbackobj
;
};
};
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -191,7 +197,9 @@ void GTK2Proc( GdkEvent *event, gpointer data )
...
@@ -191,7 +197,9 @@ void GTK2Proc( GdkEvent *event, gpointer data )
// Check if vlc is closing
// Check if vlc is closing
proc
->
IsClosing
();
proc
->
IsClosing
();
#ifndef BASIC_SKINS
gtk_main_do_event
(
event
);
gtk_main_do_event
(
event
);
#endif
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -211,6 +219,7 @@ gboolean RefreshTimer( gpointer data )
...
@@ -211,6 +219,7 @@ gboolean RefreshTimer( gpointer data )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// Implementation of Instance class
// Implementation of Instance class
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef BASIC_SKINS
Instance
::
Instance
(
)
Instance
::
Instance
(
)
{
{
}
}
...
@@ -241,7 +250,7 @@ bool Instance::OnInit()
...
@@ -241,7 +250,7 @@ bool Instance::OnInit()
return
TRUE
;
return
TRUE
;
}
}
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -255,9 +264,14 @@ void OSRun( intf_thread_t *p_intf )
...
@@ -255,9 +264,14 @@ void OSRun( intf_thread_t *p_intf )
CallBackObjects
*
callbackobj
=
new
CallBackObjects
();
CallBackObjects
*
callbackobj
=
new
CallBackObjects
();
callbackobj
->
Proc
=
new
VlcProc
(
p_intf
);
callbackobj
->
Proc
=
new
VlcProc
(
p_intf
);
#ifndef BASIC_SKINS
wxTheApp
=
new
Instance
(
p_intf
,
callbackobj
);
wxTheApp
=
new
Instance
(
p_intf
,
callbackobj
);
wxEntry
(
1
,
p_args
);
wxEntry
(
1
,
p_args
);
#else
gdk_event_handler_set
(
GTK2Proc
,
(
gpointer
)
callbackobj
,
NULL
);
// Add timer
g_timeout_add
(
200
,
(
GSourceFunc
)
RefreshTimer
,
(
gpointer
)
p_intf
);
#endif
delete
callbackobj
;
delete
callbackobj
;
}
}
...
...
modules/gui/skins/src/window.cpp
View file @
ef59c8fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* window.cpp: Window class
* window.cpp: Window class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.2
1 2003/04/28 12:00:1
4 asmax Exp $
* $Id: window.cpp,v 1.2
2 2003/04/30 21:16:2
4 asmax Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -290,6 +290,7 @@ void SkinWindow::RefreshImage( int x, int y, int w, int h )
...
@@ -290,6 +290,7 @@ void SkinWindow::RefreshImage( int x, int y, int w, int h )
unsigned
int
i
;
unsigned
int
i
;
// Create Bitmap Buffer
// Create Bitmap Buffer
// Graphics *Buffer = (Graphics *)new OSGraphics( p_intf, w, h, this );
Graphics
*
Buffer
=
(
Graphics
*
)
new
OSGraphics
(
w
,
h
,
this
);
Graphics
*
Buffer
=
(
Graphics
*
)
new
OSGraphics
(
w
,
h
,
this
);
// Draw every control
// Draw every control
...
@@ -490,9 +491,9 @@ void SkinWindow::ReSize()
...
@@ -490,9 +491,9 @@ void SkinWindow::ReSize()
// Change image buffer
// Change image buffer
if
(
Image
!=
NULL
)
if
(
Image
!=
NULL
)
delete
(
OSGraphics
*
)
Image
;
delete
(
OSGraphics
*
)
Image
;
// Image = (Graphics *)new OSGraphics( p_intf, w, h, this );
Image
=
(
Graphics
*
)
new
OSGraphics
(
w
,
h
,
this
);
Image
=
(
Graphics
*
)
new
OSGraphics
(
w
,
h
,
this
);
Size
(
w
,
h
);
Size
(
w
,
h
);
}
}
...
...
modules/gui/skins/x11/x11_bitmap.cpp
View file @
ef59c8fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* x11_bitmap.cpp: X11 implementation of the Bitmap class
* x11_bitmap.cpp: X11 implementation of the Bitmap class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: x11_bitmap.cpp,v 1.
1 2003/04/28 14:32:57
asmax Exp $
* $Id: x11_bitmap.cpp,v 1.
2 2003/04/30 21:16:24
asmax Exp $
*
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -146,11 +146,10 @@ void X11Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
...
@@ -146,11 +146,10 @@ void X11Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
{
{
if
(
Bmp
)
if
(
Bmp
)
{
{
/* GdkDrawable *
destImg = ( (X11Graphics *)dest )->GetImage();
Drawable
destImg
=
(
(
X11Graphics
*
)
dest
)
->
GetImage
();
G
dkGC *
destGC = ( (X11Graphics *)dest )->GetGC();
G
C
destGC
=
(
(
X11Graphics
*
)
dest
)
->
GetGC
();
gdk_pixbuf_render_to_drawable( Bmp, destImg, destGC, x, y, xRef, yRef,
XCopyArea
(
display
,
Bmp
,
destImg
,
destGC
,
x
,
y
,
w
,
h
,
xRef
,
yRef
);
w, h, GDK_RGB_DITHER_NORMAL, 0, 0);*/
}
}
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
modules/gui/skins/x11/x11_graphics.cpp
View file @
ef59c8fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* x11_graphics.cpp: X11 implementation of the Graphics and Region classes
* x11_graphics.cpp: X11 implementation of the Graphics and Region classes
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: x11_graphics.cpp,v 1.
1 2003/04/28 14:32:57
asmax Exp $
* $Id: x11_graphics.cpp,v 1.
2 2003/04/30 21:16:24
asmax Exp $
*
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -28,11 +28,15 @@
...
@@ -28,11 +28,15 @@
//--- X11 -----------------------------------------------------------------
//--- X11 -----------------------------------------------------------------
#include <X11/Xlib.h>
#include <X11/Xlib.h>
//--- VLC -----------------------------------------------------------------
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
//--- SKIN ------------------------------------------------------------------
#include "../src/graphics.h"
#include "../src/graphics.h"
#include "../src/window.h"
#include "../src/window.h"
#include "../os_window.h"
#include "../os_window.h"
#include "x11_graphics.h"
#include "x11_graphics.h"
#include "../src/skin_common.h"
#include <stdio.h>
#include <stdio.h>
#include <math.h>
#include <math.h>
...
@@ -40,24 +44,32 @@
...
@@ -40,24 +44,32 @@
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// X11 GRAPHICS
// X11 GRAPHICS
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
X11Graphics
::
X11Graphics
(
int
w
,
int
h
,
SkinWindow
*
from
)
:
Graphics
(
w
,
h
)
X11Graphics
::
X11Graphics
(
intf_thread_t
*
p_intf
,
int
w
,
int
h
,
SkinWindow
*
from
)
:
Graphics
(
w
,
h
)
{
{
/* if( from != NULL )
display
=
p_intf
->
p_sys
->
display
;
int
screen
=
DefaultScreen
(
display
);
if
(
from
!=
NULL
)
{
{
GdkWindow *fromWnd = ( (X11Window *)from )->GetHandle();
Window
fromWnd
=
(
(
X11Window
*
)
from
)
->
GetHandle
();
Image = (GdkDrawable*) gdk_pixmap_new( fromWnd, w, h, -1 );
Gc = gdk_gc_new( ( GdkDrawable* )fromWnd );
XWindowAttributes
attr
;
XGetWindowAttributes
(
display
,
fromWnd
,
&
attr
);
Image
=
XCreatePixmap
(
display
,
fromWnd
,
w
,
h
,
attr
.
depth
);
Gc
=
DefaultGC
(
display
,
screen
);
}
}
else
else
{
{
// FIXME: 8 -> screen depth
Window
root
=
DefaultRootWindow
(
display
);
Image =
(GdkDrawable*) gdk_pixmap_new( NULL, w, h, 16 );
Image
=
XCreatePixmap
(
display
,
root
,
w
,
h
,
gdk_drawable_set_colormap( Image, gdk_colormap_get_system(
) );
DefaultDepth
(
display
,
screen
)
);
Gc =
gdk_gc_new( Image
);
Gc
=
DefaultGC
(
display
,
screen
);
}
}
// Set the background color to black
// Set the background color to black
gdk_draw_rectangle( Image, Gc, TRUE, 0, 0, w, h );*/
// gdk_draw_rectangle( Image, Gc, TRUE, 0, 0, w, h );
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
X11Graphics
::~
X11Graphics
()
X11Graphics
::~
X11Graphics
()
...
@@ -69,8 +81,8 @@ X11Graphics::~X11Graphics()
...
@@ -69,8 +81,8 @@ X11Graphics::~X11Graphics()
void
X11Graphics
::
CopyFrom
(
int
dx
,
int
dy
,
int
dw
,
int
dh
,
Graphics
*
Src
,
void
X11Graphics
::
CopyFrom
(
int
dx
,
int
dy
,
int
dw
,
int
dh
,
Graphics
*
Src
,
int
sx
,
int
sy
,
int
Flag
)
int
sx
,
int
sy
,
int
Flag
)
{
{
/* gdk_draw_drawable( Image, Gc, (( X11Graphics* )Src )->GetImage(),
XCopyArea
(
display
,
((
X11Graphics
*
)
Src
)
->
GetImage
(),
Image
,
Gc
,
sx, sy, d
x, dy, dw, dh );*/
sx
,
sy
,
d
w
,
dh
,
dx
,
dy
);
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
X11Graphics
::
DrawRect
(
int
x
,
int
y
,
int
w
,
int
h
,
int
color
)
void
X11Graphics
::
DrawRect
(
int
x
,
int
y
,
int
w
,
int
h
,
int
color
)
...
...
modules/gui/skins/x11/x11_graphics.h
View file @
ef59c8fc
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* x11_graphics.h: X11 implementation of the Graphics and Region classes
* x11_graphics.h: X11 implementation of the Graphics and Region classes
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: x11_graphics.h,v 1.
1 2003/04/28 14:32:57
asmax Exp $
* $Id: x11_graphics.h,v 1.
2 2003/04/30 21:16:24
asmax Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -40,12 +40,13 @@ class SkinWindow;
...
@@ -40,12 +40,13 @@ class SkinWindow;
class
X11Graphics
:
public
Graphics
class
X11Graphics
:
public
Graphics
{
{
protected:
protected:
/* Drawable *Image;
Display
*
display
;
GdkGC *Gc;*/
Drawable
Image
;
GC
Gc
;
public:
public:
// Constructor
// Constructor
X11Graphics
(
int
w
,
int
h
,
SkinWindow
*
from
=
NULL
);
X11Graphics
(
int
f_thread_t
*
p_intf
,
int
w
,
int
h
,
SkinWindow
*
from
=
NULL
);
// Destructor
// Destructor
virtual
~
X11Graphics
();
virtual
~
X11Graphics
();
// Drawing methods
// Drawing methods
...
@@ -60,8 +61,8 @@ class X11Graphics : public Graphics
...
@@ -60,8 +61,8 @@ class X11Graphics : public Graphics
virtual
void
ResetClipRegion
();
virtual
void
ResetClipRegion
();
// Specific X11 methods
// Specific X11 methods
/* GdkDrawable *
GetImage() { return Image; };
Drawable
GetImage
()
{
return
Image
;
};
G
dkGC *GetGC() { return Gc; };*/
G
C
GetGC
()
{
return
Gc
;
};
};
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
X11Region
:
public
SkinRegion
class
X11Region
:
public
SkinRegion
...
...
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