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
36449bd0
Commit
36449bd0
authored
Apr 13, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* at last an image !!
parent
e8f95f34
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
19 deletions
+36
-19
modules/gui/skins/controls/image.cpp
modules/gui/skins/controls/image.cpp
+2
-2
modules/gui/skins/gtk2/gtk2_bitmap.cpp
modules/gui/skins/gtk2/gtk2_bitmap.cpp
+19
-1
modules/gui/skins/gtk2/gtk2_bitmap.h
modules/gui/skins/gtk2/gtk2_bitmap.h
+2
-4
modules/gui/skins/gtk2/gtk2_theme.cpp
modules/gui/skins/gtk2/gtk2_theme.cpp
+6
-5
modules/gui/skins/gtk2/gtk2_window.cpp
modules/gui/skins/gtk2/gtk2_window.cpp
+5
-5
modules/gui/skins/src/skin_main.cpp
modules/gui/skins/src/skin_main.cpp
+2
-2
No files found.
modules/gui/skins/controls/image.cpp
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* image.cpp: Image control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: image.cpp,v 1.
2 2003/04/11 21:19:49 videolan
Exp $
* $Id: image.cpp,v 1.
3 2003/04/13 22:55:15 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
modules/gui/skins/gtk2/gtk2_bitmap.cpp
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* gtk2_bitmap.cpp: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.cpp,v 1.
3 2003/04/13 20:07:34
asmax Exp $
* $Id: gtk2_bitmap.cpp,v 1.
4 2003/04/13 22:55:15
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -25,6 +25,7 @@
#if !defined WIN32
//--- GTK2 -----------------------------------------------------------------
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
//--- VLC -------------------------------------------------------------------
...
...
@@ -98,6 +99,16 @@ GTK2Bitmap::GTK2Bitmap( intf_thread_t *p_intf, string FileName, int AColor )
// Delete objects
DeleteObject( HBitmap );*/
// Load the bitmap image
Bmp
=
gdk_pixbuf_new_from_file
(
FileName
.
c_str
(),
NULL
);
if
(
Bmp
==
NULL
)
{
if
(
FileName
!=
""
)
msg_Warn
(
p_intf
,
"Couldn't load bitmap: %s"
,
FileName
.
c_str
()
);
// Bmp = gdk_pixbuf_new( GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
Bmp
=
NULL
;
}
}
//---------------------------------------------------------------------------
GTK2Bitmap
::
GTK2Bitmap
(
intf_thread_t
*
p_intf
,
Graphics
*
from
,
int
x
,
int
y
,
...
...
@@ -149,6 +160,13 @@ void GTK2Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
// New method, not available in win95
TransparentBlt( destDC, xRef, yRef, w, h, bmpDC, x, y, w, h, AlphaColor );
*/
GdkDrawable
*
destImg
=
(
(
GTK2Graphics
*
)
dest
)
->
GetImageHandle
();
GdkGC
*
gc
=
gdk_gc_new
(
destImg
);
/*gdk_pixbuf_render_to_drawable( Bmp, destImg, gc, 0, 0, x, y, w, h,
GDK_RGB_DITHER_NONE, 0, 0);*/
gdk_pixbuf_render_to_drawable
(
Bmp
,
destImg
,
gc
,
0
,
0
,
x
,
y
,
50
,
50
,
GDK_RGB_DITHER_NONE
,
0
,
0
);
}
//---------------------------------------------------------------------------
bool
GTK2Bitmap
::
Hit
(
int
x
,
int
y
)
...
...
modules/gui/skins/gtk2/gtk2_bitmap.h
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* gtk2_bitmap.h: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.h,v 1.
2 2003/04/13 20:07:34
asmax Exp $
* $Id: gtk2_bitmap.h,v 1.
3 2003/04/13 22:55:15
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -42,7 +42,7 @@ class Graphics;
class
GTK2Bitmap
:
public
Bitmap
{
private:
Gdk
Bitmap
*
bmpDC
;
Gdk
Pixbuf
*
Bmp
;
public:
// Constructors
...
...
@@ -60,8 +60,6 @@ class GTK2Bitmap : public Bitmap
virtual
int
GetBmpPixel
(
int
x
,
int
y
);
virtual
void
SetBmpPixel
(
int
x
,
int
y
,
int
color
);
GdkBitmap
*
GetBmpDC
()
{
return
bmpDC
;
}
};
//---------------------------------------------------------------------------
...
...
modules/gui/skins/gtk2/gtk2_theme.cpp
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.
4 2003/04/13 20:07:34
asmax Exp $
* $Id: gtk2_theme.cpp,v 1.
5 2003/04/13 22:55:15
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -26,6 +26,7 @@
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
...
...
@@ -265,9 +266,8 @@ void GTK2Theme::OnLoadTheme()
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
x
=
100
;
attr
.
y
=
100
;
attr
.
window_type
=
GDK_WINDOW_TOPLEVEL
;
attr
.
width
=
400
;
attr
.
height
=
20
0
;
attr
.
height
=
15
0
;
attr
.
window_type
=
GDK_WINDOW_TOPLEVEL
;
attr
.
wclass
=
GDK_INPUT_OUTPUT
;
attr
.
override_redirect
=
FALSE
;
...
...
@@ -276,6 +276,7 @@ void GTK2Theme::OnLoadTheme()
// Create the parent window
ParentWindow
=
gdk_window_new
(
NULL
,
&
attr
,
mask
);
gdk_window_show
(
ParentWindow
);
}
//---------------------------------------------------------------------------
...
...
@@ -319,8 +320,8 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
GdkWindowAttr
attr
;
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
width
=
1
00
;
attr
.
height
=
1
0
0
;
attr
.
width
=
4
00
;
attr
.
height
=
1
5
0
;
attr
.
window_type
=
GDK_WINDOW_CHILD
;
attr
.
wclass
=
GDK_INPUT_OUTPUT
;
...
...
modules/gui/skins/gtk2/gtk2_window.cpp
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.
4 2003/04/13 19:09:59
asmax Exp $
* $Id: gtk2_window.cpp,v 1.
5 2003/04/13 22:55:15
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -142,14 +142,14 @@ GTK2Window::~GTK2Window()
//---------------------------------------------------------------------------
void
GTK2Window
::
OSShow
(
bool
show
)
{
/*
if( show )
if
(
show
)
{
gdk_window_show
(
gWnd
);
}
else
{
gdk_window_hide
(
gWnd
);
}
*/
}
}
//---------------------------------------------------------------------------
bool
GTK2Window
::
ProcessOSEvent
(
Event
*
evt
)
...
...
@@ -271,9 +271,9 @@ void GTK2Window::Move( int left, int top )
//---------------------------------------------------------------------------
void
GTK2Window
::
Size
(
int
width
,
int
height
)
{
/*
Width = width;
Width
=
width
;
Height
=
height
;
SetWindowPos( hWnd, HWND_TOP, Left, Top, Width, Height,
/*
SetWindowPos( hWnd, HWND_TOP, Left, Top, Width, Height,
SWP_NOMOVE|SWP_NOREDRAW|SWP_NOZORDER );*/
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/src/skin_main.cpp
View file @
36449bd0
...
...
@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.
7 2003/04/13 17:46:23
asmax Exp $
* $Id: skin_main.cpp,v 1.
8 2003/04/13 22:55:15
asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -175,7 +175,7 @@ static void Run( intf_thread_t *p_intf )
DIRECTORY_SEPARATOR
+
"theme.xml"
;
#else
// FIXME: find VLC directory
string
default_dir
=
(
string
)
"
/home/cyril/videolan/vlc/share
"
+
string
default_dir
=
(
string
)
"
.
"
+
DIRECTORY_SEPARATOR
+
"skins"
+
DIRECTORY_SEPARATOR
+
"default"
+
DIRECTORY_SEPARATOR
+
"theme.xml"
;
...
...
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