diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-25 01:51:58 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-25 01:51:58 +0000 |
commit | 1988e13749e613b4b378be1a6cb4bad7f17bebb0 (patch) | |
tree | 0f5775f3f599586a2885149f73c9ec43797bb77a /gtk/gtkdnd.h | |
parent | 24a325c67a12ad928180e96aad8483837e26125f (diff) | |
download | gtk+-1988e13749e613b4b378be1a6cb4bad7f17bebb0.tar.gz |
Add a special size for drag-and-drop GTK_ICON_SIZE_DND (Default to 32x32)
Sun Jun 24 21:34:32 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h gtk/gtkiconfactory.c: Add a special size for
drag-and-drop GTK_ICON_SIZE_DND (Default to 32x32)
* gtk/gtkdnd.c (gtk_drag_dest_set_target_list): Fix problem
with un'reffing wrong list reported by Jeff Franks.
* gtk/gtkdnd.[ch] (_gtk_drag_{source,}dest_handle_event): _prefix.
* gtk/gtkdnd.c (gtk_drag_set_icon_default): Use GTK_STOCK_DND
for the default icon. Remove inline XPM.
* gtk/gtkstock.h gtk/gtkiconfactory.c:
Add GTK_STOCK_DND GTK_STOCK_DND_MULTIPLE (Currently, stock_new
is used for GTK_STOCK_DND, but it is a bit too small.)
* gtk/stock-icons/stock_dnd_multiple.png
gtk/stock-icons/Makefile.am: New stock icon moved from gnome-libs.
* gtk/gtkdnd.c (gtk_drag_source_event_cb): Only return
TRUE when starting a drag. In other cases, we are
just observing. (#52995)
* gtk/gtkdnd.[ch] (gtk_drag_set_icon_{stock,pixbuf}): Add
function to set the icon for a drag from a GdkPixbuf
or stock ID.
* gtk/gtkdnd.[ch] (gtk_drag_source_set_icon_{stock,pixbuf}):
Likewise, for drag sources.
* gtk/gtkdnd.h: Deprecate gtk_drag_set_default_icon.
(Now should be done using the stock system.)
Diffstat (limited to 'gtk/gtkdnd.h')
-rw-r--r-- | gtk/gtkdnd.h | 64 |
1 files changed, 38 insertions, 26 deletions
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h index 1a589d349b..8bb7aeb429 100644 --- a/gtk/gtkdnd.h +++ b/gtk/gtkdnd.h @@ -96,10 +96,14 @@ void gtk_drag_source_set (GtkWidget *widget, void gtk_drag_source_unset (GtkWidget *widget); -void gtk_drag_source_set_icon (GtkWidget *widget, - GdkColormap *colormap, - GdkPixmap *pixmap, - GdkBitmap *mask); +void gtk_drag_source_set_icon (GtkWidget *widget, + GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask); +void gtk_drag_source_set_icon_pixbuf (GtkWidget *widget, + GdkPixbuf *pixbuf); +void gtk_drag_source_set_icon_stock (GtkWidget *widget, + const gchar *stock_id); /* There probably should be functions for setting the targets * as a GtkTargetList @@ -113,27 +117,27 @@ GdkDragContext *gtk_drag_begin (GtkWidget *widget, /* Set the image being dragged around */ -void gtk_drag_set_icon_widget (GdkDragContext *context, - GtkWidget *widget, - gint hot_x, - gint hot_y); - -void gtk_drag_set_icon_pixmap (GdkDragContext *context, - GdkColormap *colormap, - GdkPixmap *pixmap, - GdkBitmap *mask, - gint hot_x, - gint hot_y); +void gtk_drag_set_icon_widget (GdkDragContext *context, + GtkWidget *widget, + gint hot_x, + gint hot_y); +void gtk_drag_set_icon_pixmap (GdkDragContext *context, + GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask, + gint hot_x, + gint hot_y); +void gtk_drag_set_icon_pixbuf (GdkDragContext *context, + GdkPixbuf *pixbuf, + gint hot_x, + gint hot_y); +void gtk_drag_set_icon_stock (GdkDragContext *context, + const gchar *stock_id, + gint hot_x, + gint hot_y); void gtk_drag_set_icon_default (GdkDragContext *context); -void gtk_drag_set_default_icon (GdkColormap *colormap, - GdkPixmap *pixmap, - GdkBitmap *mask, - gint hot_x, - gint hot_y); - - gboolean gtk_drag_check_threshold (GtkWidget *widget, gint start_x, gint start_y, @@ -141,10 +145,18 @@ gboolean gtk_drag_check_threshold (GtkWidget *widget, gint current_y); /* Internal functions */ -void gtk_drag_source_handle_event (GtkWidget *widget, - GdkEvent *event); -void gtk_drag_dest_handle_event (GtkWidget *toplevel, - GdkEvent *event); +void _gtk_drag_source_handle_event (GtkWidget *widget, + GdkEvent *event); +void _gtk_drag_dest_handle_event (GtkWidget *toplevel, + GdkEvent *event); + +#ifndef GTK_DISABLE_DEPRECATED +void gtk_drag_set_default_icon (GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask, + gint hot_x, + gint hot_y); +#endif /* !GTK_DISABLE_DEPRECATED */ #ifdef __cplusplus } |