* vlcproc.cpp: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.cpp,v 1.39 2003/06/23 20:35:36 asmax Exp $
+ * $Id: vlcproc.cpp,v 1.40 2003/06/24 22:26:01 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
{
// 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 );
}
}
return VLC_SUCCESS;
}
+// Interface show/hide callback
+int VlcProc::IntfShowCallback( vlc_object_t *p_this, const char *psz_variable,
+ vlc_value_t old_val, vlc_value_t new_val, void *param )
+{
+ if( new_val.b_bool == VLC_TRUE )
+ {
+ OSAPI_PostMessage( NULL, VLC_SHOW, 1, 0 );
+ }
+ else
+ {
+ OSAPI_PostMessage( NULL, VLC_HIDE, 1, 0 );
+ }
+ return VLC_SUCCESS;
+}
+
void VlcProc::InterfaceRefresh()
{
// Shortcut pointers
* vlcproc.h: VlcProc class
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.h,v 1.8 2003/06/23 20:35:36 asmax Exp $
+ * $Id: vlcproc.h,v 1.9 2003/06/24 22:26:01 asmax Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
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,
+ void *param );
+
void InterfaceRefresh();
void EnabledEvent( string type, bool state );
* xcommon.c: Functions common to the X11 and XVideo plugins
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.20 2003/05/28 00:52:05 titer Exp $
+ * $Id: xcommon.c,v 1.21 2003/06/24 22:26:01 asmax Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
vlc_object_release( p_intf );
}
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL )
{
break;
case Button2:
- var_Get( p_vout, "mouse-button-down", &val );
- val.i_int &= ~2;
- var_Set( p_vout, "mouse-button-down", val );
+ {
+ playlist_t *p_playlist;
+
+ var_Get( p_vout, "mouse-button-down", &val );
+ val.i_int &= ~2;
+ var_Set( p_vout, "mouse-button-down", val );
+
+ p_playlist = vlc_object_find( p_vout,
+ VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist != NULL )
+ {
+ vlc_value_t val;
+ var_Get( p_playlist, "intf-show", &val );
+ val.b_bool = !val.b_bool;
+ var_Set( p_playlist, "intf-show", val );
+ vlc_object_release( p_playlist );
+ }
+ }
break;
case Button3:
vlc_object_release( p_intf );
}
- p_playlist = vlc_object_find( p_intf,
+ p_playlist = vlc_object_find( p_vout,
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist != NULL )
* playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: playlist.c,v 1.37 2003/06/23 20:35:36 asmax Exp $
+ * $Id: playlist.c,v 1.38 2003/06/24 22:26:01 asmax Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
var_Create( p_playlist, "intf-popupmenu", VLC_VAR_VOID );
+ var_Create( p_playlist, "intf-show", VLC_VAR_BOOL );
+ val.b_bool = VLC_TRUE;
+ var_Set( p_playlist, "intf-show", val );
+
p_playlist->p_input = NULL;
p_playlist->i_status = PLAYLIST_STOPPED;
p_playlist->i_index = -1;
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.225 2003/05/25 11:31:54 gbazin Exp $
+ * $Id: video_output.c,v 1.226 2003/06/24 22:26:01 asmax Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* update using one of the THREAD_* constants.
*****************************************************************************/
void vout_Destroy( vout_thread_t *p_vout )
-{
+{
+ vlc_object_t *p_playlist;
+
/* Request thread destruction */
p_vout->b_die = VLC_TRUE;
vlc_thread_join( p_vout );
var_Destroy( p_vout, "intf-change" );
+ p_playlist = vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+
/* Free structure */
vlc_object_destroy( p_vout );
+
+ /* If it was the last vout, tell the interface to show up */
+ if( p_playlist != NULL )
+ {
+ vout_thread_t *p_another_vout = vlc_object_find( p_playlist,
+ VLC_OBJECT_VOUT, FIND_ANYWHERE );
+ if( p_another_vout == NULL )
+ {
+ vlc_value_t val;
+ val.b_bool = VLC_TRUE;
+ var_Set( p_playlist, "intf-show", val );
+ }
+ else
+ {
+ vlc_object_release( p_another_vout );
+ }
+ vlc_object_release( p_playlist );
+ }
}
/*****************************************************************************