elm: Longwaited trailing white space removal. Clean elm up!

This commit is contained in:
Daniel Juyung Seo 2013-09-30 19:21:31 +09:00
parent 3a9cb2398b
commit e756f97dae
36 changed files with 219 additions and 219 deletions

View File

@ -114,7 +114,7 @@ handle_run(int fd, unsigned long bytes)
return;
}
close(fd);
argc = ((unsigned long *)(buf))[0];
envnum = ((unsigned long *)(buf))[1];
@ -123,7 +123,7 @@ handle_run(int fd, unsigned long bytes)
CRITICAL("no executable specified");
return;
}
argv = alloca(argc * sizeof(char *));
if (envnum > 0) envir = alloca(envnum * sizeof(char *));
off = ((unsigned long *)(buf))[2 + argc + envnum] - sizeof(unsigned long);
@ -321,7 +321,7 @@ main(int argc, char **argv)
len = sizeof(struct sockaddr_un);
fd = accept(sock, (struct sockaddr *)&client, &len);
elm_quicklaunch_sub_init(argc, argv);
// don't seed since we are doing this AFTER launch request
// don't seed since we are doing this AFTER launch request
// elm_quicklaunch_seed();
if (fd >= 0)
{

View File

@ -138,22 +138,22 @@ main(int argc, char **argv)
sargc = argc - 1;
sargv = &(argv[1]);
}
slen = 0;
envnum = 0;
// header:
// UL 'total bytes'
// UL 'argnum'
// UL 'envnum'
slen += sizeof(unsigned long) * 3;
for (i = 0; i < sargc; i++)
{
slen += sizeof(unsigned long);
slen += strlen(sargv[i]) + 1;
}
#ifdef HAVE_ENVIRON
// count how much space is needed for environment
for (i = 0; environ[i]; i++)
@ -170,7 +170,7 @@ main(int argc, char **argv)
// allocate buffer on stack
sbuf = alloca(slen);
// fill in header
((unsigned long *)(sbuf))[0] = slen - sizeof(unsigned long);
((unsigned long *)(sbuf))[1] = sargc;
@ -187,7 +187,7 @@ main(int argc, char **argv)
pos += strlen(sargv[i]) + 1;
n++;
}
#ifdef HAVE_ENVIRON
// fill in environ
for (i = 0; environ[i]; i++)
@ -203,7 +203,7 @@ main(int argc, char **argv)
((unsigned long *)(sbuf))[n] = (unsigned long)pos - (unsigned long)sbuf;
n++;
strcpy((char *)pos, cwd);
if (write(sock, sbuf, slen) < 0)
printf("elementary_quicklaunch: cannot write to socket '%s'\n", buf);
close(sock);

View File

@ -10,7 +10,7 @@ _cb_size_radio_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED)
Evas_Object *o_bg = data;
int size;
size = elm_radio_value_get((Evas_Object *)obj);
elm_bg_load_size_set(o_bg, size, size);
elm_bg_load_size_set(o_bg, size, size);
}
static void

View File

@ -163,7 +163,7 @@ test_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
elm_box_pack_end(bx, bt);
evas_object_show(bt);
evas_object_show(ic);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
elm_image_file_set(ic, buf, NULL);

View File

@ -102,7 +102,7 @@ _timer_cb(void *data)
elm_object_disabled_set(bt1, EINA_FALSE);
elm_object_disabled_set(bt2, EINA_FALSE);
elm_object_disabled_set(bt3, EINA_FALSE);
return ECORE_CALLBACK_CANCEL;
}

View File

@ -84,33 +84,33 @@ test_focus(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
tb_it = elm_toolbar_item_append(tbar, "document-print", "Hello", _tb_sel, NULL);
elm_object_item_disabled_set(tb_it, EINA_TRUE);
elm_toolbar_item_priority_set(tb_it, 100);
tb_it = elm_toolbar_item_append(tbar, "folder-new", "World", _tb_sel, NULL);
elm_toolbar_item_priority_set(tb_it, -100);
tb_it = elm_toolbar_item_append(tbar, "object-rotate-right", "H", _tb_sel, NULL);
elm_toolbar_item_priority_set(tb_it, 150);
tb_it = elm_toolbar_item_append(tbar, "mail-send", "Comes", _tb_sel, NULL);
elm_toolbar_item_priority_set(tb_it, 0);
tb_it = elm_toolbar_item_append(tbar, "clock", "Elementary", _tb_sel, NULL);
elm_toolbar_item_priority_set(tb_it, -200);
tb_it = elm_toolbar_item_append(tbar, "refresh", "Menu", NULL, NULL);
elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
elm_toolbar_item_priority_set(tb_it, -9999);
elm_toolbar_menu_parent_set(tbar, win);
menu = elm_toolbar_item_menu_get(tb_it);
elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", _tb_sel, NULL);
menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", _tb_sel, NULL);
elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", _tb_sel, NULL);
elm_menu_item_add(menu, NULL, "edit-delete", "Menu", _tb_sel, NULL);
elm_box_pack_end(tbx, tbar);
evas_object_show(tbar);
Evas_Object *mainbx = elm_box_add(win);
elm_box_horizontal_set(mainbx, EINA_TRUE);
evas_object_size_hint_weight_set(mainbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

View File

@ -3410,7 +3410,7 @@ _genlist_renew(Evas_Object *obj, const char *style)
int i;
if (!obj) return;
elm_genlist_clear(obj);
check = evas_object_data_get(obj, "check");
@ -3418,7 +3418,7 @@ _genlist_renew(Evas_Object *obj, const char *style)
elm_genlist_mode_set(obj, ELM_LIST_COMPRESS);
else
elm_genlist_mode_set(obj, ELM_LIST_SCROLL);
ic = elm_genlist_item_class_new();
ic->item_style = style;
ic->func.text_get = gl_text_get;
@ -3492,7 +3492,7 @@ test_genlist_item_styles(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_genlist_renew(gl, "default");
elm_box_pack_end(box, gl);
evas_object_show(gl);
check = elm_check_add(win);
elm_object_text_set(check, "Compress");
elm_box_pack_end(box, check);

View File

@ -618,7 +618,7 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
elm_box_pack_end(bx0, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _on_done, win);
bx = elm_box_add(win);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@ -682,7 +682,7 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
elm_box_pack_end(bx0, bt);
evas_object_show(bt);
evas_object_smart_callback_add(bt, "clicked", _on_indirect, gl);
evas_object_resize(win, 320, 480);
evas_object_show(win);
}

View File

@ -197,7 +197,7 @@ test_index(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(tb);
gl = elm_genlist_add(win);
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -218,7 +218,7 @@ test_index(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
evas_object_show(bt);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
ck = elm_check_add(win);
elm_object_text_set(ck, "Omit mode : ");

View File

@ -98,7 +98,7 @@ test_prefs(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
layout);
elm_prefs_autosave_set(prefs, EINA_TRUE);
prefs_data =
elm_prefs_data_new("./test_prefs.cfg", NULL, EET_FILE_MODE_READ_WRITE);

View File

@ -48,7 +48,7 @@ test_segment_control(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
{
const struct exp_mode *em = exp_modes + i;
//segment control
//segment control
sc = elm_segment_control_add(bx);
evas_object_size_hint_weight_set(sc, em->weight.w, em->weight.h);
evas_object_size_hint_align_set(sc, em->align.x, em->align.y);
@ -72,7 +72,7 @@ test_segment_control(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
evas_object_show(sc);
elm_box_pack_end(bx, sc);
//segment control 2
//segment control 2
sc = elm_segment_control_add(bx);
evas_object_size_hint_weight_set(sc, em->weight.w, em->weight.h);
evas_object_size_hint_align_set(sc, em->align.x, em->align.y);
@ -113,7 +113,7 @@ test_segment_control(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
evas_object_show(sc);
elm_box_pack_end(bx, sc);
//segment control 4 (text only disabled)
//segment control 4 (text only disabled)
sc = elm_segment_control_add(bx);
evas_object_size_hint_weight_set(sc, em->weight.w, em->weight.h);
evas_object_size_hint_align_set(sc, em->align.x, em->align.y);

View File

@ -53,7 +53,7 @@ test_video(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
evas_object_size_hint_align_set(bt, 0.5, 0.1);
elm_table_pack(tb, bt, 0, 0, 1, 1);
evas_object_show(bt);
evas_object_resize(win, 800, 500);
evas_object_show(win);
}

View File

@ -72,7 +72,7 @@ static void
cb_mouse_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Down *ev = event_info;
if (ev->button == 1) elm_object_focus_set(obj, EINA_TRUE);
}

View File

@ -189,13 +189,13 @@ _shrink_mode_set(Evas_Object *obj,
edje_object_size_min_calc(sd->end, &w_label_count, NULL);
elm_coords_finger_size_adjust(1, &w_label_count, 1, NULL);
}
if ((w < 0) || (w < w_label_count))
{
elm_box_unpack(sd->box, item->button);
evas_object_hide(item->button);
item->visible = EINA_FALSE;
count++;
snprintf(buf, sizeof(buf), "... + %d", count);
edje_object_part_text_escaped_set(sd->end, "elm.text", buf);
@ -205,7 +205,7 @@ _shrink_mode_set(Evas_Object *obj,
(sd->end, w_label_count, h);
elm_box_pack_end(sd->box, sd->end);
evas_object_show(sd->end);
sd->view_state = MULTIBUTTONENTRY_VIEW_SHRINK;
evas_object_smart_callback_call
(obj, SIG_EXPAND_STATE_CHANGED, (void *)1);
@ -508,7 +508,7 @@ _button_resize(Evas_Object *obj,
size_str = edje_object_data_get(btn, "button_max_size");
if (size_str) button_max_width = atoi(size_str);
button_max_width *= elm_widget_scale_get(obj) * elm_config_scale_get();
// decide the size of button
@ -567,7 +567,7 @@ _access_multibuttonentry_label_register(Evas_Object *obj, Eina_Bool is_access)
{
ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(obj, sd);
Evas_Object *po;
po = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
if (is_access)
{

View File

@ -1418,7 +1418,7 @@ _elm_naviframe_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
if (ret) *ret = EINA_TRUE;
//FIXME: Replace this below code to elm_naviframe_item_pop() at elm 2.0.
///Leave for compatibility.
///Leave for compatibility.
if (it->title_prev_btn)
evas_object_smart_callback_call(it->title_prev_btn, SIG_CLICKED, NULL);
}

View File

@ -220,7 +220,7 @@ _update_slider(void *data,
length = elm_video_play_length_get(sd->video);
pos = elm_video_play_position_get(sd->video);
elm_object_disabled_set(sd->slider,
elm_object_disabled_set(sd->slider,
(!seekable) | elm_widget_disabled_get(data));
elm_slider_min_max_set(sd->slider, 0, length);
if ((elm_slider_value_get(sd->slider) != pos) &&
@ -383,7 +383,7 @@ _eject(void *data,
void *event_info __UNUSED__)
{
ELM_PLAYER_DATA_GET(data, sd);
elm_layout_signal_emit(data, "elm,button,eject", "elm");
emotion_object_eject(elm_video_emotion_get(sd->video));
evas_object_smart_callback_call(data, SIG_EJECT_CLICKED, NULL);
@ -393,7 +393,7 @@ static void
_mute_toggle(Evas_Object *obj)
{
ELM_PLAYER_DATA_GET(obj, sd);
if (!elm_video_audio_mute_get(sd->video))
{
elm_video_audio_mute_set(sd->video, EINA_TRUE);
@ -480,7 +480,7 @@ _player_button_add(Evas_Object *obj,
Evas_Object *ic;
Evas_Object *bt;
char buf[256];
ic = elm_icon_add(obj);
snprintf(buf, sizeof(buf), "media_player/%s/%s", name,
elm_widget_style_get(obj));
@ -491,7 +491,7 @@ _player_button_add(Evas_Object *obj,
elm_widget_mirrored_automatic_set(bt, EINA_FALSE);
elm_object_content_set(bt, ic);
evas_object_show(ic);
snprintf(buf, sizeof(buf), "media_player/%s/%s", name,
elm_widget_style_get(obj));
elm_object_style_set(bt, buf);
@ -554,16 +554,16 @@ _elm_player_smart_content_set(Eo *obj, void *_pd, va_list *list)
if (part && strcmp(part, "video"))
{
eo_do_super(obj, MY_CLASS,
eo_do_super(obj, MY_CLASS,
elm_obj_container_content_set(part, content, &int_ret));
if (ret) *ret = int_ret;
return;
}
if ((!part) || (!strcmp(part, "video"))) part = "elm.swallow.content";
eo_do_super(obj, MY_CLASS,
eo_do_super(obj, MY_CLASS,
elm_obj_container_content_set(part, content, &int_ret));
if (ret) *ret = int_ret;
if (!_elm_video_check(content)) return;
if (sd->video == content) goto end;
@ -599,7 +599,7 @@ _elm_player_smart_content_set(Eo *obj, void *_pd, va_list *list)
elm_object_disabled_set(sd->slider, !seekable);
elm_slider_min_max_set(sd->slider, 0, length);
elm_slider_value_set(sd->slider, pos);
elm_slider_value_set(sd->vslider,
elm_video_audio_level_get(sd->video) * 100.0);
// XXX: get mute

View File

@ -69,7 +69,7 @@ _elm_calendar_smart_sizing_eval(Eo *obj, void *_pd EINA_UNUSED, va_list *list EI
Evas_Coord minw = -1, minh = -1;
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
// 7x8 (1 month+year, days, 6 dates.)
elm_coords_finger_size_adjust(7, &minw, 8, &minh);
edje_object_size_min_restricted_calc
@ -919,7 +919,7 @@ _elm_calendar_smart_calculate(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA
_set_headers(obj);
_populate(obj);
elm_layout_thaw(obj);
elm_layout_thaw(obj);
}
static void

View File

@ -276,7 +276,7 @@ static Eina_Bool _x11_elm_cnp_selection_set (Evas_Object *obj, Elm_
static void _x11_elm_cnp_selection_loss_callback_set(Evas_Object *obj __UNUSED__, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void *data);
static Eina_Bool _x11_elm_object_cnp_selection_clear (Evas_Object *obj, Elm_Sel_Type selection);
static Eina_Bool _x11_elm_cnp_selection_get (Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, Elm_Drop_Cb datacb, void *udata);
static Eina_Bool _x11_elm_drop_target_add (Evas_Object *obj, Elm_Sel_Format format,
static Eina_Bool _x11_elm_drop_target_add (Evas_Object *obj, Elm_Sel_Format format,
Elm_Drag_State entercb, void *enterdata,
Elm_Drag_State leavecb, void *leavedata,
Elm_Drag_Pos poscb, void *posdata,
@ -403,7 +403,7 @@ static X11_Cnp_Atom _x11_atoms[CNP_N_ATOMS] = {
_x11_notify_handler_image,/* Raw image data is the same */
0
},
/*
/*
[CNP_ATOM_text_html_utf8] = {
"text/html;charset=utf-8",
ELM_SEL_FORMAT_HTML,
@ -541,7 +541,7 @@ _x11_selection_clear(void *udata __UNUSED__, int type __UNUSED__, void *event)
_x11_sel_obj_del2, sel);
sel->widget = NULL;
sel->requestwidget = NULL;
sel->active = EINA_FALSE;
sel->widget = NULL;
ELM_SAFE_FREE(sel->selbuf, free);
@ -580,7 +580,7 @@ _x11_selection_notify(void *udata __UNUSED__, int type __UNUSED__, void *event)
return ECORE_CALLBACK_PASS_ON;
}
cnp_debug("Target is %s\n", ev->target);
for (i = 0; i < CNP_N_ATOMS; i++)
{
if (!strcmp(ev->target, _x11_atoms[i].name))
@ -816,7 +816,7 @@ _x11_notify_handler_text(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify
free(stripstr);
free(mkupstr);
}
end:
end:
if (sel == (_x11_selections + ELM_SEL_TYPE_XDND))
ecore_x_dnd_send_finished();
return 0;
@ -837,7 +837,7 @@ _x11_notify_handler_uri(X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *
if (data->content == ECORE_X_SELECTION_CONTENT_FILES)
{
int i, len = 0;
cnp_debug("got a files list\n");
files = notify->data;
/*
@ -1124,7 +1124,7 @@ _x11_dropable_find(Ecore_X_Window win)
{
Eina_List *l;
Dropable *dropable;
if (!drops) return NULL;
EINA_LIST_FOREACH(drops, l, dropable)
{
@ -1139,7 +1139,7 @@ _x11_dropable_geom_find(Ecore_X_Window win, Evas_Coord px, Evas_Coord py)
Eina_List *l;
Dropable *dropable;
Evas_Coord x, y, w, h;
if (!drops) return NULL;
EINA_LIST_FOREACH(drops, l, dropable)
{
@ -1229,10 +1229,10 @@ static void
_x11_dnd_dropable_handle(Dropable *dropable, Evas_Coord x, Evas_Coord y, Eina_Bool have_obj, Elm_Xdnd_Action action)
{
Dropable *dropable_last = NULL;
if (dropable->last.in)
dropable_last = _x11_dropable_geom_find
(_x11_elm_widget_xwin_get(dropable->obj),
(_x11_elm_widget_xwin_get(dropable->obj),
dropable->last.x, dropable->last.y);
if ((have_obj) && (dropable_last == dropable)) // same
{
@ -1320,7 +1320,7 @@ _x11_dnd_position(void *data __UNUSED__, int etype __UNUSED__, void *ev)
Ecore_X_Rectangle rect = { 0, 0, 0, 0 };
Dropable *dropable, *dropable_old;
Elm_Xdnd_Action act;
/* Need to send a status back */
/* FIXME: Should check I can drop here */
/* FIXME: Should highlight widget */
@ -1328,7 +1328,7 @@ _x11_dnd_position(void *data __UNUSED__, int etype __UNUSED__, void *ev)
if (dropable)
{
Evas_Coord x, y, ox = 0, oy = 0, ow = 0, oh = 0;
x = pos->position.x;
y = pos->position.y;
_x11_dropable_coords_adjust(dropable, &x, &y);
@ -1343,7 +1343,7 @@ _x11_dnd_position(void *data __UNUSED__, int etype __UNUSED__, void *ev)
rect.height = oh;
ecore_x_dnd_send_status(EINA_TRUE, EINA_FALSE, rect, pos->action);
cnp_debug("dnd position %i %i %p\n", x - ox, y - oy, dropable);
_x11_dnd_dropable_handle(dropable, x - ox, y - oy, EINA_TRUE,
_x11_dnd_dropable_handle(dropable, x - ox, y - oy, EINA_TRUE,
act);
// CCCCCCC: call dnd exit on last obj if obj != last
// CCCCCCC: call drop position on obj
@ -1353,7 +1353,7 @@ _x11_dnd_position(void *data __UNUSED__, int etype __UNUSED__, void *ev)
{
ecore_x_dnd_send_status(EINA_FALSE, EINA_FALSE, rect, pos->action);
cnp_debug("dnd position not in obj\n");
_x11_dnd_dropable_handle(dropable_old, 0, 0, EINA_FALSE,
_x11_dnd_dropable_handle(dropable_old, 0, 0, EINA_FALSE,
act);
// CCCCCCC: call dnd exit on last obj
_x11_dropable_all_set(pos->win, x, y, EINA_TRUE);
@ -1432,7 +1432,7 @@ found:
cnp_debug("0x%x\n", drop->win);
act = _x11_dnd_action_map(drop->action);
if (i == CNP_ATOM_text_urilist)
{
cnp_debug("We found a URI... (%scached) %s\n",
@ -1441,7 +1441,7 @@ found:
if (savedtypes.imgfile)
{
char *entrytag;
static const char *tagstring =
static const char *tagstring =
"<item absize=240x180 href=file://%s></item>";
ddata.x = savedtypes.x;
ddata.y = savedtypes.y;
@ -1661,7 +1661,7 @@ _x11_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_For
evas_object_event_callback_del_full(sel->widget, EVAS_CALLBACK_DEL,
_x11_sel_obj_del, sel);
sel->widget = NULL;
sel->active = EINA_TRUE;
sel->widget = obj;
sel->xwin = xwin;
@ -1672,7 +1672,7 @@ _x11_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_For
evas_object_event_callback_add
(sel->widget, EVAS_CALLBACK_DEL, _x11_sel_obj_del, sel);
if (selbuf)
{
if (format == ELM_SEL_FORMAT_IMAGE)
@ -1700,7 +1700,7 @@ static void
_x11_elm_cnp_selection_loss_callback_set(Evas_Object *obj __UNUSED__, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void *data)
{
X11_Cnp_Selection *sel;
_x11_elm_cnp_init();
sel = _x11_selections + selection;
sel->loss_cb = func;
@ -1713,7 +1713,7 @@ _x11_elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection)
X11_Cnp_Selection *sel;
_x11_elm_cnp_init();
sel = _x11_selections + selection;
/* No longer this selection: Consider it gone! */
@ -1729,7 +1729,7 @@ _x11_elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection)
sel->requestwidget = NULL;
sel->loss_cb = NULL;
sel->loss_data = NULL;
sel->active = EINA_FALSE;
ELM_SAFE_FREE(sel->selbuf, free);
sel->clear();
@ -1746,14 +1746,14 @@ _x11_elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection,
X11_Cnp_Selection *sel;
_x11_elm_cnp_init();
sel = _x11_selections + selection;
if (sel->requestwidget)
evas_object_event_callback_del_full(sel->requestwidget, EVAS_CALLBACK_DEL,
_x11_sel_obj_del2, sel);
sel->requestwidget = NULL;
sel->requestformat = format;
sel->requestwidget = obj;
sel->xwin = xwin;
@ -1763,7 +1763,7 @@ _x11_elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection,
evas_object_event_callback_add
(sel->requestwidget, EVAS_CALLBACK_DEL, _x11_sel_obj_del2, sel);
return EINA_TRUE;
}
@ -1779,7 +1779,7 @@ _x11_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
Eina_List *item, *l;
int first;
Eina_Bool have_drops = EINA_FALSE;
_x11_elm_cnp_init();
/* TODO: check if obj is already a drop target. Do not add twice! */
@ -1834,7 +1834,7 @@ _x11_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format,
(Evas_Object_Event_Cb)elm_drop_target_del,
obj);
if (!have_drops) ecore_x_dnd_aware_set(xwin, EINA_TRUE);
/* TODO BUG: should handle dnd-aware per window, not just the first
* window that requested it! */
/* If not the first: We're done */
@ -1862,7 +1862,7 @@ _x11_elm_drop_target_del(Evas_Object *obj)
Eina_Bool have_drops = EINA_FALSE;
_x11_elm_cnp_init();
del = NULL;
EINA_LIST_FOREACH(drops, item, drop)
{
@ -1878,7 +1878,7 @@ _x11_elm_drop_target_del(Evas_Object *obj)
evas_object_event_callback_del(obj, EVAS_CALLBACK_FREE,
(Evas_Object_Event_Cb)elm_drop_target_del);
if (del) free(del);
/* TODO BUG: we should handle dnd-aware per window, not just the last that reelased it */
/* If still drops there: All fine.. continue */
@ -2033,10 +2033,10 @@ static Eina_Bool
_x11_elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action)
{
Ecore_X_Atom actx;
_x11_elm_cnp_init();
if (!dragwin) return EINA_FALSE;
if (dragwidget != obj) return EINA_FALSE;
if (dragaction == action) return EINA_TRUE;
dragaction = action;
@ -2111,7 +2111,7 @@ _wl_sel_obj_del2(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
if (sel->requestwidget == obj) sel->requestwidget = NULL;
}
static Eina_Bool
static Eina_Bool
_wl_elm_cnp_selection_set(Evas_Object *obj __UNUSED__, Elm_Sel_Type selection, Elm_Sel_Format format __UNUSED__, const void *selbuf, size_t buflen)
{
const char *types[10] = {0, };
@ -2119,7 +2119,7 @@ _wl_elm_cnp_selection_set(Evas_Object *obj __UNUSED__, Elm_Sel_Type selection, E
_wl_elm_cnp_init();
/* TODO: other EML_SEL_TYPE and ELM_SEL_FORMAT */
if (ELM_SEL_TYPE_CLIPBOARD == selection)
if (ELM_SEL_TYPE_CLIPBOARD == selection)
{
types[0] = "text/plain;charset=utf-8";
ecore_wl_dnd_selection_set(ecore_wl_input_get(), types);
@ -2133,7 +2133,7 @@ _wl_elm_cnp_selection_set(Evas_Object *obj __UNUSED__, Elm_Sel_Type selection, E
return EINA_FALSE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format __UNUSED__, Elm_Drop_Cb datacb __UNUSED__, void *udata __UNUSED__)
{
_wl_elm_cnp_init();
@ -2147,18 +2147,18 @@ _wl_elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
wl_cnp_selection.requestwidget = obj;
evas_object_event_callback_add(wl_cnp_selection.requestwidget, EVAS_CALLBACK_DEL,
_wl_sel_obj_del2, &wl_cnp_selection);
ecore_wl_dnd_selection_get(ecore_wl_input_get(),
ecore_wl_dnd_selection_get(ecore_wl_input_get(),
"text/plain;charset=utf-8");
}
return EINA_TRUE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_cnp_selection_clear(Evas_Object *obj EINA_UNUSED, Elm_Sel_Type selection)
{
_wl_elm_cnp_init();
if (ELM_SEL_TYPE_CLIPBOARD == selection)
if (ELM_SEL_TYPE_CLIPBOARD == selection)
{
wl_cnp_selection.requestwidget = NULL;
if (wl_cnp_selection.selbuf) free(wl_cnp_selection.selbuf);
@ -2221,7 +2221,7 @@ _wl_selection_receive(void *udata, int type __UNUSED__, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_elm_cnp_init(void)
{
static int _init_count = 0;
@ -2229,15 +2229,15 @@ _wl_elm_cnp_init(void)
if (_init_count > 0) return EINA_TRUE;
_init_count++;
ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND,
ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND,
_wl_selection_send, &wl_cnp_selection);
ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY,
ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY,
_wl_selection_receive, &wl_cnp_selection);
return EINA_TRUE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_dnd_init(void)
{
static int _init_count = 0;
@ -2247,18 +2247,18 @@ _wl_elm_dnd_init(void)
text_uri = eina_stringshare_add("text/uri-list");
ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND,
ecore_event_handler_add(ECORE_WL_EVENT_DATA_SOURCE_SEND,
_wl_dnd_send, &wl_cnp_selection);
ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY,
ecore_event_handler_add(ECORE_WL_EVENT_SELECTION_DATA_READY,
_wl_dnd_receive, &wl_cnp_selection);
ecore_event_handler_add(ECORE_WL_EVENT_DND_END,
ecore_event_handler_add(ECORE_WL_EVENT_DND_END,
_wl_dnd_end, &wl_cnp_selection);
return EINA_TRUE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State entercb, void *enterdata, Elm_Drag_State leavecb, void *leavedata, Elm_Drag_Pos poscb, void *posdata, Elm_Drop_Cb dropcb, void *cbdata)
{
Dropable *drop;
@ -2278,7 +2278,7 @@ _wl_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State
}
}
if (!(drop = calloc(1, sizeof(Dropable))))
if (!(drop = calloc(1, sizeof(Dropable))))
return EINA_FALSE;
if (!(drops = eina_list_append(drops, drop)))
@ -2304,24 +2304,24 @@ _wl_elm_drop_target_add(Evas_Object *obj, Elm_Sel_Format format, Elm_Drag_State
if (first)
{
handler_enter =
ecore_event_handler_add(ECORE_WL_EVENT_DND_ENTER,
handler_enter =
ecore_event_handler_add(ECORE_WL_EVENT_DND_ENTER,
_wl_dnd_enter, NULL);
handler_leave =
ecore_event_handler_add(ECORE_WL_EVENT_DND_LEAVE,
handler_leave =
ecore_event_handler_add(ECORE_WL_EVENT_DND_LEAVE,
_wl_dnd_leave, NULL);
handler_pos =
ecore_event_handler_add(ECORE_WL_EVENT_DND_POSITION,
handler_pos =
ecore_event_handler_add(ECORE_WL_EVENT_DND_POSITION,
_wl_dnd_position, NULL);
handler_drop =
ecore_event_handler_add(ECORE_WL_EVENT_DND_DROP,
handler_drop =
ecore_event_handler_add(ECORE_WL_EVENT_DND_DROP,
_wl_dnd_drop, NULL);
}
return EINA_TRUE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_drop_target_del(Evas_Object *obj)
{
Dropable *drop;
@ -2350,7 +2350,7 @@ _wl_elm_drop_target_del(Evas_Object *obj)
return EINA_TRUE;
}
static Eina_Bool
static Eina_Bool
_wl_elm_drag_action_set(Evas_Object *obj, Elm_Xdnd_Action action)
{
if (!dragwin) return EINA_FALSE;
@ -2387,7 +2387,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch
wl_cnp_selection.buflen = strlen(wl_cnp_selection.selbuf);
/* setup callback to notify if this object gets deleted */
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
_wl_drag_source_del, obj);
dragwidget = obj;
@ -2404,7 +2404,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch
elm_win_borderless_set(dragwin, EINA_TRUE);
elm_win_override_set(dragwin, EINA_TRUE);
ecore_wl_window_type_set(elm_win_wl_window_get(dragwin),
ecore_wl_window_type_set(elm_win_wl_window_get(dragwin),
ECORE_WL_WINDOW_TYPE_DND);
if (createicon)
@ -2422,7 +2422,7 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch
else
{
icon = elm_icon_add(dragwin);
evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND,
evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
}
@ -2448,20 +2448,20 @@ _wl_elm_drag_start(Evas_Object *obj, Elm_Sel_Format format EINA_UNUSED, const ch
ecore_wl_dnd_drag_start(ecore_wl_input_get(),
elm_win_wl_window_get(obj),
elm_win_wl_window_get(dragwin),
elm_win_wl_window_get(dragwin),
x3, y3, w, h);
return EINA_TRUE;
}
static void
static void
_wl_drag_source_del(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED)
{
if (dragwidget == obj)
dragwidget = NULL;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Wl_Event_Dnd_Enter *ev;
@ -2504,7 +2504,7 @@ _wl_dnd_enter(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_leave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Wl_Event_Dnd_Leave *ev;
@ -2521,7 +2521,7 @@ _wl_dnd_leave(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Wl_Event_Dnd_Position *ev;
@ -2563,7 +2563,7 @@ _wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
case ELM_SEL_FORMAT_TARGETS:
case ELM_SEL_FORMAT_IMAGE:
if ((!strncmp(savedtypes.types[i], "text/uri", 8)) ||
if ((!strncmp(savedtypes.types[i], "text/uri", 8)) ||
(!strncmp(savedtypes.types[i], "image/", 6)))
{
wl_cnp_selection.requestwidget = drop->obj;
@ -2591,7 +2591,7 @@ _wl_dnd_position(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
Ecore_Wl_Event_Dnd_Drop *ev;
@ -2602,7 +2602,7 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
ev = event;
if (!(drop = _wl_dropable_find(ev->win)))
if (!(drop = _wl_dropable_find(ev->win)))
return ECORE_CALLBACK_PASS_ON;
savedtypes.x = ev->position.x;
@ -2617,14 +2617,14 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
for (i = 0; i < savedtypes.ntypes; i++)
{
if ((savedtypes.types[i] == text_uri) &&
((drop->types & ELM_SEL_FORMAT_MARKUP) ||
if ((savedtypes.types[i] == text_uri) &&
((drop->types & ELM_SEL_FORMAT_MARKUP) ||
(drop->types & ELM_SEL_FORMAT_IMAGE)))
{
wl_cnp_selection.requestwidget = drop->obj;
evas_object_event_callback_add(wl_cnp_selection.requestwidget,
evas_object_event_callback_add(wl_cnp_selection.requestwidget,
EVAS_CALLBACK_DEL,
_wl_sel_obj_del2,
_wl_sel_obj_del2,
&wl_cnp_selection);
ecore_wl_dnd_drag_get(ecore_wl_input_get(), text_uri);
break;
@ -2634,7 +2634,7 @@ _wl_dnd_drop(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_send(void *data, int type EINA_UNUSED, void *event)
{
char *buf;
@ -2662,7 +2662,7 @@ _wl_dnd_send(void *data, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_receive(void *data, int type EINA_UNUSED, void *event)
{
Wl_Cnp_Selection *sel;
@ -2677,7 +2677,7 @@ _wl_dnd_receive(void *data, int type EINA_UNUSED, void *event)
_wl_dropable_data_handle(sel, ev->data);
else
{
evas_object_event_callback_del_full(sel->requestwidget,
evas_object_event_callback_del_full(sel->requestwidget,
EVAS_CALLBACK_DEL,
_wl_sel_obj_del2, sel);
sel->requestwidget = NULL;
@ -2687,7 +2687,7 @@ _wl_dnd_receive(void *data, int type EINA_UNUSED, void *event)
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
static Eina_Bool
_wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
{
/* Ecore_Wl_Event_Dnd_End *ev; */
@ -2724,14 +2724,14 @@ _wl_dnd_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSE
return ECORE_CALLBACK_PASS_ON;
}
static void
static void
_wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data)
{
Dropable *drop;
unsigned int win = 0;
char *p, *s = NULL, *entrytag;
Elm_Selection_Data sdata;
static const char *tagstring =
static const char *tagstring =
"<item absize=240x180 href=file://%s></item>";
win = _wl_elm_widget_window_get(sel->requestwidget);
@ -2764,7 +2764,7 @@ _wl_dropable_data_handle(Wl_Cnp_Selection *sel, char *data)
if (!savedtypes.imgfile) return;
if ((drop->types & ELM_SEL_FORMAT_MARKUP) &&
if ((drop->types & ELM_SEL_FORMAT_MARKUP) &&
(drop->types & ELM_SEL_FORMAT_IMAGE))
{
int l = 0;
@ -2795,10 +2795,10 @@ _wl_dropable_find(unsigned int win)
{
Eina_List *l;
Dropable *dropable;
if (!drops) return NULL;
EINA_LIST_FOREACH(drops, l, dropable)
if (_wl_elm_widget_window_get(dropable->obj) == win)
if (_wl_elm_widget_window_get(dropable->obj) == win)
return dropable;
return NULL;
}
@ -2824,18 +2824,18 @@ _wl_dropable_find_geom(unsigned int win, Evas_Coord x, Evas_Coord y)
return NULL;
}
static void
static void
_wl_dropable_handle(Dropable *drop, Evas_Coord x, Evas_Coord y, Eina_Bool have_obj)
{
Dropable *last = NULL;
if (drop->last.in)
last = _wl_dropable_find_geom(_wl_elm_widget_window_get(drop->obj),
last = _wl_dropable_find_geom(_wl_elm_widget_window_get(drop->obj),
drop->last.x, drop->last.y);
if ((have_obj) && (last == drop))
{
if (drop->poscb)
if (drop->poscb)
drop->poscb(drop->posdata, drop->obj, x, y, dragaction);
}
else if ((have_obj) && (!last))
@ -2863,7 +2863,7 @@ _wl_dropable_handle(Dropable *drop, Evas_Coord x, Evas_Coord y, Eina_Bool have_o
}
}
static void
static void
_wl_dropable_all_set(unsigned int win, Evas_Coord x, Evas_Coord y, Eina_Bool set)
{
Eina_List *l;
@ -2880,7 +2880,7 @@ _wl_dropable_all_set(unsigned int win, Evas_Coord x, Evas_Coord y, Eina_Bool set
}
}
static Eina_Bool
static Eina_Bool
_wl_drops_accept(const char *type)
{
Eina_List *l;
@ -2893,7 +2893,7 @@ _wl_drops_accept(const char *type)
{
case ELM_SEL_FORMAT_TARGETS:
case ELM_SEL_FORMAT_IMAGE:
if ((!strncmp(type, "text/uri", 8)) ||
if ((!strncmp(type, "text/uri", 8)) ||
(!strncmp(type, "image/", 6)))
{
wl_cnp_selection.requestwidget = drop->obj;
@ -2916,7 +2916,7 @@ _wl_drops_accept(const char *type)
return will_accept;
}
static unsigned int
static unsigned int
_wl_elm_widget_window_get(Evas_Object *obj)
{
Evas_Object *top;
@ -3006,7 +3006,7 @@ _local_get_job(void *data)
{
Local_Selinfo *info = data;
Elm_Selection_Data ev;
info->get.job = NULL;
ev.x = 0;
ev.y = 0;
@ -3022,7 +3022,7 @@ static Eina_Bool
_local_elm_cnp_init(void)
{
static int _init_count = 0;
if (_init_count > 0) return EINA_TRUE;
_init_count++;
memset(&(_local_selinfo), 0, sizeof(_local_selinfo));
@ -3085,7 +3085,7 @@ _local_elm_cnp_selection_get(Evas_Object *obj,
_local_selinfo[selection].get.obj = obj;
_local_selinfo[selection].get.func = datacb;
_local_selinfo[selection].get.data = udata;
_local_selinfo[selection].get.job =
_local_selinfo[selection].get.job =
ecore_job_add(_local_get_job, &(_local_selinfo[selection]));
return EINA_TRUE;
}
@ -3199,7 +3199,7 @@ _tempfile_new(int size)
char *tmp;
/* And before someone says anything see POSIX 1003.1-2008 page 400 */
long pid;
pid = (long)getpid();
/* Use pid instead of /proc/self: That way if can be passed around */
len = snprintf(NULL,0,"/proc/%li/fd/%i", pid, info->fd);
@ -3306,7 +3306,7 @@ elm_cnp_selection_loss_callback_set(Evas_Object *obj, Elm_Sel_Type selection,
#ifdef HAVE_ELEMENTARY_X
if (_x11_elm_widget_xwin_get(obj))
_x11_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
#endif
#endif
_local_elm_cnp_selection_loss_callback_set(obj, selection, func, data);
}
@ -3397,15 +3397,15 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data,
if (!_elm_cnp_init_count) _elm_cnp_init();
#ifdef HAVE_ELEMENTARY_X
if (_x11_elm_widget_xwin_get(obj))
return _x11_elm_drag_start(obj, format, data, action,
createicon, createdata,
return _x11_elm_drag_start(obj, format, data, action,
createicon, createdata,
dragpos, dragdata,
acceptcb, acceptdata,
dragdone, donecbdata);
#endif
#ifdef HAVE_ELEMENTARY_WAYLAND
return _wl_elm_drag_start(obj, format, data, action,
createicon, createdata,
return _wl_elm_drag_start(obj, format, data, action,
createicon, createdata,
dragpos, dragdata,
acceptcb, acceptdata,
dragdone, donecbdata);
@ -3583,7 +3583,7 @@ _cont_drag_done_cb(void *data, Evas_Object *obj __UNUSED__)
{
Item_Container_Drag_Info *st = data;
elm_widget_scroll_freeze_pop(st->obj);
if (st->user_info.dragdone)
if (st->user_info.dragdone)
st->user_info.dragdone(st->user_info.donecbdata, dragwidget, doaccept);
}

View File

@ -129,15 +129,15 @@ _color_picker_init(Elm_Colorselector_Smart_Data *sd)
}
color = (sd->a << 24) |
(((sd->r * sd->a) / 255) << 16) |
(((sd->g * sd->a) / 255) << 8) |
(((sd->r * sd->a) / 255) << 16) |
(((sd->g * sd->a) / 255) << 8) |
(((sd->b * sd->a) / 255));
if (sd->a == 255)
evas_object_image_alpha_set(sd->picker_display, EINA_FALSE);
else
evas_object_image_alpha_set(sd->picker_display, EINA_TRUE);
pixels = evas_object_image_data_get(sd->picker_display, EINA_TRUE);
copy = pixels;
for (y = 0; y < 17; y++)
@ -634,7 +634,7 @@ _mouse_grab_pixels(void *data, int type __UNUSED__, void *event __UNUSED__)
return EINA_TRUE;
}
#endif
#endif
static void
_mouse_in_canvas(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__)
@ -1449,10 +1449,10 @@ _palette_colors_load(Evas_Object *obj)
item->color->a = color->a;
elm_box_pack_end(sd->palette_box, VIEW(item));
evas_object_color_set(item->color_obj,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
evas_object_color_set(item->color_obj,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
item->color->a);
sd->items = eina_list_append(sd->items, item);
@ -1513,7 +1513,7 @@ _elm_colorselector_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
elm_layout_content_set(obj, "selector", priv->col_bars_area);
elm_layout_signal_emit(obj, "elm,state,both", "elm");
/* setup the color picker */
priv->picker = elm_box_add(obj);
elm_box_horizontal_set(priv->picker, EINA_TRUE);
@ -1964,7 +1964,7 @@ _mode_set(Eo *obj, void *_pd, va_list *list)
elm_layout_signal_emit(obj, "elm,state,picker", "elm");
sd->focused = ELM_COLORSELECTOR_PICKER;
break;
case ELM_COLORSELECTOR_ALL:
if (!elm_layout_content_set(obj, "elm.palette", sd->palette_box))
elm_layout_content_set(obj, "palette", sd->palette_box);
@ -2041,9 +2041,9 @@ elm_colorselector_palette_item_color_set(Elm_Object_Item *it,
item->color->b = b;
item->color->a = a;
evas_object_color_set(item->color_obj,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
item->color->a);
_colors_save(WIDGET(it));
}
@ -2096,9 +2096,9 @@ _palette_color_add(Eo *obj, void *_pd, va_list *list)
elm_box_pack_end(sd->palette_box, VIEW(item));
evas_object_color_set(item->color_obj,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
(item->color->r * item->color->a) / 255,
(item->color->g * item->color->a) / 255,
(item->color->b * item->color->a) / 255,
item->color->a);
sd->items = eina_list_append(sd->items, item);

View File

@ -513,7 +513,7 @@ _elm_config_user_dir_snprintf(char *dst,
(dst, size, '/', home, strlen(home),
ELEMENTARY_BASE_DIR, sizeof(ELEMENTARY_BASE_DIR) - 1);
#else
#ifdef DOXDG
#ifdef DOXDG
home = getenv("XDG_CONFIG_HOME");
if (home)
{
@ -522,7 +522,7 @@ _elm_config_user_dir_snprintf(char *dst,
"elementary", sizeof("elementary") - 1);
}
else
#endif
#endif
{
home = getenv("HOME");
if (!home) home = "/";
@ -535,7 +535,7 @@ _elm_config_user_dir_snprintf(char *dst,
user_dir_len = eina_str_join_len
(dst, size, '/', home, strlen(home),
ELEMENTARY_BASE_DIR, sizeof(ELEMENTARY_BASE_DIR) - 1);
#endif
#endif
}
#endif
@ -2485,10 +2485,10 @@ _elm_config_sub_init(void)
if (ecore_x_init(NULL))
{
_root_1st = ecore_x_window_root_first_get();
if (!ecore_x_screen_is_composited(0))
_elm_config->compositing = 0;
ecore_x_atoms_get(_atom_names, ATOM_COUNT, _atom);
ecore_x_event_mask_set(_root_1st,
ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
@ -2497,13 +2497,13 @@ _elm_config_sub_init(void)
if (!getenv("ELM_PROFILE"))
{
char *s;
s = ecore_x_window_prop_string_get(_root_1st,
_atom[ATOM_E_PROFILE]);
if (s)
{
int changed = 0;
if (_elm_profile)
{
if (strcmp(_elm_profile, s)) changed = 1;

View File

@ -837,13 +837,13 @@ _elm_datetime_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
{
Elm_Access_Info *ai;
priv->access_obj = _elm_access_edje_object_part_object_register
(obj, elm_layout_edje_get(obj), "elm.access");
if (!priv->access_obj)
priv->access_obj = _elm_access_edje_object_part_object_register
(obj, elm_layout_edje_get(obj), "access");
ai = _elm_access_info_get(priv->access_obj);
_elm_access_text_set(ai, ELM_ACCESS_TYPE, "date time");
_elm_access_callback_set(ai, ELM_ACCESS_INFO, _access_info_cb, obj);
@ -1039,11 +1039,11 @@ _elm_datetime_field_limit_set(Eo *obj, void *_pd, va_list *list)
if (min > max) return;
field = sd->field_list + fieldtype;
if (((min >= mapping[fieldtype].def_min) &&
if (((min >= mapping[fieldtype].def_min) &&
(min <= mapping[fieldtype].def_max)) ||
(field->type == ELM_DATETIME_YEAR))
field->min = min;
if (((max >= mapping[fieldtype].def_min) &&
if (((max >= mapping[fieldtype].def_min) &&
(max <= mapping[fieldtype].def_max)) ||
(field->type == ELM_DATETIME_YEAR))
field->max = max;
@ -1248,7 +1248,7 @@ _class_constructor(Eo_Class *klass)
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_THEME), _elm_datetime_smart_theme),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ON_FOCUS), _elm_datetime_smart_on_focus),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DISABLE), _elm_datetime_smart_disable),
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_datetime_smart_sizing_eval),
EO_OP_FUNC(ELM_OBJ_DATETIME_ID(ELM_OBJ_DATETIME_SUB_ID_FORMAT_GET), _format_get),

View File

@ -531,7 +531,7 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list)
if (sd->scroll)
{
Eina_Bool ok = EINA_FALSE;
eo_do(obj, elm_scrollable_interface_mirrored_set(elm_widget_mirrored_get(obj)));
if (sd->single_line)
@ -1518,7 +1518,7 @@ _mouse_down_cb(void *data,
sd->downx = ev->canvas.x;
sd->downy = ev->canvas.y;
sd->long_pressed = EINA_FALSE;
if (ev->button == 1)
{
ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del);
@ -3409,7 +3409,7 @@ _password_set(Eo *obj, void *_pd, va_list *list)
else
{
#ifdef HAVE_ELEMENTARY_X
elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP,
elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP,
NULL, NULL,
NULL, NULL,
NULL, NULL,
@ -3668,7 +3668,7 @@ _editable_set(Eo *obj, void *_pd, va_list *list)
#ifdef HAVE_ELEMENTARY_X
if (editable)
elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP,
elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP,
NULL, NULL,
NULL, NULL,
NULL, NULL,

View File

@ -1334,7 +1334,7 @@ _flip(Evas_Object *obj)
else
_flip_do(obj, t, sd->mode, 0, 0);
}
if (t >= 1.0)
{
#if 0 // this breaks manual flipping. :/

View File

@ -257,7 +257,7 @@ _on_item_changed(Elm_Flipselector_Smart_Data *sd)
item = DATA_GET(sd->current);
if (!item) return;
if (sd->deleting) return;
if (item->func)
item->func((void *)item->base.data, WIDGET(item), item);
if (!item->deleted)
@ -586,7 +586,7 @@ _elm_flipselector_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
Elm_Flipselector_Smart_Data *sd = _pd;
sd->deleting = EINA_TRUE;
if (sd->walking) ERR("flipselector deleted while walking.\n");
while (sd->items)

View File

@ -798,7 +798,7 @@ _elm_genlist_item_position_state_update(Elm_Gen_Item *it)
unsigned idx = it->item->order_num_in;
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
if (!it->item->nostacking)
{
if ((idx & 0x1) ^ it->item->stacking_even)
@ -2842,7 +2842,7 @@ static void
_item_unhighlight(Elm_Gen_Item *it)
{
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
if ((it->generation < GL_IT(it)->wsd->generation) || (!it->highlighted))
return;
@ -3242,7 +3242,7 @@ _item_mouse_move_cb(void *data,
minw /= 2;
minh /= 2;
// gah! annoying drag detection - leave this alone
if (h < w)
{
@ -3256,7 +3256,7 @@ _item_mouse_move_cb(void *data,
}
if (minw < 5) minw = 5;
if (minh < 5) minh = 5;
if ((adx > minw) || (ady > minh))
{
it->dragging = EINA_TRUE;
@ -4883,7 +4883,7 @@ _elm_genlist_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
priv->stack[i] = evas_object_rectangle_add(evas_object_evas_get(obj));
evas_object_smart_member_add(priv->stack[i], priv->pan_obj);
}
eo_do(obj, elm_scrollable_interface_extern_pan_set(priv->pan_obj));
edje_object_size_min_calc(wd->resize_obj, &minw, &minh);

View File

@ -859,7 +859,7 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Smart_Data *sd,
_elm_image_internal_sizing_eval(obj, sd);
if (ret) *ret = EINA_TRUE;
}
}
static void
_elm_image_smart_download_done(void *data, Elm_Url *url EINA_UNUSED, Eina_Binbuf *download)

View File

@ -538,9 +538,9 @@ _elm_direction_arrows_eval(Elm_Scrollable_Smart_Interface_Data *sid)
Eina_Bool go_left = EINA_TRUE, go_right = EINA_TRUE;
Eina_Bool go_up = EINA_TRUE, go_down = EINA_TRUE;
Evas_Coord x = 0, y = 0, mx = 0, my = 0, minx = 0, miny = 0;
if (!sid->edje_obj || !sid->pan_obj) return;
eo_do(sid->pan_obj, elm_obj_pan_pos_max_get(&mx, &my));
eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny));
eo_do(sid->pan_obj, elm_obj_pan_pos_get(&x, &y));
@ -722,7 +722,7 @@ _elm_scroll_scroll_bar_h_visibility_adjust(
if (sid->cb_func.content_min_limit)
sid->cb_func.content_min_limit(sid->obj, sid->min_w, sid->min_h);
}
_elm_direction_arrows_eval(sid);
return scroll_h_vis_change;
}

View File

@ -48,7 +48,7 @@ _elm_module_shutdown(void)
if (modules)
{
Eina_List *tl = NULL;
it = eina_hash_iterator_data_new(modules);
EINA_ITERATOR_FOREACH(it, m) tl = eina_list_append(tl, m);

View File

@ -126,7 +126,7 @@ _elm_panel_smart_theme(Eo *obj, void *_pd, va_list *list)
const char *str;
Evas_Coord minw = 0, minh = 0;
Elm_Panel_Smart_Data *sd = _pd;
Eina_Bool int_ret = EINA_FALSE;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
@ -146,15 +146,15 @@ _elm_panel_smart_theme(Eo *obj, void *_pd, va_list *list)
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
_orient_set_do(obj);
evas_object_hide(sd->event);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
evas_object_size_hint_min_set(sd->event, minw, minh);
if (edje_object_part_exists
(wd->resize_obj, "elm.swallow.event"))
elm_layout_content_set(obj, "elm.swallow.event", sd->event);
elm_layout_sizing_eval(obj);
if (ret) *ret = EINA_TRUE;
@ -382,13 +382,13 @@ _elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
(wd->resize_obj, "elm.swallow.event"))
{
Evas_Coord minw = 0, minh = 0;
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
evas_object_size_hint_min_set(priv->event, minw, minh);
elm_layout_content_set(obj, "elm.swallow.event", priv->event);
}
elm_widget_sub_object_add(obj, priv->event);
elm_layout_sizing_eval(obj);
}

View File

@ -693,7 +693,7 @@ elm_prefs_data_value_set(Elm_Prefs_Data *prefs_data,
}
name = strrchr(path, ':');
if (!name)
if (!name)
{
ERR("invalid item path: %s", path);
return EINA_FALSE;
@ -710,7 +710,7 @@ elm_prefs_data_value_set(Elm_Prefs_Data *prefs_data,
if (!values)
{
/* new key, must add one */
values = eina_hash_string_superfast_new(_data_values_hash_free_cb);
values = eina_hash_string_superfast_new(_data_values_hash_free_cb);
eina_hash_set(prefs_data->keys, key, values);
}
@ -769,7 +769,7 @@ elm_prefs_data_value_get(const Elm_Prefs_Data *prefs_data,
EINA_SAFETY_ON_NULL_RETURN_VAL(value, EINA_FALSE);
name = strrchr(path, ':');
if (!name)
if (!name)
{
ERR("invalid item path: %s", path);
return EINA_FALSE;

View File

@ -497,7 +497,7 @@ _elm_slider_smart_theme(Eo *obj, void *_pd, va_list *list)
if (sd->popup)
edje_object_scale_set(sd->popup, elm_widget_scale_get(obj) *
elm_config_scale_get());
if (sd->horizontal)
evas_object_size_hint_min_set
(sd->spacer, (double)sd->size * elm_widget_scale_get(obj) *
@ -865,7 +865,7 @@ _elm_slider_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
(_elm_access_info_get(obj), ELM_ACCESS_INFO, _access_info_cb, NULL);
_elm_access_callback_set
(_elm_access_info_get(obj), ELM_ACCESS_STATE, _access_state_cb, NULL);
evas_object_smart_changed(obj);
}
@ -978,7 +978,7 @@ _elm_slider_unit_format_set(Eo *obj, void *_pd, va_list *list)
const char *units = va_arg(*list, const char *);
Elm_Slider_Smart_Data *sd = _pd;
Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
eina_stringshare_replace(&sd->units, units);
if (units)
{

View File

@ -83,7 +83,7 @@ _elm_url_data(void *data, int type EINA_UNUSED, void *event)
if (url_data->url_con != r->target) return EINA_TRUE;
eina_binbuf_append_length(r->download, url_data->data, url_data->size);
return EINA_TRUE;
}

View File

@ -51,7 +51,7 @@ double
_elm_atof(const char *s)
{
char *cradix, *buf, *p;
if ((!s) || (!s[0])) return 0.0;
cradix = nl_langinfo(RADIXCHAR);
if (!cradix) return atof(s);

View File

@ -5986,7 +5986,7 @@ _elm_widget_item_signal_callback_del(Elm_Widget_Item *item,
{
Elm_Widget_Item_Signal_Data *wisd;
Eina_List *l;
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(func, NULL);

View File

@ -1010,7 +1010,7 @@ _elm_win_state_change(Ecore_Evas *ee)
ch_maximized = EINA_TRUE;
}
profile = ecore_evas_window_profile_get(sd->ee);
ch_profile = _elm_win_profile_set(sd, profile);
@ -2221,10 +2221,10 @@ _elm_win_frame_obj_move(void *data,
evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
if ((x != (ox - fx)) || (y != (oy - fy)) ||
if ((x != (ox - fx)) || (y != (oy - fy)) ||
(w != (fw - ow)) || (h != (fh - oh)))
{
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
(fw - ow), (fh - oh));
}
@ -2253,10 +2253,10 @@ _elm_win_frame_obj_resize(void *data,
evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
if ((x != (ox - fx)) || (y != (oy - fy)) ||
if ((x != (ox - fx)) || (y != (oy - fy)) ||
(w != (fw - ow)) || (h != (fh - oh)))
{
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
(fw - ow), (fh - oh));
}
@ -2453,14 +2453,14 @@ _elm_win_frame_add(Elm_Win_Smart_Data *sd,
sd->spacer_obj = evas_object_rectangle_add(sd->evas);
evas_object_color_set(sd->spacer_obj, 0, 0, 0, 0);
evas_object_repeat_events_set(sd->spacer_obj, EINA_TRUE);
edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
sd->spacer_obj);
sd->client_obj = evas_object_rectangle_add(sd->evas);
evas_object_color_set(sd->client_obj, 0, 0, 0, 0);
/* NB: Tried pass_events here, but that fails to send events */
evas_object_repeat_events_set(sd->client_obj, EINA_TRUE);
edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
edje_object_part_swallow(sd->frame_obj, "elm.swallow.client",
sd->client_obj);
evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
@ -2470,7 +2470,7 @@ _elm_win_frame_add(Elm_Win_Smart_Data *sd,
evas_object_event_callback_add
(sd->frame_obj, EVAS_CALLBACK_RESIZE, _elm_win_frame_obj_resize, sd);
/* NB: Do NOT remove these calls !! Needed to calculate proper
/* NB: Do NOT remove these calls !! Needed to calculate proper
* framespace on inital show of the window */
edje_object_size_min_calc(sd->frame_obj, &mw, &mh);
evas_object_move(sd->frame_obj, 0, 0);
@ -2516,7 +2516,7 @@ _elm_win_frame_del(Elm_Win_Smart_Data *sd)
{
int w, h;
if (sd->client_obj)
if (sd->client_obj)
{
evas_object_del(sd->client_obj);
sd->client_obj = NULL;
@ -5433,7 +5433,7 @@ elm_win_floating_mode_get(const Evas_Object *obj)
return sd->floating;
}
static void
static void
_window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
{
Ecore_Window *ret = va_arg(*list, Ecore_Window *);
@ -5477,7 +5477,7 @@ _window_id_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
*ret = 0;
}
EAPI Ecore_Window
EAPI Ecore_Window
elm_win_window_id_get(const Evas_Object *obj)
{
if (!obj) return 0;

View File

@ -160,7 +160,7 @@ static void
_elm_cursor_obj_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Elm_Cursor *cur = data;
if (cur)
{
evas_object_event_callback_del_full(cur->obj, EVAS_CALLBACK_DEL,