Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-12-30 15:16:59 +09:00
commit 1aa5bbadd2
19 changed files with 1067 additions and 189 deletions

View File

@ -288,3 +288,646 @@ group { name: "elm/radio/base/default";
#undef MASK
#undef DISABLE
}
group { name: "elm/radio/base/plain";
alias: "elm/check/base/plain";
images.image: "button_normal.png" COMP;
images.image: "button_clicked.png" COMP;
images.image: "horizontal_separated_bar_small_glow.png" COMP;
#define ICON 1
#define LABEL 2
#define MASK 3
#define DISABLE 4
#define SELECTED 8
script {
public btmode;
public eval_mode(m) {
new m1 = m & MASK;
new d = m & DISABLE;
new s = m & SELECTED;
if (s) {
set_state(PART:"base", "selected", 0.0);
set_state(PART:"bar", "selected", 0.0);
} else {
set_state(PART:"base", "default", 0.0);
set_state(PART:"bar", "default", 0.0);
}
if (m1 == (ICON | LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer_content", "visible", 0.0);
set_state(PART:"elm.text", "visible", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer_content", "visible", 0.0);
set_state(PART:"elm.text", "disabled_visible", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (ICON)) {
if (!d) {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer_content", "icononly", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer_content", "icononly", 0.0);
set_state(PART:"elm.text", "disabled", 0.0);
set_state(PART:"base", "disabled", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "visible", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "disabled_visible", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
}
}
}
parts {
part { name: "base"; mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: -1 0;
rel2.offset: 0 1;
image.normal: "button_normal.png";
image.border: 4 4 3 5;
image.middle: SOLID;
fill.smooth: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
image.normal: "button_clicked.png";
image.border: 5 5 4 6;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
}
}
part { name: "clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "elm.swallow.content"; type: SWALLOW;
scale: 1;
clip_to: "clip";
description { state: "default" 0.0;
fixed: 1 0;
visible: 0;
align: 0.0 0.5;
max: 0 0;
rel1.offset: 6 5;
rel1.to: "base";
rel2.relative: 0.0 1.0;
rel2.offset: 6 -8;
rel2.to: "base";
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
visible: 1;
align: 0.5 0.5;
max: 9999 9999;
min: 16 16;
rel2.relative: 1.0 1.0;
rel2.offset: -7 -8;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
aspect: 1.0 1.0;
max: 9999 9999;
min: 16 16;
}
}
part { name: "sizer_content"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
text { font: FN; size: 10;
min: 0 0;
text_class: "radio_text";
}
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 2 4;
rel1.to_x: "elm.swallow.content";
rel1.relative: 1.0 0.0;
rel1.to_y: "base";
rel2.offset: -8 -8;
rel2.to: "base";
color: FN_COL_DEFAULT;
color_class: "radio_text";
text { font: FN; size: 10;
min: 0 0;
align: 0.0 0.5;
text_class: "radio";
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color_class: "radio_text_disabled";
color3: 255 255 255 255;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
text.min: 1 1;
text.ellipsis: -1;
}
description { state: "disabled_visible" 0.0;
inherit: "default" 0.0;
color_class: "radio_text_disabled";
color3: 255 255 255 255;
visible: 1;
text.min: 1 1;
text.ellipsis: -1;
}
}
image { "bar"; nomouse;
desc { "default";
image.normal: "horizontal_separated_bar_small_glow.png";
image.border: 4 4 4 4;
fill.smooth: 0;
fill.smooth: 0;
fixed: 0 1;
rel.to: "base";
rel1.relative: 0.0 1.0;
rel1.offset: 1 -12;
rel2.offset: -2 -3;
color: 255 255 255 0;
visible: 0;
}
desc { "selected";
inherit: "default";
color: 255 255 255 255;
visible: 1;
}
}
part { name: "event"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program { signal: "mouse,down,1"; source: "event";
action: STATE_SET "selected" 0.0;
target: "base";
}
program { signal: "mouse,up,1"; source: "event";
script {
new m = get_int(btmode);
eval_mode(m);
}
}
program { signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "elm,action,radio,toggle" "elm";
}
program { signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
}
program { signal: "elm,state,*,on"; source: "elm";
script {
new m = get_int(btmode);
m |= SELECTED; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,*,off"; source: "elm";
script {
new m = get_int(btmode);
m &= ~SELECTED; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,text,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,text,hidden"; source: "elm";
script {
new m = get_int(btmode);
m &= ~LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,icon,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,icon,hidden"; source: "elm";
script {
new m = get_int(btmode);
m &= ~ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,disabled"; source: "elm";
script {
new m = get_int(btmode);
m |= DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,enabled"; source: "elm";
script {
new m = get_int(btmode);
m &= ~DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
}
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}
group { name: "elm/radio/base/icon";
alias: "elm/check/base/icon";
images.image: "button_normal.png" COMP;
images.image: "button_clicked.png" COMP;
images.image: "horizontal_separated_bar_small_glow.png" COMP;
#define ICON 1
#define LABEL 2
#define MASK 3
#define DISABLE 4
#define SELECTED 8
script {
public btmode;
public eval_mode(m) {
new m1 = m & MASK;
new d = m & DISABLE;
new s = m & SELECTED;
if (s) {
set_state(PART:"base", "selected", 0.0);
set_state(PART:"bar", "selected", 0.0);
} else {
set_state(PART:"base", "default", 0.0);
set_state(PART:"bar", "default", 0.0);
}
if (m1 == (ICON | LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer_content", "visible", 0.0);
set_state(PART:"elm.text", "visible", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "visible", 0.0);
set_state(PART:"sizer_content", "visible", 0.0);
set_state(PART:"elm.text", "disabled_visible", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (ICON)) {
if (!d) {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer_content", "icononly", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "icononly", 0.0);
set_state(PART:"sizer_content", "icononly", 0.0);
set_state(PART:"elm.text", "disabled", 0.0);
set_state(PART:"base", "disabled", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else if (m1 == (LABEL)) {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "visible", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "disabled_visible", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
} else {
if (!d) {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "default", 0.0);
set_state(PART:"event", "default", 0.0);
} else {
set_state(PART:"elm.swallow.content", "default", 0.0);
set_state(PART:"sizer_content", "default", 0.0);
set_state(PART:"elm.text", "default", 0.0);
set_state(PART:"clip", "disabled", 0.0);
set_state(PART:"event", "disabled", 0.0);
}
}
}
}
parts {
part { name: "base"; mouse_events: 0;
description { state: "default" 0.0;
rel1.offset: -1 0;
rel2.offset: 0 1;
image.normal: "button_normal.png";
image.border: 4 4 3 5;
image.middle: SOLID;
fill.smooth: 0;
}
description { state: "selected" 0.0;
inherit: "default" 0.0;
image.normal: "button_clicked.png";
image.border: 5 5 4 6;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
}
}
part { name: "clip"; type: RECT;
description { state: "default" 0.0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color: 255 255 255 64;
}
}
part { name: "elm.swallow.content"; type: SWALLOW;
scale: 1;
clip_to: "clip";
description { state: "default" 0.0;
fixed: 0 1;
visible: 0;
align: 0.5 0.0;
max: 0 0;
rel1.offset: 6 2;
rel1.to: "base";
rel2.relative: 1.0 0.0;
rel2.offset: -7 2;
rel2.to: "base";
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
fixed: 0 0;
visible: 1;
align: 0.5 0.5;
max: 9999 9999;
min: 16 16;
rel2.relative: 1.0 1.0;
rel2.offset: -7 -8;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
fixed: 0 0;
visible: 1;
rel1.offset: 6 5;
rel2.offset: -7 5;
aspect: 1.0 1.0;
max: 9999 9999;
min: 16 16;
}
}
part { name: "sizer_content"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
text { font: FN; size: 10;
min: 0 0;
text_class: "radio_text";
}
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
description { state: "icononly" 0.0;
inherit: "default" 0.0;
rel1.to: "elm.swallow.content";
rel2.to: "elm.swallow.content";
text {
min: 1 1;
ellipsis: -1;
text: "M";
}
}
}
part { name: "elm.text"; type: TEXT; mouse_events: 0;
effect: SHADOW BOTTOM;
scale: 1;
description { state: "default" 0.0;
rel1.offset: 6 2;
rel1.to_y: "elm.swallow.content";
rel1.relative: 0.0 1.0;
rel2.offset: -8 -8;
rel2.to: "base";
color: FN_COL_DEFAULT;
color_class: "radio_text";
text { font: FN; size: 10;
min: 0 0;
align: 0.5 1.0;
text_class: "radio";
}
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
color_class: "radio_text_disabled";
color3: 255 255 255 255;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
text.min: 1 1;
text.ellipsis: -1;
}
description { state: "disabled_visible" 0.0;
inherit: "default" 0.0;
color_class: "radio_text_disabled";
color3: 255 255 255 255;
visible: 1;
text.min: 1 1;
text.ellipsis: -1;
}
}
image { "bar"; nomouse;
desc { "default";
image.normal: "horizontal_separated_bar_small_glow.png";
image.border: 4 4 4 4;
fill.smooth: 0;
fill.smooth: 0;
fixed: 0 1;
rel.to: "base";
rel1.relative: 0.0 1.0;
rel1.offset: 1 -12;
rel2.offset: -2 -3;
color: 255 255 255 0;
visible: 0;
}
desc { "selected";
inherit: "default";
color: 255 255 255 255;
visible: 1;
}
}
part { name: "event"; type: RECT;
description { state: "default" 0.0;
color: 0 0 0 0;
}
description { state: "disabled" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
}
programs {
program { signal: "mouse,down,1"; source: "event";
action: STATE_SET "selected" 0.0;
target: "base";
}
program { signal: "mouse,up,1"; source: "event";
script {
new m = get_int(btmode);
eval_mode(m);
}
}
program { signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "elm,action,radio,toggle" "elm";
}
program { signal: "mouse,clicked,1"; source: "event";
action: SIGNAL_EMIT "elm,action,check,toggle" "elm";
}
program { signal: "elm,state,*,on"; source: "elm";
script {
new m = get_int(btmode);
m |= SELECTED; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,*,off"; source: "elm";
script {
new m = get_int(btmode);
m &= ~SELECTED; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,text,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,text,hidden"; source: "elm";
script {
new m = get_int(btmode);
m &= ~LABEL; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,icon,visible"; source: "elm";
script {
new m = get_int(btmode);
m |= ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,icon,hidden"; source: "elm";
script {
new m = get_int(btmode);
m &= ~ICON; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,disabled"; source: "elm";
script {
new m = get_int(btmode);
m |= DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
program { signal: "elm,state,enabled"; source: "elm";
script {
new m = get_int(btmode);
m &= ~DISABLE; set_int(btmode, m);
eval_mode(m);
}
}
}
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}

View File

@ -254,6 +254,39 @@ ecore_evas_wayland_engine_include_dir = []
evas_static_list = []
luaold_interpreters = [
['lua', ['>=5.1.0','<5.3.0']],
['lua51', ['>=5.1.0','<5.2.0']],
['lua-5.1', ['>=5.1.0','<5.2.0']],
['lua5.1', ['>=5.1.0','<5.2.0']],
['lua52', ['>=5.2.0','<5.3.0']],
['lua-5.2', ['>=5.2.0','<5.3.0']],
['lua5.2', ['>=5.2.0','<5.3.0']],
]
lua_pc_name = ''
if get_option('lua-interpreter') == 'lua'
foreach l : luaold_interpreters
lua = dependency(l[0], version: l[1], required:false)
lua_pc_name = l[0]
if lua.found() == true
break
endif
endforeach
else
lua = dependency(get_option('lua-interpreter'))
lua_pc_name = 'luajit'
endif
if sys_osx == true and get_option('lua-interpreter') == 'luajit'
# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
lua = declare_dependency(
include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
)
endif
subprojects = [
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
['evil' ,[] , false, true, false, false, false, false, [], []],
@ -293,7 +326,7 @@ subprojects = [
['efreet' ,[] , false, false, true, false, false, false, ['eina', 'efl', 'eo'], []],
['ecore_imf_evas' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
['ephysics' ,['physics'] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', get_option('lua-interpreter')], []],
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', lua_pc_name], []],
['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []],
['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],

View File

@ -29,25 +29,18 @@ state_changed_cb2(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EIN
elm_object_text_set(obj, "text is visible when check state is true.");
}
void
test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
static void
check_style(Evas_Object *win, Evas_Object *bx, const char *style)
{
Evas_Object *win, *bx, *ic, *ck, *ck0;
Evas_Object *ic, *ck, *ck0;
char buf[PATH_MAX];
win = elm_win_util_standard_add("check", "Check");
elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
evas_object_show(bx);
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);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Icon sized to check");
elm_object_part_content_set(ck, "icon", ic);
elm_check_state_set(ck, EINA_TRUE);
@ -62,6 +55,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
elm_image_file_set(ic, buf, NULL);
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Icon not resizable");
elm_object_part_content_set(ck, "icon", ic);
elm_box_pack_end(bx, ck);
@ -71,17 +65,20 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
evas_object_smart_callback_add(ck, "changed", changed_cb, ck0);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Label Only");
elm_box_pack_end(bx, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Use State Pointer");
elm_check_state_pointer_set(ck, &eb);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Print State Pointer Value");
elm_box_pack_end(bx, ck);
evas_object_show(ck);
@ -92,6 +89,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
elm_image_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_text_set(ck, "Disabled check");
elm_object_part_content_set(ck, "icon", ic);
elm_check_state_set(ck, EINA_TRUE);
@ -101,6 +99,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
evas_object_show(ic);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_box_pack_end(bx, ck);
elm_object_disabled_set(ck, EINA_TRUE);
evas_object_show(ck);
@ -110,21 +109,63 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
elm_image_file_set(ic, buf, NULL);
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_object_part_content_set(ck, "icon", ic);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
evas_object_show(ic);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_box_pack_end(bx, ck);
evas_object_show(ck);
ck = elm_check_add(win);
elm_object_style_set(ck, style);
elm_box_pack_end(bx, ck);
elm_object_text_set(ck, "text is visible when check state is true.");
elm_check_state_set(ck, EINA_TRUE);
evas_object_show(ck);
evas_object_smart_callback_add(ck, "changed", state_changed_cb2, NULL);
}
void
test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *win, *bx, *bx0;
win = elm_win_util_standard_add("check", "Check");
elm_win_autodel_set(win, EINA_TRUE);
bx0 = elm_box_add(win);
evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_horizontal_set(bx0, EINA_TRUE);
elm_win_resize_object_add(win, bx0);
evas_object_show(bx0);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_FALSE);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
check_style(win, bx, "default");
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_FALSE);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
check_style(win, bx, "plain");
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_FALSE);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
check_style(win, bx, "icon");
evas_object_show(win);
}

View File

@ -18,7 +18,7 @@ _rdg_changed_cb(void *data EINA_UNUSED, Evas_Object *obj,
}
static void
_group_1_create(Evas_Object *bx)
_group_1_create(Evas_Object *bx, const char *style)
{
Evas_Object *bx2, *fr, *ic, *rd, *rdg;
char buf[PATH_MAX];
@ -41,6 +41,7 @@ _group_1_create(Evas_Object *bx)
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 0);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
@ -60,6 +61,7 @@ _group_1_create(Evas_Object *bx)
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 1);
elm_radio_group_add(rd, rdg);
elm_object_text_set(rd, "Icon no scale");
@ -69,6 +71,7 @@ _group_1_create(Evas_Object *bx)
evas_object_smart_callback_add(rd, "changed", _rd_changed_cb, NULL);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 2);
elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_text_set(rd, "Label Only");
@ -77,6 +80,7 @@ _group_1_create(Evas_Object *bx)
evas_object_smart_callback_add(rd, "changed", _rd_changed_cb, NULL);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 3);
elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_text_set(rd, "Disabled");
@ -91,6 +95,7 @@ _group_1_create(Evas_Object *bx)
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 4);
elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_part_content_set(rd, "icon", ic);
@ -104,6 +109,7 @@ _group_1_create(Evas_Object *bx)
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 5);
elm_radio_group_add(rd, rdg); // add a radio button rd to a radio group rdg.
elm_object_part_content_set(rd, "icon", ic);
@ -116,7 +122,7 @@ _group_1_create(Evas_Object *bx)
}
static void
_group_2_create(Evas_Object *bx)
_group_2_create(Evas_Object *bx, const char *style)
{
Evas_Object *bx2, *fr, *rd, *rdg;
@ -134,6 +140,7 @@ _group_2_create(Evas_Object *bx)
// radio 1
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 1);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
@ -148,6 +155,7 @@ _group_2_create(Evas_Object *bx)
// radio 2
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 2);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
@ -158,6 +166,7 @@ _group_2_create(Evas_Object *bx)
// radio 2
rd = elm_radio_add(bx2);
elm_object_style_set(rd, style);
elm_radio_state_value_set(rd, 3);
evas_object_size_hint_weight_set(rd, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(rd, EVAS_HINT_FILL, 0.5);
@ -171,19 +180,42 @@ void
test_radio(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Evas_Object *win, *bx;
Evas_Object *win, *bx, *bx0;
win = elm_win_util_standard_add("radios", "Radios");
elm_win_autodel_set(win, EINA_TRUE);
bx0 = elm_box_add(win);
elm_box_horizontal_set(bx0, EINA_TRUE);
elm_win_resize_object_add(win, bx0);
evas_object_show(bx0);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
_group_1_create(bx);
_group_2_create(bx);
_group_1_create(bx, "default");
_group_2_create(bx, "default");
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_horizontal_set(bx, EINA_TRUE);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
_group_1_create(bx, "plain");
_group_2_create(bx, "plain");
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_horizontal_set(bx, EINA_TRUE);
elm_box_pack_end(bx0, bx);
evas_object_show(bx);
_group_1_create(bx, "icon");
_group_2_create(bx, "icon");
evas_object_show(win);
}

View File

@ -1035,9 +1035,10 @@ ecore_x_input_device_property_get(int slot, const char *prop, int *num_ret,
if ((slot < 0) || (slot >= _ecore_x_xi2_num)) goto err;
a = XInternAtom(_ecore_x_disp, prop, False);
if (!XIGetProperty(_ecore_x_disp, _ecore_x_xi2_devs[slot].deviceid,
// XIGetProperty returns 0 AKA `Success` if everything is good
if (XIGetProperty(_ecore_x_disp, _ecore_x_xi2_devs[slot].deviceid,
a, 0, 65536, False, AnyPropertyType, &a_type, &fmt,
&num, &dummy, &data)) goto err;
&num, &dummy, &data) != 0) goto err;
*format_ret = a_type;
*num_ret = num;
*unit_size_ret = fmt;

View File

@ -63,7 +63,7 @@ _efl_canvas_layout_part_text_efl_text_style_text_background_type_get(const Eo *o
PROXY_DATA_GET(obj, pd);
if (pd->rp->part->type == EDJE_PART_TYPE_TEXT)
return EFL_TEXT_STYLE_BACKGROUND_TYPE_DISABLED;
return EFL_TEXT_STYLE_BACKGROUND_TYPE_NONE;
return efl_text_background_type_get(pd->rp->object);
}

View File

@ -1,16 +1,16 @@
enum @beta Efl.Text_Style_Background_Type
{
[[Whether to add a background colored rectangle (background) to each line of text or not.]]
disabled = 0, [[Do not use background.]]
enabled, [[Use background.]]
none = 0, [[Do not use background.]]
solid_color, [[Use solid color background.]]
}
enum @beta Efl.Text_Style_Strikethrough_Type
{
[[Whether to add a strike-through decoration to the displayed text or not.]]
disabled = 0, [[Do not use strike-through.]]
enabled, [[Use strike-through.]]
none = 0, [[Do not use strike-through.]]
single, [[Strikethrough with a single line.]]
}
@ -50,8 +50,7 @@ enum @beta Efl.Text_Style_Shadow_Direction
enum @beta Efl.Text_Style_Underline_Type
{
[[Type of underline of the displayed text.]]
off = 0, [[Text without underline.]]
on, [[Underline enabled.]]
none = 0, [[Text without underline.]]
single, [[Underlined with a single line.]]
double, [[Underlined with a double line.]]
dashed, [[Underlined with a dashed line.]]

View File

@ -1208,8 +1208,9 @@ _efl_ui_collection_focus_manager_efl_ui_focus_manager_request_move(Eo *obj, Efl_
if (ITEM_IS_OUTSIDE_VISIBLE(item_id))
{
int new_id = efl_ui_position_manager_entity_relative_item(collection_pd->pos_man, efl_ui_item_index_get(item), direction);
if (new_id == -1)
unsigned int new_id;
if (!efl_ui_position_manager_entity_relative_item(collection_pd->pos_man, efl_ui_item_index_get(item), direction, &new_id))
{
new_item = NULL;
}

View File

@ -79,6 +79,11 @@ struct _Efl_Ui_Collection_View_Data
Eina_List *requests; // Array of Efl_Ui_Collection_Request in progress
struct {
Efl_Gfx_Entity *last; // The last item of the collection, so focus can start by the end if necessary.
Efl_Gfx_Entity *previously; // The previously selected item in the collection, so focus can come back to it.
} focus;
unsigned int start_id;
unsigned int end_id;
@ -293,6 +298,9 @@ _all_cleanup(Efl_Ui_Collection_View *obj, Efl_Ui_Collection_View_Data *pd)
}
#endif
efl_replace(&pd->focus.previously, NULL);
efl_replace(&pd->focus.last, NULL);
EINA_LIST_FOREACH_SAFE(pd->requests, l, ll, request)
eina_future_cancel(request->f);
}
@ -485,6 +493,33 @@ _entity_fetch_cb(Eo *obj, void *data EINA_UNUSED, const Eina_Value v)
return eina_future_as_value(r);
}
static inline unsigned int
_lookup_entity_index(Efl_Gfx_Entity *entity, Efl_Model **model)
{
Efl_Model *fetch;
fetch = efl_ui_view_model_get(entity);
if (model) *model = fetch;
return efl_composite_model_index_get(fetch);
}
static void
_last_entity_update(Efl_Ui_Collection_View_Data *pd, Efl_Gfx_Entity *entity)
{
Efl_Model *new_model, *old_model;
unsigned int new_index, old_index;
if (!pd->focus.last) goto replace;
new_index = _lookup_entity_index(entity, &new_model);
old_index = _lookup_entity_index(pd->focus.last, &old_model);
if (new_index <= old_index) return;
replace:
efl_replace(&pd->focus.last, entity);
}
static inline Eina_Bool
_entity_propagate(Efl_Model *model, Efl_Gfx_Entity *entity)
{
@ -634,6 +669,9 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
evas_event_thaw(e);
evas_event_thaw_eval(e);
// Check if the last child is also the list item in the list
_last_entity_update(pd, child);
// Currently position manager will flush its entire size cache on update, so only do
// it when necessary to improve performance.
if (updated_size || request->need_size)
@ -667,6 +705,54 @@ _entity_free_cb(Eo *o, void *data, const Eina_Future *dead_future EINA_UNUSED)
free(request);
}
static Eina_Bool
_focus_lookup(Efl_Ui_Collection_View_Data *pd, unsigned int search_index,
Efl_Gfx_Entity **entity, Efl_Model **model)
{
unsigned int idx;
if (entity) *entity = pd->focus.last;
if (pd->focus.last)
{
idx = _lookup_entity_index(pd->focus.last, model);
if (idx == search_index) return EINA_TRUE;
}
if (entity) *entity = pd->focus.previously;
if (pd->focus.previously)
{
idx = _lookup_entity_index(pd->focus.previously, model);
if (idx == search_index) return EINA_TRUE;
}
if (entity) *entity = NULL;
if (model) *model = NULL;
return EINA_FALSE;
}
static Efl_Ui_Collection_Item_Lookup *
_build_from_focus(Efl_Ui_Collection_View_Data *pd, unsigned int search_index,
Efl_Model **model)
{
Efl_Ui_Collection_Item_Lookup *insert;
Efl_Gfx_Entity *entity = NULL;
// Not found in the cache lookup, but just maybe
if (!_focus_lookup(pd, search_index, &entity, model)) return NULL;
// Lucky us, let's add it to the cache
insert = calloc(1, sizeof (Efl_Ui_Collection_Item_Lookup));
if (!insert) return NULL;
insert->index = search_index;
insert->item.model = efl_ref(*model);
insert->item.entity = efl_ref(entity);
pd->cache = eina_rbtree_inline_insert(pd->cache, EINA_RBTREE_GET(insert),
_cache_tree_cmp, NULL);
return insert;
}
static Eina_List *
_cache_size_fetch(Eina_List *requests, Efl_Ui_Collection_Request **request,
Efl_Ui_Collection_View_Data *pd,
@ -675,7 +761,7 @@ _cache_size_fetch(Eina_List *requests, Efl_Ui_Collection_Request **request,
Eina_Size2D item_base)
{
Efl_Ui_Collection_Item_Lookup *lookup;
Efl_Model *model;
Efl_Model *model = NULL;
Eina_Size2D item_size = item_base;
if (!pd->cache) goto not_found;
@ -683,10 +769,16 @@ _cache_size_fetch(Eina_List *requests, Efl_Ui_Collection_Request **request,
lookup = (void*) eina_rbtree_inline_lookup(pd->cache, &search_index,
sizeof (search_index), _cache_tree_lookup,
NULL);
if (!lookup) goto not_found;
// In the cache we should always have model, so no need to check for it
model = lookup->item.model;
if (lookup)
{
model = lookup->item.model;
}
else
{
lookup = _build_from_focus(pd, search_index, &model);
if (!lookup) goto not_found;
}
// If we do not know the size
if (!ITEM_SIZE_FROM_MODEL(model, item_size))
@ -731,12 +823,14 @@ _cache_entity_fetch(Eina_List *requests, Efl_Ui_Collection_Request **request,
Efl_Ui_Position_Manager_Object_Batch_Entity *target)
{
Efl_Ui_Collection_Item_Lookup *lookup;
Efl_Model *model = NULL;
if (!pd->cache) goto not_found;
lookup = (void*) eina_rbtree_inline_lookup(pd->cache, &search_index,
sizeof (search_index), _cache_tree_lookup,
NULL);
if (!lookup) lookup = _build_from_focus(pd, search_index, &model);
if (!lookup) goto not_found;
if (!lookup->item.entity) goto not_found;
@ -1668,8 +1762,27 @@ _efl_ui_collection_view_position_manager_get(const Eo *obj EINA_UNUSED,
}
static void
_efl_model_count_changed(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
_efl_model_count_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
Efl_Ui_Collection_Request *request = NULL;
Eina_List *requests = NULL;
MY_DATA_GET(data, pd);
unsigned int index;
unsigned int count = 0;
count = efl_model_children_count_get(pd->model);
if (pd->focus.last)
{
index = _lookup_entity_index(pd->focus.last, NULL);
if (index + 1 == count)
return ;
}
// The last item is not the last item anymore
requests = _request_add(requests, &request, count, EINA_TRUE);
requests = _batch_request_flush(requests, data, pd);
// We are not triggering efl_ui_position_manager_entity_data_access_set as it is can
// only be slow, we rely on child added/removed instead (If we were to not rely on
// child added/removed we could maybe use count changed)
@ -1863,6 +1976,7 @@ _efl_model_child_removed(void *data, const Efl_Event *event)
if (request_length > 0)
{
Efl_Ui_Collection_Request *request = NULL;
requests = _request_add(requests, &request, ev->index, EINA_TRUE);
request->length = request_length;
requests = eina_list_append(requests, request);
@ -1882,9 +1996,7 @@ static void
_efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
{
Efl_Model_Changed_Event *ev = event->info;
#ifdef VIEWPORT_ENABLE
Eina_List *requests = NULL;
#endif
MY_DATA_GET(data, pd);
Eina_Iterator *it;
const char *property;
@ -1971,7 +2083,6 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
#ifdef VIEWPORT_ENABLE
for (i = 0; i < 3; i++)
{
Efl_Ui_Collection_Request *request;
if (!pd->viewport[i]) continue ;
if (pd->viewport[i]->count == 0) continue ;
@ -1986,10 +2097,21 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
requests = eina_list_append(requests, request);
}
requests = _batch_request_flush(requests, data, pd);
#endif
switch(efl_ui_position_manager_entity_version(pd->manager, 1))
// Fetch last item if necessary for later focus
if (efl_model_children_count_get(model))
{
Efl_Ui_Collection_Request *request = NULL;
uint64_t index = efl_model_children_count_get(model) - 1;
requests = _request_add(requests, &request, index, EINA_TRUE);
}
// Flush all pending request
requests = _batch_request_flush(requests, data, pd);
switch (efl_ui_position_manager_entity_version(pd->manager, 1))
{
case 1:
efl_ui_position_manager_data_access_v1_data_access_set(pd->manager,
@ -2249,20 +2371,17 @@ _efl_ui_collection_view_focus_manager_efl_ui_focus_manager_manager_focus_set(Eo
if (focus == efl_ui_focus_manager_root_get(obj))
{
// Find last item
item_id = efl_model_children_count_get(cpd->model) - 1;
item = cpd->focus.previously;
if (!item) item = cpd->focus.last;
if (item) item_id = _lookup_entity_index(item, NULL);
else item_id = efl_model_children_count_get(cpd->model) - 1;
}
else
{
Efl_Model *model;
Eina_Value *vindex;
item = _find_item(obj, cpd, focus);
if (!item) return ;
model = efl_ui_view_model_get(item);
vindex = efl_model_property_get(model, "child.index");
if (!eina_value_uint_convert(vindex, &item_id)) return;
eina_value_free(vindex);
item_id = _lookup_entity_index(item, NULL);
}
// If this is NULL then we are before finalize, we cannot serve any sane value here
@ -2293,7 +2412,8 @@ EOLIAN static Efl_Ui_Focus_Object *
_efl_ui_collection_view_focus_manager_efl_ui_focus_manager_request_move(Eo *obj, Efl_Ui_Collection_View_Focus_Manager_Data *pd, Efl_Ui_Focus_Direction direction, Efl_Ui_Focus_Object *child, Eina_Bool logical)
{
MY_DATA_GET(pd->collection, cpd);
Efl_Ui_Item *new_item, *item;
Efl_Ui_Item *new_item = NULL;
Efl_Ui_Item *item;
unsigned int item_id;
if (!child)
@ -2302,20 +2422,20 @@ _efl_ui_collection_view_focus_manager_efl_ui_focus_manager_request_move(Eo *obj,
item = _find_item(obj, cpd, child);
//if this is NULL then we are before finalize, we cannot serve any sane value here
if (!cpd->manager) return NULL;
if (!item) return NULL;
if (!cpd->manager) goto end;
if (!item) goto end;
if (!_id_from_item(item, &item_id))
return NULL;
goto end;
if (ITEM_IS_OUTSIDE_VISIBLE(item_id))
{
int new_id;
unsigned int new_id;
new_id = efl_ui_position_manager_entity_relative_item(cpd->manager,
item_id,
direction);
if (new_id < 0)
if (!efl_ui_position_manager_entity_relative_item(cpd->manager,
item_id,
direction,
&new_id))
{
new_item = NULL;
}
@ -2361,6 +2481,8 @@ _efl_ui_collection_view_focus_manager_efl_ui_focus_manager_request_move(Eo *obj,
new_item = efl_ui_focus_manager_request_move(efl_super(obj, EFL_UI_COLLECTION_VIEW_FOCUS_MANAGER_CLASS), direction, child, logical);
}
end:
efl_replace(&cpd->focus.previously, new_item);
return new_item;
}

View File

@ -107,8 +107,9 @@ interface @beta Efl.Ui.Position_Manager.Entity extends Efl.Ui.Layout_Orientable
params {
current_id : uint; [[The id where the direction is oriented at]]
direction : Efl.Ui.Focus.Direction; [[The direction where the new id is]]
@out index: uint; [[The relative item index after the translation has been applied.]]
}
return : int; [[The id of the item in that direction, or -1 if there is no item in that direction]]
return : bool; [[$true if there is a next item, $false otherwise.]]
}
}
events {

View File

@ -738,35 +738,34 @@ _efl_ui_position_manager_grid_efl_ui_position_manager_entity_position_single_ite
return geom;
}
EOLIAN static int
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_relative_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, unsigned int current_id, Efl_Ui_Focus_Direction direction)
EOLIAN static Eina_Bool
_efl_ui_position_manager_grid_efl_ui_position_manager_entity_relative_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_Grid_Data *pd, unsigned int current_id, Efl_Ui_Focus_Direction direction, unsigned int *index)
{
int new_id = current_id;
switch(direction)
{
case EFL_UI_FOCUS_DIRECTION_RIGHT:
case EFL_UI_FOCUS_DIRECTION_NEXT:
new_id += 1;
break;
if (current_id + 1 >= pd->size) return EINA_FALSE;
current_id += 1;
break;
case EFL_UI_FOCUS_DIRECTION_LEFT:
case EFL_UI_FOCUS_DIRECTION_PREVIOUS:
new_id -= 1;
break;
if (current_id == 0) return EINA_FALSE;
current_id -= 1;
break;
case EFL_UI_FOCUS_DIRECTION_UP:
//FIXME
break;
//FIXME
break;
case EFL_UI_FOCUS_DIRECTION_DOWN:
//FIXME
break;
//FIXME
break;
default:
new_id = -1;
ERR("Uncaught case!");
break;
ERR("Uncaught case!");
return EINA_FALSE;
}
if (new_id < 0 || new_id > (int)pd->size)
return -1;
else
return new_id;
if (index) *index = current_id;
return EINA_TRUE;
}
EOLIAN static int

View File

@ -520,31 +520,30 @@ _efl_ui_position_manager_list_efl_object_invalidate(Eo *obj, Efl_Ui_Position_Man
efl_invalidate(efl_super(obj, MY_CLASS));
}
EOLIAN static int
_efl_ui_position_manager_list_efl_ui_position_manager_entity_relative_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, unsigned int current_id, Efl_Ui_Focus_Direction direction)
EOLIAN static Eina_Bool
_efl_ui_position_manager_list_efl_ui_position_manager_entity_relative_item(Eo *obj EINA_UNUSED, Efl_Ui_Position_Manager_List_Data *pd, unsigned int current_id, Efl_Ui_Focus_Direction direction, unsigned int *index)
{
int new_id = current_id;
switch(direction)
{
case EFL_UI_FOCUS_DIRECTION_RIGHT:
case EFL_UI_FOCUS_DIRECTION_NEXT:
case EFL_UI_FOCUS_DIRECTION_DOWN:
new_id += 1;
break;
if (current_id + 1 >= pd->size) return EINA_FALSE;
current_id += 1;
break;
case EFL_UI_FOCUS_DIRECTION_LEFT:
case EFL_UI_FOCUS_DIRECTION_PREVIOUS:
case EFL_UI_FOCUS_DIRECTION_UP:
new_id -= 1;
break;
if (current_id == 0) return EINA_FALSE;
current_id -= 1;
break;
default:
ERR("Uncaught case!");
new_id = -1;
break;
ERR("Uncaught case!");
return EINA_FALSE;
}
if (new_id < 0 || new_id > (int)pd->size)
return -1;
else
return new_id;
if (index) *index = current_id;
return EINA_TRUE;
}
EOLIAN static int

View File

@ -353,9 +353,9 @@ _efl_ui_textbox_guide_update(Evas_Object *obj,
EFL_UI_TEXT_DATA_GET(obj, sd);
if ((has_text) && (!sd->has_text))
edje_object_signal_emit(sd->entry_edje, "efl,guide,disabled", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,guide,disabled", "efl");
else if ((!has_text) && (sd->has_text))
edje_object_signal_emit(sd->entry_edje, "efl,guide,enabled", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,guide,enabled", "efl");
sd->has_text = has_text;
}
@ -390,7 +390,7 @@ _mirrored_set(Evas_Object *obj,
{
EFL_UI_TEXT_DATA_GET(obj, sd);
edje_object_mirrored_set(sd->entry_edje, rtl);
efl_ui_mirrored_set(sd->entry_edje, rtl);
if (sd->anchor_hover.hover)
efl_ui_mirrored_set(sd->anchor_hover.hover, rtl);
@ -405,12 +405,12 @@ _hide_selection_handler(Evas_Object *obj)
if (sd->start_handler_shown)
{
edje_object_signal_emit(sd->start_handler, "efl,handler,hide", "efl");
efl_layout_signal_emit(sd->start_handler, "efl,handler,hide", "efl");
sd->start_handler_shown = EINA_FALSE;
}
if (sd->end_handler_shown)
{
edje_object_signal_emit(sd->end_handler, "efl,handler,hide", "efl");
efl_layout_signal_emit(sd->end_handler, "efl,handler,hide", "efl");
sd->end_handler_shown = EINA_FALSE;
}
}
@ -431,7 +431,7 @@ _viewport_region_get(Evas_Object *obj)
rect = efl_gfx_entity_geometry_get(sd->text_obj);
}
parent = elm_widget_parent_get(obj);
parent = efl_ui_widget_parent_get(obj);
while (parent)
{
if (efl_isa(parent, ELM_INTERFACE_SCROLLABLE_MIXIN))
@ -445,7 +445,7 @@ _viewport_region_get(Evas_Object *obj)
break;
}
}
parent = elm_widget_parent_get(parent);
parent = efl_ui_widget_parent_get(parent);
}
return rect;
@ -500,13 +500,13 @@ _update_selection_handler(Eo *obj)
}
if (!sd->start_handler_shown && !hidden)
{
edje_object_signal_emit(sd->start_handler,
efl_layout_signal_emit(sd->start_handler,
"efl,handler,show", "efl");
sd->start_handler_shown = EINA_TRUE;
}
else if (sd->start_handler_shown && hidden)
{
edje_object_signal_emit(sd->start_handler,
efl_layout_signal_emit(sd->start_handler,
"efl,handler,hide", "efl");
sd->start_handler_shown = EINA_FALSE;
}
@ -528,13 +528,13 @@ _update_selection_handler(Eo *obj)
}
if (!sd->end_handler_shown && !hidden)
{
edje_object_signal_emit(sd->end_handler,
efl_layout_signal_emit(sd->end_handler,
"efl,handler,show", "efl");
sd->end_handler_shown = EINA_TRUE;
}
else if (sd->end_handler_shown && hidden)
{
edje_object_signal_emit(sd->end_handler,
efl_layout_signal_emit(sd->end_handler,
"efl,handler,hide", "efl");
sd->end_handler_shown = EINA_FALSE;
}
@ -543,13 +543,13 @@ _update_selection_handler(Eo *obj)
{
if (sd->start_handler_shown)
{
edje_object_signal_emit(sd->start_handler,
efl_layout_signal_emit(sd->start_handler,
"efl,handler,hide", "efl");
sd->start_handler_shown = EINA_FALSE;
}
if (sd->end_handler_shown)
{
edje_object_signal_emit(sd->end_handler,
efl_layout_signal_emit(sd->end_handler,
"efl,handler,hide", "efl");
sd->end_handler_shown = EINA_FALSE;
}
@ -671,10 +671,10 @@ _efl_ui_textbox_efl_ui_widget_disabled_set(Eo *obj, Efl_Ui_Textbox_Data *sd, Ein
_dnd_drop_cb, NULL);
emission = efl_ui_widget_disabled_get(obj) ? "efl,state,disabled" : "efl,state,enabled";
edje_object_signal_emit(sd->entry_edje, emission, "efl");
efl_layout_signal_emit(sd->entry_edje, emission, "efl");
if (sd->scroll)
{
edje_object_signal_emit(sd->scr_edje, emission, "efl");
efl_layout_signal_emit(sd->scr_edje, emission, "efl");
elm_interface_scrollable_freeze_set(obj, efl_ui_widget_disabled_get(obj));
}
@ -709,7 +709,7 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd)
edje_object_mirrored_set
(wd->resize_obj, efl_ui_mirrored_get(obj));
edje_object_scale_set
efl_gfx_entity_scale_set
(wd->resize_obj,
efl_gfx_entity_scale_get(obj) * elm_config_scale_get());
@ -725,15 +725,15 @@ _efl_ui_textbox_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textbox_Data *sd)
if (efl_ui_focus_object_focus_get(obj))
{
edje_object_signal_emit(sd->entry_edje, "efl,action,focus", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,action,focus", "efl");
if (sd->scroll)
edje_object_signal_emit(sd->scr_edje, "efl,action,focus", "efl");
efl_layout_signal_emit(sd->scr_edje, "efl,action,focus", "efl");
}
edje_object_message_signal_process(sd->entry_edje);
efl_layout_signal_process(sd->entry_edje, EINA_FALSE);
Evas_Object* clip = evas_object_clip_get(sd->entry_edje);
evas_object_clip_set(sd->hit_rect, clip);
efl_canvas_object_clipper_set(sd->hit_rect, clip);
if (sd->start_handler)
{
@ -880,7 +880,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
_edje_signal_emit(sd, "efl,action,focus", "efl");
if (sd->scroll)
edje_object_signal_emit(sd->scr_edje, "efl,action,focus", "efl");
efl_layout_signal_emit(sd->scr_edje, "efl,action,focus", "efl");
if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj) && !efl_input_text_input_panel_show_on_demand_get(obj))
elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
@ -893,7 +893,7 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
_edje_signal_emit(sd, "efl,action,unfocus", "efl");
if (sd->scroll)
edje_object_signal_emit(sd->scr_edje, "efl,action,unfocus", "efl");
efl_layout_signal_emit(sd->scr_edje, "efl,action,unfocus", "efl");
evas_object_focus_set(sw, EINA_FALSE);
if (top && top_is_win && efl_input_text_input_panel_autoshow_get(obj))
@ -906,13 +906,13 @@ _efl_ui_textbox_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Textbox_Data
if ((efl_text_interactive_have_selection_get(obj)) && (!sd->hoversel))
{
sd->sel_mode = EINA_FALSE;
elm_widget_scroll_hold_pop(obj);
efl_ui_widget_scroll_hold_pop(obj);
edje_object_part_text_select_allow_set(sd->entry_edje, "efl.text", EINA_FALSE);
edje_object_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
edje_object_part_text_select_none(sd->entry_edje, "efl.text");
}
}
edje_object_signal_emit(sd->scr_edje, "validation,default", "efl");
efl_layout_signal_emit(sd->scr_edje, "validation,default", "efl");
}
return EINA_TRUE;
@ -998,7 +998,7 @@ _hover_dismissed_cb(void *data, const Efl_Event *event EINA_UNUSED)
(sd->entry_edje, "efl.text", EINA_TRUE);
}
}
elm_widget_scroll_freeze_pop(data);
efl_ui_widget_scroll_freeze_pop(data);
ecore_job_del(sd->hov_deljob);
sd->hov_deljob = ecore_job_add(_hover_del_job, data);
}
@ -1021,10 +1021,10 @@ _hover_selected_cb(void *data,
edje_object_part_text_select_allow_set
(sd->entry_edje, "efl.text", EINA_TRUE);
}
edje_object_signal_emit(sd->entry_edje, "efl,state,select,on", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,state,select,on", "efl");
if (!_elm_config->desktop_entry)
elm_widget_scroll_hold_push(data);
efl_ui_widget_scroll_hold_push(data);
}
static void
@ -1142,9 +1142,9 @@ _hover_cancel_cb(void *data,
if (!_elm_config->desktop_entry)
edje_object_part_text_select_allow_set
(sd->entry_edje, "efl.text", EINA_FALSE);
edje_object_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
if (!_elm_config->desktop_entry)
elm_widget_scroll_hold_pop(data);
efl_ui_widget_scroll_hold_pop(data);
edje_object_part_text_select_none(sd->entry_edje, "efl.text");
}
@ -1190,10 +1190,10 @@ _menu_call(Evas_Object *obj)
return;
}
if (sd->hoversel) evas_object_del(sd->hoversel);
else elm_widget_scroll_freeze_push(obj);
else efl_ui_widget_scroll_freeze_push(obj);
sd->hoversel = elm_hoversel_add(obj);
context_menu_orientation = edje_object_data_get
context_menu_orientation = efl_layout_group_data_get
(sd->entry_edje, "context_menu_orientation");
if ((context_menu_orientation) &&
@ -1201,7 +1201,7 @@ _menu_call(Evas_Object *obj)
elm_hoversel_horizontal_set(sd->hoversel, EINA_TRUE);
elm_object_style_set(sd->hoversel, "entry");
elm_widget_sub_object_add(obj, sd->hoversel);
efl_ui_widget_sub_object_add(obj, sd->hoversel);
elm_object_text_set(sd->hoversel, "Text");
top = elm_widget_top_get(obj);
@ -2294,10 +2294,10 @@ _efl_ui_textbox_selection_cut(Eo *obj, Efl_Ui_Textbox_Data *sd)
if (!_elm_config->desktop_entry)
edje_object_part_text_select_allow_set
(sd->entry_edje, "efl.text", EINA_FALSE);
edje_object_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
efl_layout_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
if (!_elm_config->desktop_entry)
elm_widget_scroll_hold_pop(obj);
efl_ui_widget_scroll_hold_pop(obj);
/*In password mode, cut will remove text only*/
if (!efl_text_password_get(obj))
@ -2330,8 +2330,8 @@ _efl_ui_textbox_selection_copy(Eo *obj, Efl_Ui_Textbox_Data *sd)
{
edje_object_part_text_select_allow_set
(sd->entry_edje, "efl.text", EINA_FALSE);
edje_object_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
elm_widget_scroll_hold_pop(obj);
efl_layout_signal_emit(sd->entry_edje, "efl,state,select,off", "efl");
efl_ui_widget_scroll_hold_pop(obj);
}
_selection_store(EFL_UI_SELECTION_TYPE_CLIPBOARD, obj);
efl_event_callback_call(obj, EFL_UI_TEXTBOX_EVENT_SELECTION_COPY, NULL);
@ -2438,21 +2438,24 @@ _efl_ui_textbox_scrollable_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Ein
if (scroll)
{
edje_object_part_swallow(sd->entry_edje, "efl.text", NULL);
efl_content_set(efl_part(sd->entry_edje, "efl.text"), NULL);
sd->scroller = efl_add(EFL_UI_INTERNAL_TEXT_SCROLLER_CLASS, obj,
efl_ui_internal_text_scroller_initialize(efl_added,
sd->text_obj, sd->text_table));
efl_ui_scrollbar_bar_mode_set(sd->scroller, EFL_UI_SCROLLBAR_MODE_AUTO, EFL_UI_SCROLLBAR_MODE_AUTO);
edje_object_part_swallow(sd->entry_edje, "efl.text", sd->scroller);
evas_object_clip_set(sd->cursor,
efl_content_set(efl_part(sd->entry_edje, "efl.text"), sd->scroller);
efl_canvas_object_clipper_set(sd->cursor,
efl_ui_internal_text_scroller_viewport_clip_get(sd->scroller));
efl_event_callback_add(sd->scroller, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_scroller_size_changed_cb, obj);
}
else
{
efl_content_set(sd->scroller, NULL);
edje_object_part_swallow(sd->entry_edje, "efl.text", sd->text_table);
/* sd->text_table should not be deleted, so we need to use content_unset
* instead of efl_content_set(sd->scroller, NULL)
*/
efl_content_unset(sd->scroller);
efl_content_set(efl_part(sd->entry_edje, "efl.text"), sd->text_table);
efl_del(sd->scroller);
sd->scroller = NULL;
}
@ -2472,7 +2475,7 @@ _efl_ui_textbox_efl_ui_widget_on_access_activate(Eo *obj, Efl_Ui_Textbox_Data *_
EFL_UI_TEXT_DATA_GET(obj, sd);
if (!elm_widget_disabled_get(obj) &&
if (!efl_ui_widget_disabled_get(obj) &&
!evas_object_freeze_events_get(obj))
{
efl_event_callback_call(obj, EFL_INPUT_EVENT_CLICKED, NULL);
@ -3036,9 +3039,9 @@ _efl_ui_textbox_efl_access_object_i18n_name_get(const Eo *obj, Efl_Ui_Textbox_Da
static void
_edje_signal_emit(Efl_Ui_Textbox_Data *sd, const char *sig, const char *src)
{
edje_object_signal_emit(sd->entry_edje, sig, src);
edje_object_signal_emit(sd->cursor, sig, src);
edje_object_signal_emit(sd->cursor_bidi, sig, src);
efl_layout_signal_emit(sd->entry_edje, sig, src);
efl_layout_signal_emit(sd->cursor, sig, src);
efl_layout_signal_emit(sd->cursor_bidi, sig, src);
}
static inline Eo *
@ -3059,7 +3062,7 @@ _decoration_create(Eo *obj, Efl_Ui_Textbox_Data *sd,
{
evas_object_stack_below(ret, NULL);
}
evas_object_clip_set(ret, clip);
efl_canvas_object_clipper_set(ret, clip);
evas_object_pass_events_set(ret, EINA_TRUE);
return ret;
}
@ -3420,7 +3423,7 @@ _anchors_update(Eo *obj, Efl_Ui_Textbox_Data *sd)
evas_object_color_set(ob, 0, 0, 0, 0);
evas_object_smart_member_add(ob, smart);
evas_object_stack_above(ob, obj);
evas_object_clip_set(ob, clip);
efl_canvas_object_clipper_set(ob, clip);
evas_object_repeat_events_set(ob, EINA_TRUE);
rect->obj = ob;
//FIXME: add event handlers

View File

@ -1,16 +1,5 @@
elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
if sys_osx == true
# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
luajit = dependency('luajit')
lua = declare_dependency(
include_directories: include_directories(luajit.get_pkgconfig_variable('includedir')),
link_args: ['-L'+luajit.get_pkgconfig_variable('libdir'), '-l'+luajit.get_pkgconfig_variable('libname')]
)
elua_pub_deps = [lua]
else
elua_pub_deps = [dependency('luajit')]
endif
elua_pub_deps = [lua]
elua_src = ['elua.c', 'io.c', 'cache.c']
elua_header_src = ['Elua.h']

View File

@ -15,12 +15,11 @@ abstract @beta Efl.Text.Formatter extends Efl.Object {
The $format will be applied to the given range.
The passed cursors must belong to same text object, otherwise insertion will be ignored.
Passed format parameter uses same format as style in @Efl.Canvas.Textblock.style_apply.
]]
params {
start: const(Efl.Text.Cursor); [[Start of range.]]
end: const(Efl.Text.Cursor); [[End of range.]]
format: string; [[Attribute format.]]
format: string; [[Format string. Uses same format as $style in @Efl.Canvas.Textblock.style_apply.]]
}
}

View File

@ -16412,19 +16412,25 @@ static struct
};
static void
_efl_canvas_textblock_efl_text_style_text_underline_type_set(Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED, Efl_Text_Style_Underline_Type type EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_underline_type_set(Eo *obj, Efl_Canvas_Textblock_Data *o, Efl_Text_Style_Underline_Type type)
{
ASYNC_BLOCK;
_FMT_SET(underline, _style_underline_map[type].underline_single);
_FMT_SET(underline2, _style_underline_map[type].underline_double);
_FMT_SET(underline_dash, _style_underline_map[type].underline_dashed);
if (efl_text_underline_type_get(obj) == type)
return;
ASYNC_BLOCK;
_FMT(underline) = _style_underline_map[type].underline_single;
_FMT(underline2) = _style_underline_map[type].underline_double;
_FMT(underline_dash) = _style_underline_map[type].underline_dashed;
_canvas_text_format_changed(obj, o);
}
static Efl_Text_Style_Underline_Type
_efl_canvas_textblock_efl_text_style_text_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o EINA_UNUSED)
_efl_canvas_textblock_efl_text_style_text_underline_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Textblock_Data *o)
{
return _FMT(underline);
if(_FMT(underline_dash)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED;
else if (_FMT(underline2)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_DOUBLE;
else if (_FMT(underline)) return EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE;
else return EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE;
}
static void

View File

@ -7,34 +7,4 @@ evas_src += files([
'evas_filter_utils.c',
])
luaold_interpreters = [
['lua', ['>=5.1.0','<5.3.0']],
['lua51', ['>=5.1.0','<5.2.0']],
['lua-5.1', ['>=5.1.0','<5.2.0']],
['lua5.1', ['>=5.1.0','<5.2.0']],
['lua52', ['>=5.2.0','<5.3.0']],
['lua-5.2', ['>=5.2.0','<5.3.0']],
['lua5.2', ['>=5.2.0','<5.3.0']],
]
if get_option('lua-interpreter') == 'lua'
config_h.set('ENABLE_LUA_OLD', '1')
foreach l : luaold_interpreters
lua = dependency(l[0], version: l[1], required:false)
if lua.found() == true
break
endif
endforeach
else
lua = dependency(get_option('lua-interpreter'))
endif
if sys_osx == true and get_option('lua-interpreter') == 'luajit'
# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
lua = declare_dependency(
include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
)
endif
evas_deps += lua

View File

@ -132,10 +132,32 @@ EFL_START_TEST(text_user_change)
}
EFL_END_TEST
EFL_START_TEST(text_scroll_mode)
{
Eo *txt, *win, *cur;
win = win_add();
txt = efl_add(EFL_UI_TEXTBOX_CLASS, win);
cur = efl_text_interactive_main_cursor_get(txt);
efl_text_set(txt, "Hello");
/*scroll mode is false by default*/
fail_if(efl_ui_textbox_scrollable_get(txt));
efl_ui_textbox_scrollable_set(txt, !efl_ui_textbox_scrollable_get(txt));
efl_text_cursor_text_insert(cur, "World");
fail_if(!efl_ui_textbox_scrollable_get(txt));
efl_ui_textbox_scrollable_set(txt, !efl_ui_textbox_scrollable_get(txt));
efl_text_cursor_text_insert(cur, "!!!");
ck_assert_str_eq(efl_text_get(txt),"HelloWorld!!!");
efl_del(txt);
efl_del(win);
}
EFL_END_TEST
void efl_ui_test_text(TCase *tc)
{
tcase_add_test(tc, text_cnp);
tcase_add_test(tc, text_all_select_all_unselect);
tcase_add_test(tc, text_selection);
tcase_add_test(tc, text_user_change);
tcase_add_test(tc, text_scroll_mode);
}

View File

@ -4908,7 +4908,7 @@ EFL_START_TEST(efl_canvas_textblock_style)
ck_assert_int_eq(efl_text_wrap_get(txt), EFL_TEXT_FORMAT_WRAP_NONE);
efl_canvas_textblock_style_apply(txt, "backing=on");
ck_assert_int_eq(efl_text_background_type_get(txt), EFL_TEXT_STYLE_BACKGROUND_TYPE_ENABLED);
ck_assert_int_eq(efl_text_background_type_get(txt), EFL_TEXT_STYLE_BACKGROUND_TYPE_SOLID_COLOR);
efl_canvas_textblock_style_apply(txt, "style=far_soft_shadow");
ck_assert_int_eq(efl_text_effect_type_get(txt), EFL_TEXT_STYLE_EFFECT_TYPE_FAR_SOFT_SHADOW);
@ -4936,6 +4936,23 @@ EFL_START_TEST(efl_canvas_textblock_style)
}
EFL_END_TEST
EFL_START_TEST(efl_text_style)
{
START_EFL_CANVAS_TEXTBLOCK_TEST();
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_NONE);
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE);
ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_SINGLE);
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_DOUBLE);
ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_DOUBLE);
efl_text_underline_type_set(txt, EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED);
ck_assert_int_eq(efl_text_underline_type_get(txt), EFL_TEXT_STYLE_UNDERLINE_TYPE_DASHED);
END_EFL_CANVAS_TEXTBLOCK_TEST();
}
EFL_END_TEST
void evas_test_textblock(TCase *tc)
{
tcase_add_test(tc, evas_textblock_simple);
@ -4972,5 +4989,6 @@ void evas_test_textblock(TCase *tc)
tcase_add_test(tc, efl_canvas_textblock_markup_invalid_escape);
tcase_add_test(tc, efl_text_font);
tcase_add_test(tc, efl_canvas_textblock_style);
tcase_add_test(tc, efl_text_style);
}