forked from enlightenment/efl
parent
fcd8351553
commit
9d7fe9552c
|
@ -422,6 +422,7 @@ ecore_x_shutdown(void)
|
||||||
_ecore_x_filter_handler = NULL;
|
_ecore_x_filter_handler = NULL;
|
||||||
_ecore_x_disp = NULL;
|
_ecore_x_disp = NULL;
|
||||||
_ecore_x_event_handlers = NULL;
|
_ecore_x_event_handlers = NULL;
|
||||||
|
_ecore_x_selection_shutdown();
|
||||||
if (_ecore_x_init_count < 0) _ecore_x_init_count = 0;
|
if (_ecore_x_init_count < 0) _ecore_x_init_count = 0;
|
||||||
return _ecore_x_init_count;
|
return _ecore_x_init_count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
|
||||||
void _ecore_x_event_handle_shape_change(XEvent *xevent);
|
void _ecore_x_event_handle_shape_change(XEvent *xevent);
|
||||||
|
|
||||||
void _ecore_x_selection_data_initialize(void);
|
void _ecore_x_selection_data_initialize(void);
|
||||||
|
void _ecore_x_selection_shutdown(void);
|
||||||
Atom _ecore_x_selection_target_atom_get(char *target);
|
Atom _ecore_x_selection_target_atom_get(char *target);
|
||||||
char * _ecore_x_selection_target_get(Atom target);
|
char * _ecore_x_selection_target_get(Atom target);
|
||||||
void _ecore_x_selection_request_data_set(Ecore_X_Selection_Data data);
|
void _ecore_x_selection_request_data_set(Ecore_X_Selection_Data data);
|
||||||
|
|
|
@ -3,28 +3,40 @@
|
||||||
#include <Ecore_X.h>
|
#include <Ecore_X.h>
|
||||||
#include <Ecore_Txt.h>
|
#include <Ecore_Txt.h>
|
||||||
|
|
||||||
/* FIXME: Initialize! */
|
static Ecore_X_Selection_Data selections[3] = {{0}};
|
||||||
static Ecore_X_Selection_Data selections[3];
|
static Ecore_X_Selection_Data request_data[3] = {{0}};
|
||||||
static Ecore_X_Selection_Data request_data[3];
|
static Ecore_X_Selection_Converter *converters = NULL;
|
||||||
static Ecore_X_Selection_Converter *converters;
|
|
||||||
|
|
||||||
static int _ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret);
|
static int _ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret);
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_x_selection_data_initialize(void)
|
_ecore_x_selection_data_initialize(void)
|
||||||
{
|
{
|
||||||
memset(selections, 0, sizeof(selections));
|
|
||||||
memset(request_data, 0, sizeof(request_data));
|
|
||||||
|
|
||||||
/* Initialize converters */
|
/* Initialize converters */
|
||||||
converters = NULL;
|
|
||||||
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);
|
||||||
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_ecore_x_selection_shutdown(void)
|
||||||
|
{
|
||||||
|
Ecore_X_Selection_Converter *cnv = converters, *tmp;
|
||||||
|
|
||||||
|
if (!converters)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* free the selection converters */
|
||||||
|
while (cnv) {
|
||||||
|
tmp = cnv->next;
|
||||||
|
free(cnv);
|
||||||
|
cnv = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
converters = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue