typedef Eina_Bool (*X11_Converter_Fn_Cb) (char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
typedef int (*X11_Response_Handler_Cb) (X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *);
-typedef Eina_Bool (*X11_Notify_Handler_Cb) (Ecore_X_Event_Selection_Notify *, Elm_Selection_Data *, Tmp_Info **);
+typedef Eina_Bool (*X11_Data_Preparer_Cb) (Ecore_X_Event_Selection_Notify *, Elm_Selection_Data *, Tmp_Info **);
static void _x11_sel_obj_del (void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED);
static void _x11_sel_obj_del2 (void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED);
static Eina_Bool _x11_vcard_send (char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
static Eina_Bool _x11_is_uri_type_data (X11_Cnp_Selection *sel EINA_UNUSED, Ecore_X_Event_Selection_Notify *notify);
static Eina_Bool _x11_notify_handler_targets (X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify);
-static Eina_Bool _x11_notify_handler_text (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
-static Eina_Bool _x11_notify_handler_image (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
-static Eina_Bool _x11_notify_handler_uri (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
+static Eina_Bool _x11_data_preparer_text (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
+static Eina_Bool _x11_data_preparer_image (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
+static Eina_Bool _x11_data_preparer_uri (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
//static int _x11_notify_handler_html (X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify);
-static Eina_Bool _x11_vcard_receive (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
+static Eina_Bool _x11_data_preparer_vcard (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
static Eina_Bool _x11_dnd_enter (void *data EINA_UNUSED, int etype EINA_UNUSED, void *ev);
static Eina_Bool _x11_dnd_drop (void *data EINA_UNUSED, int etype EINA_UNUSED, void *ev);
static Eina_Bool _x11_dnd_position (void *data EINA_UNUSED, int etype EINA_UNUSED, void *ev);
#ifdef HAVE_ELEMENTARY_X
/* Called by ecore to do conversion */
X11_Converter_Fn_Cb x_converter;
- X11_Notify_Handler_Cb x_notify;
+ X11_Data_Preparer_Cb x_data_preparer;
/* Atom */
Ecore_X_Atom x_atom;
#endif
.formats = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE, /* Either images or entries */
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_general_converter,
- .x_notify = _x11_notify_handler_uri,
+ .x_data_preparer = _x11_data_preparer_uri,
#endif
},
ARRAYINIT(CNP_ATOM_text_urilist) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_general_converter,
- .x_notify = _x11_notify_handler_uri,
+ .x_data_preparer = _x11_data_preparer_uri,
#endif
},
ARRAYINIT(CNP_ATOM_text_x_vcard) {
.formats = ELM_SEL_FORMAT_VCARD,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_vcard_send,
- .x_notify = _x11_vcard_receive,
+ .x_data_preparer = _x11_data_preparer_vcard,
#endif
},
ARRAYINIT(CNP_ATOM_image_png) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_jpeg) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_bmp) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_gif) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_tiff) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_svg) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_xpm) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_tga) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
ARRAYINIT(CNP_ATOM_image_ppm) {
.formats = ELM_SEL_FORMAT_IMAGE,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_image_converter,
- .x_notify = _x11_notify_handler_image,
+ .x_data_preparer = _x11_data_preparer_image,
#endif
},
/*
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
ARRAYINIT(CNP_ATOM_STRING) {
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
ARRAYINIT(CNP_ATOM_COMPOUND_TEXT) {
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
ARRAYINIT(CNP_ATOM_TEXT) {
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
ARRAYINIT(CNP_ATOM_text_plain_utf8) {
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
ARRAYINIT(CNP_ATOM_text_plain) {
.formats = ELM_SEL_FORMAT_TEXT | ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_HTML,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_text_converter,
- .x_notify = _x11_notify_handler_text,
+ .x_data_preparer = _x11_data_preparer_text,
#endif
},
};
{
if (!strcmp(ev->target, _atoms[i].name))
{
- if (_atoms[i].x_notify)
+ if (_atoms[i].x_data_preparer)
{
Elm_Selection_Data ddata;
Tmp_Info *tmp_info = NULL;
Eina_Bool success;
ddata.data = NULL;
cnp_debug("Found something: %s\n", _atoms[i].name);
- success = _atoms[i].x_notify(ev, &ddata, &tmp_info);
+ success = _atoms[i].x_data_preparer(ev, &ddata, &tmp_info);
if (_atoms[i].formats == ELM_SEL_FORMAT_IMAGE && savedtypes.imgfile) break;
if (ev->selection == ECORE_X_SELECTION_XDND)
{
if (!(_atoms[j].formats & sel->requestformat)) continue;
for (i = 0; i < targets->data.length; i++)
{
- if ((_atoms[j].x_atom == atomlist[i]) && (_atoms[j].x_notify))
+ if ((_atoms[j].x_atom == atomlist[i]) && (_atoms[j].x_data_preparer))
{
if ((j == CNP_ATOM_text_uri) ||
(j == CNP_ATOM_text_urilist))
}
static Eina_Bool
-_x11_notify_handler_text(Ecore_X_Event_Selection_Notify *notify,
+_x11_data_preparer_text(Ecore_X_Event_Selection_Notify *notify,
Elm_Selection_Data *ddata, Tmp_Info **tmp_info EINA_UNUSED)
{
Ecore_X_Selection_Data *data = notify->data;
* So someone is pasting an image into my entry or widget...
*/
static Eina_Bool
-_x11_notify_handler_uri(Ecore_X_Event_Selection_Notify *notify,
+_x11_data_preparer_uri(Ecore_X_Event_Selection_Notify *notify,
Elm_Selection_Data *ddata, Tmp_Info **tmp_info EINA_UNUSED)
{
Ecore_X_Selection_Data *data;
* Just received an vcard, either through cut and paste, or dnd.
*/
static Eina_Bool
-_x11_vcard_receive(Ecore_X_Event_Selection_Notify *notify,
+_x11_data_preparer_vcard(Ecore_X_Event_Selection_Notify *notify,
Elm_Selection_Data *ddata, Tmp_Info **tmp_info EINA_UNUSED)
{
cnp_debug("vcard receive\n");
}
static Eina_Bool
-_x11_notify_handler_image(Ecore_X_Event_Selection_Notify *notify,
+_x11_data_preparer_image(Ecore_X_Event_Selection_Notify *notify,
Elm_Selection_Data *ddata, Tmp_Info **tmp_info)
{
Ecore_X_Selection_Data *data = notify->data;