Commit cc516205 authored by Geoffroy Couprie's avatar Geoffroy Couprie

WinCE: update the interface module

parent 90d15c42
...@@ -23,6 +23,7 @@ SOURCES_wince = \ ...@@ -23,6 +23,7 @@ SOURCES_wince = \
$(NULL) $(NULL)
EXTRA_DIST += \ EXTRA_DIST += \
wince_rc.rc \
bitmaps/vlc16x16.ico \ bitmaps/vlc16x16.ico \
bitmaps/toolbar1.bmp \ bitmaps/toolbar1.bmp \
bitmaps/toolbar2.bmp \ bitmaps/toolbar2.bmp \
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_aout.h> #include <vlc_aout.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
...@@ -330,7 +331,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg ) ...@@ -330,7 +331,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
{ {
OPENFILENAME ofn; OPENFILENAME ofn;
TCHAR szFile[MAX_PATH] = _T("\0"); TCHAR szFile[MAX_PATH] = _T("\0");
static TCHAR szFilter[] = _T("All (*.*)\0*.*\0"); static TCHAR szFilter[] = _T("wav (*.wav)\0*.wav\0mp3 (*.mp3 *.mpga)\0*.mp3;*.mpga\0All (*.*)\0*.*\0");
playlist_t *p_playlist = pl_Yield( p_intf ); playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
...@@ -363,7 +364,8 @@ void DialogsProvider::OnOpenFileSimple( int i_arg ) ...@@ -363,7 +364,8 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
{ {
char *psz_filename = _TOMB(ofn.lpstrFile); char *psz_filename = _TOMB(ofn.lpstrFile);
playlist_Add( p_playlist, psz_filename, psz_filename, playlist_Add( p_playlist, psz_filename, psz_filename,
PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END ); PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END,
TRUE, FALSE );
} }
pl_Release( p_intf ); pl_Release( p_intf );
...@@ -423,7 +425,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg ) ...@@ -423,7 +425,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
char *psz_filename = _TOMB(psz_result); char *psz_filename = _TOMB(psz_result);
playlist_Add( p_playlist, psz_filename, psz_filename, playlist_Add( p_playlist, psz_filename, psz_filename,
PLAYLIST_APPEND | (i_arg ? PLAYLIST_GO : 0), PLAYLIST_APPEND | (i_arg ? PLAYLIST_GO : 0),
PLAYLIST_END ); PLAYLIST_END, TRUE, FALSE );
} }
p_malloc->Free( pidl ); p_malloc->Free( pidl );
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_input.h>
#include "wince.h" #include "wince.h"
...@@ -119,8 +120,10 @@ void FileInfo::UpdateFileInfo() ...@@ -119,8 +120,10 @@ void FileInfo::UpdateFileInfo()
tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
// Set the text of the item. // Set the text of the item. Not right, but I don't know yet how to handle this
tvi.pszText = _FROMMB( p_input->input.p_item->psz_name ); //tvi.pszText = _FROMMB( p_input->input.p_item->psz_name ); <- old line
input_item_t * inp_item = input_item_GetById( p_input, 1 );
tvi.pszText = _FROMMB( input_item_GetName( inp_item ) );
tvi.cchTextMax = _tcslen( tvi.pszText ); tvi.cchTextMax = _tcslen( tvi.pszText );
// Save the heading level in the item's application-defined data area // Save the heading level in the item's application-defined data area
...@@ -135,13 +138,13 @@ void FileInfo::UpdateFileInfo() ...@@ -135,13 +138,13 @@ void FileInfo::UpdateFileInfo()
hPrevRootItem = hPrev; hPrevRootItem = hPrev;
vlc_mutex_lock( &p_input->input.p_item->lock ); vlc_mutex_lock( &inp_item->lock );
for( int i = 0; i < p_input->input.p_item->i_categories; i++ ) for( int i = 0; i < inp_item->i_categories; i++ )
{ {
info_category_t *p_cat = p_input->input.p_item->pp_categories[i]; info_category_t *p_cat = inp_item->pp_categories[i];
// Set the text of the item. // Set the text of the item.
tvi.pszText = _FROMMB( p_input->input.p_item->psz_name ); tvi.pszText = _FROMMB( inp_item->psz_name );
tvi.cchTextMax = _tcslen( tvi.pszText ); tvi.cchTextMax = _tcslen( tvi.pszText );
// Save the heading level in the item's application-defined data area // Save the heading level in the item's application-defined data area
...@@ -176,7 +179,7 @@ void FileInfo::UpdateFileInfo() ...@@ -176,7 +179,7 @@ void FileInfo::UpdateFileInfo()
TreeView_Expand( hwndTV, hPrevLev2Item, TVE_EXPANDPARTIAL|TVE_EXPAND ); TreeView_Expand( hwndTV, hPrevLev2Item, TVE_EXPANDPARTIAL|TVE_EXPAND );
} }
vlc_mutex_unlock( &p_input->input.p_item->lock ); vlc_mutex_unlock( &inp_item->lock );
TreeView_Expand( hwndTV, hPrevRootItem, TVE_EXPANDPARTIAL|TVE_EXPAND ); TreeView_Expand( hwndTV, hPrevRootItem, TVE_EXPANDPARTIAL|TVE_EXPAND );
......
...@@ -37,8 +37,11 @@ ...@@ -37,8 +37,11 @@
#include <vlc_aout.h> #include <vlc_aout.h>
#include <vlc_vout.h> #include <vlc_vout.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_input.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
#define INT64_C(val) val##LL
#include <windowsx.h> #include <windowsx.h>
#include <commctrl.h> #include <commctrl.h>
...@@ -501,7 +504,7 @@ LRESULT Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -501,7 +504,7 @@ LRESULT Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
{ {
string about = (string)"VLC media player " PACKAGE_VERSION + string about = (string)"VLC media player " PACKAGE_VERSION +
_("\n(WinCE interface)\n\n") + _("\n(WinCE interface)\n\n") +
_("(c) 1996-2006 - the VideoLAN Team\n\n") + _("(c) 1996-2008 - the VideoLAN Team\n\n") +
_("Compiled by ") + VLC_CompileBy() + "@" + _("Compiled by ") + VLC_CompileBy() + "@" +
VLC_CompileHost() + "." + VLC_CompileDomain() + ".\n" + VLC_CompileHost() + "." + VLC_CompileDomain() + ".\n" +
_("Compiler: ") + VLC_Compiler() + ".\n" + _("Compiler: ") + VLC_Compiler() + ".\n" +
...@@ -640,7 +643,7 @@ void Interface::OnPlayStream( void ) ...@@ -640,7 +643,7 @@ void Interface::OnPlayStream( void )
playlist_t *p_playlist = pl_Yield( p_intf ); playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
if( p_playlist->i_size ) if( !playlist_IsEmpty(p_playlist) )
{ {
vlc_value_t state; vlc_value_t state;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
...@@ -71,6 +72,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -71,6 +72,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
SHMENUBARINFO mbi; SHMENUBARINFO mbi;
INITCOMMONCONTROLSEX iccex; INITCOMMONCONTROLSEX iccex;
RECT rcClient; RECT rcClient;
char *psz_uri;
switch( msg ) switch( msg )
{ {
...@@ -104,7 +106,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -104,7 +106,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
WS_CHILD | WS_VISIBLE | SS_RIGHT, WS_CHILD | WS_VISIBLE | SS_RIGHT,
0, 10, 60, 15, hwnd, NULL, hInst, NULL); 0, 10, 60, 15, hwnd, NULL, hInst, NULL);
char *psz_uri = input_item_GetURI( &p_item->input ); psz_uri = input_item_GetURI( p_item->p_input );
uri_text = CreateWindow( _T("EDIT"), _FROMMB(psz_uri), uri_text = CreateWindow( _T("EDIT"), _FROMMB(psz_uri),
WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT | ES_AUTOHSCROLL, WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT | ES_AUTOHSCROLL,
70, 10 - 3, rcClient.right - 70 - 10, 15 + 6, hwnd, 0, hInst, 0 ); 70, 10 - 3, rcClient.right - 70 - 10, 15 + 6, hwnd, 0, hInst, 0 );
...@@ -117,7 +119,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -117,7 +119,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
hwnd, NULL, hInst, NULL); hwnd, NULL, hInst, NULL);
name_text = CreateWindow( _T("EDIT"), name_text = CreateWindow( _T("EDIT"),
_FROMMB(p_item->input.psz_name), _FROMMB(p_item->p_input->psz_name),
WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT | ES_AUTOHSCROLL, WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT | ES_AUTOHSCROLL,
70, 10 + 15 + 10 - 3, rcClient.right - 70 - 10, 15 + 6, 70, 10 + 15 + 10 - 3, rcClient.right - 70 - 10, 15 + 6,
hwnd, NULL, hInst, NULL); hwnd, NULL, hInst, NULL);
...@@ -134,7 +136,8 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -134,7 +136,8 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
hwnd, NULL, hInst, NULL ); hwnd, NULL, hInst, NULL );
SendMessage( enabled_checkbox, BM_SETCHECK, SendMessage( enabled_checkbox, BM_SETCHECK,
p_item->b_enabled ? BST_CHECKED : BST_UNCHECKED, 0 ); (p_item->i_flags & PLAYLIST_DBL_FLAG) ?
BST_UNCHECKED : BST_CHECKED, 0 );
/* Treeview */ /* Treeview */
iccex.dwSize = sizeof( INITCOMMONCONTROLSEX ); iccex.dwSize = sizeof( INITCOMMONCONTROLSEX );
...@@ -190,7 +193,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -190,7 +193,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
// Set the text of the item. // Set the text of the item.
tvi.pszText = _FROMMB(p_item->input.psz_name); tvi.pszText = _FROMMB(p_item->p_input->psz_name);
tvi.cchTextMax = _tcslen(tvi.pszText); tvi.cchTextMax = _tcslen(tvi.pszText);
// Save the heading level in the item's application-defined data area // Save the heading level in the item's application-defined data area
...@@ -204,13 +207,13 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -204,13 +207,13 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
hPrevRootItem = hPrev; hPrevRootItem = hPrev;
/* Rebuild the tree */ /* Rebuild the tree */
vlc_mutex_lock( &p_item->input.lock ); vlc_mutex_lock( &p_item->p_input->lock );
for( int i = 0; i < p_item->input.i_categories; i++ ) for( int i = 0; i < p_item->p_input->i_categories; i++ )
{ {
info_category_t *p_cat = p_item->input.pp_categories[i]; info_category_t *p_cat = p_item->p_input->pp_categories[i];
// Set the text of the item. // Set the text of the item.
tvi.pszText = _FROMMB( p_item->input.psz_name ); tvi.pszText = _FROMMB( p_item->p_input->psz_name );
tvi.cchTextMax = _tcslen( tvi.pszText ); tvi.cchTextMax = _tcslen( tvi.pszText );
// Save the heading level in the item's application-defined data area // Save the heading level in the item's application-defined data area
...@@ -246,7 +249,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -246,7 +249,7 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
TreeView_Expand( info_tree, hPrevLev2Item, TreeView_Expand( info_tree, hPrevLev2Item,
TVE_EXPANDPARTIAL |TVE_EXPAND ); TVE_EXPANDPARTIAL |TVE_EXPAND );
} }
vlc_mutex_unlock( &p_item->input.lock ); vlc_mutex_unlock( &p_item->p_input->lock );
TreeView_Expand( info_tree, hPrevRootItem, TVE_EXPANDPARTIAL |TVE_EXPAND ); TreeView_Expand( info_tree, hPrevRootItem, TVE_EXPANDPARTIAL |TVE_EXPAND );
} }
...@@ -260,14 +263,14 @@ void ItemInfoDialog::OnOk() ...@@ -260,14 +263,14 @@ void ItemInfoDialog::OnOk()
TCHAR psz_name[MAX_PATH]; TCHAR psz_name[MAX_PATH];
Edit_GetText( name_text, psz_name, MAX_PATH ); Edit_GetText( name_text, psz_name, MAX_PATH );
input_item_SetName( &p_item->input, _TOMB( psz_name ) ); input_item_SetName( p_item->p_input, _TOMB( psz_name ) );
TCHAR psz_uri[MAX_PATH]; TCHAR psz_uri[MAX_PATH];
Edit_GetText( uri_text, psz_uri, MAX_PATH ); Edit_GetText( uri_text, psz_uri, MAX_PATH );
input_item_SetURI( &p_item->input, _TOMB(psz_uri) ); input_item_SetURI( p_item->p_input, _TOMB(psz_uri) );
vlc_mutex_lock( &p_item->input.lock ); vlc_mutex_lock( &p_item->p_input->lock );
bool b_old_enabled = p_item->b_enabled; bool b_old_enabled = !(p_item->i_flags & PLAYLIST_DBL_FLAG);
playlist_t * p_playlist = pl_Yield( p_intf ); playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist != NULL ) if( p_playlist != NULL )
...@@ -276,7 +279,7 @@ void ItemInfoDialog::OnOk() ...@@ -276,7 +279,7 @@ void ItemInfoDialog::OnOk()
pl_Release( p_intf ); pl_Release( p_intf );
} }
p_item->b_enabled = (b_state & BST_CHECKED) ? true : false ; p_item->i_flags |= (b_state & BST_CHECKED) ? false : PLAYLIST_DBL_FLAG ;
vlc_mutex_unlock( &p_item->input.lock ); vlc_mutex_unlock( &p_item->p_input->lock );
} }
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
...@@ -222,7 +223,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -222,7 +223,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
else else
{ {
playlist_t * p_playlist = pl_Yield( p_intf ); playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist && p_playlist->i_size ) if( p_playlist && !playlist_IsEmpty( p_playlist ) )
{ {
AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") ); AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") );
AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") ); AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") );
......
...@@ -206,17 +206,20 @@ void Messages::UpdateLog() ...@@ -206,17 +206,20 @@ void Messages::UpdateLog()
for( i_start = p_sub->i_start; i_start != i_stop; for( i_start = p_sub->i_start; i_start != i_stop;
i_start = (i_start+1) % VLC_MSG_QSIZE ) i_start = (i_start+1) % VLC_MSG_QSIZE )
{ {
vlc_value_t val;
var_Get( p_intf->p_libvlc, "verbose", &val );
switch( p_sub->p_msg[i_start].i_type ) switch( p_sub->p_msg[i_start].i_type )
{ {
case VLC_MSG_ERR: case VLC_MSG_ERR:
case VLC_MSG_INFO: case VLC_MSG_INFO:
if( p_intf->p_libvlc_global->i_verbose < 0 ) continue; if( val.i_int < 0 ) continue;
break; break;
case VLC_MSG_WARN: case VLC_MSG_WARN:
if( p_intf->p_libvlc_global->i_verbose < 1 ) continue; if( val.i_int < 1 ) continue;
break; break;
case VLC_MSG_DBG: case VLC_MSG_DBG:
if( p_intf->p_libvlc_global->i_verbose < 2 ) continue; if( val.i_int < 2 ) continue;
break; break;
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
...@@ -601,32 +602,32 @@ void OpenDialog::OnOk() ...@@ -601,32 +602,32 @@ void OpenDialog::OnOk()
GetWindowText( mrl_combo, psz_text, 2048 ); GetWindowText( mrl_combo, psz_text, 2048 );
int i_args; int i_args;
char **pp_args = vlc_parse_cmdline( _TOMB(psz_text), &i_args ); /*char **pp_args = vlc_parse_cmdline( _TOMB(psz_text), &i_args );
ComboBox_AddString( mrl_combo, psz_text ); ComboBox_AddString( mrl_combo, psz_text );
if( ComboBox_GetCount( mrl_combo ) > 10 ) if( ComboBox_GetCount( mrl_combo ) > 10 )
ComboBox_DeleteString( mrl_combo, 0 ); ComboBox_DeleteString( mrl_combo, 0 );
ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 ); ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );*/
/* Update the playlist */ /* Update the playlist */
playlist_t *p_playlist = pl_Yield( p_intf ); playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
for( int i = 0; i < i_args; i++ ) /* for( int i = 0; i < i_args; i++ )
{ {
bool b_start = !i && i_open_arg; bool b_start = !i && i_open_arg;
playlist_item_t *p_item = playlist_item_t *p_item =
playlist_ItemNew( p_playlist, pp_args[i], pp_args[i] ); playlist_ItemNew( p_playlist, pp_args[i], pp_args[i] );
/* Insert options */ /* Insert options */
while( i + 1 < i_args && pp_args[i + 1][0] == ':' ) /* while( i + 1 < i_args && pp_args[i + 1][0] == ':' )
{ {
playlist_ItemAddOption( p_item, pp_args[i + 1] ); playlist_ItemAddOption( p_item, pp_args[i + 1] );
i++; i++;
} }*/
/* Get the options from the subtitles dialog */ /* Get the options from the subtitles dialog */
if( (SendMessage( subsfile_checkbox, BM_GETCHECK, 0, 0 ) & BST_CHECKED) /* if( (SendMessage( subsfile_checkbox, BM_GETCHECK, 0, 0 ) & BST_CHECKED)
&& subsfile_mrl.size() ) && subsfile_mrl.size() )
{ {
for( int j = 0; j < (int)subsfile_mrl.size(); j++ ) for( int j = 0; j < (int)subsfile_mrl.size(); j++ )
...@@ -654,7 +655,7 @@ void OpenDialog::OnOk() ...@@ -654,7 +655,7 @@ void OpenDialog::OnOk()
{ {
free( pp_args[i_args] ); free( pp_args[i_args] );
if( !i_args ) free( pp_args ); if( !i_args ) free( pp_args );
} }*/
pl_Release( p_intf ); pl_Release( p_intf );
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -193,7 +193,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this, ...@@ -193,7 +193,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this,
alt = CreateWindow( _T("BUTTON"), _T("Alt"), alt = CreateWindow( _T("BUTTON"), _T("Alt"),
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
20, *py_pos, 15, 15, parent, NULL, hInst, NULL ); 20, *py_pos, 15, 15, parent, NULL, hInst, NULL );
Button_SetCheck( alt, p_item->i_value & KEY_MODIFIER_ALT ? BST_CHECKED : Button_SetCheck( alt, p_item->i_type & KEY_MODIFIER_ALT ? BST_CHECKED :
BST_UNCHECKED ); BST_UNCHECKED );
alt_label = CreateWindow( _T("STATIC"), _T("Alt"), alt_label = CreateWindow( _T("STATIC"), _T("Alt"),
...@@ -204,7 +204,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this, ...@@ -204,7 +204,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this,
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
20 + 15 + 5 + 30 + 5, *py_pos, 15, 15, 20 + 15 + 5 + 30 + 5, *py_pos, 15, 15,
parent, NULL, hInst, NULL ); parent, NULL, hInst, NULL );
Button_SetCheck( ctrl, p_item->i_value & KEY_MODIFIER_CTRL ? BST_CHECKED : Button_SetCheck( ctrl, p_item->i_type & KEY_MODIFIER_CTRL ? BST_CHECKED :
BST_UNCHECKED ); BST_UNCHECKED );
ctrl_label = CreateWindow( _T("STATIC"), _T("Ctrl"), ctrl_label = CreateWindow( _T("STATIC"), _T("Ctrl"),
...@@ -216,7 +216,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this, ...@@ -216,7 +216,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this,
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
20 + 15 + 5 + 2*(30 + 5) + 15 + 5, *py_pos, 15, 15, 20 + 15 + 5 + 2*(30 + 5) + 15 + 5, *py_pos, 15, 15,
parent, NULL, hInst, NULL ); parent, NULL, hInst, NULL );
Button_SetCheck( shift, p_item->i_value & KEY_MODIFIER_SHIFT ? Button_SetCheck( shift, p_item->i_type & KEY_MODIFIER_SHIFT ?
BST_CHECKED : BST_UNCHECKED ); BST_CHECKED : BST_UNCHECKED );
shift_label = CreateWindow( _T("STATIC"), _T("Shift"), shift_label = CreateWindow( _T("STATIC"), _T("Shift"),
...@@ -238,7 +238,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this, ...@@ -238,7 +238,7 @@ KeyConfigControl::KeyConfigControl( vlc_object_t *p_this,
ComboBox_AddString( combo, _FROMMB(m_keysList[i].c_str()) ); ComboBox_AddString( combo, _FROMMB(m_keysList[i].c_str()) );
ComboBox_SetItemData( combo, i, (void*)vlc_keys[i].i_key_code ); ComboBox_SetItemData( combo, i, (void*)vlc_keys[i].i_key_code );
if( (unsigned int)vlc_keys[i].i_key_code == if( (unsigned int)vlc_keys[i].i_key_code ==
( ((unsigned int)p_item->i_value) & ~KEY_MODIFIER ) ) ( ((unsigned int)p_item->i_type) & ~KEY_MODIFIER ) )
{ {
ComboBox_SetCurSel( combo, i ); ComboBox_SetCurSel( combo, i );
ComboBox_SetText( combo, _FROMMB(m_keysList[i].c_str()) ); ComboBox_SetText( combo, _FROMMB(m_keysList[i].c_str()) );
...@@ -315,13 +315,13 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this, ...@@ -315,13 +315,13 @@ ModuleConfigControl::ModuleConfigControl( vlc_object_t *p_this,
{ {
p_parser = (module_t *)p_list->p_values[i_index].p_object ; p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability, p_item->psz_type ) ) if( module_IsCapable( p_parser, p_item->psz_type ) )
{ {
ComboBox_AddString( combo, _FROMMB(p_parser->psz_longname) ); ComboBox_AddString( combo, _FROMMB(module_GetLongName( p_parser ) ));
ComboBox_SetItemData( combo, i_index, ComboBox_SetItemData( combo, i_index,
(void*)p_parser->psz_object_name ); (void *) module_GetObjName( p_parser ) );
if( p_item->psz_value && !strcmp(p_item->psz_value, if( p_item->value.psz && !strcmp( p_item->value.psz,
p_parser->psz_object_name) ) module_GetObjName( p_parser )) )
{ {
ComboBox_SetCurSel( combo, i_index ); ComboBox_SetCurSel( combo, i_index );
//ComboBox_SetText( combo, _FROMMB(p_parser->psz_longname) ); //ComboBox_SetText( combo, _FROMMB(p_parser->psz_longname) );
...@@ -360,8 +360,8 @@ StringConfigControl::StringConfigControl( vlc_object_t *p_this, ...@@ -360,8 +360,8 @@ StringConfigControl::StringConfigControl( vlc_object_t *p_this,
*py_pos += 15 + 10; *py_pos += 15 + 10;
textctrl = CreateWindow( _T("EDIT"), p_item->psz_value ? textctrl = CreateWindow( _T("EDIT"), p_item->psz_type ?
_FROMMB(p_item->psz_value) : _T(""), _FROMMB(p_item->psz_type) : _T(""),
WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | SS_LEFT |
ES_AUTOHSCROLL, 20, *py_pos - 3, 180, 15 + 3, ES_AUTOHSCROLL, 20, *py_pos - 3, 180, 15 + 3,
parent, NULL, hInst, NULL ); parent, NULL, hInst, NULL );
...@@ -733,7 +733,7 @@ FloatConfigControl::FloatConfigControl( vlc_object_t *p_this, ...@@ -733,7 +733,7 @@ FloatConfigControl::FloatConfigControl( vlc_object_t *p_this,
*py_pos += 15 + 10; *py_pos += 15 + 10;
TCHAR psz_string[100]; TCHAR psz_string[100];
_stprintf( psz_string, _T("%f"), p_item->f_value ); _stprintf( psz_string, _T("%d"), p_item->i_type );
textctrl = CreateWindow( _T("EDIT"), psz_string, textctrl = CreateWindow( _T("EDIT"), psz_string,
WS_CHILD | WS_VISIBLE | WS_BORDER | SS_RIGHT | ES_AUTOHSCROLL, WS_CHILD | WS_VISIBLE | WS_BORDER | SS_RIGHT | ES_AUTOHSCROLL,
20, *py_pos - 3, 70, 15 + 3, parent, NULL, hInst, NULL ); 20, *py_pos - 3, 70, 15 + 3, parent, NULL, hInst, NULL );
...@@ -776,7 +776,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *p_this, ...@@ -776,7 +776,7 @@ BoolConfigControl::BoolConfigControl( vlc_object_t *p_this,
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
5, *py_pos, 15, 15, 5, *py_pos, 15, 15,
parent, NULL, hInst, NULL ); parent, NULL, hInst, NULL );
Button_SetCheck( checkbox, p_item->i_value ? BST_CHECKED : BST_UNCHECKED ); Button_SetCheck( checkbox, config_GetInt(p_this, p_item->psz_name) ? BST_CHECKED : BST_UNCHECKED );
checkbox_label = CreateWindow( _T("STATIC"), _FROMMB(p_item->psz_text), checkbox_label = CreateWindow( _T("STATIC"), _FROMMB(p_item->psz_text),
WS_CHILD | WS_VISIBLE | SS_LEFT, WS_CHILD | WS_VISIBLE | SS_LEFT,
......
...@@ -139,7 +139,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -139,7 +139,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
hwnd, NULL, hInst, NULL ); hwnd, NULL, hInst, NULL );
encoding_combo = CreateWindow( _T("COMBOBOX"), encoding_combo = CreateWindow( _T("COMBOBOX"),
_FROMMB(p_item->psz_value), _FROMMB(p_item->value.psz),
WS_CHILD | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST |
LBS_SORT | WS_VSCROLL, LBS_SORT | WS_VSCROLL,
rcClient.right - 150 - 10, 10 + 5*(15 + 10) - 3, 150, 5*15 + 6, rcClient.right - 150 - 10, 10 + 5*(15 + 10) - 3, 150, 5*15 + 6,
...@@ -152,15 +152,15 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -152,15 +152,15 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
ComboBox_AddString( encoding_combo, ComboBox_AddString( encoding_combo,
_FROMMB(p_item->ppsz_list[i_index]) ); _FROMMB(p_item->ppsz_list[i_index]) );
if( p_item->psz_value && if( p_item->value.psz &&
!strcmp( p_item->psz_value, p_item->ppsz_list[i_index] ) ) !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
ComboBox_SetCurSel( encoding_combo, i_index ); ComboBox_SetCurSel( encoding_combo, i_index );
} }
if( p_item->psz_value ) if( p_item->value.psz )
{ {
ComboBox_SelectString( encoding_combo, 0, ComboBox_SelectString( encoding_combo, 0,
_FROMMB(p_item->psz_value) ); _FROMMB(p_item->value.psz) );
} }
} }
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_aout.h> #include <vlc_aout.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_input.h>
#include <vlc_playlist.h>
#include "wince.h" #include "wince.h"
...@@ -105,9 +107,10 @@ void Timer::Notify( void ) ...@@ -105,9 +107,10 @@ void Timer::Notify( void )
ShowWindow( p_main_interface->hwndVol, SW_SHOW ); ShowWindow( p_main_interface->hwndVol, SW_SHOW );
// only for local file, check if works well with net url // only for local file, check if works well with net url
shortname = strrchr( p_intf->p_sys->p_input->input.p_item->psz_name, '\\' ); input_item_t *p_item =input_GetItem(p_intf->p_sys->p_input);
shortname = strrchr( input_item_GetURL(p_item), '\\' );
if (! shortname) if (! shortname)
shortname = p_intf->p_sys->p_input->input.p_item->psz_name; shortname = input_item_GetURL(p_item);
else shortname++; else shortname++;
SendMessage( p_main_interface->hwndSB, SB_SETTEXT, SendMessage( p_main_interface->hwndSB, SB_SETTEXT,
......
...@@ -100,9 +100,10 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, HWND _p_parent ) ...@@ -100,9 +100,10 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, HWND _p_parent )
p_vout = NULL; p_vout = NULL;
p_intf->pf_request_window = ::GetWindow; // Changeset 138da19...
p_intf->pf_release_window = ::ReleaseWindow; //p_intf->pf_request_window = ::GetWindow;
p_intf->pf_control_window = ::ControlWindow; //p_intf->pf_release_window = ::ReleaseWindow;
//p_intf->pf_control_window = ::ControlWindow;
p_intf->p_sys->p_video_window = this; p_intf->p_sys->p_video_window = this;
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_interface.h> #include <vlc_interface.h>
#include <vlc_input.h>
#if defined( UNDER_CE ) && defined(__MINGW32__) #if defined( UNDER_CE ) && defined(__MINGW32__)
/* This is a gross hack for the wince gcc cross-compiler */ /* This is a gross hack for the wince gcc cross-compiler */
...@@ -51,7 +52,7 @@ static void Run ( intf_thread_t * ); ...@@ -51,7 +52,7 @@ static void Run ( intf_thread_t * );
static int OpenDialogs( vlc_object_t * ); static int OpenDialogs( vlc_object_t * );
static void* MainLoop ( intf_thread_t * ); static void* MainLoop ( vlc_object_t * );
static void ShowDialog( intf_thread_t *, int, int, intf_dialog_args_t * ); static void ShowDialog( intf_thread_t *, int, int, intf_dialog_args_t * );
/***************************************************************************** /*****************************************************************************
...@@ -62,11 +63,14 @@ static void ShowDialog( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -62,11 +63,14 @@ static void ShowDialog( intf_thread_t *, int, int, intf_dialog_args_t * );
"of having it in a separate window.") "of having it in a separate window.")
vlc_module_begin(); vlc_module_begin();
set_shortname( "WinCE" );
set_description( (char *) _("WinCE interface module") ); set_description( (char *) _("WinCE interface module") );
set_capability( "interface", 100 ); set_capability( "interface", 100 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
add_shortcut( "wince" ); add_shortcut( "wince" );
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_MAIN );
add_bool( "wince-embed", 1, NULL, add_bool( "wince-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, false ); EMBED_TEXT, EMBED_LONGTEXT, false );
...@@ -152,10 +156,11 @@ static int OpenDialogs( vlc_object_t *p_this ) ...@@ -152,10 +156,11 @@ static int OpenDialogs( vlc_object_t *p_this )
static void Close( vlc_object_t *p_this ) static void Close( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t *)p_this; intf_thread_t *p_intf = (intf_thread_t *)p_this;
intf_sys_t *p_sys = p_intf->p_sys;
if( p_intf->p_sys->p_input ) if( p_sys->p_input )
{ {
vlc_object_release( p_intf->p_sys->p_input ); vlc_object_release( p_sys->p_input );
} }
MenuItemExt::ClearList( p_intf->p_sys->p_video_menu ); MenuItemExt::ClearList( p_intf->p_sys->p_video_menu );
...@@ -194,10 +199,10 @@ static void Run( intf_thread_t *p_intf ) ...@@ -194,10 +199,10 @@ static void Run( intf_thread_t *p_intf )
/* The module is used in dialog provider mode */ /* The module is used in dialog provider mode */
/* Create a new thread for the dialogs provider */ /* Create a new thread for the dialogs provider */
if( vlc_thread_create( p_intf, "Skins Dialogs Thread", if( vlc_thread_create( p_intf, "WinCE Dialogs Thread",
MainLoop, 0, true ) ) MainLoop, 0, true ) )
{ {
msg_Err( p_intf, "cannot create Skins Dialogs Thread" ); msg_Err( p_intf, "cannot create WinCE Dialogs Thread" );
p_intf->pf_show_dialog = NULL; p_intf->pf_show_dialog = NULL;
} }
} }
...@@ -205,7 +210,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -205,7 +210,7 @@ static void Run( intf_thread_t *p_intf )
{ {
int canc = vlc_savecancel(); int canc = vlc_savecancel();
/* The module is used in interface mode */ /* The module is used in interface mode */
MainLoop( p_intf ); MainLoop( VLC_OBJECT(p_intf) );
vlc_restorecancel( canc ); vlc_restorecancel( canc );
} }
} }
......
...@@ -134,7 +134,7 @@ END ...@@ -134,7 +134,7 @@ END
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
#ifdef __MINGW32__ #ifdef UNDER_CE
IDI_ICON1 ICON DISCARDABLE "bitmaps/vlc16x16.ico" IDI_ICON1 ICON DISCARDABLE "bitmaps/vlc16x16.ico"
#else #else
IDI_ICON1 ICON DISCARDABLE "bitmaps\\vlc16x16.ico" IDI_ICON1 ICON DISCARDABLE "bitmaps\\vlc16x16.ico"
...@@ -143,9 +143,9 @@ IDI_ICON1 ICON DISCARDABLE "bitmaps\\vlc16x16.ico" ...@@ -143,9 +143,9 @@ IDI_ICON1 ICON DISCARDABLE "bitmaps\\vlc16x16.ico"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Bitmap // Bitmap
// //
#ifdef __MINGW32__ #ifdef UNDER_CE
IDB_BITMAP1 BITMAP DISCARDABLE "bitmaps/toolbar1.bmp" IDB_BITMAP1 BITMAP DISCARDABLE "bitmaps/toolbar1.bmp"
IDB_BITMAP2 BITMAP DISCARDABLE "bitmaps/toolbar2.bmp" IDB_BITMAP2 BITMAP DISCARDABLE "bitmaps/toolbar2.bmp"
IDB_BITMAP3 BITMAP DISCARDABLE "bitmaps/toolbar3.bmp" IDB_BITMAP3 BITMAP DISCARDABLE "bitmaps/toolbar3.bmp"
......
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