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
3075f6a4
Commit
3075f6a4
authored
Apr 13, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* something will be visible soon, be patient...
(this silly GDK doesn't know BMP images :(
parent
4dec9682
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
38 deletions
+44
-38
modules/gui/skins/gtk2/gtk2_bitmap.cpp
modules/gui/skins/gtk2/gtk2_bitmap.cpp
+3
-3
modules/gui/skins/gtk2/gtk2_bitmap.h
modules/gui/skins/gtk2/gtk2_bitmap.h
+4
-4
modules/gui/skins/gtk2/gtk2_graphics.cpp
modules/gui/skins/gtk2/gtk2_graphics.cpp
+20
-12
modules/gui/skins/gtk2/gtk2_theme.cpp
modules/gui/skins/gtk2/gtk2_theme.cpp
+13
-10
modules/gui/skins/os_graphics.h
modules/gui/skins/os_graphics.h
+3
-3
modules/gui/skins/src/window.cpp
modules/gui/skins/src/window.cpp
+1
-6
No files found.
modules/gui/skins/gtk2/gtk2_bitmap.cpp
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* gtk2_bitmap.cpp: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.cpp,v 1.
2 2003/04/13 19:09:59
asmax Exp $
* $Id: gtk2_bitmap.cpp,v 1.
3 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -25,8 +25,7 @@
#if !defined WIN32
//--- GTK2 -----------------------------------------------------------------
//#define WINVER 0x0500
//#include <windows.h>
#include <gdk/gdk.h>
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
...
...
@@ -98,6 +97,7 @@ GTK2Bitmap::GTK2Bitmap( intf_thread_t *p_intf, string FileName, int AColor )
// Delete objects
DeleteObject( HBitmap );*/
}
//---------------------------------------------------------------------------
GTK2Bitmap
::
GTK2Bitmap
(
intf_thread_t
*
p_intf
,
Graphics
*
from
,
int
x
,
int
y
,
...
...
modules/gui/skins/gtk2/gtk2_bitmap.h
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* gtk2_bitmap.h: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.h,v 1.
1 2003/04/12 21:43:27
asmax Exp $
* $Id: gtk2_bitmap.h,v 1.
2 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -27,7 +27,7 @@
#define VLC_GTK2_BITMAP
//--- GTK2 -----------------------------------------------------------------
//#include <windows
.h>
#include <gdk/gdk
.h>
//--- GENERAL ---------------------------------------------------------------
#include <string>
...
...
@@ -42,7 +42,7 @@ class Graphics;
class
GTK2Bitmap
:
public
Bitmap
{
private:
// HDC
bmpDC;
GdkBitmap
*
bmpDC
;
public:
// Constructors
...
...
@@ -61,7 +61,7 @@ class GTK2Bitmap : public Bitmap
virtual
int
GetBmpPixel
(
int
x
,
int
y
);
virtual
void
SetBmpPixel
(
int
x
,
int
y
,
int
color
);
// HDC
GetBmpDC() { return bmpDC; }
GdkBitmap
*
GetBmpDC
()
{
return
bmpDC
;
}
};
//---------------------------------------------------------------------------
...
...
modules/gui/skins/gtk2/gtk2_graphics.cpp
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* gtk2_graphics.cpp: GTK2 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_graphics.cpp,v 1.
4 2003/04/13 19:09:59
asmax Exp $
* $Id: gtk2_graphics.cpp,v 1.
5 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -33,7 +33,6 @@
#include "os_window.h"
#include "gtk2_graphics.h"
//---------------------------------------------------------------------------
// GTK2 GRAPHICS
//---------------------------------------------------------------------------
...
...
@@ -54,8 +53,8 @@ GTK2Graphics::GTK2Graphics( int w, int h, Window *from ) : Graphics( w, h )
SelectObject( Image, HImage );
DeleteObject( HImage );*/
/*
Image = ( GdkDrawable* )( (GTK2Window *)from )->GetHandle();
Gc = gdk_gc_new( Image );
*/
Image
=
(
GdkDrawable
*
)(
(
GTK2Window
*
)
from
)
->
GetHandle
();
Gc
=
gdk_gc_new
(
Image
);
}
//---------------------------------------------------------------------------
GTK2Graphics
::~
GTK2Graphics
()
...
...
@@ -80,7 +79,7 @@ void GTK2Graphics::CopyFrom( int dx, int dy, int dw, int dh, Graphics *Src,
//---------------------------------------------------------------------------
void
GTK2Graphics
::
DrawRect
(
int
x
,
int
y
,
int
w
,
int
h
,
int
color
)
{
//
gdk_draw_rectangle( Image, Gc, TRUE, x, y, w, h);
gdk_draw_rectangle
(
Image
,
Gc
,
TRUE
,
x
,
y
,
w
,
h
);
}
//---------------------------------------------------------------------------
void
GTK2Graphics
::
SetClipRegion
(
Region
*
rgn
)
...
...
@@ -97,12 +96,17 @@ void GTK2Graphics::SetClipRegion( Region *rgn )
//---------------------------------------------------------------------------
GTK2Region
::
GTK2Region
()
{
/* Rgn = CreateRectRgn( 0, 0, 0, 0 );*/
Rgn
=
gdk_region_new
();
}
//---------------------------------------------------------------------------
GTK2Region
::
GTK2Region
(
int
x
,
int
y
,
int
w
,
int
h
)
{
/* Rgn = CreateRectRgn( x, y, x + w, y + h );*/
GdkRectangle
rect
;
rect
.
x
=
x
;
rect
.
y
=
y
;
rect
.
width
=
w
;
rect
.
height
=
h
;
Rgn
=
gdk_region_rectangle
(
&
rect
);
}
//---------------------------------------------------------------------------
GTK2Region
::~
GTK2Region
()
...
...
@@ -117,10 +121,13 @@ void GTK2Region::AddPoint( int x, int y )
//---------------------------------------------------------------------------
void
GTK2Region
::
AddRectangle
(
int
x
,
int
y
,
int
w
,
int
h
)
{
/* HRGN Buffer;
Buffer = CreateRectRgn( x, y, x + w, y + h );
CombineRgn( Rgn, Buffer, Rgn, 0x2 );
DeleteObject( Buffer );*/
GdkRectangle
rect
;
rect
.
x
=
x
;
rect
.
y
=
y
;
rect
.
width
=
w
;
rect
.
height
=
h
;
GdkRegion
*
Buffer
=
gdk_region_rectangle
(
&
rect
);
gdk_region_union
(
Rgn
,
Buffer
);
}
//---------------------------------------------------------------------------
void
GTK2Region
::
AddElipse
(
int
x
,
int
y
,
int
w
,
int
h
)
...
...
@@ -129,6 +136,7 @@ void GTK2Region::AddElipse( int x, int y, int w, int h )
Buffer = CreateEllipticRgn( x, y, x + w, y + h );
CombineRgn( Rgn, Buffer, Rgn, 0x2 );
DeleteObject( Buffer );*/
/*FIXME*/
}
//---------------------------------------------------------------------------
void
GTK2Region
::
Move
(
int
x
,
int
y
)
...
...
@@ -138,7 +146,7 @@ void GTK2Region::Move( int x, int y )
//---------------------------------------------------------------------------
bool
GTK2Region
::
Hit
(
int
x
,
int
y
)
{
/* return PtInRegion( Rgn, x, y );*/
return
gdk_region_point_in
(
Rgn
,
x
,
y
);
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/gtk2/gtk2_theme.cpp
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.
3 2003/04/13 19:09:59
asmax Exp $
* $Id: gtk2_theme.cpp,v 1.
4 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -263,15 +263,20 @@ void GTK2Theme::OnLoadTheme()
GdkWindowAttr
attr
;
attr
.
title
=
"VLC Media Player"
;
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
width
=
100
;
attr
.
height
=
100
;
attr
.
x
=
100
;
attr
.
y
=
100
;
attr
.
window_type
=
GDK_WINDOW_TOPLEVEL
;
attr
.
width
=
400
;
attr
.
height
=
200
;
attr
.
window_type
=
GDK_WINDOW_TOPLEVEL
;
attr
.
wclass
=
GDK_INPUT_OUTPUT
;
attr
.
override_redirect
=
FALSE
;
gint
mask
=
GDK_WA_TITLE
;
gint
mask
=
GDK_WA_TITLE
|
GDK_WA_X
|
GDK_WA_Y
|
GDK_WA_NOREDIR
;
// Create the parent window
ParentWindow
=
gdk_window_new
(
NULL
,
&
attr
,
mask
);
gdk_window_show
(
ParentWindow
);
}
//---------------------------------------------------------------------------
void
GTK2Theme
::
AddSystemMenu
(
string
name
,
Event
*
event
)
...
...
@@ -316,25 +321,23 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
attr
.
event_mask
=
GDK_ALL_EVENTS_MASK
;
attr
.
width
=
100
;
attr
.
height
=
100
;
//attr.window_type = GDK_WINDOW_CHILD;
attr
.
window_type
=
GDK_WINDOW_TOPLEVEL
;
attr
.
window_type
=
GDK_WINDOW_CHILD
;
attr
.
wclass
=
GDK_INPUT_OUTPUT
;
gint
mask
=
0
;
// Create the parent window
// GdkWindow *gwnd = gdk_window_new( ParentWindow, &attr, mask);
GdkWindow
*
gwnd
=
gdk_window_new
(
NULL
,
&
attr
,
mask
);
GdkWindow
*
gwnd
=
gdk_window_new
(
ParentWindow
,
&
attr
,
mask
);
if
(
!
gwnd
)
{
msg_Err
(
p_intf
,
"CreateWindow failed"
);
return
;
}
gdk_window_show
(
gwnd
);
WindowList
.
push_back
(
(
Window
*
)
new
OSWindow
(
p_intf
,
gwnd
,
x
,
y
,
visible
,
fadetime
,
alpha
,
movealpha
,
dragdrop
)
)
;
gdk_window_show
(
ParentWindow
);
}
//---------------------------------------------------------------------------
...
...
modules/gui/skins/os_graphics.h
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* os_graphics.h: Wrapper for the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_graphics.h,v 1.
2 2003/04/12 21:43:27
asmax Exp $
* $Id: os_graphics.h,v 1.
3 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -32,8 +32,8 @@
#define OSRegion Win32Region
#else
#include "gtk2_graphics.h"
#define SRC_COPY
SRCCOPY
#define SRC_AND
SRCAND
#define SRC_COPY
1
#define SRC_AND
2
#define OSGraphics GTK2Graphics
#define OSRegion GTK2Region
#endif
...
...
modules/gui/skins/src/window.cpp
View file @
3075f6a4
...
...
@@ -2,7 +2,7 @@
* window.cpp: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.
6 2003/04/13 17:46:23
asmax Exp $
* $Id: window.cpp,v 1.
7 2003/04/13 20:07:34
asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -278,12 +278,7 @@ void Window::RefreshImage( int x, int y, int w, int h )
ControlList
[
i
]
->
Draw
(
x
,
y
,
w
,
h
,
Buffer
);
// Copy buffer in Image
/* FIXME: kludge */
#ifdef WIN32
Image
->
CopyFrom
(
x
,
y
,
w
,
h
,
Buffer
,
0
,
0
,
SRC_COPY
);
#else
fprintf
(
stderr
,
"%X WARNING: FIXME in window.cpp !!!!"
,
Buffer
);
#endif
// Free memory
delete
Buffer
;
...
...
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