* event.cpp: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: event.cpp,v 1.19 2003/06/22 12:46:49 asmax Exp $
+ * $Id: event.cpp,v 1.20 2003/07/20 20:42:23 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
delete[] (char *)Param2;
break;
}
-
}
//---------------------------------------------------------------------------
bool Event::IsEqual( Event *evt )
// Dialogs
else if( Desc == "VLC_LOG_SHOW" )
return VLC_LOG_SHOW;
- else if( Desc == "VLC_LOG_CLEAR" )
- return VLC_LOG_CLEAR;
else if( Desc == "VLC_PREFS_SHOW" )
return VLC_PREFS_SHOW;
else if( Desc == "VLC_INFO_SHOW" )
else if( Desc == "VLC_FULLSCREEN" )
return VLC_FULLSCREEN;
- // Network events
- else if( Desc == "VLC_NET_ADDUDP" )
- return VLC_NET_ADDUDP;
-
// Window events
else if( Desc == "WINDOW_MOVE" )
return WINDOW_MOVE;
Param2 = GetBool( para1 );
break;
- case VLC_NET_ADDUDP:
- Param2 = atoi( para1 );
- break;
-
case CTRL_ID_VISIBLE:
Param1 = (unsigned int)FindControl( para1 );
Param2 = GetBool( para2 );
// Create shortcut
CreateShortcut();
-
}
//---------------------------------------------------------------------------
GenericControl * Event::FindControl( string id )
}
}
return NULL;
-
}
//---------------------------------------------------------------------------
int Event::GetBool( string expr )
// Free memory
delete[] evt;
delete[] next;
-
}
//---------------------------------------------------------------------------
Action::~Action()
{
-
}
//---------------------------------------------------------------------------
bool Action::SendEvent()
* event.h: Event class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: event.h,v 1.12 2003/06/22 12:46:49 asmax Exp $
+ * $Id: event.h,v 1.13 2003/07/20 20:42:23 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
#define VLC_DROP (VLC_MESSAGE + 7)
#define VLC_LOG_SHOW (VLC_MESSAGE + 20)
-#define VLC_LOG_CLEAR (VLC_MESSAGE + 22)
#define VLC_PREFS_SHOW (VLC_MESSAGE + 23)
#define VLC_INFO_SHOW (VLC_MESSAGE + 24)
#define VLC_PLAYLIST_ADD_FILE (VLC_MESSAGE + 301)
#define VLC_TEST_ALL_CLOSED (VLC_MESSAGE + 600)
-// Network events
-#define VLC_NET_ADDUDP (VLC_MESSAGE + 701)
-
// Window event
#define WINDOW_MOVE (VLC_WINDOW + 1)
#define WINDOW_OPEN (VLC_WINDOW + 2)
* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.cpp,v 1.41 2003/07/20 10:38:49 gbazin Exp $
+ * $Id: vlcproc.cpp,v 1.42 2003/07/20 20:42:23 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
//---------------------------------------------------------------------------
VlcProc::VlcProc( intf_thread_t *_p_intf )
{
- p_intf = _p_intf;
-
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
+ p_intf = _p_intf;
+
+ playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
// We want to be noticed of playlit changes
var_AddCallback( p_playlist, "intf-change", RefreshCallback, this );
-
+
// Raise/lower interface with middle click on vout
var_AddCallback( p_playlist, "intf-show", IntfShowCallback, this );
-
- vlc_object_release( p_playlist );
+
+ vlc_object_release( p_playlist );
}
}
//---------------------------------------------------------------------------
VlcProc::~VlcProc()
{
// Remove the refresh callback
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
+ playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
if( p_playlist != NULL )
{
p_intf->p_sys->p_dialogs->ShowMessages();
return true;
- case VLC_LOG_CLEAR:
- return true;
-
case VLC_PREFS_SHOW:
p_intf->p_sys->p_dialogs->ShowPrefs();
return true;
p_intf->p_sys->p_theme->ChangeTaskbar();
return true;
- case VLC_NET_ADDUDP:
- AddNetworkUDP( (int)evt->GetParam2() );
- return true;
-
default:
return true;
}
}
//---------------------------------------------------------------------------
-
-
-//---------------------------------------------------------------------------
-// Network
-//---------------------------------------------------------------------------
-void VlcProc::AddNetworkUDP( int port )
-{
- // Build source name
- char *s_port = new char[5];
- sprintf( s_port, "%i", port );
- string source = "udp:@:" + (string)s_port;
- delete[] s_port;
-
- playlist_Add( p_intf->p_sys->p_playlist, (char *)source.c_str(),
- PLAYLIST_APPEND, PLAYLIST_END );
-
- // Refresh interface !
- p_intf->p_sys->p_theme->EvtBank->Get( "playlist_refresh" )
- ->PostSynchroMessage();
- InterfaceRefresh();
-}
-//---------------------------------------------------------------------------
* vlcproc.h: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.h,v 1.9 2003/06/24 22:26:01 asmax Exp $
+ * $Id: vlcproc.h,v 1.10 2003/07/20 20:42:23 ipkiss Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
void MoveStream( long Pos );
void FullScreen();
void ChangeVolume( unsigned int msg, long param );
- void AddNetworkUDP( int port );
- static int RefreshCallback( vlc_object_t *p_this,
- const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val,
+ static int RefreshCallback( vlc_object_t *p_this,
+ const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val,
void *param );
- static int IntfShowCallback( vlc_object_t *p_this,
- const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val,
+ static int IntfShowCallback( vlc_object_t *p_this,
+ const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val,
void *param );
-
+
void InterfaceRefresh();
void EnabledEvent( string type, bool state );