#include "intf_plst.h"
#include "intf_msg.h"
-#include "gtk_sys.h"
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
+#include "gtk_sys.h"
#include "main.h"
-/*****************************************************************************
- * Inline function to retrieve the interface structure
- *****************************************************************************/
-static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
-{
- return( gtk_object_get_data( GTK_OBJECT( lookup_widget(item, psz_parent) ),
- "p_intf" ) );
-}
-
/*****************************************************************************
* Callbacks
******************************************************************************/
}
}
+
+gboolean
+on_playlist_clist_drag_motion (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ guint time,
+ gpointer user_data)
+{
+ GtkCList * clist;
+ gint row,col;
+ int dummy;
+ gchar * text[2];
+ GdkColor color;
+ intf_thread_t *p_intf = GetIntf( GTK_WIDGET(widget), "intf_playlist" );
+
+
+ clist = GTK_CLIST(lookup_widget( p_intf->p_sys->p_playlist,"playlist_clist"
+ ));
+
+ if(!GTK_WIDGET_TOPLEVEL(widget))
+ {
+ gdk_window_raise( p_intf->p_sys->p_playlist->window );
+ }
+
+ color.red = 0xffff;
+ color.green = 0xffff;
+ color.blue = 0xffff;
+
+ gtk_clist_freeze( clist );
+
+ for(dummy=0; dummy<clist->rows; dummy++)
+ {
+ gtk_clist_set_background ( clist, dummy , &color);
+ }
+ color.red = 0xffff;
+ color.green = 0;
+ color.blue = 0;
+ gtk_clist_set_background ( clist, p_main->p_playlist->i_index , &color);
+
+ if( gtk_clist_get_selection_info( clist,x,y ,&row,&col )== 1)
+ {
+ color.red = 0;
+ color.green = 0x9000;
+ color.blue = 0xf000;
+ gtk_clist_set_background ( clist, row-1 , &color);
+ gtk_clist_set_background ( clist, row , &color);
+ }
+
+ gtk_clist_thaw( clist );
+
+ return TRUE;
+}
+
void
on_invertselection_clicked (GtkMenuItem *menuitem,
gpointer user_data);
+
+gboolean
+on_playlist_clist_drag_motion (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ guint time,
+ gpointer user_data);
gtk_signal_connect (GTK_OBJECT (playlist_clist), "drag_data_received",
GTK_SIGNAL_FUNC (on_intf_playlist_drag_data_received),
NULL);
+ gtk_signal_connect (GTK_OBJECT (playlist_clist), "drag_motion",
+ GTK_SIGNAL_FUNC (on_playlist_clist_drag_motion),
+ NULL);
return intf_playlist;
}
#include "intf_msg.h"
#include "intf_urldecode.h"
-#include "gtk_sys.h"
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
+#include "gtk_sys.h"
#include "main.h"
void on_generic_drop_data_received( intf_thread_t * p_intf,
GtkSelectionData *data, guint info, int position);
-
-static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
-{
- return( gtk_object_get_data( GTK_OBJECT( lookup_widget(item, psz_parent) ),
- "p_intf" ) );
-}
-
-
-
void
on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data)
&row,
&col )== 1)
{
- on_generic_drop_data_received( p_intf, data, info, row -1 /*TRICK ! */);
+ on_generic_drop_data_received( p_intf, data, info, row );
} else {
on_generic_drop_data_received( p_intf, data, info, PLAYLIST_END);
}
* gtk_sys.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_sys.h,v 1.4 2001/03/08 13:32:55 octplane Exp $
+ * $Id: gtk_sys.h,v 1.5 2001/03/09 19:38:47 octplane Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#define DROP_ACCEPT_TEXT_URI_LIST 0
#define DROP_ACCEPT_TEXT_PLAIN 1
+/*****************************************************************************
+ * useful inline function
+ ****************************************************************************/
+static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
+{
+ return( gtk_object_get_data( GTK_OBJECT( lookup_widget(item, psz_parent) ),
+ "p_intf" ) );
+}
+
+
+
+
/*****************************************************************************
* intf_sys_t: description and status of Gtk+ interface
*****************************************************************************/
* intf_gtk.c: Gtk+ interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_gtk.c,v 1.8 2001/03/08 21:47:02 octplane Exp $
+ * $Id: intf_gtk.c,v 1.9 2001/03/09 19:38:47 octplane Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
#include "intf_msg.h"
#include "interface.h"
-#include "gtk_sys.h"
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
+#include "gtk_sys.h"
#include "main.h"
<handler>on_intf_playlist_drag_data_received</handler>
<last_modification_time>Thu, 08 Mar 2001 12:00:13 GMT</last_modification_time>
</signal>
+ <signal>
+ <name>drag_motion</name>
+ <handler>on_playlist_clist_drag_motion</handler>
+ <last_modification_time>Fri, 09 Mar 2001 18:32:47 GMT</last_modification_time>
+ </signal>
<columns>2</columns>
<column_widths>257,80</column_widths>
<selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
/* This hack is hugly, but hey, you are, too. */
SDL_Overlay * p_overlay;
-
- p_overlay = SDL_CreateYUVOverlay( VOUT_WIDTH_DEFAULT, VOUT_HEIGHT_DEFAULT,
+
+ p_overlay = SDL_CreateYUVOverlay(
+ main_GetIntVariable( VOUT_WIDTH_VAR,VOUT_WIDTH_DEFAULT ),
+ main_GetIntVariable( VOUT_HEIGHT_VAR,VOUT_HEIGHT_DEFAULT ),
SDL_YV12_OVERLAY,
p_vout->p_sys->p_display );
intf_Msg( "vout: YUV acceleration %s",
}
else
{
-
/*
* p_vout->p_rendered_pic->p_y/u/v contains the YUV buffers to
* render