forked from enlightenment/efl
Move the content description for the selection notify into the data.
Add the content description in provided parsers. SVN revision: 23884
This commit is contained in:
parent
37642982f7
commit
1ce85d7f7f
|
@ -548,6 +548,10 @@ struct _Ecore_X_Event_Selection_Notify
|
|||
Ecore_X_Selection selection;
|
||||
char *target;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct _Ecore_X_Selection_Data
|
||||
{
|
||||
enum {
|
||||
ECORE_X_SELECTION_CONTENT_NONE,
|
||||
ECORE_X_SELECTION_CONTENT_TEXT,
|
||||
|
@ -555,10 +559,6 @@ struct _Ecore_X_Event_Selection_Notify
|
|||
ECORE_X_SELECTION_CONTENT_TARGETS,
|
||||
ECORE_X_SELECTION_CONTENT_CUSTOM
|
||||
} content;
|
||||
};
|
||||
|
||||
struct _Ecore_X_Selection_Data
|
||||
{
|
||||
unsigned char *data;
|
||||
int length;
|
||||
|
||||
|
|
|
@ -679,6 +679,9 @@ _ecore_x_selection_parser_files(const char *target, unsigned char *data, int siz
|
|||
free(tmp);
|
||||
free(data);
|
||||
|
||||
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_FILES;
|
||||
ECORE_X_SELECTION_DATA(sel)->length = sel->num_files;
|
||||
|
||||
return ECORE_X_SELECTION_DATA(sel);
|
||||
}
|
||||
|
||||
|
@ -715,6 +718,8 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, unsigned char *dat
|
|||
}
|
||||
|
||||
sel->text = (char *)data;
|
||||
ECORE_X_SELECTION_DATA(sel)->length = size;
|
||||
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TEXT;
|
||||
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free;
|
||||
return sel;
|
||||
}
|
||||
|
@ -747,6 +752,8 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__, unsigned char *
|
|||
free(data);
|
||||
|
||||
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_targets_free;
|
||||
ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS;
|
||||
ECORE_X_SELECTION_DATA(sel)->length = size;
|
||||
return sel;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue