Commit ad6c5336 authored by Cyril Deguet's avatar Cyril Deguet

* changed Region into SkinRegion to prepare the X11 port

parent f38481fd
......@@ -2,7 +2,7 @@
* generic.cpp: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.cpp,v 1.5 2003/04/23 10:29:52 asmax Exp $
* $Id: generic.cpp,v 1.6 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -196,15 +196,15 @@ void GenericControl::MoveRelative( int xOff, int yOff )
Top += yOff;
}
//---------------------------------------------------------------------------
Region *GenericControl::CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY )
SkinRegion *GenericControl::CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY )
{
// Initialization
Region *Buffer;
SkinRegion *Buffer;
int w, h;
int x = 0, y = 0, x_first = 0;
bmp->GetSize( w, h );
Buffer = (Region *)new OSRegion;
Buffer = (SkinRegion *)new OSRegion;
// Parse bitmap
for( y = 0; y < h; y++ )
......
......@@ -2,7 +2,7 @@
* generic.h: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
* $Id: generic.h,v 1.4 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -36,7 +36,7 @@ struct intf_thread_t;
class SkinWindow;
class Bitmap;
class Graphics;
class Region;
class SkinRegion;
class Event;
//---------------------------------------------------------------------------
......@@ -86,7 +86,7 @@ class GenericControl // This is the generic control class
int y2, int w2, int h2, int &x, int &y, int &w, int &h );
// Create a region from a bitmap with transcolor as empty region
Region *CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY );
SkinRegion *CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY );
int Left; // Left offset of the control
int Top; // Top offset of the control
int Width; // Width of the control
......
......@@ -2,7 +2,7 @@
* playlist.cpp: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.9 2003/04/21 22:12:37 asmax Exp $
* $Id: playlist.cpp,v 1.10 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -154,7 +154,7 @@ void ControlPlayList::Init()
TextWidth -= TextLeft;
// Set Text Clipping Region
TextClipRgn = (Region *)new OSRegion;
TextClipRgn = (SkinRegion *)new OSRegion;
for( i = 0; i < Line; i++ )
{
for( j = 0; j < CaseHeight; j++ )
......@@ -279,7 +279,7 @@ void ControlPlayList::Draw( int x, int y, int w, int h, Graphics *dest )
xI, yI, wI, hI) )
{
// Change clipping region
Region *destClipRgn = (Region *)new OSRegion( 0, 0, w, h );
SkinRegion *destClipRgn = (SkinRegion *)new OSRegion( 0, 0, w, h );
TextClipRgn->Move( TextLeft - x, TextTop - y );
dest->SetClipRegion( TextClipRgn );
......
......@@ -2,7 +2,7 @@
* playlist.h: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.h,v 1.4 2003/04/21 22:12:37 asmax Exp $
* $Id: playlist.h,v 1.5 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -37,7 +37,7 @@ class Graphics;
class SkinWindow;
class SkinFont;
class Bezier;
class Region;
class SkinRegion;
//---------------------------------------------------------------------------
#define MAX_PLAYLIST_SIZE 7
......@@ -78,7 +78,7 @@ class ControlPlayList : public GenericControl
int TextHeight;
int TextWidth;
Bezier *TextCurve;
Region *TextClipRgn;
SkinRegion *TextClipRgn;
int NumOfItems;
int SelectColor;
......
......@@ -2,7 +2,7 @@
* slider.cpp: Slider control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: slider.cpp,v 1.8 2003/04/22 17:56:44 asmax Exp $
* $Id: slider.cpp,v 1.9 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -121,7 +121,7 @@ void ControlSlider::Init()
delete Curve;
// Create Hit Region
HitRgn = (Region *)new OSRegion;
HitRgn = (SkinRegion *)new OSRegion;
// Create slider hit region and move cursor inside control
for( i = 0; i <= MaxValue; i++ )
......
......@@ -2,7 +2,7 @@
* slider.h: Slider control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: slider.h,v 1.4 2003/04/21 21:51:16 asmax Exp $
* $Id: slider.h,v 1.5 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -36,7 +36,7 @@ class Event;
class Graphics;
class SkinWindow;
class Bezier;
class Region;
class SkinRegion;
//---------------------------------------------------------------------------
class ControlSlider : public GenericControl
......@@ -55,7 +55,7 @@ class ControlSlider : public GenericControl
int CHeight; // Height of cursor
int * CursorX; // Array of x coordinates of slider points
int * CursorY; // Array of y coordinates of slider points
Region *HitRgn; // Active region for mouse events
SkinRegion *HitRgn; // Active region for mouse events
int LastRefreshTime;
// Slider properties
......
......@@ -2,7 +2,7 @@
* text.cpp: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.cpp,v 1.7 2003/04/21 21:51:16 asmax Exp $
* $Id: text.cpp,v 1.8 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -231,7 +231,7 @@ void ControlText::SetSize()
if( TextClipRgn != NULL )
delete TextClipRgn;
TextClipRgn = (Region *)new OSRegion( Left, Top, Width, Height );
TextClipRgn = (SkinRegion *)new OSRegion( Left, Top, Width, Height );
}
//---------------------------------------------------------------------------
......@@ -300,7 +300,7 @@ void ControlText::Draw( int x, int y, int w, int h, Graphics *dest )
}
// Reset clipping region to old region
Region *destClipRgn = (Region *)new OSRegion( 0, 0, w, h );
SkinRegion *destClipRgn = (SkinRegion *)new OSRegion( 0, 0, w, h );
dest->SetClipRegion( destClipRgn );
delete destClipRgn;
TextClipRgn->Move( x, y );
......
......@@ -2,7 +2,7 @@
* text.h: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: text.h,v 1.4 2003/04/21 22:12:37 asmax Exp $
* $Id: text.h,v 1.5 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -36,7 +36,7 @@ class Event;
class BitmapBank;
class Graphics;
class SkinWindow;
class Region;
class SkinRegion;
class SkinFont;
//---------------------------------------------------------------------------
......@@ -66,7 +66,7 @@ class ControlText : public GenericControl
string FontName;
list<string> DisplayList;
list<string>::const_iterator Display;
Region *TextClipRgn;
SkinRegion *TextClipRgn;
// Internal methods
void SetSize();
......
......@@ -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.16 2003/04/28 12:00:13 asmax Exp $
* $Id: gtk2_graphics.cpp,v 1.17 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -79,7 +79,7 @@ void GTK2Graphics::DrawRect( int x, int y, int w, int h, int color )
gdk_draw_rectangle( Image, Gc, TRUE, x, y, w, h);
}
//---------------------------------------------------------------------------
void GTK2Graphics::SetClipRegion( Region *rgn )
void GTK2Graphics::SetClipRegion( SkinRegion *rgn )
{
gdk_gc_set_clip_region( Gc, ( (GTK2Region *)rgn )->GetHandle() );
}
......
......@@ -2,7 +2,7 @@
* gtk2_graphics.h: GTK2 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_graphics.h,v 1.5 2003/04/21 21:51:16 asmax Exp $
* $Id: gtk2_graphics.h,v 1.6 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -31,7 +31,7 @@
#include <gdk/gdk.h>
//---------------------------------------------------------------------------
class Region;
class SkinRegion;
class SkinWindow;
//---------------------------------------------------------------------------
......@@ -54,7 +54,7 @@ class GTK2Graphics : public Graphics
virtual void DrawRect( int x, int y, int w, int h, int color );
// Clipping methods
virtual void SetClipRegion( Region *rgn );
virtual void SetClipRegion( SkinRegion *rgn );
virtual void ResetClipRegion();
// Specific GTK2 methods
......@@ -62,7 +62,7 @@ class GTK2Graphics : public Graphics
GdkGC *GetGC() { return Gc; };
};
//---------------------------------------------------------------------------
class GTK2Region : public Region
class GTK2Region : public SkinRegion
{
private:
GdkRegion *Rgn;
......
......@@ -2,7 +2,7 @@
* graphics.cpp: Graphics class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: graphics.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
* $Id: graphics.cpp,v 1.2 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -47,15 +47,15 @@ Graphics::~Graphics()
//---------------------------------------------------------------------------
// REGION
//---------------------------------------------------------------------------
Region::Region()
SkinRegion::SkinRegion()
{
}
//---------------------------------------------------------------------------
Region::Region( int x, int y, int w, int h )
SkinRegion::SkinRegion( int x, int y, int w, int h )
{
}
//---------------------------------------------------------------------------
Region::~Region()
SkinRegion::~SkinRegion()
{
}
//---------------------------------------------------------------------------
......@@ -2,7 +2,7 @@
* graphics.h: Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: graphics.h,v 1.2 2003/04/19 02:34:47 karibu Exp $
* $Id: graphics.h,v 1.3 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -28,7 +28,7 @@
#define VLC_SKIN_GRAPHICS
//---------------------------------------------------------------------------
class Region;
class SkinRegion;
//---------------------------------------------------------------------------
class Graphics
......@@ -50,20 +50,20 @@ class Graphics
virtual void DrawRect( int x, int y, int w, int h, int color ) = 0;
// Clipping methods
virtual void SetClipRegion( Region *rgn ) = 0;
virtual void SetClipRegion( SkinRegion *rgn ) = 0;
virtual void ResetClipRegion() = 0;
};
//---------------------------------------------------------------------------
class Region
class SkinRegion
{
private:
public:
// Constructor
Region();
Region( int x, int y, int w, int h );
SkinRegion();
SkinRegion( int x, int y, int w, int h );
// Destructor
virtual ~Region();
virtual ~SkinRegion();
// Modify region
virtual void Move( int x, int y ) = 0;
virtual void AddPoint( int x, int y ) = 0;
......
......@@ -2,7 +2,7 @@
* win32_graphics.cpp: Win32 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: win32_graphics.cpp,v 1.5 2003/04/21 21:51:16 asmax Exp $
* $Id: win32_graphics.cpp,v 1.6 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -82,7 +82,7 @@ void Win32Graphics::DrawRect( int x, int y, int w, int h, int color )
delete r;
}
//---------------------------------------------------------------------------
void Win32Graphics::SetClipRegion( Region *rgn )
void Win32Graphics::SetClipRegion( SkinRegion *rgn )
{
SelectClipRgn( Image, ( (Win32Region *)rgn )->GetHandle() );
}
......
......@@ -2,7 +2,7 @@
* win32_graphics.h: Win32 implementation of the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: win32_graphics.h,v 1.4 2003/04/21 21:51:16 asmax Exp $
* $Id: win32_graphics.h,v 1.5 2003/04/28 12:25:34 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
......@@ -29,7 +29,7 @@
#define VLC_SKIN_WIN32_GRAPHICS
//---------------------------------------------------------------------------
class Region;
class SkinRegion;
class SkinWindow;
//---------------------------------------------------------------------------
......@@ -51,14 +51,14 @@ class Win32Graphics : public Graphics
virtual void DrawRect( int x, int y, int w, int h, int color );
// Clipping methods
virtual void SetClipRegion( Region *rgn );
virtual void SetClipRegion( SkinRegion *rgn );
virtual void ResetClipRegion();
// Specific win32 methods
HDC GetImageHandle() { return Image; };
};
//---------------------------------------------------------------------------
class Win32Region : public Region
class Win32Region : public SkinRegion
{
private:
HRGN Rgn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment