Commit fff29587 authored by Emmanuel Puig's avatar Emmanuel Puig

* button.cpp : Fixing bug when disabling control
* Checkbox.cpp : adding onmouseover and onmouseout events
* Updating DTD
* win32_event.cpp : fixing bug for WINDOW_OPEN event
parent d066ac36
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* button.cpp: Button control * button.cpp: Button control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: button.cpp,v 1.2 2003/03/19 02:09:56 videolan Exp $ * $Id: button.cpp,v 1.3 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -238,6 +238,15 @@ void ControlButton::Enable( Event *event, bool enabled ) ...@@ -238,6 +238,15 @@ void ControlButton::Enable( Event *event, bool enabled )
if( enabled != Enabled ) if( enabled != Enabled )
{ {
Enabled = enabled; Enabled = enabled;
// If cursor is in, send mouse out event
if( !Enabled && CursorIn )
{
if( MouseOutActionName != "none" )
MouseOutAction->SendEvent();
CursorIn = false;
}
ParentWindow->Refresh( Left, Top, Width, Height ); ParentWindow->Refresh( Left, Top, Width, Height );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* checkbox.cpp: Checkbox control * checkbox.cpp: Checkbox control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: checkbox.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: checkbox.cpp,v 1.2 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -44,27 +44,50 @@ ...@@ -44,27 +44,50 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Checkbox Button // Checkbox Button
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
ControlCheckBox::ControlCheckBox( string id, bool visible, int x, int y, ControlCheckBox::ControlCheckBox(
string img1, string img2, string click1, string click2, string disabled1, string id,
string disabled2, string action1, string action2, string tooltiptext1, bool visible,
string tooltiptext2, string help, int x, int y,
string img1, string img2, string clickimg1, string clickimg2,
string disabled1, string disabled2,
string onclick1, string onclick2, string onmouseover1,
string onmouseout1, string onmouseover2, string onmouseout2,
string tooltiptext1, string tooltiptext2, string help,
Window *Parent ) : GenericControl( id, visible, help, Parent ) Window *Parent ) : GenericControl( id, visible, help, Parent )
{ {
Left = x; Left = x;
Top = y; Top = y;
State = 1; // 1 = up - 0 = down State = 1; // 1 = up - 0 = down
Selected = false; Selected = false;
CursorIn = false;
Act = 1; Act = 1;
Enabled1 = true; Enabled1 = true;
Enabled2 = true; Enabled2 = true;
Img1 = img1; Img1 = img1;
Img2 = img2; Img2 = img2;
Click1 = click1; Click1 = clickimg1;
Click2 = click2; Click2 = clickimg2;
Disabled1 = disabled1; Disabled1 = disabled1;
Disabled2 = disabled2; Disabled2 = disabled2;
ClickActionName1 = action1;
ClickActionName2 = action2; // Actions
ClickActionName1 = onclick1;
ClickActionName2 = onclick2;
MouseOverActionName1 = onmouseover1;
MouseOutActionName1 = onmouseout1;
if( onmouseover2 == "none" )
MouseOverActionName2 = MouseOverActionName1;
else
MouseOverActionName2 = onmouseover2;
if( onmouseout2 == "none" )
MouseOutActionName2 = MouseOutActionName1;
else
MouseOutActionName2 = onmouseout2;
// Tooltips
ToolTipText1 = tooltiptext1; ToolTipText1 = tooltiptext1;
ToolTipText2 = tooltiptext2; ToolTipText2 = tooltiptext2;
} }
...@@ -107,7 +130,10 @@ void ControlCheckBox::Init() ...@@ -107,7 +130,10 @@ void ControlCheckBox::Init()
// Create script // Create script
ClickAction1 = new Action( p_intf, ClickActionName1 ); ClickAction1 = new Action( p_intf, ClickActionName1 );
ClickAction2 = new Action( p_intf, ClickActionName2 ); ClickAction2 = new Action( p_intf, ClickActionName2 );
MouseOverAction1 = new Action( p_intf, MouseOverActionName1 );
MouseOutAction1 = new Action( p_intf, MouseOutActionName1 );
MouseOverAction2 = new Action( p_intf, MouseOverActionName2 );
MouseOutAction2 = new Action( p_intf, MouseOutActionName2 );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool ControlCheckBox::ProcessEvent( Event *evt ) bool ControlCheckBox::ProcessEvent( Event *evt )
...@@ -230,37 +256,46 @@ bool ControlCheckBox::MouseDown( int x, int y, int button ) ...@@ -230,37 +256,46 @@ bool ControlCheckBox::MouseDown( int x, int y, int button )
bool ControlCheckBox::MouseMove( int x, int y, int button ) bool ControlCheckBox::MouseMove( int x, int y, int button )
{ {
// Test enabled // Test enabled
if( !Selected || !button )
return false;
if( ( !Enabled1 && Act == 1 ) || ( !Enabled2 && Act == 2 ) ) if( ( !Enabled1 && Act == 1 ) || ( !Enabled2 && Act == 2 ) )
return false; return false;
if( Act == 1 ) // If mouse is entering control
if( MouseOver( x, y ) && !CursorIn )
{ {
if( State == 1 && Img[0]->Hit( x - Left, y - Top ) ) // If control is already selected
if( button == 1 && Selected )
{ {
State = 0; State = 0;
ParentWindow->Refresh( Left, Top, Width, Height ); ParentWindow->Refresh( Left, Top, Width, Height );
} }
else if( State == 0 && !Img[1]->Hit( x - Left, y - Top ) )
{ // Check events
State = 1; if( Act == 1 && MouseOverActionName1 != "none" )
ParentWindow->Refresh( Left, Top, Width, Height ); MouseOverAction1->SendEvent();
} else if( Act == 2 && MouseOverActionName2 != "none" )
MouseOverAction2->SendEvent();
CursorIn = true;
return true;
} }
else if( Act == 2 ) // If mouse if leaving control
else if( !MouseOver( x, y ) && CursorIn )
{ {
if( State == 1 && Img[2]->Hit( x - Left, y - Top ) ) // If control is already selected
{ if( button == 1 && Selected )
State = 0;
ParentWindow->Refresh( Left, Top, Width, Height );
}
else if( State == 0 && !Img[3]->Hit( x - Left, y - Top ) )
{ {
State = 1; State = 1;
ParentWindow->Refresh( Left, Top, Width, Height ); ParentWindow->Refresh( Left, Top, Width, Height );
} }
// Check events
if( Act == 1 && MouseOutActionName1 != "none" )
MouseOutAction1->SendEvent();
else if( Act == 2 && MouseOutActionName2 != "none" )
MouseOutAction2->SendEvent();
CursorIn = false;
return true;
} }
return true; return true;
} }
...@@ -302,7 +337,16 @@ void ControlCheckBox::Enable( Event *event, bool enabled ) ...@@ -302,7 +337,16 @@ void ControlCheckBox::Enable( Event *event, bool enabled )
{ {
Enabled1 = enabled; Enabled1 = enabled;
if( Act == 1 ) if( Act == 1 )
{
// If cursor is in, send mouse out event
if( !Enabled1 && CursorIn )
{
if( MouseOutActionName2 != "none" )
MouseOutAction2->SendEvent();
CursorIn = false;
}
ParentWindow->Refresh( Left, Top, Width, Height ); ParentWindow->Refresh( Left, Top, Width, Height );
}
} }
...@@ -312,7 +356,16 @@ void ControlCheckBox::Enable( Event *event, bool enabled ) ...@@ -312,7 +356,16 @@ void ControlCheckBox::Enable( Event *event, bool enabled )
{ {
Enabled2 = enabled; Enabled2 = enabled;
if( Act == 2 ) if( Act == 2 )
{
// If cursor is in, send mouse out event
if( !Enabled2 && CursorIn )
{
if( MouseOutActionName2 != "none" )
MouseOutAction2->SendEvent();
CursorIn = false;
}
ParentWindow->Refresh( Left, Top, Width, Height ); ParentWindow->Refresh( Left, Top, Width, Height );
}
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* checkbox.h: Checkbox control * checkbox.h: Checkbox control
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: checkbox.h,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: checkbox.h,v 1.2 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulière <ipkiss@via.ecp.fr> * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -52,6 +52,7 @@ class ControlCheckBox : public GenericControl ...@@ -52,6 +52,7 @@ class ControlCheckBox : public GenericControl
bool Enabled1; bool Enabled1;
bool Enabled2; bool Enabled2;
bool Selected; bool Selected;
bool CursorIn;
// List of actions to execute when clicking // List of actions to execute when clicking
int Act; int Act;
...@@ -60,15 +61,29 @@ class ControlCheckBox : public GenericControl ...@@ -60,15 +61,29 @@ class ControlCheckBox : public GenericControl
Action *ClickAction2; Action *ClickAction2;
string ClickActionName2; string ClickActionName2;
Action *MouseOverAction1;
string MouseOverActionName1;
Action *MouseOutAction1;
string MouseOutActionName1;
Action *MouseOverAction2;
string MouseOverActionName2;
Action *MouseOutAction2;
string MouseOutActionName2;
// ToolTip text // ToolTip text
string ToolTipText1; string ToolTipText1;
string ToolTipText2; string ToolTipText2;
public: public:
// Constructor // Constructor
ControlCheckBox( string id, bool visible, int x, int y, string img1, ControlCheckBox(
string img2, string click1, string click2, string disabled1, string id,
string disabled2, string action1, string action2, bool visible,
int x, int y,
string img1, string img2, string clickimg1, string clickimg2,
string disabled1, string disabled2,
string onclick1, string onclick2, string onmouseover1,
string onmouseout1, string onmouseover2, string onmouseout2,
string tooltiptext1, string tooltiptext2, string help, string tooltiptext1, string tooltiptext2, string help,
Window *Parent ); Window *Parent );
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* skin.act: FleXML actions file * skin.act: FleXML actions file
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin.act,v 1.2 2003/03/19 02:09:56 videolan Exp $ * $Id: skin.act,v 1.3 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -103,9 +103,14 @@ ...@@ -103,9 +103,14 @@
</start> </start>
<start tag="CheckBoxControl"> <start tag="CheckBoxControl">
<![CDATA[ <![CDATA[
AddCheckBox( {id}, {visible}, {x}, {y}, {img1}, {img2}, {clickimg1}, AddCheckBox( {id},
{clickimg2}, {disabled1}, {disabled2}, {onclick1}, {visible},
{onclick2}, {tooltiptext1}, {tooltiptext2}, {help} ); {x}, {y},
{img1}, {img2}, {clickimg1}, {clickimg2}, {disabled1},
{disabled2},
{onclick1}, {onclick2}, {onmouseover1}, {onmouseout1},
{onmouseover2}, {onmouseout2},
{tooltiptext1}, {tooltiptext2}, {help} );
]]> ]]>
</start> </start>
<start tag="SliderControl"> <start tag="SliderControl">
......
/* XML application for skin.dtd (Id: skin.dtd,v 1.8 2003/03/17 22:14:47 karibu Exp). /* XML application for skin.dtd (Id: skin.dtd,v 1.2 2003/03/19 02:09:56 videolan Exp).
* Includes actions from skin.act. * Includes actions from skin.act.
* Generated 2003/03/19 02:59:06. * Generated 2003/03/19 18:16:00.
* *
* This program was generated with the FleXML XML processor generator, * This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp). * (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
...@@ -164,16 +164,21 @@ void STag_CheckBoxControl(void) ...@@ -164,16 +164,21 @@ void STag_CheckBoxControl(void)
#line 104 "skin.act" #line 104 "skin.act"
AddCheckBox( A_CheckBoxControl_id, A_CheckBoxControl_visible, A_CheckBoxControl_x, A_CheckBoxControl_y, A_CheckBoxControl_img1, A_CheckBoxControl_img2, A_CheckBoxControl_clickimg1, AddCheckBox( A_CheckBoxControl_id,
A_CheckBoxControl_clickimg2, A_CheckBoxControl_disabled1, A_CheckBoxControl_disabled2, A_CheckBoxControl_onclick1, A_CheckBoxControl_visible,
A_CheckBoxControl_onclick2, A_CheckBoxControl_tooltiptext1, A_CheckBoxControl_tooltiptext2, A_CheckBoxControl_help ); A_CheckBoxControl_x, A_CheckBoxControl_y,
A_CheckBoxControl_img1, A_CheckBoxControl_img2, A_CheckBoxControl_clickimg1, A_CheckBoxControl_clickimg2, A_CheckBoxControl_disabled1,
A_CheckBoxControl_disabled2,
A_CheckBoxControl_onclick1, A_CheckBoxControl_onclick2, A_CheckBoxControl_onmouseover1, A_CheckBoxControl_onmouseout1,
A_CheckBoxControl_onmouseover2, A_CheckBoxControl_onmouseout2,
A_CheckBoxControl_tooltiptext1, A_CheckBoxControl_tooltiptext2, A_CheckBoxControl_help );
} /* STag_CheckBoxControl */ } /* STag_CheckBoxControl */
void STag_SliderControl(void) void STag_SliderControl(void)
{ {
#line 111 "skin.act" #line 116 "skin.act"
AddSlider( A_SliderControl_id, A_SliderControl_visible, A_SliderControl_x, A_SliderControl_y, A_SliderControl_type, A_SliderControl_up, A_SliderControl_down, A_SliderControl_abs, AddSlider( A_SliderControl_id, A_SliderControl_visible, A_SliderControl_x, A_SliderControl_y, A_SliderControl_type, A_SliderControl_up, A_SliderControl_down, A_SliderControl_abs,
...@@ -184,7 +189,7 @@ void STag_SliderControl(void) ...@@ -184,7 +189,7 @@ void STag_SliderControl(void)
void STag_TextControl(void) void STag_TextControl(void)
{ {
#line 117 "skin.act" #line 122 "skin.act"
AddText( A_TextControl_id, A_TextControl_visible, A_TextControl_x, A_TextControl_y, A_TextControl_text, A_TextControl_font, A_TextControl_align, AddText( A_TextControl_id, A_TextControl_visible, A_TextControl_x, A_TextControl_y, A_TextControl_text, A_TextControl_font, A_TextControl_align,
...@@ -196,7 +201,7 @@ void STag_TextControl(void) ...@@ -196,7 +201,7 @@ void STag_TextControl(void)
void STag_PlayListControl(void) void STag_PlayListControl(void)
{ {
#line 124 "skin.act" #line 129 "skin.act"
AddPlayList( A_PlayListControl_id, A_PlayListControl_visible, A_PlayListControl_x, A_PlayListControl_y, A_PlayListControl_width, A_PlayListControl_infowidth, AddPlayList( A_PlayListControl_id, A_PlayListControl_visible, A_PlayListControl_x, A_PlayListControl_y, A_PlayListControl_width, A_PlayListControl_infowidth,
...@@ -208,7 +213,7 @@ void STag_PlayListControl(void) ...@@ -208,7 +213,7 @@ void STag_PlayListControl(void)
void ETag_PlayListControl(void) void ETag_PlayListControl(void)
{ {
#line 131 "skin.act" #line 136 "skin.act"
AddPlayListEnd(); AddPlayListEnd();
...@@ -218,7 +223,7 @@ void ETag_PlayListControl(void) ...@@ -218,7 +223,7 @@ void ETag_PlayListControl(void)
void STag_Theme(void) void STag_Theme(void)
{ {
#line 136 "skin.act" #line 141 "skin.act"
StartTheme( A_Theme_log, A_Theme_magnet ); StartTheme( A_Theme_log, A_Theme_magnet );
...@@ -228,7 +233,7 @@ void STag_Theme(void) ...@@ -228,7 +233,7 @@ void STag_Theme(void)
void ETag_Theme(void) void ETag_Theme(void)
{ {
#line 141 "skin.act" #line 146 "skin.act"
EndTheme(); EndTheme();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* skin.dtd: DTD for the VLC skins * skin.dtd: DTD for the VLC skins
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $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 $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -143,6 +143,10 @@ ...@@ -143,6 +143,10 @@
disabled2 CDATA "none" disabled2 CDATA "none"
onclick1 CDATA "none" onclick1 CDATA "none"
onclick2 CDATA "none" onclick2 CDATA "none"
onmouseover1 CDATA "none"
onmouseout1 CDATA "none"
onmouseover2 CDATA "none"
onmouseout2 CDATA "none"
tooltiptext1 CDATA "none" tooltiptext1 CDATA "none"
tooltiptext2 CDATA "none" tooltiptext2 CDATA "none"
help CDATA "\0" help CDATA "\0"
......
/* XML processor/application API for skin.dtd (Id: skin.dtd,v 1.8 2003/03/17 22:14:47 karibu 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 02:59:06. * Generated 2003/03/19 18:16:00.
* *
* This program was generated with the FleXML XML processor generator, * This program was generated with the FleXML XML processor generator,
* (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp). * (Id: flexml.pl,v 1.24 1999/12/13 16:18:30 krisrose Exp).
...@@ -76,8 +76,12 @@ typedef char* AT_ButtonControl_down; ...@@ -76,8 +76,12 @@ typedef char* AT_ButtonControl_down;
#define AU_ButtonControl_down NULL #define AU_ButtonControl_down NULL
typedef char* AT_CheckBoxControl_disabled1; typedef char* AT_CheckBoxControl_disabled1;
#define AU_CheckBoxControl_disabled1 NULL #define AU_CheckBoxControl_disabled1 NULL
typedef char* AT_CheckBoxControl_onmouseover1;
#define AU_CheckBoxControl_onmouseover1 NULL
typedef char* AT_CheckBoxControl_disabled2; typedef char* AT_CheckBoxControl_disabled2;
#define AU_CheckBoxControl_disabled2 NULL #define AU_CheckBoxControl_disabled2 NULL
typedef char* AT_CheckBoxControl_onmouseover2;
#define AU_CheckBoxControl_onmouseover2 NULL
typedef char* AT_Font_underline; typedef char* AT_Font_underline;
#define AU_Font_underline NULL #define AU_Font_underline NULL
typedef char* AT_ButtonControl_onmouseover; typedef char* AT_ButtonControl_onmouseover;
...@@ -140,6 +144,10 @@ typedef char* AT_TextControl_width; ...@@ -140,6 +144,10 @@ typedef char* AT_TextControl_width;
#define AU_TextControl_width NULL #define AU_TextControl_width NULL
typedef char* AT_PlayListControl_id; typedef char* AT_PlayListControl_id;
#define AU_PlayListControl_id NULL #define AU_PlayListControl_id NULL
typedef char* AT_CheckBoxControl_onmouseout1;
#define AU_CheckBoxControl_onmouseout1 NULL
typedef char* AT_CheckBoxControl_onmouseout2;
#define AU_CheckBoxControl_onmouseout2 NULL
typedef char* AT_Bitmap_id; typedef char* AT_Bitmap_id;
#define AU_Bitmap_id NULL #define AU_Bitmap_id NULL
typedef char* AT_Font_italic; typedef char* AT_Font_italic;
...@@ -293,7 +301,9 @@ extern AT_Window_movealpha A_Window_movealpha; ...@@ -293,7 +301,9 @@ extern AT_Window_movealpha A_Window_movealpha;
extern AT_SliderControl_down A_SliderControl_down; extern AT_SliderControl_down A_SliderControl_down;
extern AT_ButtonControl_down A_ButtonControl_down; extern AT_ButtonControl_down A_ButtonControl_down;
extern AT_CheckBoxControl_disabled1 A_CheckBoxControl_disabled1; extern AT_CheckBoxControl_disabled1 A_CheckBoxControl_disabled1;
extern AT_CheckBoxControl_onmouseover1 A_CheckBoxControl_onmouseover1;
extern AT_CheckBoxControl_disabled2 A_CheckBoxControl_disabled2; extern AT_CheckBoxControl_disabled2 A_CheckBoxControl_disabled2;
extern AT_CheckBoxControl_onmouseover2 A_CheckBoxControl_onmouseover2;
extern AT_Font_underline A_Font_underline; extern AT_Font_underline A_Font_underline;
extern AT_ButtonControl_onmouseover A_ButtonControl_onmouseover; extern AT_ButtonControl_onmouseover A_ButtonControl_onmouseover;
extern AT_ButtonControl_visible A_ButtonControl_visible; extern AT_ButtonControl_visible A_ButtonControl_visible;
...@@ -325,6 +335,8 @@ extern AT_ImageControl_image A_ImageControl_image; ...@@ -325,6 +335,8 @@ extern AT_ImageControl_image A_ImageControl_image;
extern AT_ThemeInfo_name A_ThemeInfo_name; extern AT_ThemeInfo_name A_ThemeInfo_name;
extern AT_TextControl_width A_TextControl_width; extern AT_TextControl_width A_TextControl_width;
extern AT_PlayListControl_id A_PlayListControl_id; extern AT_PlayListControl_id A_PlayListControl_id;
extern AT_CheckBoxControl_onmouseout1 A_CheckBoxControl_onmouseout1;
extern AT_CheckBoxControl_onmouseout2 A_CheckBoxControl_onmouseout2;
extern AT_Bitmap_id A_Bitmap_id; extern AT_Bitmap_id A_Bitmap_id;
extern AT_Font_italic A_Font_italic; extern AT_Font_italic A_Font_italic;
extern AT_PlayListControl_ord A_PlayListControl_ord; extern AT_PlayListControl_ord A_PlayListControl_ord;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wrappers.cpp: Wrappers around C++ objects * wrappers.cpp: Wrappers around C++ objects
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: wrappers.cpp,v 1.3 2003/03/19 02:09:56 videolan Exp $ * $Id: wrappers.cpp,v 1.4 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -180,20 +180,29 @@ void AddButton( ...@@ -180,20 +180,29 @@ void AddButton(
vlcWin ) ); vlcWin ) );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void AddCheckBox( char *id, char *visible, char *x, char *y, char *img1, void AddCheckBox(
char *img2, char *click1, char *click2, char *disabled1, char *disabled2, char *id,
char *action1, char *action2, char *tooltiptext1, char *tooltiptext2, char *visible,
char *help ) char *x, char *y,
char *img1, char *img2,
char *clickimg1, char *clickimg2, char *disabled1, char *disabled2,
char *onclick1, char *onclick2, char *onmouseover1, char *onmouseout1,
char *onmouseover2, char *onmouseout2,
char *tooltiptext1, char *tooltiptext2, char *help )
{ {
int XOff, YOff; int XOff, YOff;
Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back(); Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff ); g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
vlcWin->ControlList.push_back( new ControlCheckBox( id, vlcWin->ControlList.push_back( new ControlCheckBox(
ConvertBoolean( visible ), atoi( x ) + XOff, id,
atoi( y ) + YOff, img1, img2, click1, click2, disabled1, disabled2, ConvertBoolean( visible ),
action1, action2, tooltiptext1, tooltiptext2, help, vlcWin ) ); atoi( x ) + XOff, atoi( y ) + YOff,
img1, img2, clickimg1, clickimg2, disabled1, disabled2,
onclick1, onclick2, onmouseover1, onmouseout1, onmouseover2,
onmouseout2,
tooltiptext1, tooltiptext2, help, vlcWin ) );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void AddSlider( char *id, char *visible, char *x, char *y, char *type, char *up, void AddSlider( char *id, char *visible, char *x, char *y, char *type, char *up,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wrappers.h: Wrappers around C++ objects * wrappers.h: Wrappers around C++ objects
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: wrappers.h,v 1.2 2003/03/19 02:09:56 videolan Exp $ * $Id: wrappers.h,v 1.3 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -76,9 +76,10 @@ extern "C" { ...@@ -76,9 +76,10 @@ extern "C" {
void AddCheckBox( char *id, void AddCheckBox( char *id,
char *visible, char *visible,
char *x, char *y, char *x, char *y,
char *img1, char *img2, char *click1, char *click2, char *img1, char *img2, char *clickimg1, char *clickimg2,
char *disabled1, char *disabled2, char *disabled1, char *disabled2,
char *action1, char *action2, char *onclick1, char *onclick2, char *onmouseover1,
char *onmouseout1, char *onmouseover2, char *onmouseout2,
char *tooltiptext1, char *tooltiptext2, char *help ); char *tooltiptext1, char *tooltiptext2, char *help );
void AddSlider( char *id, char *visible, char *x, char *y, char *type, void AddSlider( char *id, char *visible, char *x, char *y, char *type,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_event.cpp: Win32 implementation of the Event class * win32_event.cpp: Win32 implementation of the Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_event.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: win32_event.cpp,v 1.2 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -96,6 +96,14 @@ void Win32Event::CreateOSEvent( string para1, string para2, string para3 ) ...@@ -96,6 +96,14 @@ void Win32Event::CreateOSEvent( string para1, string para2, string para3 )
hWnd = GetWindowFromName( para1 ); hWnd = GetWindowFromName( para1 );
break; break;
case WINDOW_CLOSE:
hWnd = GetWindowFromName( para1 );
break;
case WINDOW_OPEN:
hWnd = GetWindowFromName( para1 );
break;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_run.cpp: * win32_run.cpp:
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_run.cpp,v 1.1 2003/03/18 02:21:47 ipkiss Exp $ * $Id: win32_run.cpp,v 1.2 2003/03/19 17:14:50 karibu Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -95,12 +95,15 @@ void OSRun( intf_thread_t *p_intf ) ...@@ -95,12 +95,15 @@ void OSRun( intf_thread_t *p_intf )
*****************************/ *****************************/
if( msg.message == WM_KEYUP ) if( msg.message == WM_KEYUP )
{ {
msg_Err( p_intf, "Key : %i (%i)", msg.wParam, KeyModifier );
// If key is CTRL // If key is CTRL
if( msg.wParam == 17 ) if( msg.wParam == 17 )
KeyModifier = 0; KeyModifier = 0;
else if( KeyModifier == 0 ) else if( KeyModifier == 0 )
{
p_intf->p_sys->p_theme->EvtBank->TestShortcut( p_intf->p_sys->p_theme->EvtBank->TestShortcut(
msg.wParam, KeyModifier ); msg.wParam, 0 );
}
} }
else if( msg.message == WM_KEYDOWN ) else if( msg.message == WM_KEYDOWN )
{ {
......
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