Commit 7253e738 authored by Olivier Teulière's avatar Olivier Teulière

Removed the old skins plugin

parent dae08eab
#!/bin/sh
FEATURES="
SKINS skins
SKINS skins2
FAMILIAR familiar
WXWINDOWS wxwindows
......
......@@ -2113,7 +2113,7 @@ dnl
dnl MP4 module
dnl
AC_CHECK_HEADERS(zlib.h, [
VLC_ADD_LDFLAGS([mp4 skins skins2 sap],[-lz])
VLC_ADD_LDFLAGS([mp4 skins2 sap],[-lz])
] )
AC_CHECK_HEADERS(sysfs/libsysfs.h, [
......@@ -2121,10 +2121,10 @@ AC_CHECK_HEADERS(sysfs/libsysfs.h, [
] )
dnl
dnl skins module
dnl skins2 module
dnl
AC_CHECK_HEADERS(libtar.h, [
VLC_ADD_LDFLAGS([skins skins2],[-ltar])
VLC_ADD_LDFLAGS([skins2],[-ltar])
] )
......@@ -3131,29 +3131,6 @@ then
VLC_ADD_BUILTINS([beos])
fi
dnl
dnl Skins module
dnl
AC_ARG_ENABLE(skins,
[ --enable-skins Skins interface module (default enabled on Win32)])
if test "${enable_skins}" != "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
VLC_ADD_PLUGINS([skins])
ALIASES="${ALIASES} svlc"
VLC_ADD_CPPFLAGS([skins],[-U_OFF_T_ -U_off_t -Imodules/gui/skins])
VLC_ADD_CXXFLAGS([skins],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
else if test "${enable_skins}" = "yes"; then
VLC_ADD_PLUGINS([skins])
ALIASES="${ALIASES} svlc"
VLC_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} -I/usr/include/freetype2 -DX11_SKINS])
VLC_ADD_CXXFLAGS([skins],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins],[-L${x_libraries} -lImlib2 -lXext -lX11 -lfreetype -lpng -lz ])
fi fi
fi
dnl
dnl Skins2 module
dnl
......@@ -4076,7 +4053,6 @@ AC_CONFIG_FILES([
modules/gui/macosx/Makefile
modules/gui/qnx/Makefile
modules/gui/qt/Makefile
modules/gui/skins/Makefile
modules/gui/skins2/Makefile
modules/gui/wxwindows/Makefile
modules/misc/Makefile
......
......@@ -386,8 +386,6 @@ $Id$
* skins2: Skinnable interface, new generation
* skins: Skinnable interface
* slp: input module to access SLP registered sessions
* snapshot: a output module to save pictures from the vout.
......
SOURCES_skins = \
os_api.h \
os_bitmap.h \
os_event.h \
os_font.h \
os_graphics.h \
os_theme.h \
os_window.h \
\
controls/controls.h \
controls/button.cpp \
controls/button.h \
controls/checkbox.cpp \
controls/checkbox.h \
controls/generic.cpp \
controls/generic.h \
controls/image.cpp \
controls/image.h \
controls/playlist.cpp \
controls/playlist.h \
controls/rectangle.cpp \
controls/rectangle.h \
controls/slider.cpp \
controls/slider.h \
controls/text.cpp \
controls/text.h \
\
parser/flex.c \
parser/skin.h \
parser/skin.c \
parser/wrappers.h \
parser/wrappers.cpp \
\
src/anchor.cpp \
src/anchor.h \
src/banks.cpp \
src/banks.h \
src/bezier.cpp \
src/bezier.h \
src/bitmap.cpp \
src/bitmap.h \
src/dialogs.cpp \
src/dialogs.h \
src/event.cpp \
src/event.h \
src/font.cpp \
src/font.h \
src/graphics.cpp \
src/graphics.h \
src/skin_main.cpp \
src/skin_common.h \
src/theme.cpp \
src/theme.h \
src/themeloader.cpp \
src/themeloader.h \
src/vlcproc.cpp \
src/vlcproc.h \
src/window.cpp \
src/window.h \
\
win32/win32_api.cpp \
win32/win32_bitmap.cpp \
win32/win32_bitmap.h \
win32/win32_dragdrop.cpp \
win32/win32_dragdrop.h \
win32/win32_event.cpp \
win32/win32_event.h \
win32/win32_font.cpp \
win32/win32_font.h \
win32/win32_graphics.cpp \
win32/win32_graphics.h \
win32/win32_run.cpp \
win32/win32_theme.cpp \
win32/win32_theme.h \
win32/win32_window.cpp \
win32/win32_window.h \
\
x11/x11_api.cpp \
x11/x11_bitmap.cpp \
x11/x11_bitmap.h \
x11/x11_dragdrop.cpp \
x11/x11_dragdrop.h \
x11/x11_event.cpp \
x11/x11_event.h \
x11/x11_font.cpp \
x11/x11_font.h \
x11/x11_graphics.cpp \
x11/x11_graphics.h \
x11/x11_run.cpp \
x11/x11_theme.cpp \
x11/x11_theme.h \
x11/x11_timer.cpp \
x11/x11_timer.h \
x11/x11_window.cpp \
x11/x11_window.h \
$(NULL)
EXTRA_DIST += \
parser/skin.dtd \
parser/skin.act
/*****************************************************************************
* button.cpp: Button control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: button.cpp,v 1.15 2003/06/09 12:33:16 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
#include "../src/bitmap.h"
#include "../src/banks.h"
#include "generic.h"
#include "button.h"
#include "../src/event.h"
#include "../src/theme.h"
#include "../src/window.h"
#include "../src/skin_common.h"
//---------------------------------------------------------------------------
// Control Button
//---------------------------------------------------------------------------
ControlButton::ControlButton(
string id,
bool visible,
int x, int y,
string Up, string Down, string Disabled,
string onclick, string onmouseover, string onmouseout,
string tooltiptext, string help,
SkinWindow *Parent ) : GenericControl( id, visible, help, Parent )
{
// General
Left = x;
Top = y;
State = 1; // 1=up, 0=down
Selected = false;
Enabled = true;
CursorIn = false;
this->Up = Up;
this->Down = Down;
this->Disabled = Disabled;
// Actions
ClickActionName = onclick;
MouseOverActionName = onmouseover;
MouseOutActionName = onmouseout;
// Texts
ToolTipText = tooltiptext;
}
//---------------------------------------------------------------------------
ControlButton::~ControlButton()
{
if( ClickAction )
{
delete ClickAction;
}
if( MouseOverAction )
{
delete MouseOverAction;
}
if( MouseOutAction )
{
delete MouseOutAction;
}
}
//---------------------------------------------------------------------------
void ControlButton::Init()
{
// Init bitmaps
Img = new (Bitmap *[3]);
Img[0] = p_intf->p_sys->p_theme->BmpBank->Get( Up );
Img[1] = p_intf->p_sys->p_theme->BmpBank->Get( Down );
if( Disabled == "none" )
Img[2] = p_intf->p_sys->p_theme->BmpBank->Get( Up );
else
Img[2] = p_intf->p_sys->p_theme->BmpBank->Get( Disabled );
// Get size of control
Img[0]->GetSize( Width, Height );
// Create script
ClickAction = new Action( p_intf, ClickActionName );
MouseOverAction = new Action( p_intf, MouseOverActionName );
MouseOutAction = new Action( p_intf, MouseOutActionName );
}
//---------------------------------------------------------------------------
bool ControlButton::ProcessEvent( Event *evt )
{
switch( evt->GetMessage() )
{
case CTRL_ENABLED:
Enable( (Event*)evt->GetParam1(), (bool)evt->GetParam2() );
break;
}
return false;
}
//---------------------------------------------------------------------------
void ControlButton::MoveRelative( int xOff, int yOff )
{
Left += xOff;
Top += yOff;
}
//---------------------------------------------------------------------------
void ControlButton::Draw( int x, int y, int w, int h, Graphics *dest )
{
if( !Visible )
return;
int xI, yI, wI, hI;
if( GetIntersectRgn( x,y,w,h,Left,Top,Width,Height, xI, yI, wI, hI ) )
{
// Button is in down state
if( State == 0 && Enabled )
Img[1]->DrawBitmap( xI-Left, yI-Top, wI, hI, xI-x, yI-y, dest );
// Button is in up state
if( State == 1 && Enabled )
Img[0]->DrawBitmap( xI-Left, yI-Top, wI, hI, xI-x, yI-y, dest );
// Button is disabled
if( !Enabled )
Img[2]->DrawBitmap( xI-Left, yI-Top, wI, hI, xI-x, yI-y, dest );
}
}
//---------------------------------------------------------------------------
bool ControlButton::MouseUp( int x, int y, int button )
{
// If hit in the button
// XXX: we suppose here that the expected behaviour is to have the MouseUp
// event above the "up" image, and not above the "down" one. This can give
// strange results when the "up" and "down" images have different sizes...
if( Img[1]->Hit( x - Left, y - Top ) )
{
if( !Enabled )
return true;
if( button == 1 && Selected )
{
State = 1;
Selected = false;
ClickAction->SendEvent();
ParentWindow->Refresh( Left, Top, Width, Height );
}
return true;
}
if( button == 1 )
Selected = false;
return false;
}
//---------------------------------------------------------------------------
bool ControlButton::MouseDown( int x, int y, int button )
{
if( Img[0]->Hit( x - Left, y - Top ) )
{
if( !Enabled )
return true;
if( button == 1 )
{
State = 0;
Selected = true;
ParentWindow->Refresh( Left, Top, Width, Height );
}
return true;
}
return false;
}
//---------------------------------------------------------------------------
bool ControlButton::MouseMove( int x, int y, int button )
{
if( !Enabled )
return false;
if( MouseOver( x, y ) && !CursorIn )
{
if( button == 1 && Selected )
{
State = 0;
ParentWindow->Refresh( Left, Top, Width, Height );
}
if( MouseOverActionName != "none" )
{
MouseOverAction->SendEvent();
}
CursorIn = true;
return true;
}
else if( !MouseOver( x, y ) && CursorIn )
{
if( button == 1 && Selected )
{
State = 1;
ParentWindow->Refresh( Left, Top, Width, Height );
}
if( MouseOutActionName != "none" )
{
MouseOutAction->SendEvent();
}
CursorIn = false;
return true;
}
return false;
}
//---------------------------------------------------------------------------
bool ControlButton::MouseOver( int x, int y )
{
if( Img[1 - State]->Hit( x - Left, y - Top ) )
{
return true;
}
else
{
return false;
}
}
//---------------------------------------------------------------------------
bool ControlButton::ToolTipTest( int x, int y )
{
if( MouseOver( x, y ) && Enabled )
{
ParentWindow->ChangeToolTipText( ToolTipText );
return true;
}
return false;
}
//---------------------------------------------------------------------------
void ControlButton::Enable( Event *event, bool enabled )
{
if( !ClickAction->MatchEvent( event, ACTION_MATCH_ONE ) )
return;
if( enabled != Enabled )
{
Enabled = enabled;
// If cursor is in, send mouse out event
if( !Enabled && CursorIn )
{
if( MouseOutActionName != "none" )
MouseOutAction->SendEvent();
CursorIn = false;
}
ParentWindow->Refresh( Left, Top, Width, Height );
}
}
//---------------------------------------------------------------------------
/*****************************************************************************
* button.h: Button control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: button.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_BUTTON
#define VLC_SKIN_CONTROL_BUTTON
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Action;
class Graphics;
class SkinWindow;
//---------------------------------------------------------------------------
class ControlButton : public GenericControl
{
private:
// Image IDs
string Up;
string Down;
string Disabled;
// Control behaviour
bool Selected;
bool Enabled;
bool CursorIn;
// List of actions to execute
Action *ClickAction;
string ClickActionName;
Action *MouseOverAction;
string MouseOverActionName;
Action *MouseOutAction;
string MouseOutActionName;
// ToolTip text
string ToolTipText;
public:
// Constructor
ControlButton( string id,
bool visible,
int x, int y,
string Up, string Down, string Disabled,
string onclick, string onmousevoer, string onmouseout,
string tooltiptext, string help,
SkinWindow *Parent );
// Destructor
virtual ~ControlButton();
// Initializations
virtual void Init();
virtual bool ProcessEvent( Event *evt );
// Draw button
virtual void Draw( int x1, int y1, int x2, int y2, Graphics *dest );
// Mouse events
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool ToolTipTest( int x, int y );
// Translate control
virtual void MoveRelative( int xOff, int yOff );
// Enabling control
virtual void Enable( Event *event, bool enabled );
};
//---------------------------------------------------------------------------
#endif
This diff is collapsed.
/*****************************************************************************
* checkbox.h: Checkbox control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: checkbox.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_CHECKBOX
#define VLC_SKIN_CONTROL_CHECKBOX
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Action;
class Graphics;
class SkinWindow;
//---------------------------------------------------------------------------
class ControlCheckBox : public GenericControl
{
private:
// Image IDs
string Img1;
string Img2;
string Click1;
string Click2;
string Disabled1;
string Disabled2;
// Behaviour
bool Enabled1;
bool Enabled2;
bool Selected;
bool CursorIn;
// List of actions to execute when clicking
int Act;
Action *ClickAction1;
string ClickActionName1;
Action *ClickAction2;
string ClickActionName2;
Action *MouseOverAction1;
string MouseOverActionName1;
Action *MouseOutAction1;
string MouseOutActionName1;
Action *MouseOverAction2;
string MouseOverActionName2;
Action *MouseOutAction2;
string MouseOutActionName2;
// ToolTip text
string ToolTipText1;
string ToolTipText2;
public:
// Constructor
ControlCheckBox(
string id,
bool visible,
int x, int y,
string img1, string img2, string clickimg1, string clickimg2,
string disabled1, string disabled2,
string onclick1, string onclick2, string onmouseover1,
string onmouseout1, string onmouseover2, string onmouseout2,
string tooltiptext1, string tooltiptext2, string help,
SkinWindow *Parent );
// Destructor
virtual ~ControlCheckBox();
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
// Draw button
virtual void Draw( int x1, int y1, int x2, int y2, Graphics *dest );
// Mouse events
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool ToolTipTest( int x, int y );
// Translate control
virtual void MoveRelative( int xOff, int yOff );
// Enabling control
virtual void Enable( Event *event, bool enabled );
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* controls.h:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: controls.h,v 1.2 2003/03/18 04:08:45 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#include "generic.h"
#include "button.h"
#include "checkbox.h"
#include "image.h"
#include "slider.h"
#include "playlist.h"
#include "rectangle.h"
#include "text.h"
/*****************************************************************************
* generic.cpp: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.cpp,v 1.7 2003/05/31 23:23:59 ipkiss Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
#include "../os_api.h"
#include "../src/bitmap.h"
#include "../os_bitmap.h"
#include "../src/banks.h"
#include "../src/graphics.h"
#include "../os_graphics.h"
#include "../src/event.h"
#include "generic.h"
#include "../src/window.h"
#include "../src/theme.h"
#include "../src/skin_common.h"
//---------------------------------------------------------------------------
// Generic Control
//---------------------------------------------------------------------------
GenericControl::GenericControl( string id, bool visible, string help,
SkinWindow *Parent )
{
ID = id;
Visible = visible;
Help = help;
ParentWindow = Parent;
Left = 0;
Top = 0;
Width = 0;
Height = 0;
State = 0;
Img = NULL;
p_intf = Parent->GetIntf();
}
//---------------------------------------------------------------------------
GenericControl::~GenericControl()
{
if( Img != NULL )
delete[] Img;
}
//---------------------------------------------------------------------------
bool GenericControl::GenericProcessEvent( Event *evt )
{
switch( evt->GetMessage() )
{
case CTRL_ID_VISIBLE:
if( (GenericControl *)evt->GetParam1() == this )
{
if( ( evt->GetParam2() == 0 && Visible ) ||
( evt->GetParam2() == 1 && !Visible ) ||
( evt->GetParam2() == 2 ) )
{
Visible = !Visible;
ParentWindow->Refresh( Left, Top, Width, Height );
}
}
return false;
case CTRL_ID_MOVE:
if( (GenericControl *)evt->GetParam1() == this )
{
int x = evt->GetParam2() & 0x7FFF;
int y = evt->GetParam2() >> 16 & 0x7FFF;
if( evt->GetParam2() & 0x8000 )
x = -x;
if( evt->GetParam2() >> 16 & 0x8000 )
y = -y;
MoveRelative( x, y );
ParentWindow->ReSize();
ParentWindow->RefreshAll();
}
return false;
default:
return ProcessEvent( evt );
}
}
//---------------------------------------------------------------------------
void GenericControl::Init()
{
}
//---------------------------------------------------------------------------
bool GenericControl::ProcessEvent( Event *evt )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseUp( int x, int y, int button )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseDown( int x, int y, int button )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseMove( int x, int y, int button )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseOver( int x, int y )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseDblClick( int x, int y, int button )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::MouseScroll( int x, int y, int direction )
{
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::SendNewHelpText()
{
if( Help != "" )
{
p_intf->p_sys->p_theme->EvtBank->Get( "help" )
->PostTextMessage( Help );
return true;
}
return false;
}
//---------------------------------------------------------------------------
bool GenericControl::ToolTipTest( int x, int y )
{
return false;
}
//---------------------------------------------------------------------------
void GenericControl::Enable( Event *event, bool enabled )
{
}
//---------------------------------------------------------------------------
bool GenericControl::GetIntersectRgn( int x1, int y1, int w1, int h1, int x2,
int y2, int w2, int h2, int &x, int &y, int &w, int &h )
{
if( x1 < x2 ) {x = x2;} else {x = x1;}
if( y1 < y2 ) {y = y2;} else {y = y1;}
if( x1+w1 < x2+w2 ) {w = x1+w1-x;} else {w = x2+w2-x;}
if( y1+h1 < y2+h2 ) {h = y1+h1-y;} else {h = y2+h2-y;}
return (w > 0 && h > 0);
}
//---------------------------------------------------------------------------
void GenericControl::Move( int left, int top )
{
MoveRelative( left - Left, top - Top );
}
//---------------------------------------------------------------------------
void GenericControl::MoveRelative( int xOff, int yOff )
{
Left += xOff;
Top += yOff;
}
//---------------------------------------------------------------------------
SkinRegion *GenericControl::CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY )
{
// Initialization
SkinRegion *Buffer;
int w, h;
int x = 0, y = 0, x_first = 0;
bmp->GetSize( w, h );
Buffer = (SkinRegion *)new OSRegion;
// Parse bitmap
for( y = 0; y < h; y++ )
{
for( x = 0; x < w; x++ )
{
if( bmp->GetBmpPixel( x, y ) == bmp->GetAlphaColor() )
{
if( x_first != x )
{
Buffer->AddRectangle( x_first + MoveX, y + MoveY,
x + MoveX, y + 1 + MoveY );
}
x_first = x + 1;
}
}
if( x_first != w )
{
Buffer->AddRectangle( x_first + MoveX, y + MoveY,
w + MoveX, y + 1 + MoveY );
}
x_first = 0;
}
// End of parsing
return Buffer;
}
//---------------------------------------------------------------------------
/*****************************************************************************
* generic.h: Generic control, parent of the others
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: generic.h,v 1.5 2003/05/31 23:23:59 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_GENERIC
#define VLC_SKIN_CONTROL_GENERIC
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
struct intf_thread_t;
class SkinWindow;
class Bitmap;
class Graphics;
class SkinRegion;
class Event;
//---------------------------------------------------------------------------
// Generic control class
//---------------------------------------------------------------------------
class GenericControl // This is the generic control class
{
protected:
SkinWindow * ParentWindow;
intf_thread_t *p_intf;
bool Visible;
string ID;
string Help;
int Left; // Left offset of the control
int Top; // Top offset of the control
int Width; // Width of the control
int Height; // Height of the control
int State; // Used to special state of the control
// (for button, sets whether down or up)
Bitmap **Img; // Array of bitmap used to draw control
private:
public:
// Constructor
GenericControl( string id, bool visible, string help,
SkinWindow *Parent );
// Destructor
virtual ~GenericControl();
// initializations
virtual void Init();
bool GenericProcessEvent( Event *evt );
virtual bool ProcessEvent( Event *evt );
// Draw the control into the destination DC
virtual void Draw( int x, int y, int w, int h, Graphics *dest ) = 0;
// Simulate a mouse action on control at coordinates x/y
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool MouseDblClick( int x, int y, int button );
virtual bool MouseScroll( int x, int y, int direction );
virtual bool ToolTipTest( int x, int y );
virtual bool SendNewHelpText();
// Move control
void Move( int left, int top );
virtual void MoveRelative( int xOff, int yOff );
// Get two rectangle regions and return intersection
bool GetIntersectRgn( int x1, int y1, int w1, int h1, int x2,
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
SkinRegion *CreateRegionFromBmp( Bitmap *bmp, int MoveX, int MoveY );
// Enabling control
virtual void Enable( Event *event, bool enabled );
// Self explanatory
bool IsVisible() { return Visible; }
// Getters
string GetId() { return ID; }
int GetLeft() { return Left; }
int GetTop() { return Top; }
int GetWidth() { return Width; }
int GetHeight() { return Height; }
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* image.cpp: Image control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: image.cpp,v 1.8 2003/06/09 12:33:16 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
//--- VLC -------------------------------------------------------------------
#include <vlc/vlc.h>
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
#include "../src/bitmap.h"
#include "../src/banks.h"
#include "generic.h"
#include "image.h"
#include "../src/event.h"
#include "../src/theme.h"
#include "../src/window.h"
#include "../src/skin_common.h"
//---------------------------------------------------------------------------
// Control Image
//---------------------------------------------------------------------------
ControlImage::ControlImage( string id, bool visible, int x, int y, string img,
string event, string help, SkinWindow *Parent )
: GenericControl( id, visible, help, Parent )
{
Left = x;
Top = y;
MouseDownActionName = event;
Enabled = true;
Bg = img;
}
//---------------------------------------------------------------------------
ControlImage::~ControlImage()
{
if( MouseDownAction )
{
delete MouseDownAction;
}
}
//---------------------------------------------------------------------------
void ControlImage::Init()
{
Img = new (Bitmap *[1]);
Img[0] = p_intf->p_sys->p_theme->BmpBank->Get( Bg );
Img[0]->GetSize( Width, Height );
// Create script
MouseDownAction = new Action( p_intf, MouseDownActionName );
}
//---------------------------------------------------------------------------
bool ControlImage::ProcessEvent( Event *evt )
{
switch( evt->GetMessage() )
{
case CTRL_ENABLED:
Enable( (Event*)evt->GetParam1(), (bool)evt->GetParam2() );
break;
}
return false;
}
//---------------------------------------------------------------------------
void ControlImage::Draw( int x, int y, int w, int h, Graphics *dest )
{
if( !Visible )
return;
int xI, yI, wI, hI;
if( GetIntersectRgn(x, y, w, h, Left, Top, Width, Height, xI, yI, wI, hI ) )
Img[0]->DrawBitmap( xI-Left, yI-Top, wI, hI, xI-x, yI-y, dest );
}
//---------------------------------------------------------------------------
bool ControlImage::MouseDown( int x, int y, int button )
{
if( !Enabled || !Img[0]->Hit( x - Left, y - Top ) || button != 1 ||
!MouseDownAction->SendEvent() )
return false;
return true;
}
//---------------------------------------------------------------------------
bool ControlImage::MouseOver( int x, int y )
{
if( Img[0]->Hit( x - Left, y - Top ) )
return true;
else
return false;
}
//---------------------------------------------------------------------------
void ControlImage::Enable( Event *event, bool enabled )
{
if( !MouseDownAction->MatchEvent( event, ACTION_MATCH_ONE ) )
return;
if( enabled != !Enabled )
{
Enabled = enabled;
ParentWindow->Refresh( Left, Top, Width, Height );
}
}
//---------------------------------------------------------------------------
/*****************************************************************************
* image.h: Image control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: image.h,v 1.2 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_IMAGE
#define VLC_SKIN_CONTROL_IMAGE
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Action;
class Graphics;
class SkinWindow;
//---------------------------------------------------------------------------
class ControlImage : public GenericControl
{
private:
// Image ID
string Bg;
// Behaviour
bool Enabled;
// List of actions to execute when clicking
Action *MouseDownAction;
string MouseDownActionName;
public:
// Constructor
ControlImage( string id, bool visible, int x, int y, string img,
string event, string help, SkinWindow *Parent);
// Destructor
virtual ~ControlImage();
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
//Draw image
virtual void Draw( int x, int y, int w, int h, Graphics *dest );
// Mouse events
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseOver( int x, int y );
// Enabling control
virtual void Enable( Event *event, bool enabled );
};
//---------------------------------------------------------------------------
#endif
This diff is collapsed.
/*****************************************************************************
* playlist.h: Playlist control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: playlist.h,v 1.6 2003/05/31 23:23:59 ipkiss Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_PLAYLIST
#define VLC_SKIN_CONTROL_PLAYLIST
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Event;
class Graphics;
class SkinWindow;
class SkinFont;
class Bezier;
class SkinRegion;
//---------------------------------------------------------------------------
#define MAX_PLAYLIST_SIZE 7
//---------------------------------------------------------------------------
class ControlPlayList : public GenericControl
{
private:
Event *UpdateEvent;
SkinFont *TextFont;
SkinFont *PlayFont;
string FontName;
string PlayFontName;
bool Enabled;
playlist_t *PlayList;
// Scroll slider
ControlSlider *Slider;
int StartIndex;
// Playlist text zone
int Margin;
int Column;
int Line;
int CaseHeight;
int CaseWidth;
int NumWidth;
int FileWidth;
int InfoWidth;
char Num[MAX_PLAYLIST_SIZE];
int *CaseRight;
int *CaseLeft;
int *CaseTextLeft;
int TextLeft;
int TextTop;
int TextHeight;
int TextWidth;
Bezier *TextCurve;
SkinRegion *TextClipRgn;
int NumOfItems;
int SelectColor;
bool *Select;
bool LongFileName;
char * GetFileName( int i );
// Calculate distance between two points
double Dist( int x1, int y1, int x2, int y2 );
// Text functions
void DrawAllCase( Graphics *dest, int x, int y, int w, int h );
void DrawCase( Graphics *dest, int i, int x, int y, int w, int h );
void RefreshList();
void RefreshAll();
public:
// Constructor
ControlPlayList( string id, bool visible, int width, int infowidth,
string font, string playfont, int selcolor,
double *ptx, double *pty, int nb, bool longfilename,
string help, SkinWindow *Parent );
// Destructor
virtual ~ControlPlayList();
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
void InitSliderCurve( double *ptx, double *pty, int nb,
string scroll_up, string scroll_down );
// Draw control
virtual void Draw( int x, int y, int w, int h, Graphics *dest );
// Mouse events
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool MouseDblClick( int x, int y, int button );
virtual bool MouseScroll( int x, int y, int direction );
virtual bool ToolTipTest( int x, int y );
// Translate control
virtual void MoveRelative( int xOff, int yOff );
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* rectangle.cpp: Rectanglee control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: rectangle.cpp,v 1.4 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
//--- SKIN ------------------------------------------------------------------
#include "../os_api.h"
#include "../src/graphics.h"
#include "../src/bitmap.h"
#include "../src/banks.h"
#include "generic.h"
#include "rectangle.h"
#include "../src/event.h"
#include "../src/theme.h"
#include "../src/window.h"
#include "../src/skin_common.h"
//---------------------------------------------------------------------------
// Control Rectangle
//---------------------------------------------------------------------------
ControlRectangle::ControlRectangle( string id, bool visible, int x, int y,
int w, int h, int color, string event, string help, SkinWindow *Parent )
: GenericControl( id, visible, help, Parent )
{
Left = x;
Top = y;
Width = w;
Height = h;
MouseDownActionName = event;
Enabled = true;
Color = OSAPI_GetNonTransparentColor( color );
}
//---------------------------------------------------------------------------
ControlRectangle::~ControlRectangle()
{
}
//---------------------------------------------------------------------------
void ControlRectangle::Init()
{
// Create script
MouseDownAction = new Action( p_intf, MouseDownActionName );
}
//---------------------------------------------------------------------------
bool ControlRectangle::ProcessEvent( Event *evt )
{
switch( evt->GetMessage() )
{
case CTRL_ENABLED:
Enable( (Event*)evt->GetParam1(), (bool)evt->GetParam2() );
break;
default:
break;
}
return false;
}
//---------------------------------------------------------------------------
void ControlRectangle::Draw( int x, int y, int w, int h, Graphics *dest )
{
if( !Visible )
return;
int xI, yI, wI, hI;
if( GetIntersectRgn(x, y, w, h, Left, Top, Width, Height, xI, yI, wI, hI ) )
{
dest->DrawRect( xI - x, yI - y, wI, hI, Color );
}
}
//---------------------------------------------------------------------------
bool ControlRectangle::MouseDown( int x, int y, int button )
{
if( !Enabled || !MouseOver( x, y ) || button != 1 ||
!MouseDownAction->SendEvent() )
return false;
return true;
}
//---------------------------------------------------------------------------
bool ControlRectangle::MouseOver( int x, int y )
{
if( x >= Left && x <= Left + Width && y >= Top && y <= Top + Height )
return true;
else
return false;
}
//---------------------------------------------------------------------------
void ControlRectangle::Enable( Event *event, bool enabled )
{
if( !MouseDownAction->MatchEvent( event, ACTION_MATCH_ONE ) )
return;
if( enabled != !Enabled )
{
Enabled = enabled;
ParentWindow->Refresh( Left, Top, Width, Height );
}
}
//---------------------------------------------------------------------------
/*****************************************************************************
* rectangle.h: Rectangle control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: rectangle.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_RECTANGLE
#define VLC_SKIN_CONTROL_RECTANGLE
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Action;
class Graphics;
class SkinWindow;
//---------------------------------------------------------------------------
class ControlRectangle : public GenericControl
{
private:
// Background color
int Color;
// Behaviour
bool Enabled;
// List of actions to execute when clicking
Action *MouseDownAction;
string MouseDownActionName;
public:
// Constructor
ControlRectangle( string id, bool visible, int x, int y, int w, int h,
int color, string event, string help, SkinWindow *Parent);
// Destructor
virtual ~ControlRectangle();
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
//Draw image
virtual void Draw( int x, int y, int w, int h, Graphics *dest );
// Mouse events
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseOver( int x, int y );
// Enabling control
virtual void Enable( Event *event, bool enabled );
};
//---------------------------------------------------------------------------
#endif
This diff is collapsed.
/*****************************************************************************
* slider.h: Slider control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $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>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_SLIDER
#define VLC_SKIN_CONTROL_SLIDER
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Event;
class Graphics;
class SkinWindow;
class Bezier;
class SkinRegion;
//---------------------------------------------------------------------------
class ControlSlider : public GenericControl
{
private:
string Type;
string cursorUp;
string cursorDown;
Bezier *Curve;
bool Selected;
Event *UpdateEvent;
bool Enabled; // Is the button active
// Cursor properties
int CWidth; // Width of cursor
int CHeight; // Height of cursor
int * CursorX; // Array of x coordinates of slider points
int * CursorY; // Array of y coordinates of slider points
SkinRegion *HitRgn; // Active region for mouse events
int LastRefreshTime;
// Slider properties
int SliderRange; // Should stay to SLIDER_RANGE
int MaxValue; // Maximum value of the slider
int Value; // Value of slider
// ToolTip text
string BaseToolTipText;
string FullToolTipText;
int FindNearestPoint( int x, int y );
// Move cursor (whether SLIDER_MAX in skin_common.h)
void MoveCursor( int newValue );
public:
// Constructor
ControlSlider( string id, bool visible, string type, string cursorUp,
string cursorDown, double *ptx, double *pty, int nb,
string tooltiptext, string help, SkinWindow *Parent );
// Destructor
virtual ~ControlSlider();
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
// Draw control
virtual void Draw( int x, int y, int w, int h, Graphics *dest );
// Mouse events
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool ToolTipTest( int x, int y );
virtual bool MouseScroll( int x, int y, int direction );
// Slider calls
void SetCursorPosition( long Pos );
long GetCursorPosition();
// Enabling control
virtual void Enable( Event *event, bool enabled );
// Translate control
virtual void MoveRelative( int xOff, int yOff );
// Change SliderRange (do not use if not sure)
void ChangeSliderRange( int NewRange );
};
//---------------------------------------------------------------------------
#endif
This diff is collapsed.
/*****************************************************************************
* text.h: Text control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $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>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_CONTROL_TEXT
#define VLC_SKIN_CONTROL_TEXT
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class Event;
class BitmapBank;
class Graphics;
class SkinWindow;
class SkinRegion;
class SkinFont;
//---------------------------------------------------------------------------
class ControlText : public GenericControl
{
private:
// Scrolling parameters
bool Scroll;
int TextWidth;
int TextLeft;
int ScrollSpace;
bool Selected;
int SelectedX;
int MouseX;
int MouseY;
bool PauseScroll;
// Initial parameters
bool InitScroll;
int InitLeft;
int InitWidth;
// General parameters
string Text;
int Align;
SkinFont *TextFont;
string FontName;
list<string> DisplayList;
list<string>::const_iterator Display;
SkinRegion *TextClipRgn;
// Internal methods
void SetSize();
void SetScrolling();
void StartScrolling();
void StopScrolling();
public:
// Constructor
ControlText( string id, bool visible, int x, int y, string text,
string font, int align, int width, string display,
bool scroll, int scrollspace, string help, SkinWindow *Parent );
// initialization
virtual void Init();
virtual bool ProcessEvent( Event *evt );
// Destructor
~ControlText();
// Draw control
virtual void Draw( int x, int y, int w, int h, Graphics *dest );
// Mouse events
virtual bool MouseUp( int x, int y, int button );
virtual bool MouseDown( int x, int y, int button );
virtual bool MouseMove( int x, int y, int button );
virtual bool MouseOver( int x, int y );
virtual bool MouseDblClick( int x, int y, int button );
// Move control
virtual void MoveRelative( int xOff, int yOff );
// Set text
void SetText( const string newText );
// Keep on scrolling
void DoScroll();
// Getters
bool GetSelected() { return Selected; };
bool IsScrolling() { return Scroll; };
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* os_api.h: Wrapper for some os-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_api.h,v 1.3 2003/04/21 21:51:16 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#ifndef VLC_SKIN_API
#define VLC_SKIN_API
#if defined( WIN32 )
#define DIRECTORY_SEPARATOR '\\'
#else
#define DIRECTORY_SEPARATOR '/'
#endif
//--- GENERAL ---------------------------------------------------------------
#include <string>
using namespace std;
//---------------------------------------------------------------------------
class SkinWindow;
//---------------------------------------------------------------------------
// Event API
//---------------------------------------------------------------------------
// This functions send a message to the interface message stack
// First argument is the destination window (NULL is broadcasting)
// Second argument is the name of the message (see event.h)
// Other parameters are the arguments of message
// Send message is supposed to treat the message directly and should not be
// used if possible
void OSAPI_SendMessage( SkinWindow *win, unsigned int message, unsigned int param1,
long param2 );
void OSAPI_PostMessage( SkinWindow *win, unsigned int message, unsigned int param1,
long param2 );
//---------------------------------------------------------------------------
// Graphic API
//---------------------------------------------------------------------------
// This function get a color and return the correspounding color regarding
// color resolution. If it is black, it should return the nearest non black
// color
int OSAPI_GetNonTransparentColor( int c );
// This function get the size in pixel of the screen
void OSAPI_GetScreenSize( int &w, int &h );
//---------------------------------------------------------------------------
// General
//---------------------------------------------------------------------------
// This function get the position in pixel of the mouse cursor position
void OSAPI_GetMousePos( int &x, int &y );
// This function returns the Title of the specified window
string OSAPI_GetWindowTitle( SkinWindow *win );
// This functions removes a directory and all its contents
bool OSAPI_RmDir( string Path );
// This function returns a time in millisecond whose reference should be fixed
int OSAPI_GetTime();
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* os_bitmap.h: Wrapper for the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_bitmap.h,v 1.6 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_bitmap.h"
#define OSBitmap Win32Bitmap
#elif defined X11_SKINS
#include "x11/x11_bitmap.h"
#define OSBitmap X11Bitmap
#endif
/*****************************************************************************
* os_event.h: Wrapper for the Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_event.h,v 1.6 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_event.h"
#define OSEvent Win32Event
#elif defined X11_SKINS
#include "x11/x11_event.h"
#define OSEvent X11Event
#endif
/*****************************************************************************
* os_font.h: Wrapper for the OSFont class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_font.h,v 1.7 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_font.h"
#define OSFont Win32Font
#define VLC_FONT_ALIGN_LEFT DT_LEFT
#define VLC_FONT_ALIGN_CENTER DT_CENTER
#define VLC_FONT_ALIGN_RIGHT DT_RIGHT
#elif defined X11_SKINS
#include "x11/x11_font.h"
#define OSFont X11Font
#define VLC_FONT_ALIGN_LEFT 0
#define VLC_FONT_ALIGN_CENTER 1
#define VLC_FONT_ALIGN_RIGHT 2
#endif
/*****************************************************************************
* os_graphics.h: Wrapper for the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_graphics.h,v 1.7 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_graphics.h"
#define SRC_COPY SRCCOPY
#define SRC_AND SRCAND
#define OSGraphics Win32Graphics
#define OSRegion Win32Region
#elif defined X11_SKINS
#include "x11/x11_graphics.h"
#define SRC_COPY 1
#define SRC_AND 2
#define OSGraphics X11Graphics
#define OSRegion X11Region
#endif
/*****************************************************************************
* os_theme.h: Wrapper for the OSTheme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_theme.h,v 1.6 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_theme.h"
#define OSTheme Win32Theme
#elif defined X11_SKINS
#include "x11/x11_theme.h"
#define OSTheme X11Theme
#endif
/*****************************************************************************
* os_window.h: Wrapper for the OSWindow class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_window.h,v 1.6 2003/07/13 14:55:16 gbazin Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************/
#if defined( WIN32 )
#include "win32/win32_dragdrop.h"
#include "win32/win32_window.h"
#define OSWindow Win32Window
#elif defined X11_SKINS
#include "x11/x11_dragdrop.h"
#include "x11/x11_window.h"
#define OSWindow X11Window
#endif
This diff is collapsed.
<!-- vim: set filetype=xml : -->
<!--
*****************************************************************************
* skin.act: FleXML actions file
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin.act,v 1.9 2003/10/22 19:12:56 ipkiss Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************
-->
<!DOCTYPE actions SYSTEM "flexml-act.dtd">
<actions>
<top>
<![CDATA[
#include "parser/wrappers.h"
]]>
</top>
<start tag="Bitmap">
<![CDATA[
AddBitmap( {id}, {file}, {alphacolor} );
]]>
</start>
<start tag="Event">
<![CDATA[
AddEvent( {id}, {event}, {key} );
]]>
</start>
<start tag="Font">
<![CDATA[
AddFont( {id}, {font}, {size}, {color}, {weight}, {italic},
{underline} );
]]>
</start>
<start tag="ThemeInfo">
<![CDATA[
AddThemeInfo( {name}, {author}, {email}, {webpage} );
]]>
</start>
<start tag="Window">
<![CDATA[
StartWindow( {id}, {x}, {y}, {visible}, {fadetime}, {alpha},
{movealpha}, {dragdrop}, {playondrop} );
]]>
</start>
<end tag="Window">
<![CDATA[
EndWindow();
]]>
</end>
<start tag="ControlGroup">
<![CDATA[
StartControlGroup( {x}, {y} );
]]>
</start>
<end tag="ControlGroup">
<![CDATA[
EndControlGroup();
]]>
</end>
<start tag="Anchor">
<![CDATA[
AddAnchor( {x}, {y}, {range}, {priority} );
]]>
</start>
<start tag="ImageControl">
<![CDATA[
AddImage( {id}, {visible}, {x}, {y}, {image}, {onclick}, {help} );
]]>
</start>
<start tag="RectangleControl">
<![CDATA[
AddRectangle( {id}, {visible}, {x}, {y}, {w}, {h}, {color},
{onclick}, {help} );
]]>
</start>
<start tag="ButtonControl">
<![CDATA[
AddButton( {id},
{visible},
{x}, {y},
{up}, {down}, {disabled},
{onclick}, {onmouseover}, {onmouseout},
{tooltiptext}, {help} );
]]>
</start>
<start tag="CheckBoxControl">
<![CDATA[
AddCheckBox( {id},
{visible},
{x}, {y},
{img1}, {img2}, {clickimg1}, {clickimg2}, {disabled1},
{disabled2},
{onclick1}, {onclick2}, {onmouseover1}, {onmouseout1},
{onmouseover2}, {onmouseout2},
{tooltiptext1}, {tooltiptext2}, {help} );
]]>
</start>
<start tag="SliderControl">
<![CDATA[
AddSlider( {id}, {visible}, {x}, {y}, {type}, {up}, {down}, {abs},
{ord}, {tooltiptext}, {help} );
]]>
</start>
<start tag="TextControl">
<![CDATA[
AddText( {id}, {visible}, {x}, {y}, {text}, {font}, {align},
{width}, {display}, {scroll}, {scrollspace},
{help} );
]]>
</start>
<start tag="PlayListControl">
<![CDATA[
AddPlayList( {id}, {visible}, {x}, {y}, {width}, {infowidth},
{font}, {playfont}, {selcolor}, {abs}, {ord},
{longfilename}, {help} );
]]>
</start>
<end tag="PlayListControl">
<![CDATA[
AddPlayListEnd();
]]>
</end>
<start tag="Theme">
<![CDATA[
StartTheme( {magnet} );
]]>
</start>
<end tag="Theme">
<![CDATA[
EndTheme();
]]>
</end>
</actions>
/* XML application for skin.dtd (Id: skin.dtd,v 1.4 2003/04/20 20:28:39 ipkiss Exp).
* Includes actions from skin.act.
* Generated 2003/10/22 19:09:40.
*
* This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
* Copyright 1999 Kristoffer Rose. All rights reserved.
*
* You can redistribute and/or modify this program provided the following
* two conditions hold:
*
* 1. The program is distributed WITHOUT ANY WARRANTY from the author of
* FleXML; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* 2. The program distribution conditions do not in any way affect the
* distribution conditions of the FleXML system used to generate this
* file or any version of FleXML derived from that system.
*
* Notice that these are explicit rights granted to you for files
* generated by the FleXML system. For your rights in connection with
* the FleXML system itself please consult the GNU General Public License.
*/
#include "skin.h"
#line 31 "skin.act"
#include "parser/wrappers.h"
void STag_Bitmap(void)
{
#line 36 "skin.act"
AddBitmap( A_Bitmap_id, A_Bitmap_file, A_Bitmap_alphacolor );
} /* STag_Bitmap */
void STag_Event(void)
{
#line 41 "skin.act"
AddEvent( A_Event_id, A_Event_event, A_Event_key );
} /* STag_Event */
void STag_Font(void)
{
#line 46 "skin.act"
AddFont( A_Font_id, A_Font_font, A_Font_size, A_Font_color, A_Font_weight, A_Font_italic,
A_Font_underline );
} /* STag_Font */
void STag_ThemeInfo(void)
{
#line 52 "skin.act"
AddThemeInfo( A_ThemeInfo_name, A_ThemeInfo_author, A_ThemeInfo_email, A_ThemeInfo_webpage );
} /* STag_ThemeInfo */
void STag_Window(void)
{
#line 57 "skin.act"
StartWindow( A_Window_id, A_Window_x, A_Window_y, A_Window_visible, A_Window_fadetime, A_Window_alpha,
A_Window_movealpha, A_Window_dragdrop, A_Window_playondrop );
} /* STag_Window */
void ETag_Window(void)
{
#line 63 "skin.act"
EndWindow();
} /* ETag_Window */
void STag_ControlGroup(void)
{
#line 68 "skin.act"
StartControlGroup( A_ControlGroup_x, A_ControlGroup_y );
} /* STag_ControlGroup */
void ETag_ControlGroup(void)
{
#line 73 "skin.act"
EndControlGroup();
} /* ETag_ControlGroup */
void STag_Anchor(void)
{
#line 78 "skin.act"
AddAnchor( A_Anchor_x, A_Anchor_y, A_Anchor_range, A_Anchor_priority );
} /* STag_Anchor */
void STag_ImageControl(void)
{
#line 83 "skin.act"
AddImage( A_ImageControl_id, A_ImageControl_visible, A_ImageControl_x, A_ImageControl_y, A_ImageControl_image, A_ImageControl_onclick, A_ImageControl_help );
} /* STag_ImageControl */
void STag_RectangleControl(void)
{
#line 88 "skin.act"
AddRectangle( A_RectangleControl_id, A_RectangleControl_visible, A_RectangleControl_x, A_RectangleControl_y, A_RectangleControl_w, A_RectangleControl_h, A_RectangleControl_color,
A_RectangleControl_onclick, A_RectangleControl_help );
} /* STag_RectangleControl */
void STag_ButtonControl(void)
{
#line 94 "skin.act"
AddButton( A_ButtonControl_id,
A_ButtonControl_visible,
A_ButtonControl_x, A_ButtonControl_y,
A_ButtonControl_up, A_ButtonControl_down, A_ButtonControl_disabled,
A_ButtonControl_onclick, A_ButtonControl_onmouseover, A_ButtonControl_onmouseout,
A_ButtonControl_tooltiptext, A_ButtonControl_help );
} /* STag_ButtonControl */
void STag_CheckBoxControl(void)
{
#line 104 "skin.act"
AddCheckBox( A_CheckBoxControl_id,
A_CheckBoxControl_visible,
A_CheckBoxControl_x, A_CheckBoxControl_y,
A_CheckBoxControl_img1, A_CheckBoxControl_img2, A_CheckBoxControl_clickimg1, A_CheckBoxControl_clickimg2, A_CheckBoxControl_disabled1,
A_CheckBoxControl_disabled2,
A_CheckBoxControl_onclick1, A_CheckBoxControl_onclick2, A_CheckBoxControl_onmouseover1, A_CheckBoxControl_onmouseout1,
A_CheckBoxControl_onmouseover2, A_CheckBoxControl_onmouseout2,
A_CheckBoxControl_tooltiptext1, A_CheckBoxControl_tooltiptext2, A_CheckBoxControl_help );
} /* STag_CheckBoxControl */
void STag_SliderControl(void)
{
#line 116 "skin.act"
AddSlider( A_SliderControl_id, A_SliderControl_visible, A_SliderControl_x, A_SliderControl_y, A_SliderControl_type, A_SliderControl_up, A_SliderControl_down, A_SliderControl_abs,
A_SliderControl_ord, A_SliderControl_tooltiptext, A_SliderControl_help );
} /* STag_SliderControl */
void STag_TextControl(void)
{
#line 122 "skin.act"
AddText( A_TextControl_id, A_TextControl_visible, A_TextControl_x, A_TextControl_y, A_TextControl_text, A_TextControl_font, A_TextControl_align,
A_TextControl_width, A_TextControl_display, A_TextControl_scroll, A_TextControl_scrollspace,
A_TextControl_help );
} /* STag_TextControl */
void STag_PlayListControl(void)
{
#line 129 "skin.act"
AddPlayList( A_PlayListControl_id, A_PlayListControl_visible, A_PlayListControl_x, A_PlayListControl_y, A_PlayListControl_width, A_PlayListControl_infowidth,
A_PlayListControl_font, A_PlayListControl_playfont, A_PlayListControl_selcolor, A_PlayListControl_abs, A_PlayListControl_ord,
A_PlayListControl_longfilename, A_PlayListControl_help );
} /* STag_PlayListControl */
void ETag_PlayListControl(void)
{
#line 136 "skin.act"
AddPlayListEnd();
} /* ETag_PlayListControl */
void STag_Theme(void)
{
#line 141 "skin.act"
StartTheme( A_Theme_magnet );
} /* STag_Theme */
void ETag_Theme(void)
{
#line 146 "skin.act"
EndTheme();
} /* ETag_Theme */
/* Dummy main: filter XML from stdin. */
//int main() { exit(yylex()); }
/* XML application entry points. */
void ETag_Bitmap(void) {}
void ETag_Event(void) {}
void ETag_Font(void) {}
void ETag_ThemeInfo(void) {}
void ETag_Anchor(void) {}
void ETag_ImageControl(void) {}
void ETag_RectangleControl(void) {}
void ETag_ButtonControl(void) {}
void ETag_CheckBoxControl(void) {}
void ETag_SliderControl(void) {}
void ETag_TextControl(void) {}
<!--
*****************************************************************************
* skin.dtd: DTD for the VLC skins
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin.dtd,v 1.5 2003/10/22 19:12:56 ipkiss Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111,
* USA.
*****************************************************************************
-->
<!ELEMENT Theme (ThemeInfo,(Bitmap|Font|Window|Event)*)>
<!ATTLIST Theme
magnet CDATA "9"
>
<!-- main elements -->
<!ELEMENT Bitmap EMPTY>
<!ATTLIST Bitmap
id CDATA #REQUIRED
file CDATA #REQUIRED
alphacolor CDATA #REQUIRED
>
<!ELEMENT Event EMPTY>
<!ATTLIST Event
id CDATA #REQUIRED
event CDATA #REQUIRED
key CDATA "none"
>
<!ELEMENT Font EMPTY>
<!ATTLIST Font
id CDATA "default"
font CDATA "arial"
size CDATA "12"
color CDATA "#000000"
weight CDATA "400"
italic CDATA "false"
underline CDATA "false"
>
<!ELEMENT ThemeInfo EMPTY>
<!ATTLIST ThemeInfo
name CDATA #IMPLIED
author CDATA #IMPLIED
email CDATA #IMPLIED
webpage CDATA #IMPLIED
>
<!ELEMENT Window (ControlGroup)>
<!ATTLIST Window
id CDATA #REQUIRED
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
fadetime CDATA "500"
alpha CDATA "255"
movealpha CDATA "255"
dragdrop CDATA "true"
playondrop CDATA "true"
>
<!ELEMENT ControlGroup (ControlGroup|ImageControl|ButtonControl|PlayListControl|
SliderControl|TextControl|CheckBoxControl|
RectangleControl|Anchor)+>
<!ATTLIST ControlGroup
x CDATA "\0"
y CDATA "\0"
>
<!-- Anchors -->
<!ELEMENT Anchor EMPTY>
<!ATTLIST Anchor
x CDATA "\0"
y CDATA "\0"
priority CDATA #REQUIRED
range CDATA "10"
>
<!-- Controls -->
<!ELEMENT ImageControl EMPTY>
<!ATTLIST ImageControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
image CDATA #REQUIRED
onclick CDATA "none"
help CDATA "\0"
>
<!ELEMENT RectangleControl EMPTY>
<!ATTLIST RectangleControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
w CDATA "50"
h CDATA "50"
color CDATA "#C0C0C0"
onclick CDATA "none"
help CDATA "\0"
>
<!ELEMENT ButtonControl EMPTY>
<!ATTLIST ButtonControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
up CDATA #REQUIRED
down CDATA #REQUIRED
disabled CDATA "none"
onclick CDATA "none"
onmouseover CDATA "none"
onmouseout CDATA "none"
tooltiptext CDATA "none"
help CDATA "\0"
>
<!ELEMENT CheckBoxControl EMPTY>
<!ATTLIST CheckBoxControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
img1 CDATA #REQUIRED
clickimg1 CDATA "none"
img2 CDATA #REQUIRED
clickimg2 CDATA "none"
disabled1 CDATA "none"
disabled2 CDATA "none"
onclick1 CDATA "none"
onclick2 CDATA "none"
onmouseover1 CDATA "none"
onmouseout1 CDATA "none"
onmouseover2 CDATA "none"
onmouseout2 CDATA "none"
tooltiptext1 CDATA "none"
tooltiptext2 CDATA "none"
help CDATA "\0"
>
<!ELEMENT SliderControl EMPTY>
<!ATTLIST SliderControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
type CDATA "time"
up CDATA #REQUIRED
down CDATA #REQUIRED
abs CDATA #REQUIRED
ord CDATA #REQUIRED
tooltiptext CDATA "none"
help CDATA "\0"
>
<!ELEMENT TextControl EMPTY>
<!ATTLIST TextControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
text CDATA ""
font CDATA #REQUIRED
align CDATA "left"
width CDATA "\0"
display CDATA "none"
scroll CDATA "true"
scrollspace CDATA "20"
help CDATA "\0"
>
<!ELEMENT PlayListControl SliderControl>
<!ATTLIST PlayListControl
id CDATA "none"
visible CDATA "true"
x CDATA "\0"
y CDATA "\0"
width CDATA "200"
infowidth CDATA "50"
font CDATA #REQUIRED
playfont CDATA "none"
selcolor CDATA "#0000FF"
abs CDATA #REQUIRED
ord CDATA #REQUIRED
help CDATA "\0"
longfilename CDATA "false"
>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -554,20 +554,6 @@ EOF
exit 0
fi
##
## Fix flexml-generated files
##
if test "${action}" = "flexml"
then
cd modules/gui/skins/parser
flexml -SH -a skin.act skin.dtd
# comment the dummy main function
file=skin.c
sed 's@int main@//int main@' < $file > $file.$$.bak
mv -f $file.$$.bak $file
flex -oflex.c -BLs skin.l
fi
##
## Make distclean
##
......
......@@ -133,7 +133,6 @@ Section "Media player (required)" SEC01
File /r plugins
File /r locale
File /r skins
File /r skins2
File /r http
......@@ -177,8 +176,6 @@ Section "Start Menu + Desktop Shortcut" SEC02
"$INSTDIR\vlc.exe" "--intf wxwin"
CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (skins).lnk" \
"$INSTDIR\vlc.exe" "--intf skins2"
CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player (old skins).lnk" \
"$INSTDIR\vlc.exe" "--intf skins"
CreateShortCut "$DESKTOP\VLC media player.lnk" \
"$INSTDIR\vlc.exe" "--intf wxwin"
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" \
......
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