summaryrefslogtreecommitdiff
path: root/src/bin/elementary (follow)
AgeCommit message (Collapse)Author
2019-11-22Efl.Text.CursorAli Alzyod
Summary: Implementation of new cursor text object. This Patch Contains : 1- Remove Efl.Text.Cursor & Efl.Text_Markup_Interactive interfaces and replace them with one Class Efl.Text.Cursor => there are some modifications on cursor methods 2- Update all related classes to use Efl.Text.Cursor object instead of the old interfaces 3- If class uses Efl.Text_Cursor_Cursor (handle), mainly annotation it will stay as it is until we update other annotations into attribute_factory 4- Add main cursor property into efl.text.interactive 5- Add cursor_new method in efl.ui.text (I think we may move it into efl.text.interactive interface) There still some parts that need discussion: especially cursor movement functionality, I prefer to move function with Enum, instead of special function for each movement. ``` enum @beta Efl.Text.Cursor_Move_Type { [[Text cursor movement types]] char_next, [[Advances to the next character]] char_prev, [[Advances to the previous character]] cluster_next, [[Advances to the next grapheme cluster]] cluster_prev, [[Advances to the previous grapheme cluster]] paragraph_start, [[Advances to the first character in this paragraph]] paragraph_end, [[Advances to the last character in this paragraph]] word_start, [[Advance to current word start]] word_end, [[Advance to current word end]] line_start, [[Advance to current line first character]] line_end, [[Advance to current line last character]] paragraph_first, [[Advance to current paragraph first character]] paragraph_last, [[Advance to current paragraph last character]] paragraph_next, [[Advances to the start of the next text node]] paragraph_prev [[Advances to the end of the previous text node]] } move { [[Move the cursor]] params { @in type: Efl.Text.Cursor_Move_Type; [[The type of movement]] } return: bool; [[True if actually moved]] } ``` or old way: ``` char_next { [[Advances to the next character]] // FIXME: Make the number of characters we moved by? Useful for all the other functions return: bool; [[True if actually moved]] } char_prev { [[Advances to the previous character]] return: bool; [[True if actually moved]] } char_delete { [[Deletes a single character from position pointed by given cursor.]] } cluster_next { [[Advances to the next grapheme cluster]] return: bool; [[True if actually moved]] } cluster_prev { [[Advances to the previous grapheme cluster]] return: bool; [[True if actually moved]] } // FIXME: paragraph_end is inconsistent with word_end. The one goes to the last character and the other after the last character. paragraph_start { [[Advances to the first character in this paragraph]] return: bool; [[True if actually moved]] } paragraph_end { [[Advances to the last character in this paragraph]] return: bool; [[True if actually moved]] } word_start { [[Advance to current word start]] return: bool; [[True if actually moved]] } word_end { [[Advance to current word end]] return: bool; [[True if actually moved]] } line_start { [[Advance to current line first character]] return: bool; [[True if actually moved]] } line_end { [[Advance to current line last character]] return: bool; [[True if actually moved]] } paragraph_first { [[Advance to current paragraph first character]] return: bool; [[True if actually moved]] } paragraph_last { [[Advance to current paragraph last character]] return: bool; [[True if actually moved]] } paragraph_next { [[Advances to the start of the next text node]] return: bool; [[True if actually moved]] } paragraph_prev { [[Advances to the end of the previous text node]] return: bool; [[True if actually moved]] } ``` Reviewers: woohyun, tasn, segfaultxavi Reviewed By: woohyun Subscribers: a.srour, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10542
2019-11-20elementary: move away from normal player to the new animation mixinMarcel Hollerbach
the mixin can handle the same things as the player. Additionally, the usage of the mixin simplifies the animation usage alot. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10636
2019-11-20Unify "animated" flagsXavi Artigas
There exist several flags to indicate whether an object should be animated, with inconsistent names: Efl.Canvas.Layout.animation: bool indicating if Edje animations should be played Efl.Ui.Spotlight_Manager.animation_enabled: bool indicating if page transitions should be animated Efl.Canvas.Animation_Player.animation: Efl.Canvas.Animation object This commit unifies all of them: "animated" is now a flag, and "animation" is an object. Note: Animation_Player is in the process of being replaced by an "animation" property in the Efl.Canvas.Object, hence the need for non-clashing animation flags. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10645
2019-11-12efl_ui_relative_container: rename relative_layoutYeongjong Lee
Summary: Also, Rename parameter name `target` to `base`. Rename parameter name `relative` to `relative_position`. ref T8380 Depends On D10639 Test Plan: ninja test Reviewers: woohyun, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8380 Differential Revision: https://phab.enlightenment.org/D10640
2019-11-07Revert "evas_textblock: content fit feature"Carsten Haitzler (Rasterman)
This reverts commit 2f676a6591c117e15d65f263ebd267866963b627. This causes segv's in edje_cc - i suspect the eet changes (or in combo to how they are used in edje): AddressSanitizer:DEADLYSIGNAL ================================================================= ==8991==ERROR: AddressSanitizer: SEGV on unknown address 0x000001010000 (pc 0xffff9f002604 bp 0xfffffa747700 sp 0xfffffa747700 T0) ==8991==The signal is caused by a READ memory access. #0 0xffff9f002600 in _eet_hash_gen ../src/lib/eet/eet_utils.c:25 #1 0xffff9efdd024 in eet_dictionary_string_add ../src/lib/eet/eet_dictionary.c:103 #2 0xffff9efbe324 in eet_data_put_string ../src/lib/eet/eet_data.c:849 #3 0xffff9efc1c4c in eet_data_put_type ../src/lib/eet/eet_data.c:1427 #4 0xffff9efd9128 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4730 #5 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108 #6 0xffff9efd5958 in eet_data_put_variant ../src/lib/eet/eet_data.c:4309 #7 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108 #8 0xffff9efd9270 in eet_data_put_unknown ../src/lib/eet/eet_data.c:4739 #9 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108 #10 0xffff9efd8ca0 in eet_data_put_array ../src/lib/eet/eet_data.c:4692 #11 0xffff9efdb320 in _eet_data_descriptor_encode ../src/lib/eet/eet_data.c:5108 #12 0xffff9efc7768 in eet_data_write_cipher ../src/lib/eet/eet_data.c:2403 #13 0xffff9efc78a4 in eet_data_write ../src/lib/eet/eet_data.c:2420 #14 0xaaaabb151dcc in data_thread_group ../src/bin/edje/edje_cc_out.c:2045 #15 0xaaaabb152130 in data_write_groups ../src/bin/edje/edje_cc_out.c:2086 #16 0xaaaabb157734 in data_write ../src/bin/edje/edje_cc_out.c:2866 #17 0xaaaabb14122c in main ../src/bin/edje/edje_cc.c:456 #18 0xffff9dbd92a0 in __libc_start_main (/usr/lib/aarch64-linux-gnu/libc.so.6+0x242a0) #19 0xaaaabb13ea00 (/home/raster/C/git/efl/build/src/bin/edje/edje_cc+0x38a00) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ../src/lib/eet/eet_utils.c:25 in _eet_hash_gen ==8991==ABORTING Aborted (core dumped) When compiling breaks... it's certainly time to revert ASAP :(
2019-11-06Efl.Interpolator*: More sensible API names and docsXavi Artigas
Summary: OK, so, ALL interpolator parameters were called "factor" and the docs literally said "First factor, Second factor, ..." After diving into the actual implementation, proper names (and types) for the parameters were found and proper docs written. I am afraid I could not make any sense of the Divisor interpolator code. Those docs still need writing. Test Plan: Everything still builds and passes tests. No functional changes. Reviewers: zmike, cedric, bu5hm4n, Jaehyun_Cho Reviewed By: bu5hm4n Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10603
2019-11-05evas_textblock: content fit featureAli Alzyod
Summary: **Content Fit Feature for Evas_Object_Textblock** This Feature is available at **Evas **object level. And **Edje **level (where it is internally use evas functionality) This feature will allow text block to fit its content font size to proper size to fit its area. **Main Properties:** Fit Modes : None=Default, Width, Height, All [Width+Height] Fit Size Range : Contains maximum and minimum font size to be used (and in between). Fit Step Size : Step(Jump) value when trying fonts sizes between Size_Range max and min. Fit Size Array : Other way to resize font, where you explicitly select font sizes to be uses (for example [20, 50, 100] it will try 3 sizes only) Text Fit feature was available in Edje but: 1- It doesn't effected by ellipsis or warping in font style (or do not handle the in right way) 2- Accuracy is not good (specially if you have fix pixel size elements (spaces,tabs,items)) 3- No (Step size, Size Array) available. Test Plan: To check the Feature > elementary_test > fit > textbock fit You can modify all the modes and properties These are two examples, One using Evas other uses Edje **Evas** ``` #include <Elementary.h> enum BUTTON{ BUTTON_MODE = 0, BUTTON_MAX = 1, BUTTON_MIN = 2, BUTTON_STEP = 3, BUTTON_ARRAY = 4, BUTTON_CONTENT = 5, BUTTON_STYLE = 6, BUTTON_ALL = BUTTON_STYLE+1, }; char* BUTTON_STR[BUTTON_ALL] ={ "MODE", "MAX", "MIN", "STEP", "ARRAY", "CONTENT", "STYLE", }; char *contents[] = { "Hello World", "This is Line<br>THis is other Line", "This text contains <font_size=20 color=#F00>SPECIFIC SIZE</font_size> that does not effected by fit mode" }; char *styles[] = { "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed ellipsis=1.0'", "DEFAULT='font=sans font_size=30 color=#000 wrap=mixed'", "DEFAULT='font=sans font_size=30 color=#000 ellipsis=1.0'", "DEFAULT='font=sans font_size=30 color=#000'", }; char *styles_names[] = { "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>1.0</color>", "wrap=<color=#F00>mixed</color> ellipsis=<color=#F00>NONE</color>", "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>1.0</color>", "wrap=<color=#F00>NONE</color> ellipsis=<color=#F00>NONE</color>", }; typedef struct _APP { Evas_Object *win, *box, *txtblock,*bg, *boxHor, *boxHor2; Eo *btn[BUTTON_ALL]; Eo *lbl_status; char * str; unsigned int i_contnet, i_style; } APP; APP *app; char * get_fit_status(Eo * textblock); static void _btn_clicked(void *data EINA_UNUSED, Eo *obj, void *eventInfo EINA_UNUSED){ if (obj == app->btn[BUTTON_MODE]) { unsigned int options; evas_textblock_fit_options_get(app->txtblock, &options); if (options == TEXTBLOCK_FIT_MODE_NONE) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_HEIGHT); else if (options == TEXTBLOCK_FIT_MODE_HEIGHT) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_WIDTH); else if (options == TEXTBLOCK_FIT_MODE_WIDTH) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_ALL); else if (options == TEXTBLOCK_FIT_MODE_ALL) evas_textblock_fit_options_set(app->txtblock, TEXTBLOCK_FIT_MODE_NONE); } else if (obj == app->btn[BUTTON_MAX]) { unsigned int min, max; evas_textblock_fit_size_range_get(app->txtblock, &min, &max); max -= 5; evas_textblock_fit_size_range_set(app->txtblock, min, max); } else if (obj == app->btn[BUTTON_MIN]) { unsigned int min, max; evas_textblock_fit_size_range_get(app->txtblock, &min, &max); min += 5; evas_textblock_fit_size_range_set(app->txtblock, min, max); } else if (obj == app->btn[BUTTON_STEP]) { unsigned int step; evas_textblock_fit_step_size_get(app->txtblock, &step); step++; evas_textblock_fit_step_size_set(app->txtblock, step); } else if (obj == app->btn[BUTTON_ARRAY]) { unsigned int font_size[] = {10, 50, 100 ,150}; evas_textblock_fit_size_array_set(app->txtblock,font_size,4); } else if (obj == app->btn[BUTTON_CONTENT]) { app->i_contnet++; if(app->i_contnet>=sizeof(contents)/sizeof(char*)) app->i_contnet=0; evas_object_textblock_text_markup_set(app->txtblock,contents[app->i_contnet]); } else if (obj == app->btn[BUTTON_STYLE]) { app->i_style++; if(app->i_style>=sizeof(styles)/sizeof(char*)) app->i_style=0; Evas_Textblock_Style *style = evas_object_textblock_style_get(app->txtblock); evas_textblock_style_set(style,styles[app->i_style]); } elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock)); } char * get_fit_status(Eo * textblock) { static char status[0xFFF]; unsigned int options,min,max,step,size_array[256]; size_t size_array_len; evas_textblock_fit_options_get(textblock,&options); evas_textblock_fit_size_range_get(textblock,&min,&max); evas_textblock_fit_step_size_get(textblock,&step); evas_textblock_fit_size_array_get(textblock,NULL,&size_array_len,0); if (size_array_len>255) size_array_len = 255; evas_textblock_fit_size_array_get(textblock,size_array,NULL,size_array_len); strcpy(status,"Mode : "); if (options == TEXTBLOCK_FIT_MODE_NONE) strcat(status,"MODE_NONE"); else if (options == TEXTBLOCK_FIT_MODE_HEIGHT) strcat(status,"MODE_HEIGHT"); else if (options == TEXTBLOCK_FIT_MODE_WIDTH) strcat(status,"MODE_WIDTH"); else if (options == TEXTBLOCK_FIT_MODE_ALL) strcat(status,"MODE_ALL"); strcat(status,"<br>"); sprintf(status + strlen(status),"Max : %d<br>",max); sprintf(status + strlen(status),"Min : %d<br>",min); sprintf(status + strlen(status),"Step : %d<br>",step); sprintf(status + strlen(status),"Array : [ "); for (size_t i = 0 ; i < 10 ; i++) { if(i<size_array_len) sprintf(status + strlen(status)," %d,",size_array[i]); } if(10<size_array_len) sprintf(status + strlen(status)," ... "); sprintf(status + strlen(status)," ]"); sprintf(status + strlen(status),"<br>"); sprintf(status + strlen(status),"%s",styles_names[app->i_style]); return status; } int elm_main(int argc, char **argv) { app = calloc(sizeof(APP), 1); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); app->win = elm_win_util_standard_add("Main", "App"); elm_win_autodel_set(app->win, EINA_TRUE); app->box = elm_box_add(app->win); app->boxHor = elm_box_add(app->box); app->boxHor2 = elm_box_add(app->box); app->txtblock = evas_object_textblock_add(app->box); app->bg = elm_bg_add(app->box); elm_bg_color_set(app->bg,255,255,255); Evas_Textblock_Style *style = evas_textblock_style_new(); evas_textblock_style_set(style,styles[0]); evas_object_textblock_style_set(app->txtblock,style); evas_object_textblock_text_markup_set(app->txtblock,contents[0]); elm_box_horizontal_set(app->boxHor, EINA_TRUE); elm_box_horizontal_set(app->boxHor2, EINA_TRUE); evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(app->box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->box, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(app->txtblock); evas_object_show(app->bg); evas_object_show(app->box); evas_object_show(app->boxHor); evas_object_show(app->boxHor2); elm_box_pack_end(app->box, app->bg); elm_box_pack_end(app->box, app->boxHor); elm_box_pack_end(app->box, app->boxHor2); elm_object_content_set(app->bg,app->txtblock); elm_win_resize_object_add(app->win, app->box); evas_object_resize(app->win, 320, 480); for(int i = 0 ; i < BUTTON_ALL ; i++) { app->btn[i] = elm_button_add(app->boxHor); evas_object_smart_callback_add(app->btn[i], "clicked", _btn_clicked, NULL); elm_object_text_set(app->btn[i], BUTTON_STR[i]); elm_box_pack_end(app->boxHor, app->btn[i]); evas_object_show(app->btn[i]); } app->lbl_status = elm_label_add(app->boxHor2); elm_object_text_set(app->lbl_status, get_fit_status(app->txtblock)); elm_box_pack_end(app->boxHor2, app->lbl_status); evas_object_show(app->lbl_status); evas_object_size_hint_weight_set(app->txtblock, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->txtblock, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND); evas_object_size_hint_align_set(app->bg, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(app->win); elm_run(); return 0; } ELM_MAIN() ``` **Edje** ``` // compile: edje_cc source.edc // run: edje_player source.edje collections { styles { style { name: "text_style"; base: "font=sans font_size=30 color=#FFF wrap=mixed ellipsis=1.0"; tag: "br" "\n"; tag: "ps" "ps"; tag: "tab" "\t"; tag: "b" "+ font_weight=Bold"; } } group { name: "my_group"; // must be the same as in source.c parts { part { name: "background"; type: RECT; scale: 1; description { color: 0 0 0 0; rel1.relative: 0.0 0.0; rel2.relative: 1.0 1.0; } } part { name: "text"; type: TEXTBLOCK; scale: 1; entry_mode: NONE; effect: OUTLINE_SHADOW; description { state: "default" 0.0; rel1.to : "background"; rel1.relative: 0.0 0.0; rel2.to : "background"; rel2.relative: 1.0 1.0; text { style: "text_style"; align: 0.0 0.0; text: "Hello World This is Me"; fit: 1 1; fit_step: 1; size_range: 30 200; //fit_size_array: 20 40 60 80 100 200; } } } } } } ``` Found Task T5724 relative to this Feature Reviewers: woohyun, bowonryu, cedric, raster Subscribers: #committers, #reviewers, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D9280
2019-11-04efl_canvas_animation_translate: move from x&y to container typesMarcel Hollerbach
Summary: this now uses Eina.Position2D so its easier to pass arround other positions. ref T8288 Depends on D10559 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10562
2019-11-04efl_canvas_animation_scale: move from 2 doubles to vectorsMarcel Hollerbach
Summary: with this the passing of positions is getting more easy. Additionally, Reading the API call gets easier, as parameters are semantically grouped. Depends on D10558 Reviewers: segfaultxavi, Jaehyun_Cho Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10559
2019-11-04efl_canvas_animation_rotate: adjust APIMarcel Hollerbach
Summary: in task T8288 we concluded that a few APIs need to be adjusted in order to stabelize animation classes at some point. This also adds a new macro to eina in order to create EINA_VECTOR2 values more easily. ref T8288 Reviewers: Jaehyun_Cho, segfaultxavi, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8288 Differential Revision: https://phab.enlightenment.org/D10350
2019-10-31evas: move efl_input_device into evas/Efl_Canvas.hCedric Bail
Summary: The internal and the API we would like is mostly a canvas API. A lot of the code in evas is working around the fact that efl_input_device is not defined inside Evas. This patch is the first step to try to clean this up. Depends on D10487 Reviewers: zmike, raster, bu5hm4n, Hermet Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10488
2019-10-31evas - revert evas variation sequence support - out of bound accessesCarsten Haitzler (Rasterman)
This code is filled with out of bounds accesses now after the reverted patch. All those base_char+1, itr+1 etc. in evas_common_font_query_run_font_end_get() are accessing BEYOND the end of the run. textgrid shows this instantly to fall over as it uses single unicode codepoint chars with no nul terminator. As this api takes an explicit run_len we should never access beyond the end of the run_len. Please revisit this code and keep in mind proper memory/bounds accessing. If there was ano run_len and it assumed strings were regular strings that had to be nul terminated... then it might be ok, but not here. of course if i put in guards for these +1's then it ends up in infintie loops, so enough debugging and send it back for a rethink. :) .... Revert "evas_object_textblock: add support for variation sequences" This reverts commit 46f2d8acdcda3f374c9e393ecb734ff9d00fef7d.
2019-10-19evas_object_textblock: add support for variation sequencesAli Alzyod
Summary: update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences Test Plan: ``` #define EFL_EO_API_SUPPORT 1 #define EFL_BETA_API_SUPPORT 1 #include <Eina.h> #include <Efl.h> #include <Elementary.h> EAPI_MAIN int elm_main(int argc, char **argv) { Evas_Object *win, *textblock; elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = elm_win_util_standard_add("Main", ""); elm_win_autodel_set(win, EINA_TRUE); textblock = evas_object_textblock_add(win); efl_canvas_text_style_set(textblock,NULL,"DEFAULT='font=DejaVuSans font_fallbacks=SamsungColorEmoji color=#000 font_size=20'"); evas_object_textblock_text_markup_set(textblock, "8&#xfe0f;&#x20E3;&#x262a;&#xfe0f;AAA&#x262a;&#xfe0E;1234567&#xfe0f;&#x20E3;"); evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(textblock); evas_object_move(textblock, 0, 0); evas_object_resize(textblock, 320, 320); evas_object_resize(win, 320, 320); evas_object_show(win); elm_run(); return 0; } ELM_MAIN() ``` Reviewers: woohyun, bowonryu, segfaultxavi, cedric, bu5hm4n Reviewed By: woohyun, cedric Subscribers: bu5hm4n, subodh6129, herdsman, segfaultxavi, zmike, cedric, #committers, #reviewers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9053
2019-10-18fix various trivial null derefsMike Blumenkrantz
Summary: CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944, 1383851, 1383847, 1382211, 1379921, 1379921 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10452
2019-10-02efl_gfx_arrangement: change content_padding param type and remove scalableYeongjong Lee
Summary: This change `content_padding` parameter type to int from double for consistency of size properties. `scalable` should be handled in more common size API. Co-authored-by: Mike Blumenkrantz <zmike@samsung.com> ref T7864 Test Plan: ninja test Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7864 Differential Revision: https://phab.enlightenment.org/D10154
2019-10-02elementary_test: Add the value provider test for animation_viewJunsuChoi
Summary: Add an Value Provider item to test vector animation on elementary_test. This test is to apply Efl.Gfx.Vg.Value_Provider to the loaded efl_ui_animation object. If Evas Vg Json(Lottie) Loader is not supported, use the vector class to output the svg file. Depends on D9874 Depends on D9897 Test Plan: elementary_test -> Value Provider Reviewers: Hermet, kimcinoo, smohanty Reviewed By: Hermet Subscribers: cedric, #committers, #reviewers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10015
2019-09-30test_code: do not create a background by handMarcel Hollerbach
the background here was wrong, it hasnt resizable hints, which means that the whole object cannot be resized. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D10223
2019-09-30efl_ui: remove efl_ui_text headers from Efl_Ui.h for nowMike Blumenkrantz
these require legacy types and headers, which should not be brought into this header Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10235
2019-09-30elm_test/radio: use eo type hereMike Blumenkrantz
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10230
2019-09-27elm_test: undef logging macros before redefining them in headerMike Blumenkrantz
Summary: Depends on D10228 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10229
2019-09-26efl_ui_*selectable: unify these APIs with the same c_prefixMarcel Hollerbach
Summary: with this commit that api for single and multi selectable shares the same prefix, which makes sense in c as we do not really differ between those two types there anyway. ref T7871 Reviewers: SanghyeonLee, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7871 Differential Revision: https://phab.enlightenment.org/D10183
2019-09-25efl_ui : reverse the select method name to be ended verb on the last.SangHyeon Jade Lee
Summary: our new method naming rule only allow verb at the last position, so change name to fallow rule. Reviewers: bu5hm4n, cedric, segfaultxavi Reviewed By: bu5hm4n, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10144
2019-09-24efl/player: rename 'play' property to 'pause'Mike Blumenkrantz
this is a bit of an overhaul wherein the existing 'play' mechanics are all inverted. 'pause' is a state which stops playback but does not affect the playback_position property. this patch also includes implementations of Efl.Player::playing for a couple classes which (now) only implement pause, as this is a requirement for the objects to actually activate their animations test cases: * unit tests * all elm_test animation cases * elm_test video * rage Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10114
2019-09-24efl/player: merge start+stop methods into 'playing' propertyMike Blumenkrantz
this has some overlap with the existing 'play' property which will soon be renamed. the intent here is that there is a property for controlling the 'playing' state and then another property for managing 'pausing' the play state ref T7877 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10113
2019-09-24efl/player: prune properties duplicated in efl.playableMike Blumenkrantz
efl.playable implements a number of properties which are also present in efl.player. playable was intended to be separate, so enforce this split in all classes which use player ref T7877 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10109
2019-09-24elementary: add a basic test for MVVM infrastructure.Cedric Bail
Differential Revision: https://phab.enlightenment.org/D10063
2019-09-24efl_ui_win: default the window type to basicMarcel Hollerbach
normally when you create a window, you just want to have it beeing a basic window. If not you still can set the window type. ref T8229 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10049
2019-09-23elm_test: mark image_zoomable test as non-legacyMike Blumenkrantz
Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10053
2019-09-23elementary_codegen: check before use to avoid use after freeStefan Schmidt
These might or might not have been freed already, depending on the breaks form the above loop. Before we are having a use after free here better check on it before free'ing another time. Coverity IDs: 1402671, 1402701 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D10047
2019-09-23test: Add a logic to check a size of CheckWonki Kim
If I pack a check without any api calls into a box, then it doesn't have the hint_min size which is defined on check edc. I guess there are problems on sizing logic currently, so this patch helps people to test the problem. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10038
2019-09-18efl/radio/box: handle non-radio-objectsMike Blumenkrantz
this improves the usefulness of radio box by presenting it as a box widget which has the additional feature of being able to manage radio widgets also fix all the image cases in elm_test which relied on there being only a single box in the window Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9998
2019-09-18build: fix elm header usageMike Blumenkrantz
.c files in src/lib/elementary should only include elm_priv.h to ensure that all the include ordering is correct and that all necessary headers are pulled in .c files outside of src/lib/elementary should include either/both Efl_Ui.h, Elementary.h as needed Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D9978
2019-09-18build: use legacy api in places where legacy should be usedMike Blumenkrantz
these seem to randomly have been changed when they shouldn't have also install elm_clock_eo.h since this is required but we didn't install it Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D9971
2019-09-17efl_ui_multi_selectable: remove SINGLE_ALWAYSMarcel Hollerbach
this should get a better solution later on. There is also no real usage for that. ref T7922 Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D9985
2019-09-16efl.ui.scrollable: fix event name for scrollableHosang Kim
Summary: Event name is applied in the past tense. Meaning of 'stop' is 'stop it early', so I changed it to 'finish' Test Plan: elementary_test -> efl.ui.scroller Reviewers: segfaultxavi, woohyun Reviewed By: segfaultxavi Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9859
2019-09-16efl/image: Efl.Gfx.Image_Scale_Type -> Efl.Gfx.Image_Scale_MethodXavi Artigas
ref T7927, T7875 Depends on D9931
2019-09-12efl_ui_timepicker/datepicker : change event name properlyWooHyun Jung
Summary: This changes the event name from "changed" to "date(or time),changed" @ref T7869 T7901 Reviewers: segfaultxavi, zmike, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7901, T7869 Differential Revision: https://phab.enlightenment.org/D9905
2019-09-09elm perf_test: fix warning of implicit conversion of floating pointJaehyun Cho
The result of integral division is converted into floating point. To fix the warning by assigning the result to Evas_Coord variable, type cast is done.
2019-09-06efl_ui_spotlight: migrate from active_index to active_elementMarcel Hollerbach
after playing arround with the widget, we found out that it feels quite weird to have a index, where most of the time you work with widgets. We might want to add syntax suger in the future to make it easier to just jump to the next element, or to the previous, but that still is to be decided. The event and the communication to the spotlight manager are still left to be used with the index, reason for this is, that we might need to fill there an invalid pointer, if a deletion is triggering an animation, which seems quite weird. That needs further discussing. Docx have been updated, the sitemarks about the shifting of the active_index can be removed, as the element is not subject of change during content adds/deletes. ref T7991 Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Differential Revision: https://phab.enlightenment.org/D9813
2019-09-05elm_test: don't use legacy win api in interfaces tags caseMike Blumenkrantz
fix T7754 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9829
2019-08-30efl_ui/popup: timeout -> closing_timeoutMike Blumenkrantz
simple property rename ref T7902 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9801
2019-08-30test_ui_slder: remove meaningless printf when reaching the limitWooHyun Jung
Summary: Without new internal min/max properties, this may be the only way to not give redundant printing of the meaningless value. @ref T8188 Test Plan: 1. elementary_test 2. EFl.Ui.Slider 3. On the limit slider, move the knob above the limit Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8188 Differential Revision: https://phab.enlightenment.org/D9793
2019-08-30efl_ui_datetime: change min/max to date_min/date_maxWooHyun Jung
Summary: To keep consistency with other classes, change the property name properly. @ref T7869 Reviewers: zmike, segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7869 Differential Revision: https://phab.enlightenment.org/D9797
2019-08-29elm config -> allow people to set desktop entry and magnifier configCarsten Haitzler (Rasterman)
2019-08-29efl_ui_tab_pager: remove the setter for tab_barMarcel Hollerbach
the setter of the tab_bar here is quite useless. If you set it after something else was set, the item situation is not clear anymore, there is more in the spotlight than in the bar. You cannot use the widget without tab bar. So the logical consequence for me was that the pager create the tab bar by itself, and you can just access it via a getter. Reviewed-by: WooHyun Jung <woohyun0705@gmail.com> Differential Revision: https://phab.enlightenment.org/D9731
2019-08-29efl_ui_tab_page: remove partMarcel Hollerbach
I introduced the property for item a few patches earlier. I do not want to use a part for this, as i would have to implement the class twice (Once in the part, once as a selfstanding object). It would also be kind of weird to have code like: efl_content_set(efl_part(efl_part("item"), "tab"),bla). The purpose of this part also got a little bit replaced when the item was introduced, as this is the central point of data for the tab bar icon. So need for an additional editition part. Reviewed-by: WooHyun Jung <woohyun0705@gmail.com> Differential Revision: https://phab.enlightenment.org/D9728
2019-08-29efl_ui_tab_bar: remove update eventMarcel Hollerbach
Summary: before the previous commit this was used to update the tab_bar icon. However, this is not needed anymore, as the item stuff can directly be updated. So I do not see a reason for this event anymore. Reviewers: zmike, segfaultxavi, cedric, woohyun, bowonryu Reviewed By: woohyun Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9727
2019-08-29introduce efl_ui_tab_bar_default_itemMarcel Hollerbach
Summary: Tab bar used a direct layout to implement all this functionality by its own. However, it seems that we can reuse a lot of object functionality that is already part of efl.ui.item. With this commit the features that are not part of Efl.Ui.Item are moved to Efl.Ui.Tab_Bar_Default_Item. The tab bar is changed in a way that you do not need to pass the icon and label by hand anymore, you can rather just pass the tab_bar default item. Additionally, the item for a tab_page can now directly be generated from a page. This is the first commit in order to cleanup efl_ui_tab_bar, tab_page & tab_pager. The goal is also to implement our interfaces for inserting elements on those objects. So our common test suites can also be used. Reviewers: zmike, segfaultxavi, cedric, woohyun, bowonryu Reviewed By: woohyun Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9726
2019-08-29efl_ui_radio_group: migrate to Efl.Ui.Single_SelectableMarcel Hollerbach
with this the whole thing is migrated to single_selectable. The group is added to the spec test suite. The elm_test case of radio_group now also has a fallback option to demonstrate the usage of it. This also fixes a broken testcase, where a flag was forgotten to be checked. ref T8024 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9706
2019-08-27efl_ui_slider: refactor for better data flow and code readabilityWooHyun Jung
1. efl_ui_range_value_set only sets value 2. remove internal eo functions (such as xxx_knob, val_fetch, and val_set) 3. make access_value_and_text works correctly @ref T7893 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9720