* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.41 2003/06/22 17:52:12 gbazin Exp $
+ * $Id: skin_main.cpp,v 1.45 2003/07/17 17:30:40 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
#include <vlc/intf.h>
#include <vlc/aout.h>
-//--- GENERAL ---------------------------------------------------------------
-#if !defined(MODULE_NAME_IS_basic_skins)
-#ifdef WIN32 /* mingw32 hack */
-# undef Yield
-# undef CreateDialog
-#endif
-/* Let vlc take care of the i18n stuff */
-#define WXINTL_NO_GETTEXT_MACRO
-#include <wx/wx.h>
-#endif
-
//--- SKIN ------------------------------------------------------------------
#include "../os_api.h"
#include "event.h"
#include "skin_common.h"
#include "dialogs.h"
-#if !defined(MODULE_NAME_IS_basic_skins)
-#include "../../wxwindows/wxwindows.h"
-#endif
-
#ifdef X11_SKINS
#include <X11/Xlib.h>
#include <Imlib2.h>
};
p_intf->pf_run = Run;
+ p_intf->p_sys->pf_showdialog = Dialogs::ShowDialog;
// Suscribe to messages bank
p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-#ifdef GTK2_SKINS
- // Initialize GDK
- int i_args = 3;
- char *p_args[] = { "", "", "--sync", NULL };
- char **pp_args = p_args;
-
- gdk_init( &i_args, &pp_args );
-
-#elif defined X11_SKINS
+#if defined X11_SKINS
// Initialize X11
Display *display = XOpenDisplay( NULL );
p_intf->p_sys->display = display;
int a = OSAPI_GetTime();
-#if !defined(MODULE_NAME_IS_basic_skins)
// Initialize the dialog boxes
p_intf->p_sys->p_dialogs = new Dialogs( p_intf );
- if( !p_intf->p_sys->p_dialogs ||
- !p_intf->p_sys->p_dialogs->OpenDlg ) return;
-#endif
+ if( !p_intf->p_sys->p_dialogs ) return;
// Load a theme
char *skin_last = config_GetPsz( p_intf, "skin_last" );
if( !Loader->Load( user_skin ) && !Loader->Load( default_skin ) )
{
#endif
+#if 0
#if !defined(MODULE_NAME_IS_basic_skins)
wxMutexGuiEnter();
wxFileDialog dialog( NULL,
wxMutexGuiLeave();
}
else
+#endif
#endif
{
delete Loader;
+#if 0
#if !defined(MODULE_NAME_IS_basic_skins)
wxMutexGuiLeave();
+#endif
#endif
return;
}
msg_Dbg( p_intf, "Load theme time : %i ms", OSAPI_GetTime() - a );
- // Refresh the whole interface
OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (int)true );
OSRun( p_intf );
-#if !defined(MODULE_NAME_IS_basic_skins)
// clean up the dialog boxes
delete p_intf->p_sys->p_dialogs;
-#endif
}
//---------------------------------------------------------------------------
p_intf->p_sys->p_input = NULL;
}
- OSAPI_PostMessage( NULL, VLC_INTF_REFRESH, 0, (long)false );
-
-#if !defined(MODULE_NAME_IS_basic_skins) //FIXME
- // Update the log window
- p_intf->p_sys->p_dialogs->MessagesDlg->UpdateLog();
-
- // Update the file info window
- p_intf->p_sys->p_dialogs->FileInfoDlg->UpdateFileInfo();
-#endif
-
//-------------------------------------------------------------------------
if( p_intf->p_sys->p_input != NULL && !p_intf->p_sys->p_input->b_die )
{
p_intf->p_sys->p_theme->EvtBank->Get( "volume_refresh" ),
(long)( volume * SLIDER_RANGE / AOUT_VOLUME_MAX ) );
-
// Refresh slider
// if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
if( p_input->stream.b_seekable )