]> git.sesse.net Git - vlc/blobdiff - evc/vlc.c
Changed logo and marq control variables to attach to ->p_libvlc, to be persistent.
[vlc] / evc / vlc.c
index bd62d392b91d9c7e0c5055d56f040bdd0b30e086..f97c583e06f6d539207ab840d5c33950f1f702a7 100644 (file)
--- a/evc/vlc.c
+++ b/evc/vlc.c
@@ -2,7 +2,7 @@
  * vlc.c: the vlc player, WinCE version
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlc.c,v 1.2 2002/11/13 20:51:04 sam Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -52,8 +52,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
                     LPTSTR lpCmdLine, int nCmdShow )
 {
     int    i_ret;
-    int    i_argc = 2;
-    char * ppsz_argv[] = { lpCmdLine, "-vv", NULL };
+    int    i_argc = 4;
+    char * ppsz_argv[] = { lpCmdLine, "-vv", "--intf", "dummy", NULL, NULL };
     HWND   window;
     MSG    message;
 
@@ -63,10 +63,14 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     char     psz_title[100];
     wchar_t  pwz_title[100];
 
+    i_argc = 5;
+    ppsz_argv[4] = "test.wav";
+
     /* Store our instance for future reference */
     hInst = hInstance;
 
     /* Register window class */
+    memset( &wc, 0, sizeof(wc) );
     wc.style          = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc    = (WNDPROC) WndProc;
     wc.cbClsExtra     = 0;
@@ -81,15 +85,15 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     RegisterClass(&wc);
 
     /* Print the version information */
-    sprintf( psz_title, "VideoLAN Client %s", VLC_Version() );
+    sprintf( psz_title, "VLC media player %s", VLC_Version() );
     MultiByteToWideChar( CP_ACP, 0, psz_title, -1, pwz_title, 100 );
 
     /* Create our nice window */
     window = CreateWindow( L"VLC", pwz_title,
-                           WS_VISIBLE | WS_SIZEBOX | WS_CAPTION,
+                           WS_VISIBLE /*| WS_SIZEBOX | WS_CAPTION*/,
                            CW_USEDEFAULT, CW_USEDEFAULT,
                            //CW_USEDEFAULT, CW_USEDEFAULT, 
-                           200,100,
+                           200,200,
                            NULL, NULL, hInst, NULL );
 
     ShowWindow( window, nCmdShow );
@@ -118,7 +122,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     i_ret = VLC_Play( 0 );
 
     /* Add a non-blocking interface and keep the return value */
-    i_ret = VLC_AddIntf( 0, NULL, VLC_FALSE );
+    i_ret = VLC_AddIntf( 0, NULL, VLC_FALSE, VLC_TRUE );
 
     while( GetMessage( &message, NULL, 0, 0 ) )
     {
@@ -133,7 +137,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     VLC_Die( 0 );
 
     /* Finish the threads */
-    VLC_Stop( 0 );
+    VLC_CleanUp( 0 );
 
     /* Destroy the libvlc structure */
     VLC_Destroy( 0 );
@@ -192,10 +196,18 @@ static long FAR PASCAL WndProc ( HWND hWnd, UINT message,
 {
     HDC hdc;
     int wmId, wmEvent;
+    int x, y;
     PAINTSTRUCT ps;
 
     switch( message )
     {
+        case WM_LBUTTONDOWN:
+            x = LOWORD(lParam);
+            y = HIWORD(lParam);
+            hdc = GetDC(hWnd);
+            Rectangle(hdc, x-4, y-4, x+4, y+4);
+            ReleaseDC(hWnd, hdc);
+            break;
         case WM_COMMAND:
             wmId    = LOWORD(wParam);
             wmEvent = HIWORD(wParam);