1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-28 23:09:59 +02:00

* fixed compilation under linux

* added a flag GTK2_SKINS
This commit is contained in:
Cyril Deguet 2003-04-28 12:00:14 +00:00
parent d01ae07676
commit f38481fddc
18 changed files with 45 additions and 34 deletions

View File

@ -2396,7 +2396,7 @@ if test "x${enable_skins}" != "xno"; then
if test "x${enable_skins}" = "xyes"; then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
PLUGINS="${PLUGINS} skins"
CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS}"
CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins -Imodules/gui/skins/src -Imodules/gui/skins/gtk2 -Imodules/gui/skins/controls -Imodules/gui/skins/parser ${GTK2_CFLAGS} -DGTK2_SKINS"
LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}"
fi
fi

View File

@ -2,7 +2,7 @@
* gtk2_api.cpp: Various gtk2-specific functions
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_api.cpp,v 1.15 2003/04/24 14:38:06 asmax Exp $
* $Id: gtk2_api.cpp,v 1.16 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
@ -22,7 +22,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 ------------------------------------------------------------------
#include <glib.h>

View File

@ -2,7 +2,7 @@
* gtk2_bitmap.cpp: GTK2 implementation of the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_bitmap.cpp,v 1.16 2003/04/21 18:39:38 asmax Exp $
* $Id: gtk2_bitmap.cpp,v 1.17 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -23,7 +23,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk-pixbuf/gdk-pixbuf.h>

View File

@ -2,7 +2,7 @@
* gtk2_dragdrop.cpp: GTK2 implementation of the drag & drop
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_dragdrop.cpp,v 1.5 2003/04/19 11:46:11 asmax Exp $
* $Id: gtk2_dragdrop.cpp,v 1.6 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
@ -22,7 +22,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>

View File

@ -2,7 +2,7 @@
* gtk2_event.cpp: GTK2 implementation of the Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_event.cpp,v 1.11 2003/04/21 21:51:16 asmax Exp $
* $Id: gtk2_event.cpp,v 1.12 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -24,7 +24,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>

View File

@ -2,7 +2,7 @@
* gtk2_font.cpp: GTK2 implementation of the Font class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.cpp,v 1.13 2003/04/21 22:12:37 asmax Exp $
* $Id: gtk2_font.cpp,v 1.14 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -23,7 +23,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>

View File

@ -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.15 2003/04/21 21:51:16 asmax Exp $
* $Id: gtk2_graphics.cpp,v 1.16 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -23,7 +23,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>

View File

@ -2,7 +2,7 @@
* gtk2_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_run.cpp,v 1.20 2003/04/21 21:51:16 asmax Exp $
* $Id: gtk2_run.cpp,v 1.21 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
@ -22,7 +22,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 ------------------------------------------------------------------
#include <glib.h>

View File

@ -2,7 +2,7 @@
* gtk2_theme.cpp: GTK2 implementation of the Theme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_theme.cpp,v 1.24 2003/04/21 22:12:37 asmax Exp $
* $Id: gtk2_theme.cpp,v 1.25 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
@ -22,7 +22,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GTK2 -----------------------------------------------------------------
#include <gdk/gdk.h>

View File

@ -2,7 +2,7 @@
* gtk2_window.cpp: GTK2 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: gtk2_window.cpp,v 1.28 2003/04/22 17:56:44 asmax Exp $
* $Id: gtk2_window.cpp,v 1.29 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
@ -22,7 +22,7 @@
* USA.
*****************************************************************************/
#if !defined WIN32
#ifdef GTK2_SKINS
//--- GENERAL ---------------------------------------------------------------
//#include <math.h>

View File

@ -2,7 +2,7 @@
* os_bitmap.h: Wrapper for the Bitmap class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_bitmap.h,v 1.3 2003/04/16 21:40:07 ipkiss Exp $
* $Id: os_bitmap.h,v 1.4 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -27,7 +27,7 @@
#if defined( WIN32 )
#include "win32/win32_bitmap.h"
#define OSBitmap Win32Bitmap
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_bitmap.h"
#define OSBitmap GTK2Bitmap
#endif

View File

@ -2,7 +2,7 @@
* os_event.h: Wrapper for the Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_event.h,v 1.3 2003/04/16 21:40:07 ipkiss Exp $
* $Id: os_event.h,v 1.4 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -27,7 +27,7 @@
#if defined( WIN32 )
#include "win32/win32_event.h"
#define OSEvent Win32Event
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_event.h"
#define OSEvent GTK2Event
#endif

View File

@ -2,7 +2,7 @@
* os_font.h: Wrapper for the OSFont class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_font.h,v 1.4 2003/04/17 15:43:29 karibu Exp $
* $Id: os_font.h,v 1.5 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -32,7 +32,7 @@
#define VLC_FONT_ALIGN_CENTER DT_CENTER
#define VLC_FONT_ALIGN_RIGHT DT_RIGHT
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_font.h"
#define OSFont GTK2Font

View File

@ -2,7 +2,7 @@
* os_graphics.h: Wrapper for the Graphics and Region classes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_graphics.h,v 1.4 2003/04/16 21:40:07 ipkiss Exp $
* $Id: os_graphics.h,v 1.5 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -30,7 +30,7 @@
#define SRC_AND SRCAND
#define OSGraphics Win32Graphics
#define OSRegion Win32Region
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_graphics.h"
#define SRC_COPY 1
#define SRC_AND 2

View File

@ -2,7 +2,7 @@
* os_theme.h: Wrapper for the OSTheme class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_theme.h,v 1.3 2003/04/16 21:40:07 ipkiss Exp $
* $Id: os_theme.h,v 1.4 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -27,7 +27,7 @@
#if defined( WIN32 )
#include "win32/win32_theme.h"
#define OSTheme Win32Theme
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_theme.h"
#define OSTheme GTK2Theme
#endif

View File

@ -2,7 +2,7 @@
* os_window.h: Wrapper for the OSWindow class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: os_window.h,v 1.3 2003/04/16 21:40:07 ipkiss Exp $
* $Id: os_window.h,v 1.4 2003/04/28 12:00:13 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -28,7 +28,7 @@
#include "win32/win32_dragdrop.h"
#include "win32/win32_window.h"
#define OSWindow Win32Window
#else
#elif defined GTK2_SKINS
#include "gtk2/gtk2_dragdrop.h"
#include "gtk2/gtk2_window.h"
#define OSWindow GTK2Window

View File

@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.19 2003/04/28 00:18:27 ipkiss Exp $
* $Id: skin_main.cpp,v 1.20 2003/04/28 12:00:14 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -105,7 +105,7 @@ static int Open ( vlc_object_t *p_this )
p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
#if !defined WIN32
#ifdef GTK2_SKINS
// Initialize GDK
int i_args = 3;
char *p_args[] = { "", "", "--sync", NULL };

View File

@ -2,7 +2,7 @@
* window.cpp: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: window.cpp,v 1.20 2003/04/28 00:18:27 ipkiss Exp $
* $Id: window.cpp,v 1.21 2003/04/28 12:00:14 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
@ -98,6 +98,7 @@ void SkinWindow::Open()
Changing = true;
#ifdef WIN32
if( Transition && IS_WINNT )
{
SetTransparency( 0 );
@ -106,17 +107,23 @@ void SkinWindow::Open()
}
else
{
#endif
OSAPI_PostMessage( this, WINDOW_SHOW, 0, 0 );
#ifdef WIN32
}
#endif
}
//---------------------------------------------------------------------------
void SkinWindow::Close()
{
Changing = true;
#ifdef WIN32
if( Transition && IS_WINNT )
Fade( 0, Transition, WINDOW_HIDE );
else
#endif
OSAPI_PostMessage( this, WINDOW_FADE, WINDOW_HIDE, 1242 );
}
//---------------------------------------------------------------------------
@ -141,6 +148,7 @@ void SkinWindow::Hide()
void SkinWindow::Fade( int To, int Time, unsigned int evt )
{
// No fading effect on win9x
#ifdef WIN32
if( IS_WINNT )
{
StartAlpha = Alpha;
@ -151,6 +159,7 @@ void SkinWindow::Fade( int To, int Time, unsigned int evt )
OSAPI_PostMessage( this, WINDOW_FADE, evt, Lock );
}
#endif
}
//---------------------------------------------------------------------------
bool SkinWindow::ProcessEvent( Event *evt )
@ -249,6 +258,7 @@ bool SkinWindow::ProcessEvent( Event *evt )
//---------------------------------------------------------------------------
bool SkinWindow::ChangeAlpha( int time )
{
#ifdef WIN32
if( IS_WINNT )
{
if( time >= EndTime )
@ -271,6 +281,7 @@ bool SkinWindow::ChangeAlpha( int time )
return false;
}
}
#endif
return true;
}
//---------------------------------------------------------------------------