/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include <vlc/vout.h>
-#include <vlc/intf.h>
+#include <vlc_aout.h>
+#include <vlc_vout.h>
+#include <vlc_interface.h>
#include "wince.h"
#include <commctrl.h>
#include <commdlg.h>
-#define NUMIMAGES 9 // Number of buttons in the toolbar
-#define IMAGEWIDTH 17 // Width of the buttons in the toolbar
-#define IMAGEHEIGHT 16 // Height of the buttons in the toolbar
+#define NUMIMAGES 9 // Number of buttons in the toolbar
+#define IMAGEWIDTH 17 // Width of the buttons in the toolbar
+#define IMAGEHEIGHT 16 // Height of the buttons in the toolbar
#define BUTTONWIDTH 0 // Width of the button images in the toolbar
#define BUTTONHEIGHT 0 // Height of the button images in the toolbar
#define ID_TOOLBAR 2000 // Identifier of the main tool bar
#define HELP_FAST _T("Play faster")
// The TBBUTTON structure contains information the toolbar buttons.
-static TBBUTTON tbButton[] =
+static TBBUTTON tbButton[] =
{
{0, ID_FILE_QUICKOPEN, TBSTATE_ENABLED, TBSTYLE_BUTTON},
{1, ID_FILE_OPENNET, TBSTATE_ENABLED, TBSTYLE_BUTTON},
};
// Toolbar ToolTips
-TCHAR * szToolTips[] =
+TCHAR * szToolTips[] =
{
HELP_SIMPLE, HELP_NET, HELP_STOP, HELP_PLAY, HELP_PLO, HELP_PLP,
HELP_PLN, HELP_SLOW, HELP_FAST
}
/***********************************************************************
-FUNCTION:
+FUNCTION:
CreateMenuBar
-PURPOSE:
+PURPOSE:
Creates a menu bar.
***********************************************************************/
HWND Interface::CreateMenuBar( HWND hwnd, HINSTANCE hInst )
}
/***********************************************************************
-FUNCTION:
+FUNCTION:
CreateToolBar
-PURPOSE:
+PURPOSE:
Registers the TOOLBAR control class and creates a toolbar.
***********************************************************************/
HWND CreateToolBar( HWND hwnd, HINSTANCE hInst )
BUTTONWIDTH, BUTTONHEIGHT, IMAGEWIDTH, IMAGEHEIGHT, sizeof(TBBUTTON) );
if( !hwndTB ) return NULL;
-
+
// Add ToolTips to the toolbar.
- SendMessage( hwndTB, TB_SETTOOLTIPS, (WPARAM)NUMIMAGES,
+ SendMessage( hwndTB, TB_SETTOOLTIPS, (WPARAM)NUMIMAGES,
(LPARAM)szToolTips );
// Reposition the toolbar.
GetClientRect( hwnd, &rect );
GetWindowRect( hwndTB, &rectTB );
- MoveWindow( hwndTB, rect.left, rect.bottom - rect.top - 2*MENU_HEIGHT,
+ MoveWindow( hwndTB, rect.left, rect.bottom - rect.top - 2*MENU_HEIGHT,
rect.right - rect.left, MENU_HEIGHT, TRUE );
return hwndTB;
/***********************************************************************
-FUNCTION:
+FUNCTION:
CreateSliderBar
-PURPOSE:
+PURPOSE:
Registers the TRACKBAR_CLASS control class and creates a trackbar.
***********************************************************************/
// Reposition the trackbar
GetClientRect( hwnd, &rect );
- MoveWindow( hwndSlider, rect.left,
- rect.bottom - rect.top - 2*(MENU_HEIGHT-1) - SLIDER_HEIGHT,
+ MoveWindow( hwndSlider, rect.left,
+ rect.bottom - rect.top - 2*(MENU_HEIGHT-1) - SLIDER_HEIGHT,
rect.right - rect.left - 40, 30, TRUE );
ShowWindow( hwndSlider, SW_HIDE );
/***********************************************************************
-FUNCTION:
+FUNCTION:
CreateVolTrackBar
-PURPOSE:
+PURPOSE:
Registers the TRACKBAR_CLASS control class and creates a trackbar.
***********************************************************************/
SendMessage( hwndVol, TBM_SETRANGEMIN, 1, 0 );
SendMessage( hwndVol, TBM_SETRANGEMAX, 1, 200 );
SendMessage( hwndVol, TBM_SETPOS, 1, 100 );
- SendMessage( hwndVol, TBM_SETTICFREQ, 50, 0 );
+ SendMessage( hwndVol, TBM_SETTICFREQ, 50, 0 );
// Reposition the trackbar
GetClientRect( hwnd, &rect );
- MoveWindow( hwndVol, rect.right - rect.left - 40,
- rect.bottom - rect.top - 2*(MENU_HEIGHT-1) - SLIDER_HEIGHT,
+ MoveWindow( hwndVol, rect.right - rect.left - 40,
+ rect.bottom - rect.top - 2*(MENU_HEIGHT-1) - SLIDER_HEIGHT,
40, SLIDER_HEIGHT, TRUE );
ShowWindow( hwndVol, SW_HIDE );
/***********************************************************************
-FUNCTION:
+FUNCTION:
CreateStatusBar
-PURPOSE:
+PURPOSE:
Registers the StatusBar control class and creates a Statusbar.
***********************************************************************/
if (!hwndSB ) return NULL;
- // Get the coordinates of the parent window's client area.
+ // Get the coordinates of the parent window's client area.
GetClientRect( hwnd, &rect );
// allocate memory for the panes of status bar
}
/***********************************************************************
-FUNCTION:
+FUNCTION:
WndProc
-PURPOSE:
+PURPOSE:
Processes messages sent to the main window.
***********************************************************************/
LRESULT Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
case WM_COMMAND:
switch( GET_WM_COMMAND_ID(wp,lp) )
{
- case ID_FILE_QUICKOPEN:
- case ID_FILE_OPENFILE:
+ case ID_FILE_QUICKOPEN:
+ case ID_FILE_OPENFILE:
case ID_FILE_OPENDIR:
case ID_FILE_OPENNET:
case ID_VIEW_STREAMINFO:
case SlowStream_Event: OnSlowStream(); break;
case FastStream_Event: OnFastStream(); break;
- case ID_FILE_ABOUT:
+ case ID_FILE_ABOUT:
{
string about = (string)"VLC media player " PACKAGE_VERSION +
_("\n(WinCE interface)\n\n") +
// we should test if it is a menu command
}
break;
-
+
case WM_TIMER:
timer->Notify();
break;
- case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLORSTATIC:
if( ( (HWND)lp == hwndSlider ) || ( (HWND)lp == hwndVol ) )
- {
- return( (LRESULT)::GetSysColorBrush(COLOR_3DFACE) );
+ {
+ return( (LRESULT)::GetSysColorBrush(COLOR_3DFACE) );
}
if( (HWND)lp == hwndLabel )
{
- SetBkColor( (HDC)wp, RGB (192, 192, 192) );
- return( (LRESULT)::GetSysColorBrush(COLOR_3DFACE) );
+ SetBkColor( (HDC)wp, RGB (192, 192, 192) );
+ return( (LRESULT)::GetSysColorBrush(COLOR_3DFACE) );
}
break;
break;
case WM_SETFOCUS:
- SHSipPreference( hwnd, SIP_DOWN );
+ SHSipPreference( hwnd, SIP_DOWN );
SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
case WM_EXITMENULOOP:
if( video && video->hWnd )
vlc_mutex_lock( &p_intf->change_lock );
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 ||
(int)LOWORD(wp) == SB_ENDSCROLL )