* button.cpp: Button control
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: button.cpp,v 1.3 2003/03/19 17:14:50 karibu Exp $
+ * $Id: button.cpp,v 1.4 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
#include "window.h"
#include "skin_common.h"
-
-
//---------------------------------------------------------------------------
// Control Button
//---------------------------------------------------------------------------
}
if( MouseOverActionName != "none" )
+ {
MouseOverAction->SendEvent();
+ }
CursorIn = true;
return true;
}
if( MouseOutActionName != "none" )
+ {
MouseOutAction->SendEvent();
+ }
CursorIn = false;
return true;
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /root/vlc-cvs/modules/gui/skins/parser/flex.c,v 1.3 2003/03/19 17:14:50 karibu Exp $
+ * $Header: /root/vlc-cvs/modules/gui/skins/parser/flex.c,v 1.4 2003/03/20 09:29:07 karibu Exp $
*/
#define FLEX_SCANNER
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#define INITIAL 0
-/* Validating XML processor for skin.dtd (Id: skin.dtd,v 1.2 2003/03/19 02:09:56 videolan Exp).
- * Generated 2003/03/19 18:16:00.
+/* Validating XML processor for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
+ * Generated 2003/03/20 10:30:38.
*
* This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
const char rcs_flexml[] =
"$" "Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp $";
const char rcs_skin_dtd[] =
- "$" "Id: skin.dtd,v 1.2 2003/03/19 02:09:56 videolan Exp $";
+ "$" "Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp $";
/* ANSI headers. */
#include <unistd.h>
* * skin.dtd: DTD for the VLC skins
* *****************************************************************************
* * Copyright (C) 2003 VideoLAN
- * * $Id: flex.c,v 1.3 2003/03/19 17:14:50 karibu Exp $
+ * * $Id: flex.c,v 1.4 2003/03/20 09:29:07 karibu Exp $
* *
* * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* * Emmanuel Puig <karibu@via.ecp.fr>
-/* XML application for skin.dtd (Id: skin.dtd,v 1.2 2003/03/19 02:09:56 videolan Exp).
+/* XML application for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
* Includes actions from skin.act.
- * Generated 2003/03/19 18:16:00.
+ * Generated 2003/03/20 10:30:38.
*
* This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
-/* XML processor/application API for skin.dtd (Id: skin.dtd,v 1.2 2003/03/19 02:09:56 videolan Exp).
- * Generated 2003/03/19 18:16:00.
+/* XML processor/application API for skin.dtd (Id: skin.dtd,v 1.3 2003/03/19 17:14:50 karibu Exp).
+ * Generated 2003/03/20 10:30:38.
*
* This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
* dialog.cpp: Classes for some dialog boxes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: dialog.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: dialog.cpp,v 1.2 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
//---------------------------------------------------------------------------
// Open file dialog box
//---------------------------------------------------------------------------
-OpenFileDialog::OpenFileDialog( string title, bool multiselect )
+OpenFileDialog::OpenFileDialog( intf_thread_t *_p_intf, string title,
+ bool multiselect )
{
+ p_intf = _p_intf;
MultiSelect = multiselect;
Title = title;
Filter = new char[200];
* dialog.h: Classes for some dialog boxes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: dialog.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: dialog.h,v 1.2 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
string Title;
bool MultiSelect;
+ intf_thread_t *p_intf;
+
public:
// Constructors
- OpenFileDialog( string title, bool multiselect );
+ OpenFileDialog( intf_thread_t *_p_intf, string title,
+ bool multiselect );
// Destructors
virtual ~OpenFileDialog();
* event.h: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: event.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: event.h,v 1.2 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
#define WINDOW_SHOW (VLC_WINDOW + 4)
#define WINDOW_HIDE (VLC_WINDOW + 5)
#define WINDOW_FADE (VLC_WINDOW + 6)
+#define WINDOW_LEAVE (VLC_WINDOW + 7)
+#define WINDOW_REFRESH (VLC_WINDOW + 8)
// Control event
#define CTRL_ENABLED (VLC_CONTROL + 1)
* skin-main.cpp: skins plugin for VLC
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.2 2003/03/19 03:11:14 karibu Exp $
+ * $Id: skin_main.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
// Initialize file structure
OpenFileDialog *OpenFile;
- OpenFile = (OpenFileDialog *)new OSOpenFileDialog( _("Open skin"),
- false );
+ OpenFile = (OpenFileDialog *)new OSOpenFileDialog( NULL,
+ _("Open skin"), false );
OpenFile->AddFilter( _("Skin files"), "*.vlt" );
OpenFile->AddFilter( _("Skin files"), "*.xml" );
OpenFile->AddFilter( _("All files"), "*.*" );
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.cpp,v 1.2 2003/03/19 18:14:48 karibu Exp $
+ * $Id: vlcproc.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
{
// Initialize file structure
OpenFileDialog *OpenFile;
- OpenFile = (OpenFileDialog *)new OSOpenFileDialog(
+ OpenFile = (OpenFileDialog *)new OSOpenFileDialog( p_intf,
_("Change skin - Open new file"), false );
OpenFile->AddFilter( _("Skin files"), "*.vlt" );
OpenFile->AddFilter( _("Skin files"), "*.xml" );
OpenFileDialog *OpenFile;
if( play )
{
- OpenFile = (OpenFileDialog *)new OSOpenFileDialog( _("Open file"),
- false );
+ OpenFile = (OpenFileDialog *)new OSOpenFileDialog( p_intf,
+ _("Open file"), false );
}
else
{
- OpenFile = (OpenFileDialog *)new OSOpenFileDialog( _("Add file"),
- true );
+ OpenFile = (OpenFileDialog *)new OSOpenFileDialog( p_intf,
+ _("Add file"), true );
}
OpenFile->AddFilter( _("All files"), "*.*" );
* window.cpp: Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: window.cpp,v 1.3 2003/03/19 18:14:48 karibu Exp $
+ * $Id: window.cpp,v 1.4 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
Hide();
return true;
+ case WINDOW_LEAVE:
+ MouseMove( -1, -1, 0 );
+ return true;
+
+ case WINDOW_REFRESH:
+ RefreshAll();
+ return true;
+
default:
// OS specific messages processing
return ProcessOSEvent( evt );
* win32_dialog.cpp: Win32 implementation of some dialog boxes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_dialog.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: win32_dialog.cpp,v 1.2 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
//--- VLC -------------------------------------------------------------------
#include <vlc/intf.h>
+extern intf_thread_t *g_pIntf;
//--- WIN32 -----------------------------------------------------------------
#define _WIN32_IE 0x0400 // Yes, i think it's a fucking kludge !
#include "dialog.h"
#include "os_dialog.h"
#include "skin_common.h"
+#include "window.h"
+#include "os_window.h"
#include "theme.h"
#include "os_theme.h"
#include "event.h"
//---------------------------------------------------------------------------
// Open file dialog box
//---------------------------------------------------------------------------
-Win32OpenFileDialog::Win32OpenFileDialog( string title, bool multiselect ) :
- OpenFileDialog( title, multiselect )
+Win32OpenFileDialog::Win32OpenFileDialog( intf_thread_t *_p_intf, string title,
+ bool multiselect ) : OpenFileDialog( _p_intf, title, multiselect )
{
}
//---------------------------------------------------------------------------
OpenFile.lpstrTitle = Title.c_str();
OpenFile.lpstrFilter = Filter;
+ // Remove mouse tracking event to avoid non process due to modal open box
+ if( p_intf != NULL && p_intf->p_sys->p_theme != NULL )
+ {
+ TRACKMOUSEEVENT TrackEvent;
+ TrackEvent.cbSize = sizeof( TRACKMOUSEEVENT );\r
+ TrackEvent.dwFlags = TME_LEAVE|TME_CANCEL;\r
+ TrackEvent.dwHoverTime = 1;
+
+ list<Window *>::const_iterator win;
+ for( win = g_pIntf->p_sys->p_theme->WindowList.begin();
+ win != g_pIntf->p_sys->p_theme->WindowList.end(); win++ )
+ {
+ TrackEvent.hwndTrack = ( (Win32Window *)(*win) )->GetHandle();
+ TrackMouseEvent( &TrackEvent );
+ }
+ }
+
// Show dialog box
if( !GetOpenFileName( &OpenFile ) )
+ {
+ OSAPI_PostMessage( NULL, WINDOW_LEAVE, 0, 0 );
return false;
+ }
+
+ // Tell windows that mouse cursor has left window because it has been
+ // unactivated
+ OSAPI_PostMessage( NULL, WINDOW_LEAVE, 0, 0 );
// Find files in string result
char * File = OpenFile.lpstrFile;
* win32_dialog.h: Win32 implementation of some dialog boxes
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_dialog.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $
+ * $Id: win32_dialog.h,v 1.2 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
public:
// Constructors
- Win32OpenFileDialog( string title, bool multiselect );
+ Win32OpenFileDialog( intf_thread_t *_p_intf, string title,
+ bool multiselect );
// Destructors
virtual ~Win32OpenFileDialog();
* win32_run.cpp:
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_run.cpp,v 1.2 2003/03/19 17:14:50 karibu Exp $
+ * $Id: win32_run.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
// Compute windows message list
while( GetMessage( &msg, NULL, 0, 0 ) )
{
+
// Translate keys
TranslateMessage( &msg );
* win32_window.cpp: Win32 implementation of the Window class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: win32_window.cpp,v 1.2 2003/03/19 02:09:56 videolan Exp $
+ * $Id: win32_window.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
return true;
case WM_MOUSELEAVE:
- MouseMove( -1, -1, 0 );
+ OSAPI_PostMessage( this, WINDOW_LEAVE, 0, 0 );
return true;
default: