forked from enlightenment/efl
Elm DND/Sel: Update typenames to be more consistent.
SVN revision: 52286
This commit is contained in:
parent
e8346ef866
commit
c6684b49ec
|
@ -60,7 +60,7 @@ struct _elm_cnp_selection {
|
||||||
const char *debug;
|
const char *debug;
|
||||||
Evas_Object *widget;
|
Evas_Object *widget;
|
||||||
|
|
||||||
enum _elm_sel_format format;
|
Elm_Sel_Format format;
|
||||||
char *selbuf;
|
char *selbuf;
|
||||||
|
|
||||||
unsigned int active : 1;
|
unsigned int active : 1;
|
||||||
|
@ -68,7 +68,7 @@ struct _elm_cnp_selection {
|
||||||
Ecore_X_Selection ecore_sel;
|
Ecore_X_Selection ecore_sel;
|
||||||
|
|
||||||
Evas_Object *requestwidget;
|
Evas_Object *requestwidget;
|
||||||
enum _elm_sel_format requestformat;
|
Elm_Sel_Format requestformat;
|
||||||
|
|
||||||
int (*set)(Ecore_X_Window, const void *data, int size);
|
int (*set)(Ecore_X_Window, const void *data, int size);
|
||||||
int (*clear)(void);
|
int (*clear)(void);
|
||||||
|
@ -136,7 +136,7 @@ static void pasteimage_free(struct pasteimage *pi);
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
enum _elm_sel_format formats;
|
Elm_Sel_Format formats;
|
||||||
/* Called by ecore to do conversion */
|
/* Called by ecore to do conversion */
|
||||||
converter_fn converter;
|
converter_fn converter;
|
||||||
response_handler response;
|
response_handler response;
|
||||||
|
@ -146,7 +146,7 @@ static struct {
|
||||||
} atoms[CNP_N_ATOMS] = {
|
} atoms[CNP_N_ATOMS] = {
|
||||||
[CNP_ATOM_TARGETS] = {
|
[CNP_ATOM_TARGETS] = {
|
||||||
"TARGETS",
|
"TARGETS",
|
||||||
(enum _elm_sel_format)-1, // everything
|
(Elm_Sel_Format)-1, // everything
|
||||||
targets_converter,
|
targets_converter,
|
||||||
response_handler_targets,
|
response_handler_targets,
|
||||||
notify_handler_targets,
|
notify_handler_targets,
|
||||||
|
@ -304,8 +304,8 @@ Eina_List *providedobjs;
|
||||||
static const char *text_uri;
|
static const char *text_uri;
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
|
elm_selection_set(Elm_Sel_Type selection, Evas_Object *widget,
|
||||||
enum _elm_sel_format format, const char *selbuf)
|
Elm_Sel_Format format, const char *selbuf)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
struct _elm_cnp_selection *sel;
|
struct _elm_cnp_selection *sel;
|
||||||
|
@ -320,7 +320,7 @@ elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
|
||||||
sel->active = 1;
|
sel->active = 1;
|
||||||
sel->widget = widget;
|
sel->widget = widget;
|
||||||
|
|
||||||
sel->set(elm_win_xwindow_get(widget),&selection,sizeof(enum _elm_sel_type));
|
sel->set(elm_win_xwindow_get(widget),&selection,sizeof(Elm_Sel_Type));
|
||||||
sel->format = format;
|
sel->format = format;
|
||||||
sel->selbuf = selbuf ? strdup(selbuf) : NULL;
|
sel->selbuf = selbuf ? strdup(selbuf) : NULL;
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget)
|
elm_selection_clear(Elm_Sel_Type selection, Evas_Object *widget)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
struct _elm_cnp_selection *sel;
|
struct _elm_cnp_selection *sel;
|
||||||
|
@ -355,7 +355,7 @@ elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget)
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format,
|
elm_selection_get(Elm_Sel_Type selection, Elm_Sel_Format format,
|
||||||
Evas_Object *widget)
|
Evas_Object *widget)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
|
@ -1068,8 +1068,8 @@ mark_up(const char *start, int *lenp){
|
||||||
struct dropable {
|
struct dropable {
|
||||||
Evas_Object *obj;
|
Evas_Object *obj;
|
||||||
/* FIXME: Cache window */
|
/* FIXME: Cache window */
|
||||||
enum _elm_sel_format types;
|
Elm_Sel_Format types;
|
||||||
elm_drop_cb dropcb;
|
Elm_Drop_Cb dropcb;
|
||||||
void *cbdata;
|
void *cbdata;
|
||||||
};
|
};
|
||||||
/* FIXME: Way too many globals */
|
/* FIXME: Way too many globals */
|
||||||
|
@ -1297,8 +1297,8 @@ _dnd_status(void *data, int etype, void *ev)
|
||||||
* Add a widget as drop target.
|
* Add a widget as drop target.
|
||||||
*/
|
*/
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_drop_target_add(Evas_Object *obj, enum _elm_sel_type format,
|
elm_drop_target_add(Evas_Object *obj, Elm_Sel_Type format,
|
||||||
elm_drop_cb dropcb, void *cbdata)
|
Elm_Drop_Cb dropcb, void *cbdata)
|
||||||
{
|
{
|
||||||
struct dropable *drop;
|
struct dropable *drop;
|
||||||
Ecore_X_Window xwin;
|
Ecore_X_Window xwin;
|
||||||
|
@ -1424,12 +1424,12 @@ _drag_move(void *data __UNUSED__, Ecore_X_Xdnd_Position *pos){
|
||||||
|
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_drag_start(Evas_Object *obj, enum _elm_sel_format format, const char *data,
|
elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
|
||||||
void (*dragdone)(void *data, Evas_Object *),void *donecbdata)
|
void (*dragdone)(void *data, Evas_Object *),void *donecbdata)
|
||||||
{
|
{
|
||||||
Ecore_X_Window xwin;
|
Ecore_X_Window xwin;
|
||||||
struct _elm_cnp_selection *sel;
|
struct _elm_cnp_selection *sel;
|
||||||
enum _elm_sel_type xdnd = ELM_SEL_XDND;
|
Elm_Sel_Type xdnd = ELM_SEL_XDND;
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
int x,y,x2,y2,x3,y3;
|
int x,y,x2,y2,x3,y3;
|
||||||
Evas_Object *icon;
|
Evas_Object *icon;
|
||||||
|
@ -1452,7 +1452,7 @@ elm_drag_start(Evas_Object *obj, enum _elm_sel_format format, const char *data,
|
||||||
dragdonedata = donecbdata;
|
dragdonedata = donecbdata;
|
||||||
|
|
||||||
ecore_x_dnd_callback_pos_update_set(_drag_move, NULL);
|
ecore_x_dnd_callback_pos_update_set(_drag_move, NULL);
|
||||||
ecore_x_dnd_begin(xwin, (unsigned char *)&xdnd, sizeof(enum _elm_sel_type));
|
ecore_x_dnd_begin(xwin, (unsigned char *)&xdnd, sizeof(Elm_Sel_Type));
|
||||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
|
||||||
_drag_mouse_up, NULL);
|
_drag_mouse_up, NULL);
|
||||||
|
|
||||||
|
@ -1495,14 +1495,14 @@ elm_drag_start(Evas_Object *obj, enum _elm_sel_format format, const char *data,
|
||||||
#else
|
#else
|
||||||
/* Stubs for windows */
|
/* Stubs for windows */
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_drag_start(Evas_Object *o, enum _elm_sel_format f, const char *d,
|
elm_drag_start(Evas_Object *o, Elm_Sel_Format f, const char *d,
|
||||||
void (*donecb)(void *, Evas_Object *),void *cbdata)
|
void (*donecb)(void *, Evas_Object *),void *cbdata)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
elm_drop_target_add(Evas_Object *obj, enum _elm_sel_type format,
|
elm_drop_target_add(Evas_Object *obj, Elm_Sel_Type format,
|
||||||
elm_drop_cb dropcb, void *cbdata){
|
Elm_Drop_Cb dropcb, void *cbdata){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -490,7 +490,7 @@ _paste(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_store_selection(enum _elm_sel_type seltype, Evas_Object *obj)
|
_store_selection(Elm_Sel_Type seltype, Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
const char *sel;
|
const char *sel;
|
||||||
|
|
|
@ -30,8 +30,7 @@ typedef struct _Elm_Config Elm_Config;
|
||||||
typedef struct _Elm_Module Elm_Module;
|
typedef struct _Elm_Module Elm_Module;
|
||||||
typedef struct _Elm_Drop_Data Elm_Drop_Data;
|
typedef struct _Elm_Drop_Data Elm_Drop_Data;
|
||||||
|
|
||||||
// FIXME: nash - type name wrong (caps)
|
typedef Eina_Bool (*Elm_Drop_Cb) (void *d, Evas_Object *o, Elm_Drop_Data *data);
|
||||||
typedef Eina_Bool (*elm_drop_cb) (void *d, Evas_Object *o, Elm_Drop_Data *data);
|
|
||||||
|
|
||||||
struct _Elm_Theme
|
struct _Elm_Theme
|
||||||
{
|
{
|
||||||
|
@ -58,8 +57,7 @@ typedef enum _Elm_Engine
|
||||||
ELM_OPENGL_SDL
|
ELM_OPENGL_SDL
|
||||||
} Elm_Engine;
|
} Elm_Engine;
|
||||||
|
|
||||||
// FIXME: nash - make typedef like above with caps etc. named right
|
typedef enum _Elm_Sel_Type
|
||||||
enum _elm_sel_type
|
|
||||||
{
|
{
|
||||||
ELM_SEL_PRIMARY,
|
ELM_SEL_PRIMARY,
|
||||||
ELM_SEL_SECONDARY,
|
ELM_SEL_SECONDARY,
|
||||||
|
@ -67,10 +65,9 @@ enum _elm_sel_type
|
||||||
ELM_SEL_XDND,
|
ELM_SEL_XDND,
|
||||||
|
|
||||||
ELM_SEL_MAX,
|
ELM_SEL_MAX,
|
||||||
};
|
} Elm_Sel_Type;
|
||||||
|
|
||||||
// FIXME: nash - same as above
|
typedef enum _Elm_Sel_Format
|
||||||
enum _elm_sel_format
|
|
||||||
{
|
{
|
||||||
/** Plain unformated text: Used for things that don't want rich markup */
|
/** Plain unformated text: Used for things that don't want rich markup */
|
||||||
ELM_SEL_FORMAT_TEXT = 0x01,
|
ELM_SEL_FORMAT_TEXT = 0x01,
|
||||||
|
@ -78,12 +75,12 @@ enum _elm_sel_format
|
||||||
ELM_SEL_FORMAT_MARKUP = 0x02,
|
ELM_SEL_FORMAT_MARKUP = 0x02,
|
||||||
/** Images */
|
/** Images */
|
||||||
ELM_SEL_FORMAT_IMAGE = 0x04,
|
ELM_SEL_FORMAT_IMAGE = 0x04,
|
||||||
};
|
} Elm_Sel_Format;
|
||||||
|
|
||||||
struct _Elm_Drop_Data
|
struct _Elm_Drop_Data
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
enum _elm_sel_format format;
|
Elm_Sel_Format format;
|
||||||
void *data;
|
void *data;
|
||||||
int len;
|
int len;
|
||||||
};
|
};
|
||||||
|
@ -172,12 +169,12 @@ void _elm_config_shutdown(void);
|
||||||
void elm_tooltip_theme(Elm_Tooltip *tt);
|
void elm_tooltip_theme(Elm_Tooltip *tt);
|
||||||
void elm_object_sub_tooltip_content_cb_set(Evas_Object *eventarea, Evas_Object *owner, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
void elm_object_sub_tooltip_content_cb_set(Evas_Object *eventarea, Evas_Object *owner, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
|
||||||
|
|
||||||
Eina_Bool elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
|
Eina_Bool elm_selection_set(Elm_Sel_Type selection, Evas_Object *widget, Elm_Sel_Format format, const char *buf);
|
||||||
Eina_Bool elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
|
Eina_Bool elm_selection_clear(Elm_Sel_Type selection, Evas_Object *widget);
|
||||||
Eina_Bool elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);
|
Eina_Bool elm_selection_get(Elm_Sel_Type selection, Elm_Sel_Format format, Evas_Object *widget);
|
||||||
Eina_Bool elm_drop_target_add(Evas_Object *widget, enum _elm_sel_type, elm_drop_cb, void *);
|
Eina_Bool elm_drop_target_add(Evas_Object *widget, Elm_Sel_Type, Elm_Drop_Cb, void *);
|
||||||
Eina_Bool elm_drop_target_del(Evas_Object *widget);
|
Eina_Bool elm_drop_target_del(Evas_Object *widget);
|
||||||
Eina_Bool elm_drag_start(Evas_Object *, enum _elm_sel_format, const char *, void (*)(void *,Evas_Object*),void*);
|
Eina_Bool elm_drag_start(Evas_Object *, Elm_Sel_Format, const char *, void (*)(void *,Evas_Object*),void*);
|
||||||
|
|
||||||
Eina_Bool _elm_dangerous_call_check(const char *call);
|
Eina_Bool _elm_dangerous_call_check(const char *call);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue