Commit c7b39fc6 authored by Olivier Teulière's avatar Olivier Teulière

* ./configure.ac.in:

    - added a basic-skins plugin, which doesn't make use of wxWindows
      dialogs (currently only works for win32)
    - renamed with-wx-config-path in with-skins-wx-config-path for the
      skins plugin, to avoid problems with the wxwindows plugin
parent 4c8ed65b
...@@ -1703,6 +1703,7 @@ dnl ...@@ -1703,6 +1703,7 @@ dnl
AC_CHECK_HEADERS(zlib.h, [ AC_CHECK_HEADERS(zlib.h, [
LDFLAGS_mp4="${LDFLAGS_mp4} -lz" LDFLAGS_mp4="${LDFLAGS_mp4} -lz"
LDFLAGS_skins="${LDFLAGS_skins} -lz" LDFLAGS_skins="${LDFLAGS_skins} -lz"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lz"
] ) ] )
...@@ -1711,6 +1712,7 @@ dnl skins module ...@@ -1711,6 +1712,7 @@ dnl skins module
dnl dnl
AC_CHECK_HEADERS(libtar.h, [ AC_CHECK_HEADERS(libtar.h, [
LDFLAGS_skins="${LDFLAGS_skins} -ltar" LDFLAGS_skins="${LDFLAGS_skins} -ltar"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -ltar"
] ) ] )
...@@ -2367,14 +2369,14 @@ dnl ...@@ -2367,14 +2369,14 @@ dnl
dnl Skins module dnl Skins module
dnl dnl
AC_ARG_ENABLE(skins, AC_ARG_ENABLE(skins,
[ --enable-skins Win32 skins module (default enabled on Win32)]) [ --enable-skins Skins interface module (default enabled on Win32)])
if test "x${enable_skins}" != "xno"; then if test "x${enable_skins}" != "xno"; then
WXWINDOWS_PATH="${PATH}" WXWINDOWS_PATH="${PATH}"
AC_ARG_WITH(wx-config-path, AC_ARG_WITH(skins-wx-config-path,
[ --with-wx-config-path=PATH wx-config path (default search in \$PATH)], [ --with-skins-wx-config-path=PATH wx-config path for the skins plugin (default search in \$PATH)],
[ if test "x${with_wx_config_path}" != "xno" [ if test "x${with_skins_wx_config_path}" != "xno"
then then
WXWINDOWS_PATH="${with_wx_config_path}:${PATH}" WXWINDOWS_PATH="${with_skins_wx_config_path}:${PATH}"
fi ]) fi ])
# look for wx-config # look for wx-config
AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH}) AC_PATH_PROG(WX_CONFIG, wx-config, no, ${WXWINDOWS_PATH})
...@@ -2384,7 +2386,7 @@ if test "x${enable_skins}" != "xno"; then ...@@ -2384,7 +2386,7 @@ if test "x${enable_skins}" != "xno"; then
then then
AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-skins.]) AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-skins.])
fi fi
CPPFLAGS_skins="${CPPFLAGS_skins} `${WX_CONFIG} --cxxflags`" CPPFLAGS_skins="${CPPFLAGS_skins} `${WX_CONFIG} --cxxflags` -DWX_SKINS"
LDFLAGS_skins="${LDFLAGS_skins} `${WX_CONFIG} --libs`" LDFLAGS_skins="${LDFLAGS_skins} `${WX_CONFIG} --libs`"
fi fi
...@@ -2396,12 +2398,31 @@ if test "x${enable_skins}" != "xno"; then ...@@ -2396,12 +2398,31 @@ if test "x${enable_skins}" != "xno"; then
if test "x${enable_skins}" = "xyes"; then if test "x${enable_skins}" = "xyes"; then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0]) PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
PLUGINS="${PLUGINS} skins" 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} -DGTK2_SKINS" CPPFLAGS_skins="${CPPFLAGS_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS"
LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}" LDFLAGS_skins="${LDFLAGS_skins} -lstdc++ ${GTK2_LIBS}"
fi fi
fi fi
fi fi
dnl
dnl Basic skins module (i.e. without wxWindows dialogs)
dnl
AC_ARG_ENABLE(basic-skins,
[ --enable-basic-skins Skins interface module without wxWindows dialogs (default disabled)])
if test "x${enable_basic_skins}" = "xyes"; then
if test "x${SYS}" = "xmingw32" -o "x${SYS}" = "xcygwin"; then
PLUGINS="${PLUGINS} basic_skins"
CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -U_OFF_T_ -U_off_t -fno-rtti -Imodules/gui/skins"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lstdc++ -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32"
else
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
PLUGINS="${PLUGINS} basic_skins"
CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -O2 -fno-rtti -Imodules/gui/skins ${GTK2_CFLAGS} -DGTK2_SKINS"
LDFLAGS_basic_skins="${LDFLAGS_basic_skins} -lstdc++ ${GTK2_LIBS}"
fi
CPPFLAGS_basic_skins="${CPPFLAGS_basic_skins} -DBASIC_SKINS"
fi
dnl dnl
dnl Gtk+ module dnl Gtk+ module
dnl dnl
......
...@@ -55,7 +55,6 @@ SOURCES_skins = \ ...@@ -55,7 +55,6 @@ SOURCES_skins = \
modules/gui/skins/src/vlcproc.h \ modules/gui/skins/src/vlcproc.h \
modules/gui/skins/src/window.cpp \ modules/gui/skins/src/window.cpp \
modules/gui/skins/src/window.h \ modules/gui/skins/src/window.h \
modules/gui/skins/src/wxdialogs.h \
\ \
modules/gui/skins/win32/win32_api.cpp \ modules/gui/skins/win32/win32_api.cpp \
modules/gui/skins/win32/win32_bitmap.cpp \ modules/gui/skins/win32/win32_bitmap.cpp \
...@@ -91,7 +90,7 @@ SOURCES_skins = \ ...@@ -91,7 +90,7 @@ SOURCES_skins = \
modules/gui/skins/gtk2/gtk2_window.cpp \ modules/gui/skins/gtk2/gtk2_window.cpp \
modules/gui/skins/gtk2/gtk2_window.h \ modules/gui/skins/gtk2/gtk2_window.h \
\ \
modules/gui/skins/x11/x11_api.cpp \ modules/gui/skins/x11/x11_api.cpp \
modules/gui/skins/x11/x11_bitmap.cpp \ modules/gui/skins/x11/x11_bitmap.cpp \
modules/gui/skins/x11/x11_bitmap.h \ modules/gui/skins/x11/x11_bitmap.h \
modules/gui/skins/x11/x11_dragdrop.cpp \ modules/gui/skins/x11/x11_dragdrop.cpp \
...@@ -108,6 +107,7 @@ SOURCES_skins = \ ...@@ -108,6 +107,7 @@ SOURCES_skins = \
modules/gui/skins/x11/x11_window.cpp \ modules/gui/skins/x11/x11_window.cpp \
modules/gui/skins/x11/x11_window.h \ modules/gui/skins/x11/x11_window.h \
\ \
modules/gui/skins/src/wxdialogs.h \
modules/gui/wxwindows/fileinfo.cpp \ modules/gui/wxwindows/fileinfo.cpp \
modules/gui/wxwindows/messages.cpp \ modules/gui/wxwindows/messages.cpp \
modules/gui/wxwindows/open.cpp \ modules/gui/wxwindows/open.cpp \
...@@ -115,6 +115,116 @@ SOURCES_skins = \ ...@@ -115,6 +115,116 @@ SOURCES_skins = \
modules/gui/wxwindows/streamout.cpp \ modules/gui/wxwindows/streamout.cpp \
$(NULL) $(NULL)
SOURCES_basic_skins = \
modules/gui/skins/os_api.h \
modules/gui/skins/os_bitmap.h \
modules/gui/skins/os_event.h \
modules/gui/skins/os_font.h \
modules/gui/skins/os_graphics.h \
modules/gui/skins/os_theme.h \
modules/gui/skins/os_window.h \
\
modules/gui/skins/controls/controls.h \
modules/gui/skins/controls/button.cpp \
modules/gui/skins/controls/button.h \
modules/gui/skins/controls/checkbox.cpp \
modules/gui/skins/controls/checkbox.h \
modules/gui/skins/controls/generic.cpp \
modules/gui/skins/controls/generic.h \
modules/gui/skins/controls/image.cpp \
modules/gui/skins/controls/image.h \
modules/gui/skins/controls/playlist.cpp \
modules/gui/skins/controls/playlist.h \
modules/gui/skins/controls/rectangle.cpp \
modules/gui/skins/controls/rectangle.h \
modules/gui/skins/controls/slider.cpp \
modules/gui/skins/controls/slider.h \
modules/gui/skins/controls/text.cpp \
modules/gui/skins/controls/text.h \
\
modules/gui/skins/parser/flex.c \
modules/gui/skins/parser/skin.h \
modules/gui/skins/parser/skin.c \
modules/gui/skins/parser/wrappers.h \
modules/gui/skins/parser/wrappers.cpp \
\
modules/gui/skins/src/anchor.cpp \
modules/gui/skins/src/anchor.h \
modules/gui/skins/src/banks.cpp \
modules/gui/skins/src/banks.h \
modules/gui/skins/src/bezier.cpp \
modules/gui/skins/src/bezier.h \
modules/gui/skins/src/bitmap.cpp \
modules/gui/skins/src/bitmap.h \
modules/gui/skins/src/event.cpp \
modules/gui/skins/src/event.h \
modules/gui/skins/src/font.cpp \
modules/gui/skins/src/font.h \
modules/gui/skins/src/graphics.cpp \
modules/gui/skins/src/graphics.h \
modules/gui/skins/src/skin_main.cpp \
modules/gui/skins/src/skin_common.h \
modules/gui/skins/src/theme.cpp \
modules/gui/skins/src/theme.h \
modules/gui/skins/src/themeloader.cpp \
modules/gui/skins/src/themeloader.h \
modules/gui/skins/src/vlcproc.cpp \
modules/gui/skins/src/vlcproc.h \
modules/gui/skins/src/window.cpp \
modules/gui/skins/src/window.h \
\
modules/gui/skins/win32/win32_api.cpp \
modules/gui/skins/win32/win32_bitmap.cpp \
modules/gui/skins/win32/win32_bitmap.h \
modules/gui/skins/win32/win32_dragdrop.cpp \
modules/gui/skins/win32/win32_dragdrop.h \
modules/gui/skins/win32/win32_event.cpp \
modules/gui/skins/win32/win32_event.h \
modules/gui/skins/win32/win32_font.cpp \
modules/gui/skins/win32/win32_font.h \
modules/gui/skins/win32/win32_graphics.cpp \
modules/gui/skins/win32/win32_graphics.h \
modules/gui/skins/win32/win32_run.cpp \
modules/gui/skins/win32/win32_theme.cpp \
modules/gui/skins/win32/win32_theme.h \
modules/gui/skins/win32/win32_window.cpp \
modules/gui/skins/win32/win32_window.h \
\
modules/gui/skins/gtk2/gtk2_api.cpp \
modules/gui/skins/gtk2/gtk2_bitmap.cpp \
modules/gui/skins/gtk2/gtk2_bitmap.h \
modules/gui/skins/gtk2/gtk2_dragdrop.cpp \
modules/gui/skins/gtk2/gtk2_dragdrop.h \
modules/gui/skins/gtk2/gtk2_event.cpp \
modules/gui/skins/gtk2/gtk2_event.h \
modules/gui/skins/gtk2/gtk2_font.cpp \
modules/gui/skins/gtk2/gtk2_font.h \
modules/gui/skins/gtk2/gtk2_graphics.cpp \
modules/gui/skins/gtk2/gtk2_graphics.h \
modules/gui/skins/gtk2/gtk2_run.cpp \
modules/gui/skins/gtk2/gtk2_theme.cpp \
modules/gui/skins/gtk2/gtk2_theme.h \
modules/gui/skins/gtk2/gtk2_window.cpp \
modules/gui/skins/gtk2/gtk2_window.h \
\
modules/gui/skins/x11/x11_api.cpp \
modules/gui/skins/x11/x11_bitmap.cpp \
modules/gui/skins/x11/x11_bitmap.h \
modules/gui/skins/x11/x11_dragdrop.cpp \
modules/gui/skins/x11/x11_dragdrop.h \
modules/gui/skins/x11/x11_event.cpp \
modules/gui/skins/x11/x11_event.h \
modules/gui/skins/x11/x11_font.cpp \
modules/gui/skins/x11/x11_font.h \
modules/gui/skins/x11/x11_graphics.cpp \
modules/gui/skins/x11/x11_graphics.h \
modules/gui/skins/x11/x11_run.cpp \
modules/gui/skins/x11/x11_theme.cpp \
modules/gui/skins/x11/x11_theme.h \
modules/gui/skins/x11/x11_window.cpp \
modules/gui/skins/x11/x11_window.h \
$(NULL)
EXTRA_DIST += \ EXTRA_DIST += \
modules/gui/skins/parser/skin.dtd \ modules/gui/skins/parser/skin.dtd \
modules/gui/skins/parser/skin.act modules/gui/skins/parser/skin.act
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin_common.h: Private Skin interface description * skin_common.h: Private Skin interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_common.h,v 1.8 2003/04/29 12:54:57 gbazin Exp $ * $Id: skin_common.h,v 1.9 2003/04/30 19:22:27 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -32,14 +32,16 @@ ...@@ -32,14 +32,16 @@
class Theme; class Theme;
class wxIcon;
class OpenDialog; class OpenDialog;
class Messages; class Messages;
class SoutDialog; class SoutDialog;
class PrefsDialog; class PrefsDialog;
class FileInfo; class FileInfo;
#ifndef BASIC_SKINS
class wxIcon;
#endif
#ifdef WIN32 #ifdef WIN32
class ExitTimer; class ExitTimer;
#endif #endif
#ifdef X11_SKINS #ifdef X11_SKINS
...@@ -65,13 +67,14 @@ struct intf_sys_t ...@@ -65,13 +67,14 @@ struct intf_sys_t
int i_close_status; int i_close_status;
bool b_all_win_closed; bool b_all_win_closed;
// message bank subscription // Message bank subscription
msg_subscription_t *p_sub; msg_subscription_t *p_sub;
// Interface status // Interface status
int i_index; // Set wich file is being played int i_index; // Set which file is being played
int i_size; // Size of playlist; int i_size; // Size of playlist;
#ifndef BASIC_SKINS
wxIcon *p_icon; wxIcon *p_icon;
// Dialogs // Dialogs
...@@ -84,20 +87,23 @@ struct intf_sys_t ...@@ -84,20 +87,23 @@ struct intf_sys_t
// Wait wxwindows initialization // Wait wxwindows initialization
vlc_mutex_t init_lock; vlc_mutex_t init_lock;
vlc_cond_t init_cond; vlc_cond_t init_cond;
#endif
#ifdef X11_SKINS #ifdef X11_SKINS
Display *display; Display *display;
#endif #endif
#ifdef WIN32 #ifdef WIN32
#ifndef BASIC_SKINS
bool b_wx_die; bool b_wx_die;
ExitTimer *p_kludgy_timer; ExitTimer *p_kludgy_timer;
#endif
// We dynamically load msimg32.dll to get a pointer to TransparentBlt() // We dynamically load msimg32.dll to get a pointer to TransparentBlt()
HINSTANCE h_msimg32_dll; HINSTANCE h_msimg32_dll;
BOOL (WINAPI *TransparentBlt)( HDC,int,int,int,int,HDC,int, BOOL (WINAPI *TransparentBlt)( HDC,int,int,int,int,HDC,int,
int,int,int,UINT ); int,int,int,UINT );
// idem for user32.dll and SetLayeredWindowAttributes() // Idem for user32.dll and SetLayeredWindowAttributes()
HINSTANCE h_user32_dll; HINSTANCE h_user32_dll;
BOOL (WINAPI *SetLayeredWindowAttributes)( HWND,COLORREF,BYTE,DWORD ); BOOL (WINAPI *SetLayeredWindowAttributes)( HWND,COLORREF,BYTE,DWORD );
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC * skin-main.cpp: skins plugin for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.22 2003/04/29 12:54:57 gbazin Exp $ * $Id: skin_main.cpp,v 1.23 2003/04/30 19:22:27 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
*****************************************************************************/ *****************************************************************************/
//--- GENERAL --------------------------------------------------------------- //--- GENERAL ---------------------------------------------------------------
#ifndef BASIC_SKINS
#include <wx/wx.h> #include <wx/wx.h>
#endif
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
#include <vlc/vlc.h> #include <vlc/vlc.h>
...@@ -41,7 +43,9 @@ ...@@ -41,7 +43,9 @@
#include "themeloader.h" #include "themeloader.h"
#include "vlcproc.h" #include "vlcproc.h"
#include "skin_common.h" #include "skin_common.h"
#ifndef BASIC_SKINS
#include "wxdialogs.h" #include "wxdialogs.h"
#endif
#ifdef X11_SKINS #ifdef X11_SKINS
#include <X11/Xlib.h> #include <X11/Xlib.h>
...@@ -97,11 +101,10 @@ static int Open ( vlc_object_t *p_this ) ...@@ -97,11 +101,10 @@ static int Open ( vlc_object_t *p_this )
// Set no new theme when opening file // Set no new theme when opening file
p_intf->p_sys->p_new_theme_file = NULL; p_intf->p_sys->p_new_theme_file = NULL;
// Initialize Win32 thread // Initialize info on playlist
p_intf->p_sys->i_index = -1; p_intf->p_sys->i_index = -1;
p_intf->p_sys->i_size = 0; p_intf->p_sys->i_size = 0;
p_intf->p_sys->i_close_status = VLC_NOTHING; p_intf->p_sys->i_close_status = VLC_NOTHING;
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
...@@ -148,9 +151,11 @@ static int Open ( vlc_object_t *p_this ) ...@@ -148,9 +151,11 @@ static int Open ( vlc_object_t *p_this )
#endif #endif
#ifndef BASIC_SKINS
// Initialize conditions and mutexes // Initialize conditions and mutexes
vlc_mutex_init( p_intf, &p_intf->p_sys->init_lock ); vlc_mutex_init( p_intf, &p_intf->p_sys->init_lock );
vlc_cond_init( p_intf, &p_intf->p_sys->init_cond ); vlc_cond_init( p_intf, &p_intf->p_sys->init_cond );
#endif
p_intf->p_sys->p_theme = (Theme *)new OSTheme( p_intf ); p_intf->p_sys->p_theme = (Theme *)new OSTheme( p_intf );
...@@ -181,9 +186,11 @@ static void Close ( vlc_object_t *p_this ) ...@@ -181,9 +186,11 @@ static void Close ( vlc_object_t *p_this )
// Unsuscribe to messages bank // Unsuscribe to messages bank
msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub ); msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
#ifndef BASIC_SKINS
// Destroy conditions and mutexes // Destroy conditions and mutexes
vlc_cond_destroy( &p_intf->p_sys->init_cond ); vlc_cond_destroy( &p_intf->p_sys->init_cond );
vlc_mutex_destroy( &p_intf->p_sys->init_lock ); vlc_mutex_destroy( &p_intf->p_sys->init_lock );
#endif
#ifdef WIN32 #ifdef WIN32
// Unload msimg32.dll and user32.dll // Unload msimg32.dll and user32.dll
...@@ -232,6 +239,9 @@ static void Run( intf_thread_t *p_intf ) ...@@ -232,6 +239,9 @@ static void Run( intf_thread_t *p_intf )
#endif #endif
{ {
// Last chance: the user can select a new theme file // Last chance: the user can select a new theme file
// FIXME: wxWindows isn't initialized yet !!!
#if 0
#ifndef BASIC_SKINS
wxFileDialog dialog( NULL, _("Open a skin file"), "", "", wxFileDialog dialog( NULL, _("Open a skin file"), "", "",
"Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|" "Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|"
"All files|*.*", wxOPEN ); "All files|*.*", wxOPEN );
...@@ -247,6 +257,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -247,6 +257,8 @@ static void Run( intf_thread_t *p_intf )
} }
} }
else else
#endif
#endif
{ {
delete Loader; delete Loader;
return; return;
...@@ -317,11 +329,13 @@ int SkinManage( intf_thread_t *p_intf ) ...@@ -317,11 +329,13 @@ int SkinManage( intf_thread_t *p_intf )
OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (long)false ); OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (long)false );
#ifndef BASIC_SKINS
// Update the log window // Update the log window
p_intf->p_sys->MessagesDlg->UpdateLog(); p_intf->p_sys->MessagesDlg->UpdateLog();
// Update the file info window // Update the file info window
p_intf->p_sys->InfoDlg->UpdateFileInfo(); p_intf->p_sys->InfoDlg->UpdateFileInfo();
#endif
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
if( p_intf->p_sys->p_input != NULL && !p_intf->p_sys->p_input->b_die ) if( p_intf->p_sys->p_input != NULL && !p_intf->p_sys->p_input->b_die )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.16 2003/04/25 12:37:52 gbazin Exp $ * $Id: vlcproc.cpp,v 1.17 2003/04/30 19:22:27 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
* USA. * USA.
*****************************************************************************/ *****************************************************************************/
#ifndef BASIC_SKINS
#include <wx/wx.h> #include <wx/wx.h>
#endif
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
#include <vlc/vlc.h> #include <vlc/vlc.h>
...@@ -45,8 +47,10 @@ extern "C" { ...@@ -45,8 +47,10 @@ extern "C" {
#include "window.h" #include "window.h"
#include "vlcproc.h" #include "vlcproc.h"
#include "skin_common.h" #include "skin_common.h"
#include "wxdialogs.h"
#ifndef BASIC_SKINS
#include "wxdialogs.h"
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -131,6 +135,7 @@ bool VlcProc::EventProc( Event *evt ) ...@@ -131,6 +135,7 @@ bool VlcProc::EventProc( Event *evt )
OpenFile( false ); OpenFile( false );
return true; return true;
#ifndef BASIC_SKINS
case VLC_LOG_SHOW: case VLC_LOG_SHOW:
p_intf->p_sys->MessagesDlg->Show( p_intf->p_sys->MessagesDlg->Show(
!p_intf->p_sys->MessagesDlg->IsShown() ); !p_intf->p_sys->MessagesDlg->IsShown() );
...@@ -148,6 +153,7 @@ bool VlcProc::EventProc( Event *evt ) ...@@ -148,6 +153,7 @@ bool VlcProc::EventProc( Event *evt )
p_intf->p_sys->InfoDlg->Show( p_intf->p_sys->InfoDlg->Show(
!p_intf->p_sys->InfoDlg->IsShown() ); !p_intf->p_sys->InfoDlg->IsShown() );
return true; return true;
#endif
case VLC_INTF_REFRESH: case VLC_INTF_REFRESH:
InterfaceRefresh( (bool)evt->GetParam2() ); InterfaceRefresh( (bool)evt->GetParam2() );
...@@ -328,6 +334,7 @@ void VlcProc::EnabledEvent( string type, bool state ) ...@@ -328,6 +334,7 @@ void VlcProc::EnabledEvent( string type, bool state )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void VlcProc::LoadSkin() void VlcProc::LoadSkin()
{ {
#ifndef BASIC_SKINS
if( p_intf->p_sys->p_new_theme_file == NULL ) if( p_intf->p_sys->p_new_theme_file == NULL )
{ {
wxFileDialog dialog( NULL, _("Open a skin file"), "", "", wxFileDialog dialog( NULL, _("Open a skin file"), "", "",
...@@ -382,10 +389,12 @@ void VlcProc::LoadSkin() ...@@ -382,10 +389,12 @@ void VlcProc::LoadSkin()
delete (char *)p_intf->p_sys->p_new_theme_file; delete (char *)p_intf->p_sys->p_new_theme_file;
p_intf->p_sys->p_new_theme_file = NULL; p_intf->p_sys->p_new_theme_file = NULL;
} }
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void VlcProc::OpenFile( bool play ) void VlcProc::OpenFile( bool play )
{ {
#ifndef BASIC_SKINS
if( p_intf->p_sys->OpenDlg->ShowModal() != wxID_OK ) if( p_intf->p_sys->OpenDlg->ShowModal() != wxID_OK )
{ {
return; return;
...@@ -419,6 +428,7 @@ void VlcProc::OpenFile( bool play ) ...@@ -419,6 +428,7 @@ void VlcProc::OpenFile( bool play )
p_intf->p_sys->p_theme->EvtBank->Get( "playlist_refresh" ) p_intf->p_sys->p_theme->EvtBank->Get( "playlist_refresh" )
->PostSynchroMessage(); ->PostSynchroMessage();
InterfaceRefresh(); InterfaceRefresh();
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void VlcProc::DropFile( unsigned int param ) void VlcProc::DropFile( unsigned int param )
...@@ -627,7 +637,6 @@ void VlcProc::AddNetworkChannelServer( char *server ) ...@@ -627,7 +637,6 @@ void VlcProc::AddNetworkChannelServer( char *server )
} }
delete[] name; delete[] name;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_run.cpp: * win32_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_run.cpp,v 1.12 2003/04/29 12:54:57 gbazin Exp $ * $Id: win32_run.cpp,v 1.13 2003/04/30 19:22:27 ipkiss Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
#ifdef WIN32 #ifdef WIN32
//--- GENERAL --------------------------------------------------------------- //--- GENERAL ---------------------------------------------------------------
#ifndef BASIC_SKINS
#include <wx/wx.h> #include <wx/wx.h>
#endif
#include <windows.h> #include <windows.h>
//--- VLC ------------------------------------------------------------------- //--- VLC -------------------------------------------------------------------
...@@ -43,10 +45,11 @@ ...@@ -43,10 +45,11 @@
#include "../os_theme.h" #include "../os_theme.h"
#include "../src/skin_common.h" #include "../src/skin_common.h"
#include "../src/vlcproc.h" #include "../src/vlcproc.h"
#include "../src/wxdialogs.h"
// include the icon graphic #ifndef BASIC_SKINS
#include "share/vlc32x32.xpm" #include "../src/wxdialogs.h"
#include "share/vlc32x32.xpm" // include the graphic icon
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Specific method // Specific method
...@@ -55,6 +58,7 @@ bool IsVLCEvent( unsigned int msg ); ...@@ -55,6 +58,7 @@ bool IsVLCEvent( unsigned int msg );
int SkinManage( intf_thread_t *p_intf ); int SkinManage( intf_thread_t *p_intf );
#ifndef BASIC_SKINS
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Local classes declarations. // Local classes declarations.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -190,6 +194,7 @@ void SkinsDialogsThread( intf_thread_t *p_intf ) ...@@ -190,6 +194,7 @@ void SkinsDialogsThread( intf_thread_t *p_intf )
return; return;
} }
#endif // WX_SKINS
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Refresh Timer Callback // Refresh Timer Callback
...@@ -215,6 +220,7 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -215,6 +220,7 @@ void OSRun( intf_thread_t *p_intf )
Event *ProcessEvent; Event *ProcessEvent;
int KeyModifier = 0; int KeyModifier = 0;
#ifndef BASIC_SKINS
// Create a new thread for wxWindows // Create a new thread for wxWindows
if( vlc_thread_create( p_intf, "Skins Dialogs Thread", SkinsDialogsThread, if( vlc_thread_create( p_intf, "Skins Dialogs Thread", SkinsDialogsThread,
0, 0 ) ) 0, 0 ) )
...@@ -226,6 +232,7 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -226,6 +232,7 @@ void OSRun( intf_thread_t *p_intf )
vlc_mutex_lock( &p_intf->p_sys->init_lock ); vlc_mutex_lock( &p_intf->p_sys->init_lock );
vlc_cond_wait( &p_intf->p_sys->init_cond, &p_intf->p_sys->init_lock ); vlc_cond_wait( &p_intf->p_sys->init_cond, &p_intf->p_sys->init_lock );
vlc_mutex_unlock( &p_intf->p_sys->init_lock ); vlc_mutex_unlock( &p_intf->p_sys->init_lock );
#endif
// Create refresh timer // Create refresh timer
SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200, SetTimer( ((OSTheme *)p_intf->p_sys->p_theme)->GetParentWindow(), 42, 200,
...@@ -340,8 +347,10 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -340,8 +347,10 @@ void OSRun( intf_thread_t *p_intf )
Proc->IsClosing(); Proc->IsClosing();
} }
#ifndef BASIC_SKINS
// Tell wxWindows it's time to exit // Tell wxWindows it's time to exit
p_intf->p_sys->b_wx_die = 1; p_intf->p_sys->b_wx_die = 1;
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool IsVLCEvent( unsigned int msg ) bool IsVLCEvent( unsigned int msg )
......
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