3 typedef enum _E_Drag_Type
10 typedef struct _E_Drag E_Drag;
11 typedef struct _E_Drop_Handler E_Drop_Handler;
12 typedef struct _E_Event_Dnd_Enter E_Event_Dnd_Enter;
13 typedef struct _E_Event_Dnd_Move E_Event_Dnd_Move;
14 typedef struct _E_Event_Dnd_Leave E_Event_Dnd_Leave;
15 typedef struct _E_Event_Dnd_Drop E_Event_Dnd_Drop;
16 typedef struct E_Dnd_X_Moz_Url E_Dnd_X_Moz_Url;
22 #define E_DRAG_TYPE 0xE0b0100f
26 E_Object e_obj_inherit;
35 void *(*convert)(E_Drag * drag, const char *type);
36 void (*finished)(E_Drag *drag, int dropped);
37 void (*key_down)(E_Drag *drag, Ecore_Event_Key *e);
38 void (*key_up)(E_Drag *drag, Ecore_Event_Key *e);
43 Evas_Object *comp_object;
50 unsigned char visible : 1;
52 unsigned int num_types;
56 struct _E_Drop_Handler
60 void (*enter)(void *data, const char *type, void *event);
61 void (*move)(void *data, const char *type, void *event);
62 void (*leave)(void *data, const char *type, void *event);
63 void (*drop)(void *data, const char *type, void *event);
64 Eina_Bool (*xds)(void *data, const char *type);
72 const char *active_type;
74 Eina_Bool entered : 1;
76 unsigned int num_types;
77 Eina_Stringshare *types[];
80 struct _E_Event_Dnd_Enter
87 struct _E_Event_Dnd_Move
93 struct _E_Event_Dnd_Leave
98 struct _E_Event_Dnd_Drop
104 struct E_Dnd_X_Moz_Url
107 Eina_Inarray *link_names;
110 EINTERN int e_dnd_init(void);
111 EINTERN int e_dnd_shutdown(void);
113 EAPI int e_dnd_active(void);
115 /* x and y are the top left coords of the object that is to be dragged */
116 EAPI E_Drag *e_drag_new(E_Comp *comp, int x, int y,
117 const char **types, unsigned int num_types,
118 void *data, int size,
119 void *(*convert_cb)(E_Drag * drag, const char *type),
120 void (*finished_cb)(E_Drag *drag, int dropped));
121 EAPI Evas *e_drag_evas_get(const E_Drag *drag);
122 EAPI void e_drag_object_set(E_Drag *drag, Evas_Object *object);
123 EAPI void e_drag_move(E_Drag *drag, int x, int y);
124 EAPI void e_drag_resize(E_Drag *drag, int w, int h);
125 EAPI void e_drag_key_down_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e));
126 EAPI void e_drag_key_up_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e));
128 /* x and y are the coords where the mouse is when dragging starts */
129 EAPI int e_drag_start(E_Drag *drag, int x, int y);
130 EAPI int e_drag_xdnd_start(E_Drag *drag, int x, int y);
132 EAPI void e_drop_xds_update(Eina_Bool enable, const char *value);
133 EAPI void e_drop_handler_xds_set(E_Drop_Handler *handler, Eina_Bool (*cb)(void *data, const char *type));
134 EAPI E_Drop_Handler *e_drop_handler_add(E_Object *obj,
136 void (*enter_cb)(void *data, const char *type, void *event),
137 void (*move_cb)(void *data, const char *type, void *event),
138 void (*leave_cb)(void *data, const char *type, void *event),
139 void (*drop_cb)(void *data, const char *type, void *event),
140 const char **types, unsigned int num_types,
141 int x, int y, int w, int h);
142 EAPI void e_drop_handler_geometry_set(E_Drop_Handler *handler, int x, int y, int w, int h);
143 EAPI int e_drop_inside(const E_Drop_Handler *handler, int x, int y);
144 EAPI void e_drop_handler_del(E_Drop_Handler *handler);
145 EAPI int e_drop_xdnd_register_set(Ecore_X_Window win, int reg);
146 EAPI void e_drop_handler_responsive_set(E_Drop_Handler *handler);
147 EAPI int e_drop_handler_responsive_get(const E_Drop_Handler *handler);
148 EAPI void e_drop_handler_action_set(Ecore_X_Atom action);
149 EAPI Ecore_X_Atom e_drop_handler_action_get(void);
150 EAPI Eina_List *e_dnd_util_text_uri_list_convert(char *data, int size);
154 e_drag_show(E_Drag *drag)
160 e_drag_hide(E_Drag *drag)