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
bf9d145f
Commit
bf9d145f
authored
Apr 16, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* at last, transpareny WORKS !!!!!
parent
c708c8fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
15 deletions
+50
-15
modules/gui/skins/gtk2/gtk2_api.cpp
modules/gui/skins/gtk2/gtk2_api.cpp
+2
-2
modules/gui/skins/gtk2/gtk2_bitmap.cpp
modules/gui/skins/gtk2/gtk2_bitmap.cpp
+6
-5
modules/gui/skins/gtk2/gtk2_graphics.cpp
modules/gui/skins/gtk2/gtk2_graphics.cpp
+4
-1
modules/gui/skins/gtk2/gtk2_theme.cpp
modules/gui/skins/gtk2/gtk2_theme.cpp
+3
-1
modules/gui/skins/gtk2/gtk2_window.cpp
modules/gui/skins/gtk2/gtk2_window.cpp
+31
-4
modules/gui/skins/src/event.cpp
modules/gui/skins/src/event.cpp
+4
-2
No files found.
modules/gui/skins/gtk2/gtk2_api.cpp
View file @
bf9d145f
...
...
@@ -2,7 +2,7 @@
* gtk2_api.cpp: Various gtk2-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_api.cpp,v 1.
8 2003/04/15 20:54:58 karibu
Exp $
* $Id: gtk2_api.cpp,v 1.
9 2003/04/16 14:38:04 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -67,7 +67,7 @@ void OSAPI_PostMessage( Window *win, unsigned int message, unsigned int param1,
if
(
message
==
VLC_HIDE
)
{
fprintf
(
stderr
,
"======= message %i
\n
"
,
message
);
fprintf
(
stderr
,
"======= message %i
%x
\n
"
,
message
,
event
);
}
gdk_event_put
(
(
GdkEvent
*
)
event
);
...
...
modules/gui/skins/gtk2/gtk2_bitmap.cpp
View file @
bf9d145f
...
...
@@ -2,7 +2,7 @@
* gtk2_bitmap.cpp: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.cpp,v 1.1
0 2003/04/15 22:16:05
asmax Exp $
* $Id: gtk2_bitmap.cpp,v 1.1
1 2003/04/16 14:38:04
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -111,7 +111,7 @@ GTK2Bitmap::GTK2Bitmap( intf_thread_t *p_intf, string FileName, int AColor )
}
Bmp
=
gdk_pixbuf_add_alpha
(
Bmp
,
TRUE
,
AColor
&
0xff
,
(
AColor
>>
8
)
&
0xff
,
AColor
>>
16
);
(
AColor
>>
16
)
&
0xff
);
Width
=
gdk_pixbuf_get_width
(
Bmp
);
Height
=
gdk_pixbuf_get_height
(
Bmp
);
}
...
...
@@ -161,10 +161,10 @@ void GTK2Bitmap::DrawBitmap( int x, int y, int w, int h, int xRef, int yRef,
Graphics
*
dest
)
{
GdkDrawable
*
destImg
=
(
(
GTK2Graphics
*
)
dest
)
->
GetImage
();
//
GdkGC *destGC = ( (GTK2Graphics *)dest )->GetGC();
GdkGC
*
destGC
=
(
(
GTK2Graphics
*
)
dest
)
->
GetGC
();
gdk_pixbuf_render_to_drawable
_alpha
(
Bmp
,
destImg
,
x
,
y
,
xRef
,
yRef
,
w
,
h
,
GDK_
PIXBUF_ALPHA_BILEVEL
,
128
,
GDK_
RGB_DITHER_NORMAL
,
0
,
0
);
gdk_pixbuf_render_to_drawable
(
Bmp
,
destImg
,
destGC
,
x
,
y
,
xRef
,
yRef
,
w
,
h
,
GDK_RGB_DITHER_NORMAL
,
0
,
0
);
}
//---------------------------------------------------------------------------
bool
GTK2Bitmap
::
Hit
(
int
x
,
int
y
)
...
...
@@ -172,6 +172,7 @@ bool GTK2Bitmap::Hit( int x, int y)
if
(
x
<
0
||
x
>=
Width
||
y
<
0
||
y
>=
Height
)
return
false
;
/* FIXME */
guchar
*
pixels
;
int
rowstride
,
offset
;
gboolean
has_alpha
;
...
...
modules/gui/skins/gtk2/gtk2_graphics.cpp
View file @
bf9d145f
...
...
@@ -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.
7 2003/04/15 01:19:11 ipkiss
Exp $
* $Id: gtk2_graphics.cpp,v 1.
8 2003/04/16 14:38:04 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -67,6 +67,9 @@ GTK2Graphics::GTK2Graphics( int w, int h, Window *from ) : Graphics( w, h )
gdk_drawable_set_colormap
(
Image
,
gdk_colormap_get_system
()
);
Gc
=
gdk_gc_new
(
Image
);
}
// Set the background color to black
gdk_draw_rectangle
(
Image
,
Gc
,
TRUE
,
0
,
0
,
w
,
h
);
}
//---------------------------------------------------------------------------
GTK2Graphics
::~
GTK2Graphics
()
...
...
modules/gui/skins/gtk2/gtk2_theme.cpp
View file @
bf9d145f
...
...
@@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.1
2 2003/04/15 20:33:58 karibu
Exp $
* $Id: gtk2_theme.cpp,v 1.1
3 2003/04/16 14:38:04 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -260,6 +260,8 @@ void GTK2Theme::AddWindow( string name, int x, int y, bool visible,
return
;
}
GdkColor
black
=
{
0
,
0
,
0
,
0
};
gdk_window_show
(
gwnd
);
WindowList
.
push_back
(
(
Window
*
)
new
OSWindow
(
p_intf
,
gwnd
,
x
,
y
,
visible
,
...
...
modules/gui/skins/gtk2/gtk2_window.cpp
View file @
bf9d145f
...
...
@@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.1
5 2003/04/15 20:33:58 karibu
Exp $
* $Id: gtk2_window.cpp,v 1.1
6 2003/04/16 14:38:04 asmax
Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -262,10 +262,37 @@ void GTK2Window::RefreshFromImage( int x, int y, int w, int h )
// Release window device context
ReleaseDC( hWnd, DC );
*/
*/
GdkDrawable
*
drawable
=
((
GTK2Graphics
*
)
Image
)
->
GetImage
();
GdkImage
*
image
=
gdk_drawable_get_image
(
drawable
,
0
,
0
,
Width
,
Height
);
gdk_draw_drawable
(
gWnd
,
gc
,
drawable
,
x
,
y
,
x
,
y
,
w
,
h
);
gdk_draw_drawable
(
gWnd
,
gc
,
((
GTK2Graphics
*
)
Image
)
->
GetImage
(),
x
,
y
,
x
,
y
,
w
,
h
);
// Mask for transparency
GdkRegion
*
region
=
gdk_region_new
();
for
(
int
line
=
0
;
line
<
Height
;
line
++
)
{
int
start
=
0
;
while
(
gdk_image_get_pixel
(
image
,
start
,
line
)
==
0
&&
start
<
Width
-
1
)
{
start
++
;
}
int
end
=
Width
-
1
;
while
(
end
>=
0
&&
gdk_image_get_pixel
(
image
,
end
,
line
)
==
0
)
{
end
--
;
}
GdkRectangle
rect
;
rect
.
x
=
start
;
rect
.
y
=
line
;
rect
.
width
=
end
-
start
+
1
;
rect
.
height
=
1
;
GdkRegion
*
rectReg
=
gdk_region_rectangle
(
&
rect
);
gdk_region_union
(
region
,
rectReg
);
gdk_region_destroy
(
rectReg
);
}
gdk_window_shape_combine_region
(
gWnd
,
region
,
0
,
0
);
gdk_region_destroy
(
region
);
}
//---------------------------------------------------------------------------
void
GTK2Window
::
WindowManualMove
()
...
...
modules/gui/skins/src/event.cpp
View file @
bf9d145f
...
...
@@ -2,7 +2,7 @@
* event.cpp: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.
8 2003/04/14 22:29:06 gbazin
Exp $
* $Id: event.cpp,v 1.
9 2003/04/16 14:38:04 asmax
Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
...
@@ -103,7 +103,9 @@ void Event::PostTextMessage( string text )
{
char
*
txt
=
new
char
[
text
.
size
()
+
1
];
strcpy
(
txt
,
text
.
c_str
()
);
OSAPI_PostMessage
(
NULL
,
CTRL_SET_TEXT
,
(
unsigned
int
)
this
,
(
long
)
txt
);
// OSAPI_PostMessage( NULL, CTRL_SET_TEXT, (unsigned int)this, (long)txt );
/* FIXME */
fprintf
(
stderr
,
"posttext %s
\n
"
,
text
.
c_str
());
}
//---------------------------------------------------------------------------
unsigned
int
Event
::
GetMessageType
(
string
Desc
)
...
...
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