* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.5 2002/11/23 14:28:51 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.16 2003/06/05 21:22:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* 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
#include <string.h> /* strerror() */
#include <stdio.h>
-#include <wx/wxprec.h>
-#include <wx/wx.h>
-
-/* Let vlc take care of the i18n stuff */
-#undef _
+#include <vlc/vlc.h>
#ifdef WIN32 /* mingw32 hack */
#undef Yield
#undef CreateDialog
#endif
-#include <vlc/vlc.h>
+/* Let vlc take care of the i18n stuff */
+#define WXINTL_NO_GETTEXT_MACRO
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+
#include <vlc/intf.h>
#include "wxwindows.h"
+/* Temporary hack */
+#ifdef __DARWIN__
+int wxEntry( int argc, char *argv[] , bool enterLoop = TRUE );
+#endif
+
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- add_category_hint( N_("wxWindows"), NULL );
set_description( (char *) _("wxWindows interface module") );
set_capability( "interface", 50 );
set_callbacks( Open, Close );
+ add_shortcut( "wxwindows" );
+ add_shortcut( "wxwin" );
+ add_shortcut( "wx" );
set_program( "wxvlc" );
vlc_module_end();
/* Initialize wxWindows thread */
p_intf->p_sys->b_playing = 0;
- p_intf->p_sys->b_popup_changed = 0;
- p_intf->p_sys->b_window_changed = 0;
- p_intf->p_sys->b_playlist_changed = 0;
p_intf->p_sys->p_input = NULL;
p_intf->p_sys->i_playing = -1;
p_intf->p_sys->b_slider_free = 1;
p_intf->p_sys->i_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
- p_intf->p_sys->i_part = -1;
+ p_intf->p_sys->p_popup_menu = NULL;
+ p_intf->p_sys->b_popup_change = VLC_FALSE;
return VLC_SUCCESS;
}
/*****************************************************************************
* Run: wxWindows thread
*****************************************************************************/
+#if !defined(__BUILTIN__) && defined( WIN32 )
+HINSTANCE hInstance = 0;
+extern "C" BOOL WINAPI
+DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
+{
+ hInstance = (HINSTANCE)hModule;
+ return TRUE;
+}
+#endif
+
static void Run( intf_thread_t *p_intf )
{
+#if !defined( WIN32 )
static char *p_args[] = { "" };
+#endif
/* Hack to pass the p_intf pointer to the new wxWindow Instance object */
wxTheApp = new Instance( p_intf );
#if defined( WIN32 )
+#if !defined(__BUILTIN__)
+ wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW, TRUE );
+#else
wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW, TRUE );
+#endif
#else
wxEntry( 1, p_args );
#endif
/* Create the playlist window */
p_intf->p_sys->p_playlist_window = new Playlist( p_intf, MainInterface );
+ /* Create the log window */
+ p_intf->p_sys->p_messages_window = new Messages( p_intf, MainInterface );
+
+ /* Create the fileinfo window */
+ p_intf->p_sys->p_fileinfo_window = new FileInfo ( p_intf, MainInterface );
+
/* Show the interface */
- MainInterface->Show(TRUE);
+ MainInterface->Show( TRUE );
- SetTopWindow(MainInterface);
+ SetTopWindow( MainInterface );
/* Start timer */
new Timer( p_intf, MainInterface );