* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2004 VideoLAN
- * $Id: wxwindows.cpp,v 1.38 2004/01/25 03:29:02 hartman Exp $
+ * $Id$
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <string.h> /* strerror() */
#include <stdio.h>
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
-
#include "wxwindows.h"
/* Temporary hack */
/*****************************************************************************
* Module descriptor
*****************************************************************************/
+#define EMBED_TEXT N_("Embed video in interface")
+#define EMBED_LONGTEXT N_("Embed the video window inside the interface. The "\
+ "default behaviour is to have video windows separate from the interface.")
+#define BOOKMARKS_TEXT N_("Show bookmarks dialog")
+#define BOOKMARKS_LONGTEXT N_("Show bookmarks dialog when the interface " \
+ "starts.")
+
vlc_module_begin();
#ifdef WIN32
int i_score = 150;
add_shortcut( "wx" );
set_program( "wxvlc" );
+ add_bool( "wxwin-embed", 0, NULL,
+ EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
+ add_bool( "wxwin-bookmarks", 0, NULL,
+ BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
+
add_submodule();
set_description( _("wxWindows dialogs provider") );
set_capability( "dialogs provider", 50 );
p_intf->p_sys->i_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
p_intf->p_sys->p_popup_menu = NULL;
+ p_intf->p_sys->p_video_window = NULL;
p_intf->pf_show_dialog = NULL;
+ /* We support play on start */
+ p_intf->b_play = VLC_TRUE;
+
return VLC_SUCCESS;
}
/* Creates the dialogs provider */
p_intf->p_sys->p_wxwindow =
- new DialogsProvider( p_intf, p_intf->pf_show_dialog ?
- NULL : p_intf->p_sys->p_wxwindow );
+ CreateDialogsProvider( p_intf, p_intf->pf_show_dialog ?
+ NULL : p_intf->p_sys->p_wxwindow );
p_intf->p_sys->pf_show_dialog = ShowDialog;
/* OK, initialization is over */
vlc_thread_ready( p_intf );
+ /* Check if we need to start playing */
+ if( p_intf->b_play )
+ {
+ playlist_t *p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist )
+ {
+ playlist_Play( p_playlist );
+ vlc_object_release( p_playlist );
+ }
+ }
+
/* Return TRUE to tell program to continue (FALSE would terminate) */
return TRUE;
}