diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-05-06 04:14:32 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-05-06 04:14:32 +0000 |
commit | 3e77a18b4a9c898f4a5b87cbca005e4041189fef (patch) | |
tree | eb1e2ea0c5e4ae12e1d3b0451d32a98119cdced4 /gtk/gtkiconview.h | |
parent | f8e922f9ec3a45181786daa0000308e0cbd6a2e9 (diff) | |
download | gtk+-3e77a18b4a9c898f4a5b87cbca005e4041189fef.tar.gz |
Test DND.
2005-05-06 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Test DND.
* gtk/gtk.symbols:
* gtk/gtkiconview.[hc]: Add DND support similar to the DND
support in the tree view. (#150270)
Diffstat (limited to 'gtk/gtkiconview.h')
-rw-r--r-- | gtk/gtkiconview.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gtk/gtkiconview.h b/gtk/gtkiconview.h index cfccd635ed..7b42b50d69 100644 --- a/gtk/gtkiconview.h +++ b/gtk/gtkiconview.h @@ -22,6 +22,7 @@ #include <gtk/gtkcontainer.h> #include <gtk/gtktreemodel.h> #include <gtk/gtkcellrenderer.h> +#include <gtk/gtkselection.h> G_BEGIN_DECLS @@ -40,6 +41,16 @@ typedef void (* GtkIconViewForeachFunc) (GtkIconView *icon_view, GtkTreePath *path, gpointer data); +typedef enum +{ + GTK_ICON_VIEW_NO_DROP, + GTK_ICON_VIEW_DROP_INTO, + GTK_ICON_VIEW_DROP_LEFT, + GTK_ICON_VIEW_DROP_RIGHT, + GTK_ICON_VIEW_DROP_ABOVE, + GTK_ICON_VIEW_DROP_BELOW +} GtkIconViewDropPosition; + struct _GtkIconView { GtkContainer parent; @@ -144,6 +155,39 @@ gboolean gtk_icon_view_get_cursor (GtkIconView *icon_ GtkTreePath **path, GtkCellRenderer **cell); +/* Drag-and-Drop support */ +void gtk_icon_view_enable_model_drag_source (GtkIconView *icon_view, + GdkModifierType start_button_mask, + const GtkTargetEntry *targets, + gint n_targets, + GdkDragAction actions); +void gtk_icon_view_enable_model_drag_dest (GtkIconView *icon_view, + const GtkTargetEntry *targets, + gint n_targets, + GdkDragAction actions); +void gtk_icon_view_unset_model_drag_source (GtkIconView *icon_view); +void gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view); +void gtk_icon_view_set_reorderable (GtkIconView *icon_view, + gboolean reorderable); +gboolean gtk_icon_view_get_reorderable (GtkIconView *icon_view); + + +/* These are useful to implement your own custom stuff. */ +void gtk_icon_view_set_drag_dest_item (GtkIconView *icon_view, + GtkTreePath *path, + GtkIconViewDropPosition pos); +void gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view, + GtkTreePath **path, + GtkIconViewDropPosition *pos); +gboolean gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view, + gint drag_x, + gint drag_y, + GtkTreePath **path, + GtkIconViewDropPosition *pos); +GdkPixmap *gtk_icon_view_create_drag_icon (GtkIconView *icon_view, + GtkTreePath *path); + + G_END_DECLS #endif /* __GTK_ICON_VIEW_H__ */ |