/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
-#include "wince.h"
-
/*****************************************************************************
* Constructor.
*****************************************************************************/
#include <vlc/vout.h>
#include <vlc/intf.h>
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h> // common dialogs -> fileopen.lib ?
-#include "wince.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
MessageBox(hwnd, L"SHCreateMenuBar Failed", L"Error", MB_OK);
//return -1;
}
-
+
hwndCB = mbi.hwndMB;
// Creates the toolbar
hwndSB = CreateStatusbar( hwnd );
/* Video window */
- video = CreateVideoWindow( pIntf, hInst, hwnd );
+ if( config_GetInt( pIntf, "wince-embed" ) )
+ video = CreateVideoWindow( pIntf, hInst, hwnd );
ti = new Timer(pIntf, hwnd, this);
break;
case WM_INITMENUPOPUP:
- msg_Err( pIntf, "WM_INITMENUPOPUP" );
RefreshSettingsMenu( pIntf,
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_SETTINGS ) );
(HMENU)SendMessage( hwndCB, SHCMBM_GETSUBMENU, (WPARAM)0,
(LPARAM)IDM_NAVIGATION ) );
- msg_Err( pIntf, "WM_MEND" );
#if 0
// Undo the video display because menu is opened
// due to GAPI, menu top display is not assumed
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <stdlib.h> /* malloc(), free() */
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
-#include "wince.h"
-
/*****************************************************************************
* Event Table.
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strerror() */
#include <stdio.h>
-
-#include <string>
-#include <stdio.h>
-using namespace std;
-
#include <vlc/vlc.h>
#include <vlc/intf.h>
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
-#include "wince.h"
-
#ifndef NMAXFILE
#define NMAXFILE 512 // at least 256
#endif
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <stdlib.h> /* malloc(), free() */
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
-#include "wince.h"
-
/*****************************************************************************
* Event Table.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
+#include <commctrl.h>
#include <commdlg.h>
-#include <newmenu.h>
-
#ifndef NMAXFILE
#define NMAXFILE 512 // at least 256
#endif
#define LONG2POINT(l, pt) ((pt).x = (SHORT)LOWORD(l), (pt).y = (SHORT)HIWORD(l))
-#include "wince.h"
-
-#include <aygshell.h>
-
#define NUMIMAGES 11 // Number of buttons in the toolbar
#define IMAGEWIDTH 16 // Width of the buttons in the toolbar
#define IMAGEHEIGHT 16 // Height of the buttons in the toolbar
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
#include <vlc_config_cat.h>
-#include "wince.h"
#include "preferences_widgets.h"
#define GENERAL_ID 1242
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strerror() */
#include <stdio.h>
-#include <string>
-using namespace std;
+#include <vlc/vlc.h>
+#include <vlc/intf.h>
+
+#include "wince.h"
#include <windows.h>
#include <windowsx.h>
#include <winuser.h>
#include <commctrl.h>
-#include <aygshell.h>
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
-
-#include "wince.h"
#include "preferences_widgets.h"
/*****************************************************************************
/*****************************************************************************
* Preamble
*****************************************************************************/
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* strerror() */
+#include <stdio.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
-#include <string.h>
-#include <stdlib.h> /* malloc(), free() */
-#include <string>
-#include <stdio.h>
-using namespace std;
+#include "wince.h"
#include <winuser.h>
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
-#include <aygshell.h>
-
#include <commdlg.h>
-#include "wince.h"
-
/*****************************************************************************
* Event Table.
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strerror() */
#include <stdio.h>
-
-#include <string>
-#include <stdio.h>
-using namespace std;
-
#include <vlc/vlc.h>
#include <vlc/aout.h>
#include <vlc/intf.h>
-#include <commctrl.h>
-
#include "wince.h"
+#include <commctrl.h>
+
/* Callback prototype */
static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param );
#include <vlc/vlc.h>
#include <vlc/intf.h>
+#if defined( UNDER_CE ) && defined(__MINGW32__)
+/* This is a gross hack for the wince gcc cross-compiler */
+#undef strerror
+#define _off_t long
+char *strerror( int i_err ){ return "error message not available"; };
+void abort (void){};
+#endif
+
#include "wince.h"
/*****************************************************************************
/*****************************************************************************
* Module descriptor
*****************************************************************************/
+#define EMBED_TEXT N_("Embed video in interface")
+#define EMBED_LONGTEXT N_("Embed the video inside the interface instead " \
+ "of having it in a separate window.")
+
vlc_module_begin();
set_description( (char *) _("WinCE interface module") );
set_capability( "interface", 200 );
set_callbacks( Open, Close );
add_shortcut( "wince" );
set_program( "wcevlc" );
+
+ add_bool( "wince-embed", 1, NULL,
+ EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
vlc_module_end();
HINSTANCE hInstance = 0;
MSG msg;
Interface *pInterface = new Interface();
+ if( !hInstance ) hInstance = GetModuleHandle(NULL);
+
if( !pInterface->InitInstance( hInstance, p_intf ) ) return;
// Main message loop
#ifndef WINCE_RESOURCE
-#define MENU_HEIGHT 26
#define SLIDER_HEIGHT 50
-
#define SLIDER_MAX_POS 10000
+#define MENU_HEIGHT 26
#define FILE_ACCESS 1
#define NET_ACCESS 2
#define OPEN_NORMAL 0
#define OPEN_STREAM 1
+#if defined( UNDER_CE ) && defined(__MINGW32__)
+ /* This is a gross hack for the wince gcc cross-compiler */
+ char *strerror( int );
+# define _off_t long
+#endif
+
#include "vlc_keys.h"
#include <stdio.h>
# define ISUTF8 0
#endif
+/*****************************************************************************
+ * Misc definitions (mainly from aygshell.h)
+ *****************************************************************************/
+#define _WIN32_IE 0x0500
+
+#define SHFS_HIDESIPBUTTON 0x0008
+#define SHIDIM_FLAGS 0x0001
+#define SHIDIF_DONEBUTTON 0x0001
+#define SHIDIF_SIPDOWN 0x0008
+#define SHIDIF_FULLSCREENNOMENUBAR 0x0010
+#define SHCMBF_HMENU 0x0010
+#define SHFS_SHOWSIPBUTTON 0x0004
+#define GN_CONTEXTMENU 1000
+#define SHCMBM_GETSUBMENU (WM_USER + 401)
+#define lstrlenW wcslen
+#define TrackPopupMenu(hm,u,x,y,r,hw,p) \
+ TrackPopupMenuEx((hm),(u),(x),(y),(hw),0)
+
+extern "C" {
+ typedef struct tagSHMENUBARINFO
+ {
+ DWORD cbSize;
+ HWND hwndParent;
+ DWORD dwFlags;
+ UINT nToolBarId;
+ HINSTANCE hInstRes;
+ int nBmpId;
+ int cBmpImages;
+ HWND hwndMB;
+ COLORREF clrBk;
+ } SHMENUBARINFO, *PSHMENUBARINFO;
+
+ BOOL SHCreateMenuBar( SHMENUBARINFO *pmbi );
+ BOOL SHFullScreen(HWND hwndRequester, DWORD dwState);
+
+ typedef struct tagSHINITDLGINFO
+ {
+ DWORD dwMask;
+ HWND hDlg;
+ DWORD dwFlags;
+ } SHINITDLGINFO, *PSHINITDLGINFO;
+
+ BOOL SHInitDialog(PSHINITDLGINFO pshidi);
+
+ typedef struct tagNMRGINFO
+ {
+ NMHDR hdr;
+ POINT ptAction;
+ DWORD dwItemSpec;
+ } NMRGINFO, *PNMRGINFO;
+}
+
#endif //WINCE_RESOURCE
#define IDD_ABOUT 101
#endif\r
\r
#if defined(_WIN32_WCE)\r
- #if !defined(WCEOLE_ENABLE_DIALOGEX)\r
- #define DIALOGEX DIALOG DISCARDABLE\r
- #endif\r
- #include <commctrl.h>\r
- #define SHMENUBAR RCDATA\r
- #if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300)\r
- #include <aygshell.h>\r
- #define AFXCE_IDR_SCRATCH_SHMENU 28700\r
- #else\r
- #define I_IMAGENONE (-2)\r
- #define NOMENU 0xFFFF\r
- #define IDS_SHNEW 1\r
-\r
- #define IDM_SHAREDNEW 10\r
- #define IDM_SHAREDNEWDEFAULT 11\r
- #endif // _WIN32_WCE_PSPC\r
- #define AFXCE_IDD_SAVEMODIFIEDDLG 28701\r
+ #define _WIN32_IE 0x0500\r
+ #include <commctrl.h>\r
#endif // _WIN32_WCE\r
\r
#ifdef RC_INVOKED\r
#ifndef _INC_WINDOWS\r
#define _INC_WINDOWS\r
- #include "winuser.h" // extract from windows header\r
+ #include "winuser.h" // extract from windows header\r
#endif\r
#endif\r
\r
-#ifdef IDC_STATIC\r
-#undef IDC_STATIC\r
-#endif\r
-#define IDC_STATIC (-1)\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
// English (U.S.) resources\r
\r
#pragma code_page(1252)\r
#endif //_WIN32\r
\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_ABOUT DIALOG DISCARDABLE 0, 0, 159, 62\r
-STYLE WS_CHILD | WS_CAPTION | WS_SYSMENU\r
-CAPTION "About"\r
-FONT 8, "MS Sans Serif"\r
-BEGIN\r
- LTEXT "TODO: Place controls to manipulate properties of the Control on this dialog.",\r
- IDC_STATIC,15,23,125,16\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO DISCARDABLE \r
-BEGIN\r
- IDD_ABOUT, DIALOG\r
- BEGIN\r
- LEFTMARGIN, 7\r
- RIGHTMARGIN, 152\r
- TOPMARGIN, 7\r
- BOTTOMMARGIN, 55\r
- END\r
-END\r
-#endif // APSTUDIO_INVOKED\r
-\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
// Menubar\r
// Data\r
//\r
\r
-IDR_MENUBAR SHMENUBAR DISCARDABLE \r
+IDR_MENUBAR RCDATA DISCARDABLE \r
BEGIN\r
IDR_MENUBAR, 6,\r
I_IMAGENONE, IDM_FILE, TBSTATE_ENABLED, \r
I_IMAGENONE, IDM_VIDEO, TBSTATE_ENABLED, \r
TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_VIDEO, IDM_VIDEO, 4,\r
I_IMAGENONE, IDM_NAVIGATION, TBSTATE_ENABLED, \r
- TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_NAVIGATION, IDM_NAVIGATION, 5,\r
+ TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_NAVIGATION, IDM_NAVIGATION, 5\r
END\r
\r
-IDR_MENUBAR2 SHMENUBAR DISCARDABLE \r
+IDR_MENUBAR2 RCDATA DISCARDABLE \r
BEGIN\r
IDR_MENUBAR2, 4,\r
I_IMAGENONE, IDM_MANAGE, TBSTATE_ENABLED, \r
I_IMAGENONE, IDM_SORT, TBSTATE_ENABLED, \r
TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_SORT, IDM_SORT, 1,\r
I_IMAGENONE, IDM_SEL, TBSTATE_ENABLED, \r
- TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_SEL, IDM_SEL, 2,\r
+ TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_SEL, IDM_SEL, 2\r
END\r
\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
// String Table\r
PUSHBUTTON "Clear",IDCLEAR,11,7,50,14\r
END\r
\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO DISCARDABLE \r
-BEGIN\r
- IDD_DUMMY, DIALOG\r
- BEGIN\r
- LEFTMARGIN, 7\r
- RIGHTMARGIN, 179\r
- TOPMARGIN, 7\r
- BOTTOMMARGIN, 83\r
- END\r
-\r
- IDD_MESSAGES, DIALOG\r
- BEGIN\r
- LEFTMARGIN, 7\r
- RIGHTMARGIN, 131\r
- TOPMARGIN, 7\r
- BOTTOMMARGIN, 83\r
- END\r
-END\r
-#endif // APSTUDIO_INVOKED\r
-\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
// Menubar\r
MENUITEM "", ID_MENUITEM40108\r
END\r
\r
-\r
/////////////////////////////////////////////////////////////////////////////\r
//\r
// Data\r
//\r
\r
-IDR_MENUBAR2 RCDATA DISCARDABLE \r
-BEGIN\r
-\r
-END\r
-\r
-IDR_DUMMYMENU SHMENUBAR DISCARDABLE \r
+IDR_DUMMYMENU RCDATA DISCARDABLE \r
BEGIN\r
IDR_DUMMYMENU, 1,\r
I_IMAGENONE, ID_MENUITEM40108, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, \r
- IDS_CAP_MENUITEM40109, 0, 0,\r
+ IDS_CAP_MENUITEM40109, 0, 0\r
END\r
\r
/////////////////////////////////////////////////////////////////////////////\r
IDM_SETTINGS "Settings"\r
END\r
\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
- IDS_CAP_XXX "xxx"\r
-END\r
-\r
#endif // French (France) resources\r
/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif // not APSTUDIO_INVOKED\r
-\r