forked from enlightenment/efl
ecore-x: expose ecore_x_selection_converter_text
Needed to convert COMPOUND_TEXT SVN revision: 77477
This commit is contained in:
parent
aa484b1411
commit
248fb9b2d9
|
@ -981,3 +981,7 @@
|
||||||
2012-10-04 Cedric Bail
|
2012-10-04 Cedric Bail
|
||||||
|
|
||||||
* Add ecore_x_input_raw_select and ECORE_X_RAW_*.
|
* Add ecore_x_input_raw_select and ECORE_X_RAW_*.
|
||||||
|
|
||||||
|
2012-10-04 Sebastian Dransfeld
|
||||||
|
|
||||||
|
* Expose ecore_x_selection_converter_text
|
||||||
|
|
|
@ -10,6 +10,7 @@ Additions:
|
||||||
- ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP.
|
- ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP.
|
||||||
- ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN.
|
- ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN.
|
||||||
- ecore_x_input_raw_select.
|
- ecore_x_input_raw_select.
|
||||||
|
- +ecore_x_selection_converter_text.
|
||||||
- ECORE_X_RAW_MOTION, ECORE_X_RAW_BUTTON_PRESS and ECORE_X_RAW_BUTTON_RELEASE.
|
- ECORE_X_RAW_MOTION, ECORE_X_RAW_BUTTON_PRESS and ECORE_X_RAW_BUTTON_RELEASE.
|
||||||
* ecore_imf:
|
* ecore_imf:
|
||||||
- ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN.
|
- ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN.
|
||||||
|
|
|
@ -1308,6 +1308,7 @@ EAPI void ecore_x_selection_parser_add(const char *target,
|
||||||
EAPI void ecore_x_selection_parser_del(const char *target);
|
EAPI void ecore_x_selection_parser_del(const char *target);
|
||||||
EAPI void ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tm);
|
EAPI void ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tm);
|
||||||
EAPI Ecore_X_Window ecore_x_selection_owner_get(Ecore_X_Atom atom);
|
EAPI Ecore_X_Window ecore_x_selection_owner_get(Ecore_X_Atom atom);
|
||||||
|
EAPI Eina_Bool ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *targprop, int *s); /** @since 1.8 */
|
||||||
|
|
||||||
EAPI void ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on);
|
EAPI void ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on);
|
||||||
EAPI int ecore_x_dnd_version_get(Ecore_X_Window win);
|
EAPI int ecore_x_dnd_version_get(Ecore_X_Window win);
|
||||||
|
|
|
@ -4,13 +4,6 @@
|
||||||
#define ECORE_XCB_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
|
#define ECORE_XCB_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static Eina_Bool _ecore_xcb_selection_converter_text(char *target,
|
|
||||||
void *data,
|
|
||||||
int size,
|
|
||||||
void **data_ret,
|
|
||||||
int *size_ret,
|
|
||||||
Ecore_X_Atom *type,
|
|
||||||
int *size_type);
|
|
||||||
static void *_ecore_xcb_selection_parser_text(const char *target __UNUSED__,
|
static void *_ecore_xcb_selection_parser_text(const char *target __UNUSED__,
|
||||||
void *data,
|
void *data,
|
||||||
int size,
|
int size,
|
||||||
|
@ -53,13 +46,13 @@ _ecore_xcb_selection_init(void)
|
||||||
|
|
||||||
/* init converters */
|
/* init converters */
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
|
||||||
_ecore_xcb_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
|
||||||
_ecore_xcb_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
|
||||||
_ecore_xcb_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
|
||||||
_ecore_xcb_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
|
|
||||||
/* init parsers */
|
/* init parsers */
|
||||||
ecore_x_selection_parser_add("text/plain",
|
ecore_x_selection_parser_add("text/plain",
|
||||||
|
@ -672,14 +665,14 @@ _ecore_xcb_selection_request(Ecore_X_Window win,
|
||||||
XCB_CURRENT_TIME);
|
XCB_CURRENT_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
EAPI Eina_Bool
|
||||||
_ecore_xcb_selection_converter_text(char *target,
|
ecore_x_selection_converter_text(char *target,
|
||||||
void *data,
|
void *data,
|
||||||
int size,
|
int size,
|
||||||
void **data_ret,
|
void **data_ret,
|
||||||
int *size_ret,
|
int *size_ret,
|
||||||
Ecore_X_Atom *type __UNUSED__,
|
Ecore_X_Atom *type __UNUSED__,
|
||||||
int *size_type __UNUSED__)
|
int *size_type __UNUSED__)
|
||||||
{
|
{
|
||||||
Ecore_Xcb_Encoding_Style style;
|
Ecore_Xcb_Encoding_Style style;
|
||||||
Ecore_Xcb_Textproperty ret;
|
Ecore_Xcb_Textproperty ret;
|
||||||
|
|
|
@ -15,13 +15,6 @@ static Ecore_X_Selection_Intern selections[4];
|
||||||
static Ecore_X_Selection_Converter *converters = NULL;
|
static Ecore_X_Selection_Converter *converters = NULL;
|
||||||
static Ecore_X_Selection_Parser *parsers = NULL;
|
static Ecore_X_Selection_Parser *parsers = NULL;
|
||||||
|
|
||||||
static Eina_Bool _ecore_x_selection_converter_text(char *target,
|
|
||||||
void *data,
|
|
||||||
int size,
|
|
||||||
void **data_ret,
|
|
||||||
int *size_ret,
|
|
||||||
Ecore_X_Atom *tprop,
|
|
||||||
int *);
|
|
||||||
static int _ecore_x_selection_data_default_free(void *data);
|
static int _ecore_x_selection_data_default_free(void *data);
|
||||||
static void *_ecore_x_selection_parser_files(const char *target,
|
static void *_ecore_x_selection_parser_files(const char *target,
|
||||||
void *data,
|
void *data,
|
||||||
|
@ -49,15 +42,15 @@ _ecore_x_selection_data_init(void)
|
||||||
|
|
||||||
/* Initialize converters */
|
/* Initialize converters */
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
|
||||||
_ecore_x_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
#ifdef X_HAVE_UTF8_STRING
|
#ifdef X_HAVE_UTF8_STRING
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
|
||||||
_ecore_x_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
#endif /* ifdef X_HAVE_UTF8_STRING */
|
#endif /* ifdef X_HAVE_UTF8_STRING */
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
|
||||||
_ecore_x_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
|
ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
|
||||||
_ecore_x_selection_converter_text);
|
ecore_x_selection_converter_text);
|
||||||
|
|
||||||
/* Initialize parsers */
|
/* Initialize parsers */
|
||||||
ecore_x_selection_parser_add("text/plain",
|
ecore_x_selection_parser_add("text/plain",
|
||||||
|
@ -582,14 +575,14 @@ ecore_x_selection_convert(Ecore_X_Atom selection,
|
||||||
/* TODO: We need to work out a mechanism for automatic conversion to any requested
|
/* TODO: We need to work out a mechanism for automatic conversion to any requested
|
||||||
* locale using Ecore_Txt functions */
|
* locale using Ecore_Txt functions */
|
||||||
/* Converter for standard non-utf8 text targets */
|
/* Converter for standard non-utf8 text targets */
|
||||||
static Eina_Bool
|
EAPI Eina_Bool
|
||||||
_ecore_x_selection_converter_text(char *target,
|
ecore_x_selection_converter_text(char *target,
|
||||||
void *data,
|
void *data,
|
||||||
int size,
|
int size,
|
||||||
void **data_ret,
|
void **data_ret,
|
||||||
int *size_ret,
|
int *size_ret,
|
||||||
Ecore_X_Atom *targprop __UNUSED__,
|
Ecore_X_Atom *targprop __UNUSED__,
|
||||||
int *s __UNUSED__)
|
int *s __UNUSED__)
|
||||||
{
|
{
|
||||||
XTextProperty text_prop;
|
XTextProperty text_prop;
|
||||||
char *mystr;
|
char *mystr;
|
||||||
|
|
Loading…
Reference in New Issue