Commit 953d89a9 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wince: usual bunch of cleanup + updates.

parent 75543f3d
...@@ -108,7 +108,7 @@ TCHAR * szToolTips[] = ...@@ -108,7 +108,7 @@ TCHAR * szToolTips[] =
BOOL Interface::InitInstance( HINSTANCE hInstance, intf_thread_t *_p_intf ) BOOL Interface::InitInstance( HINSTANCE hInstance, intf_thread_t *_p_intf )
{ {
/* Initializations */ /* Initializations */
pIntf = _p_intf; p_intf = _p_intf;
hwndMain = hwndCB = hwndTB = hwndSlider = hwndLabel = hwndVol = hwndSB = 0; hwndMain = hwndCB = hwndTB = hwndSlider = hwndLabel = hwndVol = hwndSB = 0;
i_old_playing_status = PAUSE_S; i_old_playing_status = PAUSE_S;
...@@ -525,10 +525,10 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -525,10 +525,10 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
#endif #endif
/* Video window */ /* Video window */
if( config_GetInt( pIntf, "wince-embed" ) ) if( config_GetInt( p_intf, "wince-embed" ) )
video = CreateVideoWindow( pIntf, hwnd ); video = CreateVideoWindow( p_intf, hwnd );
ti = new Timer(pIntf, hwnd, this); ti = new Timer(p_intf, hwnd, this);
// Hide the SIP button (WINCE only) // Hide the SIP button (WINCE only)
SetForegroundWindow( hwnd ); SetForegroundWindow( hwnd );
...@@ -543,14 +543,14 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -543,14 +543,14 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break; break;
case ID_FILE_OPENFILE: case ID_FILE_OPENFILE:
open = new OpenDialog( pIntf, hInst, FILE_ACCESS, open = new OpenDialog( p_intf, hInst, FILE_ACCESS,
ID_FILE_OPENFILE, OPEN_NORMAL ); ID_FILE_OPENFILE, OPEN_NORMAL );
CreateDialogBox( hwnd, open ); CreateDialogBox( hwnd, open );
delete open; delete open;
break; break;
case ID_FILE_OPENNET: case ID_FILE_OPENNET:
open = new OpenDialog( pIntf, hInst, NET_ACCESS, ID_FILE_OPENNET, open = new OpenDialog( p_intf, hInst, NET_ACCESS, ID_FILE_OPENNET,
OPEN_NORMAL ); OPEN_NORMAL );
CreateDialogBox( hwnd, open ); CreateDialogBox( hwnd, open );
delete open; delete open;
...@@ -598,31 +598,31 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -598,31 +598,31 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break; break;
case ID_VIEW_STREAMINFO: case ID_VIEW_STREAMINFO:
fi = new FileInfo( pIntf, hInst ); fi = new FileInfo( p_intf, hInst );
CreateDialogBox( hwnd, fi ); CreateDialogBox( hwnd, fi );
delete fi; delete fi;
break; break;
case ID_VIEW_MESSAGES: case ID_VIEW_MESSAGES:
hmsg = new Messages( pIntf, hInst ); hmsg = new Messages( p_intf, hInst );
CreateDialogBox( hwnd, hmsg ); CreateDialogBox( hwnd, hmsg );
delete hmsg; delete hmsg;
break; break;
case ID_VIEW_PLAYLIST: case ID_VIEW_PLAYLIST:
pl = new Playlist( pIntf, hInst ); pl = new Playlist( p_intf, hInst );
CreateDialogBox( hwnd, pl ); CreateDialogBox( hwnd, pl );
delete pl; delete pl;
break; break;
case ID_SETTINGS_PREF: case ID_SETTINGS_PREF:
pref = new PrefsDialog( pIntf, hInst ); pref = new PrefsDialog( p_intf, hInst );
CreateDialogBox( hwnd, pref ); CreateDialogBox( hwnd, pref );
delete pref; delete pref;
break; break;
default: default:
OnMenuEvent( pIntf, GET_WM_COMMAND_ID(wp,lp) ); OnMenuEvent( p_intf, GET_WM_COMMAND_ID(wp,lp) );
// we should test if it is a menu command // we should test if it is a menu command
} }
break; break;
...@@ -652,16 +652,16 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -652,16 +652,16 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break; break;
case WM_INITMENUPOPUP: case WM_INITMENUPOPUP:
RefreshSettingsMenu( pIntf, RefreshSettingsMenu( p_intf,
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0, (HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_SETTINGS ) ); (LPARAM)IDM_SETTINGS ) );
RefreshAudioMenu( pIntf, RefreshAudioMenu( p_intf,
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0, (HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_AUDIO ) ); (LPARAM)IDM_AUDIO ) );
RefreshVideoMenu( pIntf, RefreshVideoMenu( p_intf,
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0, (HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_VIDEO ) ); (LPARAM)IDM_VIDEO ) );
RefreshNavigMenu( pIntf, RefreshNavigMenu( p_intf,
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0, (HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_NAVIGATION ) ); (LPARAM)IDM_NAVIGATION ) );
...@@ -669,7 +669,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -669,7 +669,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
// Undo the video display because menu is opened // Undo the video display because menu is opened
// due to GAPI, menu top display is not assumed // due to GAPI, menu top display is not assumed
// FIXME verify if p_child_window exits // FIXME verify if p_child_window exits
SendMessage( pIntf->p_sys->p_video_window->p_child_window, SendMessage( p_intf->p_sys->p_video_window->p_child_window,
WM_INITMENUPOPUP, wp, lp ); WM_INITMENUPOPUP, wp, lp );
#endif #endif
...@@ -683,7 +683,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, ...@@ -683,7 +683,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
// Redo the video display because menu can be closed // Redo the video display because menu can be closed
// FIXME verify if p_child_window exits // FIXME verify if p_child_window exits
if( (((NMHDR *)lp)->code) == NM_CUSTOMDRAW ) if( (((NMHDR *)lp)->code) == NM_CUSTOMDRAW )
SendMessage( pIntf->p_sys->p_video_window->p_child_window, SendMessage( p_intf->p_sys->p_video_window->p_child_window,
WM_NOTIFY, wp, lp ); WM_NOTIFY, wp, lp );
return lResult; return lResult;
#endif #endif
...@@ -713,7 +713,7 @@ void Interface::OnOpenFileSimple( void ) ...@@ -713,7 +713,7 @@ void Interface::OnOpenFileSimple( void )
static TCHAR szFilter[] = _T("All (*.*)\0*.*\0"); static TCHAR szFilter[] = _T("All (*.*)\0*.*\0");
playlist_t *p_playlist = (playlist_t *) playlist_t *p_playlist = (playlist_t *)
vlc_object_find( pIntf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
memset( &ofn, 0, sizeof(OPENFILENAME) ); memset( &ofn, 0, sizeof(OPENFILENAME) );
...@@ -740,7 +740,7 @@ void Interface::OnOpenFileSimple( void ) ...@@ -740,7 +740,7 @@ void Interface::OnOpenFileSimple( void )
SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON ); SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
if( GetOpenFileName( (LPOPENFILENAME)&ofn ) ) if( GetOpenFile( &ofn ) )
{ {
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,
...@@ -753,7 +753,7 @@ void Interface::OnOpenFileSimple( void ) ...@@ -753,7 +753,7 @@ void Interface::OnOpenFileSimple( void )
void Interface::OnPlayStream( void ) void Interface::OnPlayStream( void )
{ {
playlist_t *p_playlist = (playlist_t *) playlist_t *p_playlist = (playlist_t *)
vlc_object_find( pIntf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
if( p_playlist->i_size && p_playlist->i_enabled ) if( p_playlist->i_size && p_playlist->i_enabled )
...@@ -761,7 +761,7 @@ void Interface::OnPlayStream( void ) ...@@ -761,7 +761,7 @@ void Interface::OnPlayStream( void )
vlc_value_t state; vlc_value_t state;
input_thread_t *p_input = (input_thread_t *) input_thread_t *p_input = (input_thread_t *)
vlc_object_find( pIntf, VLC_OBJECT_INPUT, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input == NULL ) if( p_input == NULL )
{ {
...@@ -833,7 +833,7 @@ void Interface::OnVideoOnTop( void ) ...@@ -833,7 +833,7 @@ void Interface::OnVideoOnTop( void )
vlc_value_t val; vlc_value_t val;
vout_thread_t *p_vout = (vout_thread_t *) vout_thread_t *p_vout = (vout_thread_t *)
vlc_object_find( pIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
if( p_vout == NULL ) return; if( p_vout == NULL ) return;
...@@ -848,26 +848,26 @@ void Interface::OnVideoOnTop( void ) ...@@ -848,26 +848,26 @@ void Interface::OnVideoOnTop( void )
void Interface::OnSliderUpdate( int wp ) void Interface::OnSliderUpdate( int wp )
{ {
vlc_mutex_lock( &pIntf->change_lock ); vlc_mutex_lock( &p_intf->change_lock );
input_thread_t *p_input = pIntf->p_sys->p_input; input_thread_t *p_input = p_intf->p_sys->p_input;
int dwPos = SendMessage( hwndSlider, TBM_GETPOS, 0, 0 ); int dwPos = SendMessage( hwndSlider, TBM_GETPOS, 0, 0 );
if( (int)LOWORD(wp) == SB_THUMBPOSITION || if( (int)LOWORD(wp) == SB_THUMBPOSITION ||
(int)LOWORD(wp) == SB_ENDSCROLL ) (int)LOWORD(wp) == SB_ENDSCROLL )
{ {
if( pIntf->p_sys->i_slider_pos != dwPos && p_input ) if( p_intf->p_sys->i_slider_pos != dwPos && p_input )
{ {
vlc_value_t pos; vlc_value_t pos;
pos.f_float = (float)dwPos / (float)SLIDER_MAX_POS; pos.f_float = (float)dwPos / (float)SLIDER_MAX_POS;
var_Set( p_input, "position", pos ); var_Set( p_input, "position", pos );
} }
pIntf->p_sys->b_slider_free = VLC_TRUE; p_intf->p_sys->b_slider_free = VLC_TRUE;
} }
else else
{ {
pIntf->p_sys->b_slider_free = VLC_FALSE; p_intf->p_sys->b_slider_free = VLC_FALSE;
if( p_input ) if( p_input )
{ {
...@@ -886,7 +886,7 @@ void Interface::OnSliderUpdate( int wp ) ...@@ -886,7 +886,7 @@ void Interface::OnSliderUpdate( int wp )
} }
} }
vlc_mutex_unlock( &pIntf->change_lock ); vlc_mutex_unlock( &p_intf->change_lock );
} }
void Interface::OnChange( int wp ) void Interface::OnChange( int wp )
...@@ -901,7 +901,7 @@ void Interface::OnChange( int wp ) ...@@ -901,7 +901,7 @@ void Interface::OnChange( int wp )
void Interface::Change( int i_volume ) void Interface::Change( int i_volume )
{ {
aout_VolumeSet( pIntf, i_volume * AOUT_VOLUME_MAX / 200 / 2 ); aout_VolumeSet( p_intf, i_volume * AOUT_VOLUME_MAX / 200 / 2 );
#if 0 #if 0
SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"), SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
i_volume ) ); i_volume ) );
...@@ -911,7 +911,7 @@ void Interface::Change( int i_volume ) ...@@ -911,7 +911,7 @@ void Interface::Change( int i_volume )
void Interface::OnStopStream( void ) void Interface::OnStopStream( void )
{ {
playlist_t * p_playlist = (playlist_t *) playlist_t * p_playlist = (playlist_t *)
vlc_object_find( pIntf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
...@@ -922,7 +922,7 @@ void Interface::OnStopStream( void ) ...@@ -922,7 +922,7 @@ void Interface::OnStopStream( void )
void Interface::OnPrevStream( void ) void Interface::OnPrevStream( void )
{ {
playlist_t * p_playlist = (playlist_t *) playlist_t * p_playlist = (playlist_t *)
vlc_object_find( pIntf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
playlist_Prev( p_playlist ); playlist_Prev( p_playlist );
...@@ -932,7 +932,7 @@ void Interface::OnPrevStream( void ) ...@@ -932,7 +932,7 @@ void Interface::OnPrevStream( void )
void Interface::OnNextStream( void ) void Interface::OnNextStream( void )
{ {
playlist_t * p_playlist = (playlist_t *) playlist_t * p_playlist = (playlist_t *)
vlc_object_find( pIntf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
playlist_Next( p_playlist ); playlist_Next( p_playlist );
...@@ -942,7 +942,7 @@ void Interface::OnNextStream( void ) ...@@ -942,7 +942,7 @@ void Interface::OnNextStream( void )
void Interface::OnSlowStream( void ) void Interface::OnSlowStream( void )
{ {
input_thread_t *p_input = (input_thread_t *) input_thread_t *p_input = (input_thread_t *)
vlc_object_find( pIntf, VLC_OBJECT_INPUT, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input == NULL ) return; if( p_input == NULL ) return;
...@@ -954,7 +954,7 @@ void Interface::OnSlowStream( void ) ...@@ -954,7 +954,7 @@ void Interface::OnSlowStream( void )
void Interface::OnFastStream( void ) void Interface::OnFastStream( void )
{ {
input_thread_t *p_input = (input_thread_t *) input_thread_t *p_input = (input_thread_t *)
vlc_object_find( pIntf, VLC_OBJECT_INPUT, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input == NULL ) return; if( p_input == NULL ) return;
......
...@@ -691,7 +691,7 @@ void OpenDialog::OnFileBrowse() ...@@ -691,7 +691,7 @@ void OpenDialog::OnFileBrowse()
ofn.lCustData = 0L; ofn.lCustData = 0L;
ofn.lpfnHook = NULL; ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL; ofn.lpTemplateName = NULL;
if( GetOpenFileName((LPOPENFILENAME) &ofn) ) if( GetOpenFile( &ofn ) )
{ {
if( _tcschr( ofn.lpstrFile, _T(' ') ) ) if( _tcschr( ofn.lpstrFile, _T(' ') ) )
{ {
......
...@@ -279,7 +279,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -279,7 +279,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
BUTTONWIDTH, BUTTONHEIGHT, BUTTONWIDTH, BUTTONHEIGHT,
IMAGEWIDTH, IMAGEHEIGHT, sizeof(TBBUTTON) ); IMAGEWIDTH, IMAGEHEIGHT, sizeof(TBBUTTON) );
if( !hwndTB ) break; if( !hwndTB ) break;
// Add ToolTips to the toolbar. // Add ToolTips to the toolbar.
SendMessage( hwndTB, TB_SETTOOLTIPS, (WPARAM) NUMIMAGES, SendMessage( hwndTB, TB_SETTOOLTIPS, (WPARAM) NUMIMAGES,
(LPARAM)szToolTips2 ); (LPARAM)szToolTips2 );
...@@ -735,7 +735,7 @@ void Playlist::OnOpen() ...@@ -735,7 +735,7 @@ void Playlist::OnOpen()
ofn.lpfnHook = NULL; ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL; ofn.lpTemplateName = NULL;
if( GetOpenFileName((LPOPENFILENAME)&ofn) ) if( GetOpenFile( &ofn ) )
{ {
playlist_Import( p_playlist, _TOMB(ofn.lpstrFile) ); playlist_Import( p_playlist, _TOMB(ofn.lpstrFile) );
} }
...@@ -826,13 +826,9 @@ void Playlist::OnAddFile( vlc_bool_t b_directory ) ...@@ -826,13 +826,9 @@ void Playlist::OnAddFile( vlc_bool_t b_directory )
ofn.lpfnHook = NULL; ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL; ofn.lpTemplateName = NULL;
#if 0//def UNDER_CE
if( b_directory ) ofn.Flags |= OFN_PROJECT;
#endif
SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON ); SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
if( GetOpenFileName( (LPOPENFILENAME)&ofn ) ) if( GetOpenFile( &ofn ) )
{ {
playlist_t *p_playlist = (playlist_t *) playlist_t *p_playlist = (playlist_t *)
vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
......
...@@ -305,7 +305,7 @@ void SubsFileDialog::OnFileBrowse() ...@@ -305,7 +305,7 @@ void SubsFileDialog::OnFileBrowse()
ofn.lCustData = 0L; ofn.lCustData = 0L;
ofn.lpfnHook = NULL; ofn.lpfnHook = NULL;
ofn.lpTemplateName = NULL; ofn.lpTemplateName = NULL;
if( GetOpenFileName((LPOPENFILENAME) &ofn) ) if( GetOpenFile( &ofn ) )
{ {
SetWindowText( file_combo, ofn.lpstrFile ); SetWindowText( file_combo, ofn.lpstrFile );
ComboBox_AddString( file_combo, ofn.lpstrFile ); ComboBox_AddString( file_combo, ofn.lpstrFile );
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#include "wince.h" #include "wince.h"
#include <commctrl.h>
#include <commdlg.h>
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
...@@ -112,6 +115,18 @@ static int Open( vlc_object_t *p_this ) ...@@ -112,6 +115,18 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->b_slider_free = 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_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
p_intf->p_sys->GetOpenFile = 0;
p_intf->p_sys->h_gsgetfile_dll = LoadLibrary( _T("gsgetfile") );
if( p_intf->p_sys->h_gsgetfile_dll )
{
p_intf->p_sys->GetOpenFile = (BOOL (WINAPI *)(void *))
GetProcAddress( p_intf->p_sys->h_gsgetfile_dll,
_T("gsGetOpenFileName") );
}
if( !p_intf->p_sys->GetOpenFile )
p_intf->p_sys->GetOpenFile = (BOOL (WINAPI *)(void *))GetOpenFileName;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -130,6 +145,9 @@ static void Close( vlc_object_t *p_this ) ...@@ -130,6 +145,9 @@ 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 );
if( p_intf->p_sys->h_gsgetfile_dll )
FreeLibrary( p_intf->p_sys->h_gsgetfile_dll );
// Destroy structure // Destroy structure
free( p_intf->p_sys ); free( p_intf->p_sys );
} }
......
...@@ -82,8 +82,14 @@ struct intf_sys_t ...@@ -82,8 +82,14 @@ struct intf_sys_t
vector<MenuItemExt*> *p_settings_menu; vector<MenuItemExt*> *p_settings_menu;
VideoWindow *p_video_window; VideoWindow *p_video_window;
/* GetOpenFileName replacement */
BOOL (WINAPI *GetOpenFile)(void *);
HMODULE h_gsgetfile_dll;
}; };
#define GetOpenFile(a) p_intf->p_sys->GetOpenFile(a)
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
...@@ -91,21 +97,23 @@ struct intf_sys_t ...@@ -91,21 +97,23 @@ struct intf_sys_t
class CBaseWindow class CBaseWindow
{ {
public: public:
CBaseWindow(){ hInst = 0; } CBaseWindow(){ hInst = 0; }
virtual ~CBaseWindow() {}; virtual ~CBaseWindow() {};
HWND hWnd; // The main window handle HWND hWnd; // The main window handle
static LRESULT CALLBACK BaseWndProc( HWND, UINT, WPARAM, LPARAM ); static LRESULT CALLBACK BaseWndProc( HWND, UINT, WPARAM, LPARAM );
static int CreateDialogBox( HWND, CBaseWindow * ); static int CreateDialogBox( HWND, CBaseWindow * );
protected: protected:
HINSTANCE hInst; // The current instance HINSTANCE hInst; // The current instance
HWND hwndCB; // The command bar handle HWND hwndCB; // The command bar handle
HINSTANCE GetInstance () const { return hInst; } HINSTANCE GetInstance () const { return hInst; }
virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) {}; virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) { return 0; };
intf_thread_t *p_intf;
}; };
class FileInfo; class FileInfo;
...@@ -125,7 +133,7 @@ public: ...@@ -125,7 +133,7 @@ public:
Interface(){} Interface(){}
~Interface(){} ~Interface(){}
BOOL InitInstance( HINSTANCE hInstance, intf_thread_t *_pIntf ); BOOL InitInstance( HINSTANCE, intf_thread_t * );
void TogglePlayButton( int i_playing_status ); void TogglePlayButton( int i_playing_status );
...@@ -165,8 +173,6 @@ protected: ...@@ -165,8 +173,6 @@ protected:
void OnSlowStream( void ); void OnSlowStream( void );
void OnFastStream( void ); void OnFastStream( void );
intf_thread_t *pIntf;
int i_old_playing_status; int i_old_playing_status;
}; };
...@@ -182,7 +188,6 @@ protected: ...@@ -182,7 +188,6 @@ protected:
HWND hwnd_fileinfo; // handle to fileinfo window HWND hwnd_fileinfo; // handle to fileinfo window
HWND hwndTV; // handle to tree-view control HWND hwndTV; // handle to tree-view control
intf_thread_t *p_intf;
TCHAR szFileInfoClassName[100]; // Main window class name TCHAR szFileInfoClassName[100]; // Main window class name
TCHAR szFileInfoTitle[100]; // Main window name TCHAR szFileInfoTitle[100]; // Main window name
...@@ -202,8 +207,6 @@ public: ...@@ -202,8 +207,6 @@ public:
protected: protected:
intf_thread_t *p_intf;
virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ); virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
HWND hListView; HWND hListView;
...@@ -261,8 +264,6 @@ public: ...@@ -261,8 +264,6 @@ public:
protected: protected:
intf_thread_t *p_intf;
virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ); virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM );
HWND mrl_box; HWND mrl_box;
...@@ -328,8 +329,6 @@ public: ...@@ -328,8 +329,6 @@ public:
protected: protected:
friend class OpenDialog; friend class OpenDialog;
intf_thread_t *p_intf;
HWND file_box; HWND file_box;
HWND file_combo; HWND file_combo;
HWND browse_button; HWND browse_button;
...@@ -368,7 +367,6 @@ protected: ...@@ -368,7 +367,6 @@ protected:
int i_title_sorted; int i_title_sorted;
int i_author_sorted; int i_author_sorted;
intf_thread_t *p_intf;
HWND hwndCB; // Handle to the command bar (contains menu) HWND hwndCB; // Handle to the command bar (contains menu)
HWND hwndTB; // Handle to the toolbar. HWND hwndTB; // Handle to the toolbar.
HWND hListView; HWND hListView;
...@@ -480,8 +478,6 @@ public: ...@@ -480,8 +478,6 @@ public:
protected: protected:
intf_thread_t *p_intf;
/* Event handlers (these functions should _not_ be virtual) */ /* Event handlers (these functions should _not_ be virtual) */
void OnOk( void ); void OnOk( void );
/*void OnCancel( UINT event ); /*void OnCancel( UINT event );
......
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