r4888: Don't try to thumbnail zero-byte files. They're either empty, or special and
[rox-filer/translations.git] / ROX-Filer / src / dnd.h
blob8bd1dfc5431ed9513c9ded225fadd29b2e015d4e
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _DND_H
7 #define _DND_H
9 #include <gtk/gtk.h>
11 enum
13 TARGET_RAW,
14 TARGET_URI_LIST,
15 TARGET_UTF8,
16 TARGET_XDS,
17 TARGET_STRING,
18 TARGET_MOZ_URL,
21 typedef enum {
22 MOTION_NONE, /* Ignoring motion events - click to start! */
23 MOTION_REPOSITION, /* Motion events move current_grab_icon */
24 MOTION_READY_FOR_DND, /* Moving much will start dnd */
25 MOTION_DISABLED, /* Release all buttons to go to MOTION_NONE */
26 } MotionType;
27 extern MotionType motion_state;
28 extern gint drag_start_x, drag_start_y;
29 extern gint motion_buttons_pressed;
31 extern gboolean o_no_hostnames;
32 extern int spring_in_progress;
33 extern Option o_dnd_spring_open, o_dnd_drag_to_icons;
34 extern Option o_dnd_left_menu;
35 extern const char *drop_dest_prog;
36 extern const char *drop_dest_dir;
37 extern const char *drop_dest_pass_through;
38 extern const char *drop_dest_bookmark;
39 extern GdkAtom XdndDirectSave0;
40 extern GdkAtom text_uri_list;
41 extern GdkAtom _rox_run_action;
42 extern GdkAtom xa_application_octet_stream;
43 extern GdkAtom xa_string;
45 void drag_selection(GtkWidget *widget, GdkEventMotion *event, guchar *uri_list);
46 void drag_one_item(GtkWidget *widget,
47 GdkEventMotion *event,
48 const guchar *full_path,
49 DirItem *item,
50 MaskedPixmap *image);
51 void drag_data_get(GtkWidget *widget,
52 GdkDragContext *context,
53 GtkSelectionData *selection_data,
54 guint info,
55 guint32 time,
56 gpointer data);
57 void make_drop_target(GtkWidget *widget, GtkDestDefaults defaults);
58 void drag_set_pinboard_dest(GtkWidget *widget);
59 void dnd_init(void);
60 gboolean provides(GdkDragContext *context, GdkAtom target);
62 void dnd_spring_load(GdkDragContext *context, FilerWindow *src_win);
63 void dnd_spring_abort(void);
64 const guchar *dnd_motion_item(GdkDragContext *context, DirItem **item_p);
66 gboolean dnd_motion_press(GtkWidget *widget, GdkEventButton *event);
67 void dnd_motion_start(MotionType motion);
68 gboolean dnd_motion_release(GdkEventButton *event);
69 void dnd_motion_disable(void);
70 void dnd_motion_ungrab(void);
71 gboolean dnd_motion_moved(GdkEventMotion *event);
72 void dnd_motion_grab_pointer(void);
74 #endif /* _DND_H */