2012-04-20 00:35:46 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
2012-04-06 01:14:04 -07:00
|
|
|
|
|
|
|
#include <string.h>
|
2019-07-28 01:27:27 -07:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
# include <evil_private.h> /* strcasestr */
|
|
|
|
#endif
|
|
|
|
|
2019-03-07 07:39:06 -08:00
|
|
|
#include <Efl_Ui.h>
|
2008-09-29 23:58:56 -07:00
|
|
|
#include <Elementary.h>
|
2012-02-23 05:57:56 -08:00
|
|
|
#include "test.h"
|
2015-08-26 17:47:53 -07:00
|
|
|
#include "test_explode.h"
|
2008-09-29 23:58:56 -07:00
|
|
|
|
2013-04-16 22:16:47 -07:00
|
|
|
int _log_domain = -1;
|
|
|
|
|
2009-08-13 15:41:43 -07:00
|
|
|
/* all tests prototypes */
|
2013-12-14 13:59:45 -08:00
|
|
|
void test_access(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_access2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_access3(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_bg_plain(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_bg_image(void *data, Evas_Object *obj, void *event_info);
|
2010-10-12 07:38:46 -07:00
|
|
|
void test_bg_options(void *data, Evas_Object *obj, void *event_info);
|
win: Add background part to the win border
Use Efl.Part for window to manipulate the background.
Two part names are used in EDC:
- elm.rect.background
- elm.swallow.background
For apps the part name is only "background".
To set a solid color background (alpha is ok):
efl_gfx_color_set(efl_part(win, "background"), r, g, b, a);
To set an image:
efl_file_set(efl_part(win, "background"), "image.jpg", NULL);
To set an object:
efl_content_set(efl_part(win, "background"), subobj);
The solid bg is invisible by default, will become visible and use
COPY render mode if a color is set. Standard window uses the
swallow part.
@feature
2016-11-09 23:10:28 -08:00
|
|
|
void test_bg_window(void *data, Evas_Object *obj, void *event_info);
|
2017-09-25 19:46:11 -07:00
|
|
|
void test_bg_scale_type(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_icon(void *data, Evas_Object *obj, void *event_info);
|
2012-03-07 05:52:47 -08:00
|
|
|
void test_icon_transparent(void *data, Evas_Object *obj, void *event_info);
|
2014-12-30 14:02:24 -08:00
|
|
|
void test_icon_standard(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_box_vert(void *data, Evas_Object *obj, void *event_info);
|
2010-01-13 20:00:17 -08:00
|
|
|
void test_box_vert2(void *data, Evas_Object *obj, void *event_info);
|
2012-02-20 00:26:17 -08:00
|
|
|
void test_box_pack(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_box_horiz(void *data, Evas_Object *obj, void *event_info);
|
2012-02-20 00:26:17 -08:00
|
|
|
void test_box_homo(void *data, Evas_Object *obj, void *event_info);
|
2010-10-25 05:48:51 -07:00
|
|
|
void test_box_transition(void *data, Evas_Object *obj, void *event_info);
|
2014-11-09 01:36:27 -08:00
|
|
|
void test_box_align(void *data, Evas_Object *obj, void *event_info);
|
2016-04-11 22:13:19 -07:00
|
|
|
void test_ui_box(void *data, Evas_Object *obj, void *event_info);
|
2019-03-20 07:28:45 -07:00
|
|
|
void test_ui_box_stack(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_button(void *data, Evas_Object *obj, void *event_info);
|
2018-01-28 20:22:26 -08:00
|
|
|
void test_ui_button(void *data, Evas_Object *obj, void *event_info);
|
2011-12-29 04:03:42 -08:00
|
|
|
void test_cnp(void *data, Evas_Object *obj, void *event_info);
|
2016-06-02 19:56:57 -07:00
|
|
|
void test_events(void *data, Evas_Object *obj, void *event_info);
|
2010-10-27 10:02:02 -07:00
|
|
|
void test_transit(void *data, Evas_Object *obj, void *event_info);
|
2014-12-17 16:39:37 -08:00
|
|
|
void test_transit_blend(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_chain(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_custom(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_fade(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_flip(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_resizable_flip(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_resizing(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_transit_zoom(void *data, Evas_Object *obj, void *event_info);
|
2014-12-25 17:27:15 -08:00
|
|
|
void test_transit_tween(void *data, Evas_Object *obj, void *event_info);
|
2014-12-17 21:33:06 -08:00
|
|
|
void test_transit_bezier(void *data, Evas_Object *obj, void *event_info);
|
2010-04-08 13:36:37 -07:00
|
|
|
void test_fileselector_button(void *data, Evas_Object *obj, void *event_info);
|
2010-10-13 18:18:14 -07:00
|
|
|
void test_fileselector_entry(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_clock(void *data, Evas_Object *obj, void *event_info);
|
2013-12-17 17:42:17 -08:00
|
|
|
void test_clock_edit(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_clock_edit2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_clock_pause(void *data, Evas_Object *obj, void *event_info);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
void test_combobox(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_check(void *data, Evas_Object *obj, void *event_info);
|
2012-03-19 00:27:49 -07:00
|
|
|
void test_check_toggle(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_radio(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_layout(void *data, Evas_Object *obj, void *event_info);
|
2012-03-18 23:57:39 -07:00
|
|
|
void test_layout2(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_hover(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_hover2(void *data, Evas_Object *obj, void *event_info);
|
2013-09-23 00:14:56 -07:00
|
|
|
void test_hover3(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_entry(void *data, Evas_Object *obj, void *event_info);
|
2012-05-30 05:18:48 -07:00
|
|
|
void test_entry_style_user(void *data, Evas_Object *obj, void *event_info);
|
New textblock tags for elm entry widget.
This commit add the following new tags:
title, subtitle, bigger, big, small, smaller, code, comment,
string, number, brace, type, class, function, param, keyword,
preprocessor, line_added, line_removed, line_changed.
Tags has been unified in 3 new utility macros:
COMMON_TEXTBLOCK_TAGS, ENABLED_TEXTBLOCK_TAGS, and DISABLED_TEXTBLOCK_TAGS
to avoid repeating too much in the theme.
Also a new test is in: "Entry Style Default" that show all the new styles.
Docs will follow soon.
2014-02-08 11:09:42 -08:00
|
|
|
void test_entry_style_default(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_entry_scrolled(void *data, Evas_Object *obj, void *event_info);
|
Elm entry: fix returning wrong focus region
Summary:
In on_focus_region function,
entry returns relative x,y position from edje object.
It should be calculated from elm object's position.
@fix
Test Plan:
1. $elementary_test "Entry on Page Scroll"
2. click under button
3. click upper text in entry
4. page should not be scrolled
Reviewers: tasn, cedric, woohyun, Hermet, herdsman, raster
Subscribers: Blackmole, id213sin, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3923
2016-05-26 01:19:34 -07:00
|
|
|
void test_entry_on_page_scroll(void *data, Evas_Object *obj, void *event_info);
|
2010-03-09 23:58:29 -08:00
|
|
|
void test_entry3(void *data, Evas_Object *obj, void *event_info);
|
2010-03-16 02:22:47 -07:00
|
|
|
void test_entry4(void *data, Evas_Object *obj, void *event_info);
|
2010-04-17 07:20:06 -07:00
|
|
|
void test_entry5(void *data, Evas_Object *obj, void *event_info);
|
2012-02-07 03:24:39 -08:00
|
|
|
void test_entry6(void *data, Evas_Object *obj, void *event_info);
|
2012-02-22 04:33:25 -08:00
|
|
|
void test_entry7(void *data, Evas_Object *obj, void *event_info);
|
2012-02-23 23:41:38 -08:00
|
|
|
void test_entry8(void *data, Evas_Object *obj, void *event_info);
|
2015-04-02 02:37:37 -07:00
|
|
|
void test_entry_regex(void *data, Evas_Object *obj, void *event_info);
|
Remove elm_notepad
Notepad had a big issue: users couldn't access the entry, so notepad
was something near to an useless widget.
We needed to choose between wrap all entry functions or add these file
save / load and autosave features to entries.
As discussed on the emails list, we decided to go with the second
option, so we won't have an extra widget with lots of wrap functions.
Notepad was internally just an elm_entry with a scroll, so using
a scrolled entry with a file set will do the job.
I've added a test called Entry Notepad that looks like the removed
Notepad test. But we will see the improvements - you can clear the entry
or whatever you want, because the entry is the object you are creating.
If you were using elm_notepad before, just s/notepad/scrolled_entry
and almost everything should work fine. Another change was the function
file_save(obj, file, format), is now just file_save(obj), and the
file and format used are defined by file_set().
At last, some getters were added.
SVN revision: 54145
2010-11-04 04:56:15 -07:00
|
|
|
void test_entry_notepad(void *data, Evas_Object *obj, void *event_info);
|
2011-11-23 17:06:26 -08:00
|
|
|
void test_multibuttonentry(void *data, Evas_Object *obj, void *event_info);
|
2017-01-15 18:48:48 -08:00
|
|
|
void test_multibuttonentry2(void *data, Evas_Object *obj, void *event_info);
|
2012-03-06 02:09:13 -08:00
|
|
|
void test_entry_anchor2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_entry_anchor(void *data, Evas_Object *obj, void *event_info);
|
2012-12-03 04:49:13 -08:00
|
|
|
void test_entry_emoticon(void *data, Evas_Object *obj, void *event_info);
|
Edje, Elementary: Remove <password=off> tag when password mode is disabled
Summary:
When edje_password_show_last option is enabled, the edje_entry uses <password=off>
for showing last character. But, when password mode is disabled by the elm_entry,
<password=off> is remained in the text. It can cause some problems.
Because, there is no way to control password mode by API for the edje_entry.
The elm_entry can't remove <password=off> tag before getting text from the edje_entry.
So, the patch adds edje_object_part_text_hide_visible_password() function and
the elm_entry will use this when elm_layout_theme_apply() is called.
@fix
Test Plan:
1. Run "elementary_test".
2. Show "Entry Password" demo. (Newly added by this patch)
3. Password mode is enabled. Put some text.
4. Click "Show Password" check box to disable password mode.
5. Put more text.
6. Click "Hide Password" check box to enable password mode again.
7. See a character among the text is visible. (without this patch)
Reviewers: tasn, herdsman, cedric, jpeg, thiepha, raster
Reviewed By: raster
Subscribers: Blackmole, z-wony, woohyun
Differential Revision: https://phab.enlightenment.org/D3988
2016-06-20 05:11:25 -07:00
|
|
|
void test_entry_password(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_toolbar(void *data, Evas_Object *obj, void *event_info);
|
2010-10-21 10:37:10 -07:00
|
|
|
void test_toolbar2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_toolbar3(void *data, Evas_Object *obj, void *event_info);
|
2010-10-26 03:30:45 -07:00
|
|
|
void test_toolbar4(void *data, Evas_Object *obj, void *event_info);
|
2010-10-29 11:58:54 -07:00
|
|
|
void test_toolbar5(void *data, Evas_Object *obj, void *event_info);
|
2011-08-06 20:42:28 -07:00
|
|
|
void test_toolbar6(void *data, Evas_Object *obj, void *event_info);
|
2012-02-23 00:22:24 -08:00
|
|
|
void test_toolbar7(void *data, Evas_Object *obj, void *event_info);
|
2012-03-04 01:52:20 -08:00
|
|
|
void test_toolbar8(void *data, Evas_Object *obj, void *event_info);
|
2013-11-12 17:16:33 -08:00
|
|
|
void test_toolbar_vertical(void *data, Evas_Object *obj, void *event_info);
|
2014-03-23 08:22:32 -07:00
|
|
|
void test_toolbar_focus(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_hoversel(void *data, Evas_Object *obj, void *event_info);
|
2013-11-13 03:32:31 -08:00
|
|
|
void test_hoversel_focus(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_list(void *data, Evas_Object *obj, void *event_info);
|
2010-10-19 13:19:12 -07:00
|
|
|
void test_list_horizontal(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_list2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_list3(void *data, Evas_Object *obj, void *event_info);
|
2010-10-15 04:25:02 -07:00
|
|
|
void test_list4(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_list5(void *data, Evas_Object *obj, void *event_info);
|
2012-04-17 03:59:16 -07:00
|
|
|
void test_list6(void *data, Evas_Object *obj, void *event_info);
|
2012-07-05 12:00:21 -07:00
|
|
|
void test_list7(void *data, Evas_Object *obj, void *event_info);
|
2014-03-09 04:07:13 -07:00
|
|
|
void test_list_focus(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_list_horiz_focus(void *data, Evas_Object *obj, void *event_info);
|
2013-01-02 22:23:33 -08:00
|
|
|
void test_list_separator(void *data, Evas_Object *obj, void *event_info);
|
2013-11-05 10:23:41 -08:00
|
|
|
void test_list_multi_select(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_inwin(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_inwin2(void *data, Evas_Object *obj, void *event_info);
|
2017-05-26 12:33:34 -07:00
|
|
|
void test_inwin3(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_scaling(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_scaling2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_slider(void *data, Evas_Object *obj, void *event_info);
|
2017-09-11 18:07:58 -07:00
|
|
|
void test_slider_interval(void *data, Evas_Object *obj, void *event_info);
|
2017-12-11 20:58:39 -08:00
|
|
|
void test_ui_slider(void *data, Evas_Object *obj, void *event_info);
|
2010-12-01 01:54:20 -08:00
|
|
|
void test_actionslider(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_genlist(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist2(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist3(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist4(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist5(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist6(void *data, Evas_Object *obj, void *event_info);
|
2010-10-15 04:24:46 -07:00
|
|
|
void test_genlist7(void *data, Evas_Object *obj, void *event_info);
|
2011-01-05 21:13:11 -08:00
|
|
|
void test_genlist8(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_genlist9(void *data, Evas_Object *obj, void *event_info);
|
2011-04-21 04:47:36 -07:00
|
|
|
void test_genlist10(void *data, Evas_Object *obj, void *event_info);
|
2015-02-08 17:34:06 -08:00
|
|
|
void test_genlist_reorder(void *data, Evas_Object *obj, void *event_info);
|
2011-09-08 03:21:04 -07:00
|
|
|
void test_genlist12(void *data, Evas_Object *obj, void *event_info);
|
2012-01-06 15:38:33 -08:00
|
|
|
void test_genlist13(void *data, Evas_Object *obj, void *event_info);
|
2012-01-06 18:02:02 -08:00
|
|
|
void test_genlist14(void *data, Evas_Object *obj, void *event_info);
|
2012-02-22 23:39:10 -08:00
|
|
|
void test_genlist15(void *data, Evas_Object *obj, void *event_info);
|
elm genlist: Added elm_genlist_item_flip_get/set APIs. Patch by
Hyoyoung Chang <hyoyoung@gmail.com>
On Wed, Feb 29, 2012 at 9:17 PM, Hyoyoung Chang <hyoyoung@gmail.com>
wrote:
> Dear all.
>
> I made a patch to introduce new genlist item mode.
> Two public apis are added.
> +EAPI void elm_genlist_item_flip_set(Elm_Object_Item *it, Eina_Bool
flip);
> +EAPI Eina_Bool elm_genlist_item_flip_get(Elm_Object_Item *it);
>
> It provides on-the-flying item change. It works like that a new item
> added on existed item.
> In elementary test, you can test it.
> It's useful at adding widgets or show buttons in genlist item.
>
> Thanks.
On Mon, Mar 5, 2012 at 5:56 PM, Hyoyoung Chang <hyoyoung@gmail.com>
wrote:
> Hello, I modifed fliP_set api to use ecore_job.
> It resolved version of mouse_{move, up} bugs.
>
SVN revision: 68727
2012-03-05 07:03:12 -08:00
|
|
|
void test_genlist16(void *data, Evas_Object *obj, void *event_info);
|
2012-06-15 00:58:11 -07:00
|
|
|
void test_genlist17(void *data, Evas_Object *obj, void *event_info);
|
2012-06-21 00:48:00 -07:00
|
|
|
void test_genlist18(void *data, Evas_Object *obj, void *event_info);
|
2012-07-31 13:07:09 -07:00
|
|
|
void test_genlist19(void *data, Evas_Object *obj, void *event_info);
|
2014-05-26 23:53:11 -07:00
|
|
|
void test_genlist20(void *data, Evas_Object *obj, void *event_info);
|
2014-01-12 08:06:17 -08:00
|
|
|
void test_genlist_focus(void *data, Evas_Object *obj, void *event_info);
|
2012-11-27 07:21:27 -08:00
|
|
|
void test_genlist_item_styles(void *data, Evas_Object *obj, void *event_info);
|
2013-11-05 20:11:23 -08:00
|
|
|
void test_genlist_multi_select(void *data, Evas_Object *obj, void *event_info);
|
2013-11-13 00:03:49 -08:00
|
|
|
void test_genlist_del(void *data, Evas_Object *obj, void *event_info);
|
2015-09-23 04:50:05 -07:00
|
|
|
void test_genlist_filter(void *data, Evas_Object *obj, void *event_info);
|
2016-01-04 14:05:29 -08:00
|
|
|
void test_genlist_show_bring(void *data, Evas_Object *obj, void *event_info);
|
2016-04-24 02:46:45 -07:00
|
|
|
void test_genlist_cache(void *data, Evas_Object *obj, void *event_info);
|
2016-08-09 06:30:07 -07:00
|
|
|
void test_genlist_reusable(void *data, Evas_Object *obj, void *event_info);
|
2018-05-02 16:16:49 -07:00
|
|
|
void test_genlist_item_show(void *data, Evas_Object *obj, void *event_info);
|
2011-07-07 07:41:10 -07:00
|
|
|
void test_gesture_layer(void *data, Evas_Object *obj, void *event_info);
|
2011-11-09 02:46:04 -08:00
|
|
|
void test_gesture_layer2(void *data, Evas_Object *obj, void *event_info);
|
2011-12-21 00:47:56 -08:00
|
|
|
void test_gesture_layer3(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_table(void *data, Evas_Object *obj, void *event_info);
|
2011-05-03 19:28:47 -07:00
|
|
|
void test_table2(void *data, Evas_Object *obj, void *event_info);
|
2011-05-25 04:44:10 -07:00
|
|
|
void test_table3(void *data, Evas_Object *obj, void *event_info);
|
2011-05-26 01:45:20 -07:00
|
|
|
void test_table4(void *data, Evas_Object *obj, void *event_info);
|
2011-05-26 01:49:57 -07:00
|
|
|
void test_table5(void *data, Evas_Object *obj, void *event_info);
|
2011-06-15 03:07:59 -07:00
|
|
|
void test_table6(void *data, Evas_Object *obj, void *event_info);
|
2012-02-15 20:54:12 -08:00
|
|
|
void test_table7(void *data, Evas_Object *obj, void *event_info);
|
2015-08-09 09:59:14 -07:00
|
|
|
void test_table8(void *data, Evas_Object *obj, void *event_info);
|
2017-12-18 21:13:58 -08:00
|
|
|
void test_ui_table(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_table_linear(void *data, Evas_Object *obj, void *event_info);
|
2010-06-03 05:53:14 -07:00
|
|
|
void test_gengrid(void *data, Evas_Object *obj, void *event_info);
|
2010-10-10 14:05:23 -07:00
|
|
|
void test_gengrid2(void *data, Evas_Object *obj, void *event_info);
|
2011-09-09 05:49:54 -07:00
|
|
|
void test_gengrid3(void *data, Evas_Object *obj, void *event_info);
|
2013-01-03 04:03:55 -08:00
|
|
|
void test_gengrid4(void *data, Evas_Object *obj, void *event_info);
|
2014-07-22 19:35:20 -07:00
|
|
|
void test_gengrid5(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info);
|
2014-03-17 12:10:33 -07:00
|
|
|
void test_gengrid_speed(void *data, Evas_Object *obj, void *event_info);
|
2014-03-22 08:49:41 -07:00
|
|
|
void test_gengrid_focus(void *data, Evas_Object *obj, void *event_info);
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
void test_gengrid_update(void *data, Evas_Object *obj, void *event_info);
|
2016-06-30 19:52:39 -07:00
|
|
|
void test_gengrid_disabled_item_focus(void *data, Evas_Object *obj, void *event_info);
|
2016-10-04 23:36:04 -07:00
|
|
|
void test_gengrid_item_custom_size(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_win_state(void *data, Evas_Object *obj, void *event_info);
|
2010-03-16 05:42:24 -07:00
|
|
|
void test_win_state2(void *data, Evas_Object *obj, void *event_info);
|
2016-12-08 22:27:55 -08:00
|
|
|
void test_win_stack(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_progressbar(void *data, Evas_Object *obj, void *event_info);
|
2013-09-09 23:47:13 -07:00
|
|
|
void test_progressbar2(void *data, Evas_Object *obj, void *event_info);
|
2018-01-16 22:52:58 -08:00
|
|
|
void test_ui_progressbar(void *data, Evas_Object *obj, void *event_info);
|
2009-08-13 15:41:43 -07:00
|
|
|
void test_fileselector(void *data, Evas_Object *obj, void *event_info);
|
2009-08-21 05:25:50 -07:00
|
|
|
void test_separator(void *data, Evas_Object *obj, void *event_info);
|
2009-09-01 03:42:52 -07:00
|
|
|
void test_scroller(void *data, Evas_Object *obj, void *event_info);
|
2010-05-07 06:21:45 -07:00
|
|
|
void test_scroller2(void *data, Evas_Object *obj, void *event_info);
|
2015-05-19 06:00:18 -07:00
|
|
|
void test_scroller3(void *data, Evas_Object *obj, void *event_info);
|
2015-09-02 00:16:04 -07:00
|
|
|
void test_scroller4(void *data, Evas_Object *obj, void *event_info);
|
2016-06-22 16:55:07 -07:00
|
|
|
void test_scroller5(void *data, Evas_Object *obj, void *event_info);
|
2018-11-26 08:30:19 -08:00
|
|
|
void test_scroller6(void *data, Evas_Object *obj, void *event_info);
|
2018-11-28 05:17:28 -08:00
|
|
|
void test_scroller7(void *data, Evas_Object *obj, void *event_info);
|
2019-07-16 10:41:47 -07:00
|
|
|
void test_scroller_simple(void *data, Evas_Object *obj, void *event_info);
|
2017-12-18 04:08:25 -08:00
|
|
|
void test_efl_ui_scroller(void *data, Evas_Object *obj, void *event_info);
|
2019-07-17 10:59:35 -07:00
|
|
|
void test_efl_ui_scroller_simple(void *data, Evas_Object *obj, void *event_info);
|
2019-07-17 11:08:41 -07:00
|
|
|
void test_efl_ui_scroller_simple2(void *data, Evas_Object *obj, void *event_info);
|
2009-09-04 02:50:25 -07:00
|
|
|
void test_spinner(void *data, Evas_Object *obj, void *event_info);
|
2017-11-20 02:12:49 -08:00
|
|
|
void test_ui_spin(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_spin_button(void *data, Evas_Object *obj, void *event_info);
|
2018-04-25 00:43:53 -07:00
|
|
|
void test_ui_datepicker(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_timepicker(void *data, Evas_Object *obj, void *event_info);
|
2018-05-02 01:23:25 -07:00
|
|
|
void test_ui_tags(void *data, Evas_Object *obj, void *event_info);
|
2018-12-19 18:32:28 -08:00
|
|
|
void test_ui_panel(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_panel2(void *data, Evas_Object *obj, void *event_info);
|
2009-09-04 02:50:25 -07:00
|
|
|
void test_index(void *data, Evas_Object *obj, void *event_info);
|
2010-05-23 16:44:36 -07:00
|
|
|
void test_index2(void *data, Evas_Object *obj, void *event_info);
|
2015-08-04 06:55:18 -07:00
|
|
|
void test_index3(void *data, Evas_Object *obj, void *event_info);
|
2012-11-29 00:39:26 -08:00
|
|
|
void test_index_horizontal(void *data, Evas_Object *obj, void *event_info);
|
2009-09-11 06:43:02 -07:00
|
|
|
void test_photocam(void *data, Evas_Object *obj, void *event_info);
|
2013-08-11 20:14:45 -07:00
|
|
|
void test_photocam_remote(void *data, Evas_Object *obj, void *event_info);
|
2017-06-01 18:45:25 -07:00
|
|
|
void test_photocam_icon(void *data, Evas_Object *obj, void *event_info);
|
2017-07-06 22:54:35 -07:00
|
|
|
void test_image_zoomable_animated(void *data, Evas_Object *obj, void *event_info);
|
2009-09-12 02:37:29 -07:00
|
|
|
void test_photo(void *data, Evas_Object *obj, void *event_info);
|
2012-11-30 06:41:39 -08:00
|
|
|
void test_prefs(void *data, Evas_Object *obj, void *event_info);
|
2010-03-15 11:34:04 -07:00
|
|
|
void test_thumb(void *data, Evas_Object *obj, void *event_info);
|
2009-09-12 02:37:29 -07:00
|
|
|
void test_icon_desktops(void *data, Evas_Object *obj, void *event_info);
|
2011-08-10 23:05:05 -07:00
|
|
|
void test_icon_animated(void *data, Evas_Object *obj, void *event_info);
|
2009-09-23 04:15:55 -07:00
|
|
|
void test_notify(void *data, Evas_Object *obj, void *event_info);
|
2009-09-23 15:56:47 -07:00
|
|
|
void test_slideshow(void *data, Evas_Object *obj, void *event_info);
|
2009-10-07 10:11:41 -07:00
|
|
|
void test_menu(void *data, Evas_Object *obj, void *event_info);
|
2012-05-13 22:20:19 -07:00
|
|
|
void test_menu2(void *data, Evas_Object *obj, void *event_info);
|
2009-10-15 13:34:11 -07:00
|
|
|
void test_panel(void *data, Evas_Object *obj, void *event_info);
|
2014-07-06 23:08:45 -07:00
|
|
|
void test_panel2(void *data, Evas_Object *obj, void *event_info);
|
2010-06-20 09:01:15 -07:00
|
|
|
void test_panes(void *data, Evas_Object *obj, void *event_info);
|
2019-04-12 05:40:04 -07:00
|
|
|
void test_panes_flush(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_panes_left_fold(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_panes_right_fold(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_panes_up_fold(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_panes_down_fold(void *data, Evas_Object *obj, void *event_info);
|
2017-08-08 01:22:05 -07:00
|
|
|
void test_panes_minsize(void *data, Evas_Object *obj, void *event_info);
|
2010-08-23 11:46:43 -07:00
|
|
|
void test_calendar(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_calendar2(void *data, Evas_Object *obj, void *event_info);
|
2012-04-24 16:07:36 -07:00
|
|
|
void test_calendar3(void *data, Evas_Object *obj, void *event_info);
|
2017-10-25 00:42:39 -07:00
|
|
|
void test_efl_ui_calendar(void *data, Evas_Object *obj, void *event_info);
|
2009-11-25 12:37:53 -08:00
|
|
|
void test_weather(void *data, Evas_Object *obj, void *event_info);
|
2009-12-01 23:22:35 -08:00
|
|
|
void test_flip(void *data, Evas_Object *obj, void *event_info);
|
2010-03-08 20:00:08 -08:00
|
|
|
void test_flip2(void *data, Evas_Object *obj, void *event_info);
|
2010-05-25 06:17:00 -07:00
|
|
|
void test_flip3(void *data, Evas_Object *obj, void *event_info);
|
2013-12-14 11:07:43 -08:00
|
|
|
void test_flip_interactive(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_flip_to(void *data, Evas_Object *obj, void *event_info);
|
2011-05-19 06:03:48 -07:00
|
|
|
void test_flip_page(void *data, Evas_Object *obj, void *event_info);
|
2017-05-11 01:03:21 -07:00
|
|
|
void test_flip_page_eo(void *data, Evas_Object *obj, void *event_info);
|
2010-01-07 18:33:03 -08:00
|
|
|
void test_label(void *data, Evas_Object *obj, void *event_info);
|
2015-01-29 16:10:43 -08:00
|
|
|
void test_label_slide(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_label_wrap(void *data, Evas_Object *obj, void *event_info);
|
evas_textblock: content fit feature
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
Reviewed By: woohyun
Subscribers: a.srour, #committers, #reviewers, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9280
2019-12-11 21:22:45 -08:00
|
|
|
void test_textblock_fit(void *data, Evas_Object *obj, void *event_info);
|
evas: font glyphs texture garbage collector
Summary:
Introduce two public APIS
```
#define EVAS_FONT_DATA_CACHE_TEXTURE 0x01
/**
* Set the limit in bytes for memory allocated by font glyphs in evas.
* @param[in] bytes cache size in bytes, pass negative value to ignore the limit.
* @param[in] options for caching, pass 0x1 to set the texture cache (in case of accelerated rendering).
*
* @since 1.24
*/
EAPI void evas_font_data_cache_set(signed long long int byte, int options);
/**
* @}
*/
/**
* Get the limit in bytes for memory allocated by font glyphs in evas.
* @param[in] options for caching, pass 0x1 to get the texture cache (in case of accelerated rendering).
* @return Returns font allocated memory cache limit, if value is negative this means no limit.
* @since 1.24
*/
EAPI signed long long int evas_font_data_cache_get(int options);
```
Test Plan:
elementary_test => Text Memory
You need a tool to observe Video memory allocation.
1- If you have detected Graphics card then use **radiontop** or **nvidia-smi** ).
2- If you have Integrated Graphics card, then you can detect memory allocation on RAM use.
----------------------------------------------
this example allows only 50 MByte Video memory texture allocated by font glyphs
```
#include <Elementary.h>
typedef struct _APP
{
Evas_Object *tb1;
Evas_Object *btnLoad;
} APP;
char *text = "<align=center><color=#4DE0FFFF underline=on underline_color=#4DE0FFFF><a href='tel:1234567890'>1234567890</a></color>😀😁😂🤣😃😄😅😆😉😊😋😎😍😘😗😙😚☺🙂🤗🤔😐😑😶🙄😏😣😥😮🤐😯😪😫😴😌🤓😛😜😝🤤😒😓😔😕🙃🤑😲☹🙁😖😞😟😤😢😭😦😧😨😩😬😰😱😳😵😡😠😇🤠🤡🤥😷🤒🤕🤢🤧☻😈👿👹👺💀☠👻👽👾🤖💩😺😸😹😻😼😽🙀😿😾🙈🙉🙊👦👧👨👩👵👶👼👨⚕️👩⚕️👨🎓👩🎓👨🏫👩🏫👨⚖👩⚖👨🌾👩🌾👨🍳👩🍳👨🔧👩🔧👨🏭👩🏭👨💼👩💼👨🔬👩🔬👨💻👩💻👨🎤👩🎤👨🎨👩🎨👨✈️👩✈️👨🚀👩🚀👨🚒👩🚒👮♂️👮♀️🕵️♂️🕵️♀️💂♂️💂♀️👷♂️👷♀️👳♂️👳♀️👱♂️👱♀️🎅🤶👸🤴👰🤵🤰👲🙍♂️🙍♀️🙎♂️🙎♀️🙅♂️🙅♀️🙆♂️🙆♀️💁♂️💁♀️🙋♂️🙋♀️🙇♂️🙇♀️🤦♂️🤦♀️🤷♂️🤷♀️💆♂️💆♀️💇♂️💇♀️🚶♂️🚶♀️🏃♂️🏃♀️💃🕺👯♂️👯♀️🕴🗣👤👥👫👬👭💏💑👪👨👩👧👨👩👧👦👨👩👦👦👨👩👧👧👨👦👨👦👦👨👧👨👧👦👨👧👧👩👦👩👦👦👩👧👩👧👦👩👧👧💪🤳👈👉☝️👆🖕👇✌🤞🖖🤘👊🖐✋👌👍👎✊👊🤛🤜🤚👋👏✍👐🙌🙏🤝💅👂👃👣👀👁👅👄💋💘❤💓💔💕💖💗💙💚💛💜🖤💝💞💟❣💌💤💢💣💥💦💨💫💬🗨🗯💭🕳👓🕶👔👕👖👗👘👙👚👛👜👝🛍🎒👞👟👠👡👢👑👒🎩🎓⛑📿💄💍💎🐵🐒🦍🐶🐕🐩🐺🦊🐱🐈🦁🐯🐅🐆🐴🐎🦌🦄🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🦏🐭🐁🐀🐹🐰🐇🐿🦇🐻🐨🐼🐾🦃🐔🐓🐣🐤🐥🐦🐧🕊🦅🦆🦉🐸🐊🐢🦎🐍🐲🐉🐳🐋🐬🐟🐠🐡🦈🐙🐚🦀🦐🦑🦋🐌🐛🐜🐝🐞🕷🕸🦂💐🌸💮🏵🌹🥀🌺🌻🌼🌷⚘🌱🌲🌳🌴🌵🌾🌿☘🍀🍁🍂🍃🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🥝🥑🍆🥔🥕🌽🌶🥒🍄🥜🌰🍞🥐🥖🥞🧀🍖🍗🥓🍔🍟🍕🌭🌮🌯🥙🥚🍳🥘🍲🥗🍿🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼🥛☕🍵🍶🍾🍷🍸🍹🍺🍻🥂🍽🍴🥄🔪🏺🎃🎄🎆🎇✨🎈🎉🎊🎋🎍🎎🎏🎐🎑🎀🎁🎗🎟🎫🎖🏆🏅🥇🥈🥉⚽️⚾️🏀🏐🏈🏉🎾🎱🎳🏏🏑🏒🏓🏸🥊🥋🥅🎯⛳🏌️♂️🏌️♀️⛸🎣🎽🎿⛷🏂🏄♂️🏄♀️🏇🏊♂️🏊♀️⛹️♂️⛹️♀️🏋️♂️🏋️♀️🚴♂️🚴♀️🚵♂️🚵♀️🏎🏍🤸♂️🤸♀️🤼♂️🤼♀️🤽♂️🤽♀️🤾♂️🤾♀️🤺🤹♂️🤹♀️🎮🕹🎲♠️♥️♦️♣️🃏🀄🎴🌍🌎🌏🌐🗺🏔⛰🌋🗻🏕🏖🏜🏝🏞🏟🏛🏗🏘🏙🏚🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽⛪🕌🕍⛩🕋⛲⛺🌁🌃🌄🌅🌆🌇🌉⛼♨️🌌🎠🎡🎢💈🎪🎭🖼🎨🎰🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚐🚑🚒🚓🚔🚕🚖🚗🚘🚙🚚🚛⛟🚜🚲🛴🛵🚏🛣🛤⛽🚨🚥🚦🚧🛑⚓⛵🚣♂️🚣♀️🛶🚤🛳⛴🛥🚢✈🛩🛫🛬💺🚁🚟🚠🚡🚀🛰🛎🚪🛌🛏🛋🚽🚿🛀🛁⌛⏳⌚⏰⏱⏲🕰🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜🌡☀️🌝🌞⭐🌟🌠☁️⛅⛈🌤🌥🌦🌧🌨🌩🌪🌫🌬🌀🌈🌂☂️☔⛱⚡❄☃️⛄☄🔥💧🌊🔇🔈🔉🔊📢📣📯🔔🔕🎼🎵🎶🎙🎚🎛🎤🎧📻🎷🎸🎹🎺🎻🥁📱📲☎️📞📟📠🔋🔌💻🖥🖨⌨🖱🖲💽💾💿📀🎥🎞📽🎬📺📷📸📹📼🔍🔎🔬🔭📡🕯💡🔦🏮📔📕📖📗📘📙📚📓📒📃📜📄📰🗞📑🔖🏷💰💴💵💶💷💸💳💱💲✉📧📨📩📤📥📦📫📪📬📭📮🗳✏✒🖋🖊🖌🖍📝💼📁📂🗂📅📆🗒🗓📇📈📉📊📋📌📍📎🖇📏📐✂️🗃🗄🗑🔒🔓🔏🔐🔑🗝🔨⛏⚒🛠🗡⚔🔫🏹🛡🔧🔩⚙🗜⚗⚖🔗⛓💉💊🚬⚰⚱🗿🛢🔮🔮🏧🚮🚰♿🚹🚺🚻🚼🚾🛂🛃🛄🛅⚠️🚸⛔🚫🚳🚭🚯🚱🚷📵🔞☢☣⬆️↗️➡️↘️⬇️↙️⬅️↖️↕️↔️↩↪⤴️⤵️🔃🔄🔙🔚🔛🔜🔝🛐⚛🕉✡☸☯️☦☮🕎🔯♈♉♊♋♌♍♎♏♐♑♒♓⛎🔀🔁🔂▶️⏩⏭⏯◀️⏪⏮🔼⏫🔽⏬⏸⏹⏺⏏🎦🔅🔆📶📳📴♻️📛⚜🔰🔱⭕✅☑✔✖❌❎➕♀️♂️⚕➖➗➰➿〽✳✴❇⁉️❓❔❕❗〰🔟💯🔠🔡🔢🔣🔤🅰️🆎️🅱️🆑️🆒️🆓️ℹ🆔️Ⓜ️🆕️🆖️🅾️🆗️🅿️🆘️🆙️🆚️🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▫️◻◼◽◾⬛⬜🔶️🔷️🔸️🔹️🔺️🔻💠🔘🔲🔳⚪⚫🔴🔵🏁🚩🏴🏳🏳️🌈⚀⚁⚂⚃⚄⚅⛾♾🇦🇨🇦🇩🇦🇪🇦🇫🇦🇬🇦🇮🇦🇱🇦🇲🇦🇴🇦🇶🇦🇷🇦🇸🇦🇹🇦🇺🇦🇼🇦🇽🇦🇿🇧🇦🇧🇧🇧🇩🇧🇪🇧🇫🇧🇬🇧🇭🇧🇮🇧🇯🇧🇱🇧🇲🇧🇳🇧🇴🇧🇶🇧🇷🇧🇸🇧🇹🇧🇼🇧🇾🇧🇿🇨🇦🇨🇨🇨🇩🇨🇫🇨🇬🇨🇭🇨🇮🇨🇰🇨🇱🇨🇲🇨🇳🇨🇴🇨🇷🇨🇺🇨🇻🇨🇼🇨🇽🇨🇾🇨🇿🇩🇪🇩🇯🇩🇰🇩🇲🇩🇴🇩🇿🇪🇨🇪🇪🇪🇬🇪🇭🇪🇷🇪🇸🇪🇹🇪🇺🇫🇮🇫🇯🇫🇰🇫🇲🇫🇴🇫🇷🇬🇦🇬🇧🇬🇩🇬🇪🇬🇫🇬🇬🇬🇭🇬🇮🇬🇱🇬🇲🇬🇳🇬🇵🇬🇶🇬🇷🇬🇸🇬🇹🇬🇺🇬🇼🇬🇾🇭🇰🇭🇲🇭🇳🇭🇷🇭🇹🇭🇺🇮🇨🇮🇩🇮🇪🇮🇱🇮🇲🇮🇳🇮🇴🇮🇶🇮🇷🇮🇸🇮🇹🇯🇪🇯🇲🇯🇴🇯🇵🇰🇪🇰🇬🇰🇭🇰🇮🇰🇲🇰🇳🇰🇵🇰🇷🇰🇼🇰🇾🇰🇿🇱🇦🇱🇧🇱🇨🇱🇮🇱🇰🇱🇷🇱🇸🇱🇹🇱🇺🇱🇻🇱🇾🇲🇦🇲🇨🇲🇩🇲🇪🇲🇬🇲🇭🇲🇰🇲🇱🇲🇲🇲🇳🇲🇴🇲🇵🇲🇶🇲🇷🇲🇸🇲🇹🇲🇺🇲🇻🇲🇼🇲🇽🇲🇾🇲🇿🇳🇦🇳🇨🇳🇪🇳🇫🇳🇬🇳🇮🇳🇱🇳🇴🇳🇵🇳🇷🇳🇺🇳🇿🇴🇲🇵🇦🇵🇪🇵🇫🇵🇬🇵🇭🇵🇰🇵🇱🇵🇲🇵🇳🇵🇷🇵🇸🇵🇹🇵🇼🇵🇾🇶🇦🇷🇪🇷🇴🇷🇸🇷🇺🇷🇼🇸🇦🇸🇧🇸🇨🇸🇩🇸🇪🇸🇬🇸🇭🇸🇮🇸🇰🇸🇱🇸🇲🇸🇳🇸🇴🇸🇷🇸🇸🇸🇹🇸🇻🇸🇽🇸🇾🇸🇿🇹🇦🇹🇨🇹🇩🇹🇫🇹🇬🇹🇭🇹🇯🇹🇰🇹🇱🇹🇲🇹🇳🇹🇴🇹🇷🇹🇹🇹🇻🇹🇼🇹🇿🇺🇦🇺🇬🇺🇳🇺🇸🇺🇾🇺🇿🇻🇦🇻🇨🇻🇪🇻🇬🇻🇮🇻🇳🇻🇺🇼🇫🇼🇸🇽🇰🇾🇪🇾🇹🇿🇦🇿🇲🇿🇼8<br/><br/><br/><br/>Sent from my Samsung Galaxy smartphone.</align>";
int font_size = 200;
int counter = 0;
void _button_clicked(void *data, Evas_Object *obj, void *event_info)
{
APP *app = data;
font_size -= 5;
Evas_Textblock_Style *style = evas_textblock_style_new();
char buffer[100] = {0};
sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
evas_textblock_style_set(style, buffer);
evas_object_textblock_style_set(app->tb1, style);
evas_textblock_style_free(style);
style = NULL;
}
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
APP *app = calloc(1, sizeof(APP));
Evas_Object *win, *scroller1, *scroller2, *box;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_util_standard_add("", "");
elm_win_autodel_set(win, EINA_TRUE);
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
scroller1 = elm_scroller_add(win);
evas_object_size_hint_weight_set(scroller1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(scroller1, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_font_data_cache_set(50 * 1024* 1024, EVAS_FONT_DATA_CACHE_TEXTURE );
app->tb1 = evas_object_textblock_add(win);
Evas_Textblock_Style *style = evas_textblock_style_new();
char buffer[100] = {0};
sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
evas_textblock_style_set(style, buffer);
evas_object_textblock_style_set(app->tb1, style);
evas_textblock_style_free(style);
style = NULL;
evas_font_cache_set(evas_object_evas_get(app->tb1), 0);
int w,h;
evas_object_textblock_text_markup_set(app->tb1, "");
evas_object_size_hint_min_set(app->tb1, 400, 400);
elm_object_content_set(scroller1, app->tb1);
elm_box_pack_end(box, scroller1);
elm_object_content_set(win, box);
app->btnLoad = elm_button_add(win);
elm_object_text_set(app->btnLoad, "Scale Font");
evas_object_smart_callback_add(app->btnLoad, "clicked", _button_clicked, app);
evas_object_show(app->btnLoad);
evas_object_move(app->btnLoad, 0, 20);
evas_object_resize(app->btnLoad, 150, 20);
evas_object_textblock_text_markup_set(app->tb1, text);
evas_object_textblock_size_formatted_get(app->tb1, &w, &h);
evas_object_size_hint_min_set(app->tb1, 400, w/400 + h + 150);
evas_object_resize(win, 400, 400);
evas_object_show(box);
evas_object_show(scroller1);
evas_object_show(scroller2);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
```
Reviewers: raster, woohyun, zmike, cedric, bu5hm4n, Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8737
Differential Revision: https://phab.enlightenment.org/D11943
2020-07-24 02:36:27 -07:00
|
|
|
void test_text_memory(void *data, Evas_Object *obj, void *event_info);
|
2015-09-02 12:51:46 -07:00
|
|
|
void test_label_ellipsis(void *data, Evas_Object *obj, void *event_info);
|
evas_common_format_color_parse: support color names
Summary:
efl user can now specify colors by there names ( not only Hex RGB/RGBA values), which is very convenient specially for first time users (where user may think it is supported by default)
<color=#FF0000> == <color=red> == <color==RED>
there are two main types of color names and values ( X11, web colors), here we are using X11 color.
============
Update for documentation pages should be added like:
https://www.enlightenment.org/_legacy_embed/evas_textblock_style_page.html#evas_textblock_style_color
I do not know how to update it :(
Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
efl_exit(0);
}
static void
_gui_setup()
{
Eo *win, *box;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Hello World"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_markup_set(efl_added,
"<color=red>this is red color line(color = red)<color><br>"
"<color=#0000FF>this is blue color line (color = #0000FF)<color><br>"
"<color=gray>this is gray color line (color = gray)<color><br>"),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.9),
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
efl_text_multiline_set(efl_added,EINA_TRUE),
efl_pack(box, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, box,
efl_text_set(efl_added, "Quit"),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
efl_pack(box, efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()
```
Reviewers: woohyun, bowonryu, segfaultxavi, vtorri
Reviewed By: segfaultxavi, vtorri
Subscribers: vtorri, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9153
2019-06-25 10:20:02 -07:00
|
|
|
void test_label_colors(void *data, Evas_Object *obj, void *event_info);
|
2017-03-08 02:19:36 -08:00
|
|
|
void test_label_emoji(void *data, Evas_Object *obj, void *event_info);
|
evas_object_textblock: add support for variation sequences
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️⃣☪️AAA☪︎1234567️⃣");
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: raster, bu5hm4n, subodh6129, herdsman, segfaultxavi, zmike, cedric, #committers, #reviewers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9053
2019-12-11 23:22:12 -08:00
|
|
|
void test_label_variation_sequence(void *data, Evas_Object *obj, void *event_info);
|
2010-01-08 09:54:26 -08:00
|
|
|
void test_conformant(void *data, Evas_Object *obj, void *event_info);
|
2010-11-03 01:24:56 -07:00
|
|
|
void test_conformant2(void *data, Evas_Object *obj, void *event_info);
|
2012-11-15 02:43:26 -08:00
|
|
|
void test_conformant_indicator(void *data, Evas_Object *obj, void *event_info);
|
2012-12-27 05:38:33 -08:00
|
|
|
void test_main_menu(void *data, Evas_Object *obj, void *event_info);
|
2010-01-17 01:31:44 -08:00
|
|
|
void test_multi(void *data, Evas_Object *obj, void *event_info);
|
2010-01-24 19:53:36 -08:00
|
|
|
void test_floating(void *data, Evas_Object *obj, void *event_info);
|
2010-01-25 01:07:10 -08:00
|
|
|
void test_launcher(void *data, Evas_Object *obj, void *event_info);
|
2010-04-12 01:27:10 -07:00
|
|
|
void test_launcher2(void *data, Evas_Object *obj, void *event_info);
|
2010-09-04 05:31:39 -07:00
|
|
|
void test_launcher3(void *data, Evas_Object *obj, void *event_info);
|
2010-02-01 08:46:26 -08:00
|
|
|
void test_anim(void *data, Evas_Object *obj, void *event_info);
|
2010-09-10 17:52:33 -07:00
|
|
|
void test_tooltip(void *data, Evas_Object *obj, void *event_info);
|
2010-10-20 10:41:31 -07:00
|
|
|
void test_tooltip2(void *data, Evas_Object *obj, void *event_info);
|
2015-02-05 03:02:24 -08:00
|
|
|
void test_tooltip3(void *data, Evas_Object *obj, void *event_info);
|
2017-02-27 03:13:06 -08:00
|
|
|
void test_tooltip4(void *data, Evas_Object *obj, void *event_info);
|
2010-09-17 11:26:04 -07:00
|
|
|
void test_cursor(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_cursor2(void *data, Evas_Object *obj, void *event_info);
|
2010-09-25 15:01:19 -07:00
|
|
|
void test_cursor3(void *data, Evas_Object *obj, void *event_info);
|
2011-11-01 14:13:04 -07:00
|
|
|
void test_cursor4(void *data, Evas_Object *obj, void *event_info);
|
2010-09-24 07:47:59 -07:00
|
|
|
void test_focus(void *data, Evas_Object *obj, void *event_info);
|
test focus brokenness.
Raster, if possible give it a try as it seems that most of the focus
steal and clear is your code and maybe you have a clue of what is
happening. For instance I have no clue why that global focus_order
counter that always grows.
This test is now exposing various problems, some of them is what bug
us in Editje, some is what eve's url bar, etc:
- press "Give focus to scrolled entry", then press it again. See
that the scrolled entry looses its focus, although we're giving it
focus? This is related to the object loosing focus but not
detecting it, thus the next elm_widget_focus_steal() will just
ignore it and say "you already have focus, do nothing!"
- start pressing "TAB", after a full iteration, the next iteration
just goes up to the last item. If you keep doing that, at some
point the TAB will just not work anymore. If you change PARENT
from "bx" to "win", then it does not happen. But adding to "bx"
would be the correct thing to do (more logical structure)
SVN revision: 52709
2010-09-24 17:06:32 -07:00
|
|
|
void test_focus2(void *data, Evas_Object *obj, void *event_info);
|
2014-02-02 08:24:11 -08:00
|
|
|
void test_focus_hide_del(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_focus_custom_chain(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_focus_style(void *data, Evas_Object *obj, void *event_info);
|
2014-02-03 00:44:16 -08:00
|
|
|
void test_focus_part(void *data, Evas_Object *obj, void *event_info);
|
2014-02-04 03:29:29 -08:00
|
|
|
void test_focus3(void *data, Evas_Object *obj, void *event_info);
|
2014-02-05 02:17:41 -08:00
|
|
|
void test_focus_object_style(void *data, Evas_Object *obj, void *event_info);
|
2015-06-01 21:42:00 -07:00
|
|
|
void test_focus_object_policy(void *data, Evas_Object *obj, void *event_info);
|
2016-12-16 15:25:18 -08:00
|
|
|
void test_focus4(void *data, Evas_Object *obj, void *event_info);
|
2017-12-10 11:35:42 -08:00
|
|
|
void test_focus5(void *data, Evas_Object *obj, void *event_info);
|
2018-01-05 09:22:53 -08:00
|
|
|
void test_focus6(void *data, Evas_Object *obj, void *event_info);
|
2018-12-03 02:46:48 -08:00
|
|
|
void test_focus7(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
2010-11-10 05:43:34 -08:00
|
|
|
void test_flipselector(void *data, Evas_Object *obj, void *event_info);
|
2010-11-10 05:28:32 -08:00
|
|
|
void test_diskselector(void *data, Evas_Object *obj, void *event_info);
|
2010-11-10 05:14:50 -08:00
|
|
|
void test_colorselector(void *data, Evas_Object *obj, void *event_info);
|
2010-11-30 22:52:46 -08:00
|
|
|
void test_ctxpopup(void *data, Evas_Object *obj, void *event_info);
|
2010-11-11 10:03:40 -08:00
|
|
|
void test_bubble(void *data, Evas_Object *obj, void *event_info);
|
2011-04-07 09:44:54 -07:00
|
|
|
void test_segment_control(void *data, Evas_Object *obj, void *event_info);
|
2010-11-17 18:54:12 -08:00
|
|
|
void test_store(void *data, Evas_Object *obj, void *event_info);
|
2012-12-05 14:24:00 -08:00
|
|
|
void test_sys_notify(void *data, Evas_Object *obj, void *event_info);
|
2012-12-27 05:38:40 -08:00
|
|
|
void test_systray(void *data, Evas_Object *obj, void *event_info);
|
2011-04-14 03:48:43 -07:00
|
|
|
void test_win_inline(void *data, Evas_Object *obj, void *event_info);
|
2015-05-13 04:57:36 -07:00
|
|
|
void test_win_keygrab(void *data, Evas_Object *obj, void *event_info);
|
2012-01-16 09:18:20 -08:00
|
|
|
void test_win_socket(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_win_plug(void *data, Evas_Object *obj, void *event_info);
|
2014-02-10 05:09:45 -08:00
|
|
|
void test_win_wm_rotation(void *data, Evas_Object *obj, void *event_info);
|
2011-05-18 00:15:36 -07:00
|
|
|
void test_grid(void *data, Evas_Object *obj, void *event_info);
|
2017-12-18 21:13:58 -08:00
|
|
|
void test_ui_table_static(void *data, Evas_Object *obj, void *event_info);
|
2011-12-03 06:21:58 -08:00
|
|
|
void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_glview(void *data, Evas_Object *obj, void *event_info);
|
2014-03-25 08:26:46 -07:00
|
|
|
void test_glview_manygears(void *data, Evas_Object *obj, void *event_info);
|
2017-03-07 18:52:59 -08:00
|
|
|
void test_glview_gles3(void *data, Evas_Object *obj, void *event_info);
|
2011-06-17 02:44:31 -07:00
|
|
|
void test_3d(void *data, Evas_Object *obj, void *event_info);
|
2011-07-12 21:21:50 -07:00
|
|
|
void test_naviframe(void *data, Evas_Object *obj, void *event_info);
|
naviframe improvements:
- fixed theme to look less like an arse:
- overlap theme is translucent
- naviframe title visibility toggle is now animated
- item pop/push animation now applies to title area as well
- icon without title label is now centered (see Naviframe 2 test)
- title label and subtitle are now centered among the free space, should not overlap buttons anymore.
- title will use a font-size range, trying to not overlap buttons anymore.
- title will use ellipsis, trying to not overlap buttons anymore.
- prev/next buttons do not have a fixed min/max size anymore
- emit signals elm,state,title_label,show and elm,state,title_label,hide
- by default the previous button label is the title of the previous page
however by using a regular elm_button with an icon and long label
exposes a bug with button theme. And there is a conceptual issue: if
the previous button label is too big, it will look horrible. We should
have a maximum size that, if reached, should have ellipsis. This
should be a different elm_button style, with
elm/button/base/naviframe/back_btn/default being an alias to it.
SVN revision: 74403
2012-07-25 14:08:53 -07:00
|
|
|
void test_naviframe2(void *data, Evas_Object *obj, void *event_info);
|
2015-05-05 09:13:12 -07:00
|
|
|
void test_naviframe3(void *data, Evas_Object *obj, void *event_info);
|
2012-03-29 13:31:35 -07:00
|
|
|
void test_naviframe_complex(void *data, Evas_Object *obj, void *event_info);
|
2018-04-12 05:45:32 -07:00
|
|
|
void test_ui_stack(void *data, Evas_Object *obj, void *event_info);
|
2012-03-05 05:13:26 -08:00
|
|
|
//void test_factory(void *data, Evas_Object *obj, void *event_info);
|
2012-03-05 03:07:05 -08:00
|
|
|
void test_datetime(void *data, Evas_Object *obj, void *event_info);
|
2016-11-02 23:30:17 -07:00
|
|
|
void test_ui_clock(void *data, Evas_Object *obj, void *event_info);
|
2012-03-05 15:51:56 -08:00
|
|
|
void test_popup(void *data, Evas_Object *obj, void *event_info);
|
2017-10-30 04:03:01 -07:00
|
|
|
void test_ui_popup(void *data, Evas_Object *obj, void *event_info);
|
2018-11-16 02:11:50 -08:00
|
|
|
void test_ui_alert_popup(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_scroll_alert_popup(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_text_alert_popup(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_anchor_popup(void *data, Evas_Object *obj, void *event_info);
|
2012-03-06 20:57:03 -08:00
|
|
|
void test_dayselector(void *data, Evas_Object *obj, void *event_info);
|
2012-08-02 01:15:05 -07:00
|
|
|
void test_image(void *data, Evas_Object *obj, void *event_info);
|
2017-09-19 01:32:09 -07:00
|
|
|
void test_image_scale_type(void *data, Evas_Object *obj, void *event_info);
|
2017-06-30 13:15:37 -07:00
|
|
|
void test_image_swallow_align(void *data, Evas_Object *obj, void *event_info);
|
2017-12-18 00:33:49 -08:00
|
|
|
void test_image_prescale(void *data, Evas_Object *obj, void *event_info);
|
2013-08-09 05:12:29 -07:00
|
|
|
void test_remote_image(void *data, Evas_Object *obj, void *event_info);
|
2013-10-29 16:32:43 -07:00
|
|
|
void test_click_image(void *data, Evas_Object *obj, void *event_info);
|
2016-09-21 23:24:40 -07:00
|
|
|
void test_load_image(void *data, Evas_Object *obj, void *event_info);
|
2019-05-20 08:34:51 -07:00
|
|
|
void test_ui_image(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_image_scale_type(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_image_swallow_align(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_image_prescale(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_remote_ui_image(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_click_ui_image(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_load_ui_image(void *data, Evas_Object *obj, void *event_info);
|
2012-09-07 13:16:30 -07:00
|
|
|
void test_external_button(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_external_slider(void *data, Evas_Object *obj, void *event_info);
|
2012-09-10 12:17:19 -07:00
|
|
|
void test_external_scroller(void *data, Evas_Object *obj, void *event_info);
|
2012-09-10 14:48:56 -07:00
|
|
|
void test_external_pbar(void *data, Evas_Object *obj, void *event_info);
|
2012-09-12 12:26:50 -07:00
|
|
|
void test_external_video(void *data, Evas_Object *obj, void *event_info);
|
2016-06-26 14:06:22 -07:00
|
|
|
void test_external_icon(void *data, Evas_Object *obj, void *event_info);
|
2016-07-03 03:00:33 -07:00
|
|
|
void test_external_combobox(void *data, Evas_Object *obj, void *event_info);
|
2012-12-04 22:50:27 -08:00
|
|
|
void test_config(void *data, Evas_Object *obj, void *event_info);
|
2016-07-10 21:13:38 -07:00
|
|
|
void test_config_font_overlay(void *data, Evas_Object *obj, void *event_info);
|
2011-12-03 08:36:39 -08:00
|
|
|
void test_video(void *data, Evas_Object *obj, void *event_info);
|
2011-05-25 12:08:38 -07:00
|
|
|
void test_eio(void *data, Evas_Object *obj, void *event_info);
|
2013-12-23 04:25:25 -08:00
|
|
|
void test_web(void *data, Evas_Object *obj, void *event_info);
|
2013-12-27 05:23:21 -08:00
|
|
|
void test_web_ui(void *data, Evas_Object *obj, void *event_info);
|
2013-03-16 23:36:30 -07:00
|
|
|
void test_dnd_genlist_default_anim(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_dnd_genlist_user_anim(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_dnd_genlist_gengrid(void *data, Evas_Object *obj, void *event_info);
|
2013-11-28 06:04:08 -08:00
|
|
|
void test_dnd_multi_features(void *data, Evas_Object *obj, void *event_info);
|
2014-03-13 06:08:08 -07:00
|
|
|
void test_dnd_types(void *data, Evas_Object *obj, void *event_info);
|
2013-08-16 14:18:07 -07:00
|
|
|
void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
|
2017-06-11 13:25:39 -07:00
|
|
|
void test_win_dialog(void *data, Evas_Object *obj, void *event_info);
|
2017-12-11 17:02:23 -08:00
|
|
|
void test_win_indicator(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_win_modal(void *data, Evas_Object *obj, void *event_info);
|
2016-11-22 00:59:33 -08:00
|
|
|
void test_win_modal(void *data, Evas_Object *obj, void *event_info);
|
2015-01-07 23:06:34 -08:00
|
|
|
void test_box_disable(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_layout_disable(void *data, Evas_Object *obj, void *event_info);
|
2017-11-23 21:41:31 -08:00
|
|
|
void test_part_background(void *data, Evas_Object *obj, void *event_info);
|
2017-12-14 01:03:21 -08:00
|
|
|
void test_part_shadow(void *data, Evas_Object *obj, void *event_info);
|
2009-02-24 01:23:51 -08:00
|
|
|
|
2015-11-30 06:45:12 -08:00
|
|
|
void test_colorclass(void *data, Evas_Object *obj, void *event_info);
|
2015-04-05 13:02:03 -07:00
|
|
|
|
2016-06-11 03:59:34 -07:00
|
|
|
void test_code_welcome(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_code_editor(void *data, Evas_Object *obj, void *event_info);
|
2017-01-20 14:09:16 -08:00
|
|
|
void test_code_syntax(void *data, Evas_Object *obj, void *event_info);
|
2018-03-24 03:39:32 -07:00
|
|
|
void test_code_syntax_tabbed(void *data, Evas_Object *obj, void *event_info);
|
2016-06-11 03:59:34 -07:00
|
|
|
void test_code_mirror(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_code_log(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_code_diff(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_code_diff_inline(void *data, Evas_Object *obj, void *event_info);
|
2016-12-01 03:25:11 -08:00
|
|
|
|
2016-06-08 08:37:35 -07:00
|
|
|
void test_efl_ui_text(void *data, Evas_Object *obj, void *event_info);
|
2018-09-13 02:45:29 -07:00
|
|
|
void test_efl_ui_text_inputfield(void *data, Evas_Object *obj, void *event_info);
|
2016-12-01 03:25:11 -08:00
|
|
|
void test_efl_ui_text_label(void *data, Evas_Object *obj, void *event_info);
|
2016-12-16 01:59:05 -08:00
|
|
|
void test_evas_mask(void *data, Edje_Object *obj, void *event_info);
|
2017-06-11 13:25:39 -07:00
|
|
|
void test_gfx_filters(void *data, Evas_Object *obj, void *event_info);
|
2017-02-09 22:26:53 -08:00
|
|
|
void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
|
2017-06-07 23:11:21 -07:00
|
|
|
void test_evas_map(void *data, Edje_Object *obj, void *event_info);
|
2019-02-20 12:32:41 -08:00
|
|
|
void test_efl_gfx_mapping(void *data, Edje_Object *obj, void *event_info);
|
2017-08-29 03:04:15 -07:00
|
|
|
void test_ui_textpath(void *data, Edje_Object *obj, void *event_info);
|
2019-12-11 09:09:56 -08:00
|
|
|
void test_canvas_textblock(void *data, Edje_Object *obj, void *event_info);
|
2016-06-11 03:59:34 -07:00
|
|
|
|
2017-08-24 18:47:26 -07:00
|
|
|
void test_efl_anim_alpha(void *data, Evas_Object *obj, void *event_info);
|
2017-08-24 19:26:09 -07:00
|
|
|
void test_efl_anim_rotate(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_efl_anim_rotate_relative(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_efl_anim_rotate_absolute(void *data, Evas_Object *obj, void *event_info);
|
2017-08-24 20:03:08 -07:00
|
|
|
void test_efl_anim_scale(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_efl_anim_scale_relative(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_efl_anim_scale_absolute(void *data, Evas_Object *obj, void *event_info);
|
2017-08-25 00:55:48 -07:00
|
|
|
void test_efl_anim_translate(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_efl_anim_translate_absolute(void *data, Evas_Object *obj, void *event_info);
|
2017-08-25 01:54:29 -07:00
|
|
|
void test_efl_anim_group_parallel(void *data, Evas_Object *obj, void *event_info);
|
2017-08-29 20:08:41 -07:00
|
|
|
void test_efl_anim_group_sequential(void *data, Evas_Object *obj, void *event_info);
|
2017-08-30 02:17:18 -07:00
|
|
|
void test_efl_anim_pause(void *data, Evas_Object *obj, void *event_info);
|
2017-08-30 04:20:15 -07:00
|
|
|
void test_efl_anim_repeat(void *data, Evas_Object *obj, void *event_info);
|
2017-09-04 03:17:48 -07:00
|
|
|
void test_efl_anim_start_delay(void *data, Evas_Object *obj, void *event_info);
|
2017-09-12 22:59:22 -07:00
|
|
|
void test_efl_anim_interpolator(void *data, Evas_Object *obj, void *event_info);
|
2017-08-24 18:47:26 -07:00
|
|
|
|
2017-09-20 18:11:53 -07:00
|
|
|
void test_gesture_framework(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
|
2018-05-02 05:10:16 -07:00
|
|
|
void test_ui_tab_pager(void *data, Evas_Object *obj, void *event_info);
|
2019-07-04 16:02:43 -07:00
|
|
|
void test_ui_spotlight_stack(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_spotlight_plain(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
|
2020-02-14 10:02:14 -08:00
|
|
|
void test_ui_spotlight_animation(void *data, Evas_Object *obj, void *event_info);
|
2019-11-12 04:46:20 -08:00
|
|
|
void test_ui_relative_container(void *data, Evas_Object *obj, void *event_info);
|
2019-05-29 04:03:37 -07:00
|
|
|
void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
|
2019-09-20 15:01:49 -07:00
|
|
|
void test_efl_ui_collection_list(void *data, Evas_Object *obj, void *event_info);
|
2019-07-24 08:57:01 -07:00
|
|
|
void test_efl_ui_collection_grid(void *data, Evas_Object *obj, void *event_info);
|
2019-09-20 15:01:49 -07:00
|
|
|
void test_efl_ui_collection_view(void *data, Evas_Object *obj, void *event_info);
|
2019-07-29 06:00:32 -07:00
|
|
|
void test_efl_ui_item(void *data, Evas_Object *obj, void *event_info);
|
2019-06-27 08:52:53 -07:00
|
|
|
void test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
2019-07-29 06:00:32 -07:00
|
|
|
|
2019-12-31 06:53:16 -08:00
|
|
|
void test_efl_ui_vg_animation(void *data, Evas_Object *obj, void *event_info);
|
2019-10-01 22:32:33 -07:00
|
|
|
void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info);
|
2020-01-17 07:06:52 -08:00
|
|
|
void test_ui_separator(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
2019-08-21 01:53:14 -07:00
|
|
|
|
2017-11-20 03:07:33 -08:00
|
|
|
static void _list_udpate(void);
|
2017-09-20 18:11:53 -07:00
|
|
|
|
2017-11-20 03:07:33 -08:00
|
|
|
static Evas_Object *win, *tbx, *entry; // TODO: refactoring
|
|
|
|
static void *tt;
|
2019-07-24 10:16:58 -07:00
|
|
|
static Eina_List *tests, *cur_test;;
|
2018-08-13 07:55:52 -07:00
|
|
|
static Eina_Bool hide_legacy = EINA_FALSE;
|
|
|
|
static Eina_Bool hide_beta = EINA_FALSE;
|
2019-07-24 13:19:26 -07:00
|
|
|
static Eina_Bool all_tests = EINA_FALSE;
|
2012-04-06 01:14:04 -07:00
|
|
|
|
2010-03-15 19:15:37 -07:00
|
|
|
struct elm_test
|
|
|
|
{
|
2011-11-09 04:06:12 -08:00
|
|
|
const char *icon;
|
|
|
|
const char *category;
|
2010-03-15 19:15:37 -07:00
|
|
|
const char *name;
|
2016-08-08 23:00:41 -07:00
|
|
|
Evas_Object *frame;
|
|
|
|
Evas_Object *box;
|
|
|
|
Evas_Object *btn;
|
|
|
|
|
2010-03-15 19:15:37 -07:00
|
|
|
void (*cb)(void *, Evas_Object *, void *);
|
2017-11-20 03:07:33 -08:00
|
|
|
|
|
|
|
Eina_Bool is_eo;
|
2010-03-15 19:15:37 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
2014-01-15 09:10:21 -08:00
|
|
|
_elm_test_sort(const void *pa, const void *pb)
|
2010-03-15 19:15:37 -07:00
|
|
|
{
|
|
|
|
const struct elm_test *a = pa, *b = pb;
|
2011-11-09 04:06:12 -08:00
|
|
|
int res = strcasecmp(a->category, b->category);
|
|
|
|
if (res) return res;
|
2010-03-15 19:15:37 -07:00
|
|
|
return strcasecmp(a->name, b->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2017-11-20 03:07:33 -08:00
|
|
|
_elm_test_add(Eina_List **p_list, const char *icon, const char *category, const char *name, void (*cb)(void *, Evas_Object *, void *), Eina_Bool is_eo)
|
2010-03-15 19:15:37 -07:00
|
|
|
{
|
2016-08-08 23:00:41 -07:00
|
|
|
struct elm_test *t = calloc(1, sizeof(struct elm_test));
|
2011-11-09 04:06:12 -08:00
|
|
|
t->icon = icon;
|
|
|
|
t->category = category;
|
2010-03-15 19:15:37 -07:00
|
|
|
t->name = name;
|
|
|
|
t->cb = cb;
|
2017-11-20 03:07:33 -08:00
|
|
|
t->is_eo = is_eo;
|
2014-01-15 09:10:21 -08:00
|
|
|
*p_list = eina_list_sorted_insert(*p_list, _elm_test_sort, t);
|
2010-03-15 19:15:37 -07:00
|
|
|
}
|
|
|
|
|
2012-02-23 05:57:56 -08:00
|
|
|
void
|
2013-08-31 18:18:03 -07:00
|
|
|
my_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2009-08-12 09:08:53 -07:00
|
|
|
{
|
2017-10-17 10:38:24 -07:00
|
|
|
efl_exit(0); /* exit the program's main loop that runs in elm_run() */
|
2009-08-12 09:08:53 -07:00
|
|
|
}
|
|
|
|
|
2011-02-08 06:13:07 -08:00
|
|
|
static void
|
|
|
|
_ui_tg_changed(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
(void) data; (void) event_info;
|
2012-03-06 04:04:25 -08:00
|
|
|
elm_config_mirrored_set(elm_check_state_get(obj));
|
2011-02-08 06:13:07 -08:00
|
|
|
}
|
|
|
|
|
2017-11-20 03:07:33 -08:00
|
|
|
static void
|
2018-08-13 07:55:52 -07:00
|
|
|
_legacy_chk_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
2017-11-20 03:07:33 -08:00
|
|
|
{
|
2018-08-13 07:55:52 -07:00
|
|
|
hide_legacy = elm_check_state_get(obj);
|
|
|
|
_list_udpate();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_beta_chk_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
hide_beta = elm_check_state_get(obj);
|
2017-11-20 03:07:33 -08:00
|
|
|
_list_udpate();
|
|
|
|
}
|
|
|
|
|
2012-01-13 19:37:35 -08:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_frame_clicked(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
2012-01-13 19:37:35 -08:00
|
|
|
{
|
|
|
|
printf("frame %p is: %s\n", obj, elm_frame_collapse_get(obj) ? "collapsed" : "expanded");
|
|
|
|
}
|
2011-02-08 06:13:07 -08:00
|
|
|
|
2016-08-08 23:00:41 -07:00
|
|
|
static void
|
|
|
|
_clear_menu()
|
|
|
|
{
|
|
|
|
Eina_List *child, *children;
|
|
|
|
Evas_Object *box, *obj, *obj1;
|
|
|
|
|
|
|
|
child = elm_box_children_get(tbx);
|
|
|
|
EINA_LIST_FREE(child, obj)
|
|
|
|
{
|
|
|
|
box = elm_object_content_get(obj);
|
|
|
|
children = elm_box_children_get(box);
|
|
|
|
EINA_LIST_FREE(children, obj1)
|
|
|
|
{
|
|
|
|
evas_object_hide(obj1);
|
|
|
|
}
|
|
|
|
elm_box_unpack_all(box);
|
|
|
|
evas_object_hide(obj);
|
|
|
|
}
|
|
|
|
elm_box_unpack_all(tbx);
|
|
|
|
}
|
|
|
|
|
2012-04-03 07:26:09 -07:00
|
|
|
static void
|
2012-04-06 01:14:04 -07:00
|
|
|
_menu_create(const char *option_str)
|
2012-04-03 07:26:09 -07:00
|
|
|
{
|
|
|
|
struct elm_test *t = NULL;
|
|
|
|
const char *pcat = NULL;
|
|
|
|
Evas_Object *cfr = NULL, *tbx2 = NULL, *bt = NULL, *ic = NULL;
|
|
|
|
char buf[PATH_MAX];
|
2012-04-06 01:14:04 -07:00
|
|
|
Eina_List *l;
|
2012-04-03 07:26:09 -07:00
|
|
|
|
2016-08-08 23:00:41 -07:00
|
|
|
_clear_menu();
|
2012-04-06 01:14:04 -07:00
|
|
|
EINA_LIST_FOREACH(tests, l, t)
|
2012-04-03 07:26:09 -07:00
|
|
|
{
|
2018-08-13 07:55:52 -07:00
|
|
|
if (hide_legacy && !t->is_eo)
|
|
|
|
continue;
|
|
|
|
if (hide_beta && t->is_eo)
|
2017-11-20 03:07:33 -08:00
|
|
|
continue;
|
2016-12-18 20:24:12 -08:00
|
|
|
if (option_str &&
|
|
|
|
!(strcasestr(t->name, option_str) || strcasestr(t->category, option_str)))
|
|
|
|
continue;
|
2012-04-03 07:26:09 -07:00
|
|
|
if ((!pcat) || (strcmp(pcat, t->category)))
|
|
|
|
{
|
2016-08-08 23:00:41 -07:00
|
|
|
if (t->frame)
|
|
|
|
{
|
|
|
|
elm_box_pack_end(tbx, t->frame);
|
|
|
|
evas_object_show(t->frame);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
cfr = elm_frame_add(win);
|
|
|
|
// FIXME: add new style of frame for this
|
|
|
|
evas_object_smart_callback_add(cfr, "clicked", _frame_clicked, NULL);
|
|
|
|
elm_frame_autocollapse_set(cfr, EINA_TRUE);
|
|
|
|
elm_object_text_set(cfr, t->category);
|
|
|
|
evas_object_size_hint_weight_set(cfr, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_fill_set(cfr, EVAS_HINT_FILL, 0.0);
|
|
|
|
elm_box_pack_end(tbx, cfr);
|
|
|
|
evas_object_show(cfr);
|
2012-04-03 07:26:09 -07:00
|
|
|
|
2016-08-08 23:00:41 -07:00
|
|
|
tbx2 = elm_box_add(win);
|
|
|
|
elm_box_layout_set(tbx2, evas_object_box_layout_flow_horizontal, NULL, NULL);
|
|
|
|
evas_object_size_hint_weight_set(tbx2, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(tbx2, EVAS_HINT_FILL, 0.0);
|
|
|
|
elm_box_align_set(tbx2, 0.0, 0.5);
|
|
|
|
elm_object_content_set(cfr, tbx2);
|
|
|
|
evas_object_show(tbx2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (t->btn)
|
|
|
|
{
|
|
|
|
elm_box_pack_end(t->box, t->btn);
|
|
|
|
evas_object_show(t->btn);
|
2012-04-03 07:26:09 -07:00
|
|
|
}
|
2016-08-08 23:00:41 -07:00
|
|
|
else
|
2012-04-03 07:26:09 -07:00
|
|
|
{
|
2016-08-08 23:00:41 -07:00
|
|
|
bt = elm_button_add(win);
|
|
|
|
// FIXME: add new style of button for this like efm in e17
|
|
|
|
elm_object_text_set(bt, t->name);
|
|
|
|
if (t->icon)
|
|
|
|
{
|
|
|
|
ic = elm_icon_add(win);
|
|
|
|
snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), t->icon);
|
|
|
|
elm_image_file_set(ic, buf, NULL);
|
|
|
|
elm_object_part_content_set(bt, "icon", ic);
|
|
|
|
evas_object_show(ic);
|
|
|
|
}
|
2017-11-20 03:07:33 -08:00
|
|
|
else if (t->is_eo)
|
|
|
|
{
|
|
|
|
ic = efl_add(EFL_UI_IMAGE_CLASS, win,
|
|
|
|
efl_ui_image_icon_set(efl_added, "user-bookmarks"));
|
|
|
|
elm_object_part_content_set(bt, "icon", ic);
|
|
|
|
}
|
2016-08-08 23:00:41 -07:00
|
|
|
elm_box_pack_end(tbx2, bt);
|
|
|
|
evas_object_show(bt);
|
|
|
|
evas_object_smart_callback_add(bt, "clicked", t->cb, win);
|
|
|
|
t->frame = cfr;
|
|
|
|
t->box = tbx2;
|
|
|
|
t->btn = bt;
|
2012-04-03 07:26:09 -07:00
|
|
|
}
|
|
|
|
pcat = t->category;
|
2012-04-06 01:14:04 -07:00
|
|
|
if (t == tt) tt = cfr;
|
2019-07-24 13:19:26 -07:00
|
|
|
if (all_tests) t->cb(NULL, NULL, NULL);
|
2012-04-03 07:26:09 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-06 01:14:04 -07:00
|
|
|
static void
|
2013-08-31 18:18:03 -07:00
|
|
|
_entry_changed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
2012-04-06 01:14:04 -07:00
|
|
|
{
|
|
|
|
const char *str = elm_entry_entry_get(obj);
|
|
|
|
if (!str) return;
|
|
|
|
_menu_create(str);
|
|
|
|
}
|
|
|
|
|
2017-11-20 03:07:33 -08:00
|
|
|
static void
|
|
|
|
_list_udpate(void)
|
|
|
|
{
|
|
|
|
const char *str = elm_entry_entry_get(entry);
|
|
|
|
if (!str) return;
|
|
|
|
_menu_create(str);
|
|
|
|
}
|
|
|
|
|
2016-10-25 22:01:43 -07:00
|
|
|
static void
|
|
|
|
_entry_activated_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
const char *str = elm_entry_entry_get(obj);
|
2017-01-10 00:30:35 -08:00
|
|
|
struct elm_test *t, *found = NULL, *exact = NULL;
|
|
|
|
int count = 0;
|
2016-10-25 22:01:43 -07:00
|
|
|
Eina_List *l;
|
|
|
|
|
|
|
|
if (!str) return;
|
|
|
|
EINA_LIST_FOREACH(tests, l, t)
|
|
|
|
{
|
2017-01-10 00:30:35 -08:00
|
|
|
if (!exact && !strcasecmp(t->name, str)) exact = t;
|
2016-10-25 22:01:43 -07:00
|
|
|
if (!strcasestr(t->name, str)) continue;
|
|
|
|
found = t;
|
2017-01-10 00:30:35 -08:00
|
|
|
count++;
|
|
|
|
if ((count > 1) && exact) break;
|
2016-10-25 22:01:43 -07:00
|
|
|
}
|
2017-01-10 00:30:35 -08:00
|
|
|
if (exact)
|
|
|
|
evas_object_smart_callback_call(exact->btn, "clicked", NULL);
|
|
|
|
else if (found && (count == 1))
|
|
|
|
evas_object_smart_callback_call(found->btn, "clicked", NULL);
|
2016-10-25 22:01:43 -07:00
|
|
|
}
|
|
|
|
|
2013-07-05 23:10:50 -07:00
|
|
|
static char *
|
|
|
|
_space_removed_string_get(const char *name)
|
|
|
|
{
|
|
|
|
int i = 0, j = 0, len;
|
|
|
|
char *ret;
|
|
|
|
|
|
|
|
len = strlen(name);
|
2015-11-30 12:57:58 -08:00
|
|
|
ret = calloc(len + 1, sizeof(char));
|
2013-07-05 23:10:50 -07:00
|
|
|
|
|
|
|
while (name[i])
|
|
|
|
{
|
|
|
|
if (name[i] != ' ')
|
|
|
|
{
|
|
|
|
ret[j] = name[i];
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-07-24 10:16:58 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_my_win_key_up(void *d EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Key *ev)
|
|
|
|
{
|
|
|
|
struct elm_test *t;
|
|
|
|
|
|
|
|
if (eina_streq(ev->key, "comma") && (ev->modifiers & ECORE_EVENT_MODIFIER_ALT))
|
|
|
|
{
|
|
|
|
if (cur_test)
|
|
|
|
cur_test = eina_list_prev(cur_test);
|
|
|
|
if (!cur_test)
|
|
|
|
cur_test = eina_list_last(tests);
|
|
|
|
t = eina_list_data_get(cur_test);
|
|
|
|
t->cb(NULL, NULL, NULL);
|
|
|
|
}
|
|
|
|
else if (eina_streq(ev->key, "period") && (ev->modifiers & ECORE_EVENT_MODIFIER_ALT))
|
|
|
|
{
|
|
|
|
if (cur_test)
|
|
|
|
cur_test = eina_list_next(cur_test);
|
|
|
|
if (!cur_test)
|
|
|
|
cur_test = tests;
|
|
|
|
t = eina_list_data_get(cur_test);
|
|
|
|
t->cb(NULL, NULL, NULL);
|
|
|
|
}
|
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
}
|
|
|
|
|
2020-06-02 20:15:05 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_auto_close(void *data EINA_UNUSED)
|
|
|
|
{
|
|
|
|
elm_exit();
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2008-09-29 23:58:56 -07:00
|
|
|
static void
|
2020-06-02 20:15:05 -07:00
|
|
|
my_win_main(const char *autorun, Eina_Bool test_win_only, Eina_Bool autoclose)
|
2008-09-29 23:58:56 -07:00
|
|
|
{
|
2017-11-20 03:07:33 -08:00
|
|
|
Evas_Object *bg = NULL, *bx0 = NULL, *bx1 = NULL, *lb = NULL, *chk = NULL;
|
2012-04-06 01:14:04 -07:00
|
|
|
Evas_Object *fr = NULL, *tg = NULL, *sc = NULL, *en = NULL;
|
2013-07-05 23:10:50 -07:00
|
|
|
Eina_List *l = NULL;
|
2012-01-12 21:28:09 -08:00
|
|
|
struct elm_test *t = NULL;
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2020-06-02 20:15:05 -07:00
|
|
|
if (autoclose) ecore_timer_add(2, _auto_close, win);
|
|
|
|
|
2011-08-26 00:40:51 -07:00
|
|
|
if (test_win_only) goto add_tests;
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Create an elm window - It returns an evas object. This is a little
|
2009-02-02 21:09:03 -08:00
|
|
|
* special as the object lives in the canvas that is inside the window
|
|
|
|
* so what is returned is really inside the window, but as you manipulate
|
|
|
|
* the evas object returned - the window will respond. elm_win makes sure
|
|
|
|
* of that so you can blindly treat it like any other evas object
|
2011-02-27 16:14:11 -08:00
|
|
|
* pretty much, just as long as you know it has special significance.
|
2011-08-12 11:00:29 -07:00
|
|
|
* The first parameter is a "parent" window - eg for a dialog you want to
|
2009-02-02 21:09:03 -08:00
|
|
|
* have a main window it is related to, here it is NULL meaning there
|
|
|
|
* is no parent. "main" is the name of the window - used by the window
|
|
|
|
* manager for identifying the window uniquely amongst all the windows
|
2011-08-12 11:00:29 -07:00
|
|
|
* within this application (and all instances of the application). The
|
2012-04-01 23:20:28 -07:00
|
|
|
* type is a basic window (the final parameter).
|
|
|
|
* You can call elm_win_util_standard_add() instead. This is a convenient API
|
|
|
|
* for window and bg creation. You don't need to create bg object manually.
|
2013-02-20 02:00:49 -08:00
|
|
|
* You can also set the title of the window at the same time.
|
2012-04-01 23:20:28 -07:00
|
|
|
* ex) win = elm_win_util_standard_add("main", "Elementary Tests"); */
|
2009-02-02 21:09:03 -08:00
|
|
|
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
|
2017-11-07 15:49:38 -08:00
|
|
|
if (!win)
|
|
|
|
{
|
|
|
|
efl_exit(1);
|
|
|
|
return ;
|
|
|
|
}
|
2015-08-26 17:47:53 -07:00
|
|
|
|
|
|
|
explode_win_enable(win);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Set the title of the window - This is in the titlebar. */
|
2009-02-02 21:09:03 -08:00
|
|
|
elm_win_title_set(win, "Elementary Tests");
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Set a callback on the window when "delete,request" is emitted as
|
|
|
|
* a callback. When this happens my_win_del() is called and the
|
2009-02-02 21:09:03 -08:00
|
|
|
* data pointer (first param) is passed the final param here (in this
|
|
|
|
* case it is NULL). This is how you can pass specific things to a
|
2011-08-12 11:00:29 -07:00
|
|
|
* callback like objects or data layered on top. */
|
2009-10-14 01:46:38 -07:00
|
|
|
evas_object_smart_callback_add(win, "delete,request", my_win_del, NULL);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Add a background to our window. This just uses the standard theme set
|
|
|
|
* background. Without a background, you could make a window seem
|
2012-01-04 23:05:09 -08:00
|
|
|
* transparent with elm_win_alpha_set(win, EINA_TRUE); For example. if you
|
|
|
|
* have a compositor running this will make the window able to be
|
2009-02-02 21:09:03 -08:00
|
|
|
* semi-transparent and any space not filled by object/widget pixels will
|
2011-08-12 11:00:29 -07:00
|
|
|
* be transparent or translucent based on alpha. If you do not have a
|
|
|
|
* compositor running this should fall back to using shaped windows
|
|
|
|
* (which have a mask). Both these features will be slow and rely on
|
2009-02-02 21:09:03 -08:00
|
|
|
* a lot more resources, so only use it if you need it. */
|
|
|
|
bg = elm_bg_add(win);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Set weight to 1.0 x 1.0 == expand in both x and y direction. */
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Tell the window that this object is to be resized along with the window.
|
|
|
|
* Also as a result this object will be one of several objects that
|
|
|
|
* controls the minimum/maximum size of the window. */
|
2009-02-02 21:09:03 -08:00
|
|
|
elm_win_resize_object_add(win, bg);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* And show the background. */
|
2009-02-02 21:09:03 -08:00
|
|
|
evas_object_show(bg);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Add a box layout widget to the window. */
|
2009-02-02 21:09:03 -08:00
|
|
|
bx0 = elm_box_add(win);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Allow base box (bx0) to expand in x and y. */
|
2009-09-28 12:23:33 -07:00
|
|
|
evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
2011-08-12 11:00:29 -07:00
|
|
|
/* Tell the window that the box affects window size and also will be
|
|
|
|
* resized when the window is resized. */
|
2009-02-02 21:09:03 -08:00
|
|
|
elm_win_resize_object_add(win, bx0);
|
|
|
|
evas_object_show(bx0);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2009-02-02 21:09:03 -08:00
|
|
|
fr = elm_frame_add(win);
|
2012-01-13 19:37:35 -08:00
|
|
|
evas_object_smart_callback_add(fr, "clicked", _frame_clicked, NULL);
|
2012-01-03 21:26:37 -08:00
|
|
|
elm_frame_autocollapse_set(fr, EINA_TRUE);
|
2011-06-29 02:11:48 -07:00
|
|
|
elm_object_text_set(fr, "Information");
|
2009-02-02 21:09:03 -08:00
|
|
|
elm_box_pack_end(bx0, fr);
|
|
|
|
evas_object_show(fr);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2009-02-02 21:09:03 -08:00
|
|
|
lb = elm_label_add(win);
|
2011-06-28 23:41:31 -07:00
|
|
|
elm_object_text_set(lb,
|
2012-03-13 05:04:32 -07:00
|
|
|
"Please select a test from the list below by clicking<br/>"
|
|
|
|
"the test button to show the test window.");
|
2011-10-28 21:32:24 -07:00
|
|
|
elm_object_content_set(fr, lb);
|
2009-02-02 21:09:03 -08:00
|
|
|
evas_object_show(lb);
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2013-02-07 22:16:03 -08:00
|
|
|
/* This label will not be read out */
|
2013-12-15 23:01:58 -08:00
|
|
|
elm_access_object_unregister(lb);
|
2013-02-07 22:16:03 -08:00
|
|
|
|
2011-10-20 14:27:15 -07:00
|
|
|
tg = elm_check_add(win);
|
|
|
|
elm_object_style_set(tg, "toggle");
|
2012-10-17 00:02:51 -07:00
|
|
|
elm_object_text_set(tg, "UI-Mirroring:");
|
2012-03-06 04:04:25 -08:00
|
|
|
elm_check_state_set(tg, elm_config_mirrored_get());
|
2011-02-08 06:13:07 -08:00
|
|
|
evas_object_smart_callback_add(tg, "changed", _ui_tg_changed, NULL);
|
|
|
|
elm_box_pack_end(bx0, tg);
|
|
|
|
evas_object_show(tg);
|
|
|
|
|
2012-04-06 01:14:04 -07:00
|
|
|
bx1 = elm_box_add(win);
|
|
|
|
elm_box_horizontal_set(bx1, EINA_TRUE);
|
|
|
|
evas_object_size_hint_weight_set(bx1, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(bx1, EVAS_HINT_FILL, 0.0);
|
|
|
|
elm_box_pack_end(bx0, bx1);
|
|
|
|
evas_object_show(bx1);
|
|
|
|
|
|
|
|
lb = elm_label_add(win);
|
|
|
|
elm_object_text_set(lb, " Search Menu :");
|
2012-04-19 04:11:00 -07:00
|
|
|
evas_object_size_hint_weight_set(lb, 0.0, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(lb, 0.0, EVAS_HINT_FILL);
|
2012-04-06 01:14:04 -07:00
|
|
|
elm_box_pack_end(bx1, lb);
|
|
|
|
evas_object_show(lb);
|
|
|
|
|
|
|
|
en = elm_entry_add(win);
|
|
|
|
elm_entry_single_line_set(en, EINA_TRUE);
|
|
|
|
elm_entry_scrollable_set(en, EINA_TRUE);
|
2013-08-23 04:10:23 -07:00
|
|
|
elm_object_part_text_set(en, "guide", "Type widget name here to search.");
|
2012-04-06 01:14:04 -07:00
|
|
|
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
2013-08-23 04:09:05 -07:00
|
|
|
evas_object_smart_callback_add(en, "changed,user", _entry_changed_cb, NULL);
|
2016-10-25 22:01:43 -07:00
|
|
|
evas_object_smart_callback_add(en, "activated", _entry_activated_cb, NULL);
|
2012-04-06 01:14:04 -07:00
|
|
|
elm_box_pack_end(bx1, en);
|
|
|
|
evas_object_show(en);
|
|
|
|
elm_object_focus_set(en, EINA_TRUE);
|
2017-11-20 03:07:33 -08:00
|
|
|
entry = en;
|
|
|
|
|
2018-08-13 07:55:52 -07:00
|
|
|
chk = elm_check_add(win); // Check for hiding beta api
|
|
|
|
elm_object_text_set(chk, "Hide beta");
|
|
|
|
elm_check_state_set(chk, hide_beta);
|
|
|
|
evas_object_smart_callback_add(chk, "changed", _beta_chk_changed, NULL);
|
|
|
|
elm_box_pack_end(bx1, chk);
|
|
|
|
evas_object_show(chk);
|
|
|
|
|
|
|
|
chk = elm_check_add(win); // Check for hiding legacy api
|
2017-11-27 06:48:35 -08:00
|
|
|
elm_object_text_set(chk, "Hide Legacy");
|
2018-08-13 07:55:52 -07:00
|
|
|
elm_check_state_set(chk, hide_legacy);
|
|
|
|
evas_object_smart_callback_add(chk, "changed", _legacy_chk_changed, NULL);
|
2017-11-20 03:07:33 -08:00
|
|
|
elm_box_pack_end(bx1, chk);
|
|
|
|
evas_object_show(chk);
|
2012-04-06 01:14:04 -07:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
sc = elm_scroller_add(win);
|
2011-11-30 09:48:22 -08:00
|
|
|
elm_scroller_bounce_set(sc, EINA_FALSE, EINA_TRUE);
|
2011-11-09 04:06:12 -08:00
|
|
|
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
elm_box_pack_end(bx0, sc);
|
|
|
|
evas_object_show(sc);
|
2010-03-15 19:15:37 -07:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
tbx = elm_box_add(win);
|
|
|
|
evas_object_size_hint_weight_set(tbx, EVAS_HINT_EXPAND, 0.0);
|
|
|
|
evas_object_size_hint_align_set(tbx, EVAS_HINT_FILL, 0.0);
|
|
|
|
elm_object_content_set(sc, tbx);
|
|
|
|
evas_object_show(tbx);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-08-26 00:40:51 -07:00
|
|
|
add_tests:
|
2010-03-15 19:15:37 -07:00
|
|
|
tests = NULL;
|
2017-11-20 03:07:33 -08:00
|
|
|
#define ADD_TEST(icon_, cat_, name_, cb_) _elm_test_add(&tests, icon_, cat_, name_, cb_, EINA_FALSE)
|
|
|
|
#define ADD_TEST_EO(icon_, cat_, name_, cb_) _elm_test_add(&tests, icon_, cat_, name_, cb_, EINA_TRUE)
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Bg Plain", test_bg_plain);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Bg Image", test_bg_image);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Bg Options", test_bg_options);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Window States", test_win_state);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Window States 2", test_win_state2);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Inwin", test_inwin);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Inwin 2", test_inwin2);
|
2017-05-26 12:33:34 -07:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Inwin 3", test_inwin3);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Inline", test_win_inline);
|
2012-01-16 09:18:20 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Socket", test_win_socket);
|
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug);
|
2014-02-10 05:09:45 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window WM Rotation", test_win_wm_rotation);
|
2017-06-11 13:25:39 -07:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Standard/Dialog", test_win_dialog);
|
2015-05-13 04:57:36 -07:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Keygrab Set", test_win_keygrab);
|
2016-11-22 00:59:33 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Modal", test_win_modal);
|
2016-12-08 22:27:55 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Stack", test_win_stack);
|
2017-12-11 17:02:23 -08:00
|
|
|
ADD_TEST(NULL, "Window / Background", "Window Indicator", test_win_indicator);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Window / Background", "Efl.Ui.Win (Bg part)", test_bg_window);
|
|
|
|
ADD_TEST_EO(NULL, "Window / Background", "Efl.Ui.Bg", test_bg_scale_type);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2012-03-07 05:52:47 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Icon", test_icon);
|
|
|
|
ADD_TEST(NULL, "Images", "Icon Transparent", test_icon_transparent);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Icon Animation", test_icon_animated);
|
2014-12-30 14:02:24 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Icon Standard", test_icon_standard);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Photocam", test_photocam);
|
2013-08-11 20:14:45 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Photocam Remote", test_photocam_remote);
|
2017-06-01 18:45:25 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Photocam Icon", test_photocam_icon);
|
2019-09-23 03:56:11 -07:00
|
|
|
ADD_TEST_EO(NULL, "Images", "Image Zoomable animation", test_image_zoomable_animated);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Photo", test_photo);
|
|
|
|
ADD_TEST(NULL, "Images", "Thumb", test_thumb);
|
2012-08-02 01:15:05 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image", test_image);
|
2017-09-19 01:32:09 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image Scale Type", test_image_scale_type);
|
2017-06-30 13:15:37 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image Align", test_image_swallow_align);
|
2013-08-09 05:12:29 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image Remote", test_remote_image);
|
2013-10-29 16:32:43 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image Click", test_click_image);
|
2016-09-21 23:24:40 -07:00
|
|
|
ADD_TEST(NULL, "Images", "Image Async Load", test_load_image);
|
2017-12-18 00:33:49 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Image Prescale", test_image_prescale);
|
2019-05-20 08:34:51 -07:00
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image", test_ui_image);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Scale Type", test_ui_image_scale_type);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Align", test_ui_image_swallow_align);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Remote", test_remote_ui_image);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Click", test_click_ui_image);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Async Load", test_load_ui_image);
|
|
|
|
ADD_TEST_EO(NULL, "Images", "EFL.UI.Image Prescale", test_ui_image_prescale);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Slideshow", test_slideshow);
|
2011-12-03 08:36:39 -08:00
|
|
|
ADD_TEST(NULL, "Images", "Video", test_video);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Containers", "Box Vert", test_box_vert);
|
|
|
|
ADD_TEST(NULL, "Containers", "Box Vert 2", test_box_vert2);
|
2012-02-20 00:26:17 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Box Pack", test_box_pack);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Box Horiz", test_box_horiz);
|
2012-02-20 00:26:17 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Box Homogeneous", test_box_homo);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Box Transition", test_box_transition);
|
2014-11-09 01:36:27 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Box Align", test_box_align);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Table", test_table);
|
|
|
|
ADD_TEST(NULL, "Containers", "Table Homogeneous", test_table2);
|
|
|
|
ADD_TEST(NULL, "Containers", "Table 3", test_table3);
|
|
|
|
ADD_TEST(NULL, "Containers", "Table 4", test_table4);
|
|
|
|
ADD_TEST(NULL, "Containers", "Table 5", test_table5);
|
|
|
|
ADD_TEST(NULL, "Containers", "Table 6", test_table6);
|
2012-02-15 20:54:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Table 7", test_table7);
|
2015-08-09 09:59:14 -07:00
|
|
|
ADD_TEST(NULL, "Containers", "Table Padding", test_table8);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Layout", test_layout);
|
2012-03-18 23:57:39 -07:00
|
|
|
ADD_TEST(NULL, "Containers", "Layout 2", test_layout2);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Containers", "Grid", test_grid);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Box", test_ui_box);
|
2019-03-20 07:28:45 -07:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Box_Stack", test_ui_box_stack);
|
2017-12-18 21:13:58 -08:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table);
|
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear);
|
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static);
|
2019-11-12 04:46:20 -08:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Container", test_ui_relative_container);
|
2019-07-24 08:57:01 -07:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection List", test_efl_ui_collection_list);
|
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection Grid", test_efl_ui_collection_grid);
|
2019-09-20 15:01:49 -07:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection_View", test_efl_ui_collection_view);
|
2019-07-29 06:00:32 -07:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Items", test_efl_ui_item);
|
2019-06-27 08:52:53 -07:00
|
|
|
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Frame", test_ui_frame);
|
2016-04-11 22:13:19 -07:00
|
|
|
|
2016-06-02 19:56:57 -07:00
|
|
|
//------------------------------//
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Events", "Event Refeed", test_events);
|
2016-06-02 19:56:57 -07:00
|
|
|
|
2016-04-11 22:13:19 -07:00
|
|
|
//------------------------------//
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry", test_entry);
|
New textblock tags for elm entry widget.
This commit add the following new tags:
title, subtitle, bigger, big, small, smaller, code, comment,
string, number, brace, type, class, function, param, keyword,
preprocessor, line_added, line_removed, line_changed.
Tags has been unified in 3 new utility macros:
COMMON_TEXTBLOCK_TAGS, ENABLED_TEXTBLOCK_TAGS, and DISABLED_TEXTBLOCK_TAGS
to avoid repeating too much in the theme.
Also a new test is in: "Entry Style Default" that show all the new styles.
Docs will follow soon.
2014-02-08 11:09:42 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Style Default", test_entry_style_default);
|
|
|
|
ADD_TEST(NULL, "Entries", "Entry Style User", test_entry_style_user);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Scrolled", test_entry_scrolled);
|
Elm entry: fix returning wrong focus region
Summary:
In on_focus_region function,
entry returns relative x,y position from edje object.
It should be calculated from elm object's position.
@fix
Test Plan:
1. $elementary_test "Entry on Page Scroll"
2. click under button
3. click upper text in entry
4. page should not be scrolled
Reviewers: tasn, cedric, woohyun, Hermet, herdsman, raster
Subscribers: Blackmole, id213sin, cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3923
2016-05-26 01:19:34 -07:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry on Page Scroll", test_entry_on_page_scroll);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry 3", test_entry3);
|
|
|
|
ADD_TEST(NULL, "Entries", "Entry 4", test_entry4);
|
|
|
|
ADD_TEST(NULL, "Entries", "Entry 5", test_entry5);
|
2012-02-07 03:24:39 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry 6", test_entry6);
|
2012-02-22 04:33:25 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry 7", test_entry7);
|
2012-02-23 23:41:38 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry 8", test_entry8);
|
2015-04-02 02:37:37 -07:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Regex", test_entry_regex);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Notepad", test_entry_notepad);
|
2011-11-23 17:06:26 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Multibuttonentry", test_multibuttonentry);
|
2017-01-15 18:48:48 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Multibuttonentry Shrink", test_multibuttonentry2);
|
2012-03-06 02:09:13 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Anchor", test_entry_anchor);
|
|
|
|
ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
|
2012-12-03 04:49:13 -08:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Emoticon", test_entry_emoticon);
|
Edje, Elementary: Remove <password=off> tag when password mode is disabled
Summary:
When edje_password_show_last option is enabled, the edje_entry uses <password=off>
for showing last character. But, when password mode is disabled by the elm_entry,
<password=off> is remained in the text. It can cause some problems.
Because, there is no way to control password mode by API for the edje_entry.
The elm_entry can't remove <password=off> tag before getting text from the edje_entry.
So, the patch adds edje_object_part_text_hide_visible_password() function and
the elm_entry will use this when elm_layout_theme_apply() is called.
@fix
Test Plan:
1. Run "elementary_test".
2. Show "Entry Password" demo. (Newly added by this patch)
3. Password mode is enabled. Put some text.
4. Click "Show Password" check box to disable password mode.
5. Put more text.
6. Click "Hide Password" check box to enable password mode again.
7. See a character among the text is visible. (without this patch)
Reviewers: tasn, herdsman, cedric, jpeg, thiepha, raster
Reviewed By: raster
Subscribers: Blackmole, z-wony, woohyun
Differential Revision: https://phab.enlightenment.org/D3988
2016-06-20 05:11:25 -07:00
|
|
|
ADD_TEST(NULL, "Entries", "Entry Password", test_entry_password);
|
2019-12-10 16:47:50 -08:00
|
|
|
ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox", test_efl_ui_text);
|
|
|
|
ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox Input Field", test_efl_ui_text_inputfield);
|
|
|
|
ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox Label", test_efl_ui_text_label);
|
2018-05-02 01:23:25 -07:00
|
|
|
ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Tags", test_ui_tags);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2016-06-11 03:59:34 -07:00
|
|
|
//------------------------------//
|
2018-03-24 03:39:32 -07:00
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Code Entry Markup", test_code_welcome);
|
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Code Editor", test_code_editor);
|
2017-01-20 14:09:16 -08:00
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Code Syntax", test_code_syntax);
|
2018-03-24 03:39:32 -07:00
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Code Syntax (Tabbed)", test_code_syntax_tabbed);
|
2016-06-11 03:59:34 -07:00
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Mirrored Editor", test_code_mirror);
|
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Logger", test_code_log);
|
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Diff Comparison", test_code_diff);
|
|
|
|
ADD_TEST(NULL, "Advanced Entries", "Diff Inline", test_code_diff_inline);
|
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2013-08-15 21:13:36 -07:00
|
|
|
ADD_TEST(NULL, "Buttons", "Button", test_button);
|
2018-01-28 20:22:26 -08:00
|
|
|
ADD_TEST_EO(NULL, "Buttons", "Efl.Ui.Button", test_ui_button);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2012-11-30 06:41:39 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Prefs", "Prefs", test_prefs);
|
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit", test_transit);
|
2014-12-17 16:39:37 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Transit Resizing", test_transit_resizing);
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit Flip", test_transit_flip);
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit Zoom", test_transit_zoom);
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit Blend", test_transit_blend);
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit Fade", test_transit_fade);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Transit Resizable Flip", test_transit_resizable_flip);
|
2014-12-17 16:39:37 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Transit Custom", test_transit_custom);
|
|
|
|
ADD_TEST(NULL, "Effects", "Transit Chain", test_transit_chain);
|
2014-12-25 18:22:02 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Transit Tween", test_transit_tween);
|
2014-12-17 21:33:06 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Transit Bezier", test_transit_bezier);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Flip", test_flip);
|
|
|
|
ADD_TEST(NULL, "Effects", "Flip 2", test_flip2);
|
|
|
|
ADD_TEST(NULL, "Effects", "Flip 3", test_flip3);
|
2013-12-14 11:07:43 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Flip Interactive", test_flip_interactive);
|
|
|
|
ADD_TEST(NULL, "Effects", "Flip To", test_flip_to);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Effects", "Flip Page", test_flip_page);
|
|
|
|
ADD_TEST(NULL, "Effects", "Animation", test_anim);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Effects", "Flip Page", test_flip_page_eo);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Alpha", test_efl_anim_alpha);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Rotate", test_efl_anim_rotate);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Rotate Relative", test_efl_anim_rotate_relative);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Rotate Absolute", test_efl_anim_rotate_absolute);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Scale", test_efl_anim_scale);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Scale Relative", test_efl_anim_scale_relative);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Scale Absolute", test_efl_anim_scale_absolute);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Translate", test_efl_anim_translate);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Translate Absolute", test_efl_anim_translate_absolute);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Group Parallel", test_efl_anim_group_parallel);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Group Sequential", test_efl_anim_group_sequential);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Pause", test_efl_anim_pause);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Repeat", test_efl_anim_repeat);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Start Delay", test_efl_anim_start_delay);
|
|
|
|
ADD_TEST_EO(NULL, "Effects", "Efl.Animation.Interpolator", test_efl_anim_interpolator);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2012-09-07 13:16:30 -07:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Edje External", "ExtButton", test_external_button);
|
2012-09-10 14:48:56 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtProgressBar", test_external_pbar);
|
2012-09-10 12:17:19 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtScroller", test_external_scroller);
|
2012-09-07 13:16:30 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtSlider", test_external_slider);
|
2012-09-12 12:26:50 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtVideo", test_external_video);
|
2016-06-26 14:06:22 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtIcon", test_external_icon);
|
2016-07-03 03:00:33 -07:00
|
|
|
ADD_TEST(NULL, "Edje External", "ExtCombobox", test_external_combobox);
|
2012-09-07 13:16:30 -07:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar", test_toolbar);
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 2", test_toolbar2);
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 3", test_toolbar3);
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 4", test_toolbar4);
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 5", test_toolbar5);
|
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 6", test_toolbar6);
|
2012-02-23 00:22:24 -08:00
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 7", test_toolbar7);
|
2012-03-04 01:52:20 -08:00
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar 8", test_toolbar8);
|
2013-11-12 17:16:33 -08:00
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar Vertical", test_toolbar_vertical);
|
2014-03-23 08:22:32 -07:00
|
|
|
ADD_TEST(NULL, "Toolbars", "Toolbar Focus", test_toolbar_focus);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - List", "List", test_list);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List - Horizontal", test_list_horizontal);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 2", test_list2);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 3", test_list3);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 4", test_list4);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 5", test_list5);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 6", test_list6);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List 7", test_list7);
|
2014-03-09 04:07:13 -07:00
|
|
|
ADD_TEST(NULL, "Lists - List", "List Focus", test_list_focus);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List Focus Horizontal", test_list_horiz_focus);
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - List", "List Separator", test_list_separator);
|
|
|
|
ADD_TEST(NULL, "Lists - List", "List Multi Select", test_list_multi_select);
|
2013-11-05 20:11:23 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist", test_genlist);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist 2", test_genlist2);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist 3", test_genlist3);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist 4", test_genlist4);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist 5", test_genlist5);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist 7", test_genlist7);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Tree", test_genlist6);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Group", test_genlist8);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Group Tree", test_genlist9);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Decorate Item Mode", test_genlist10);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Decorate All Mode", test_genlist15);
|
2015-02-08 17:34:06 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Reorder Mode", test_genlist_reorder);
|
2011-05-25 12:08:38 -07:00
|
|
|
#ifdef HAVE_EIO
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Eio", test_eio);
|
2011-05-25 12:08:38 -07:00
|
|
|
#endif
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Textblock", test_genlist12);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Tree, Insert Sorted", test_genlist13);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Tree, Insert Relative", test_genlist14);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Flip Mode", test_genlist16);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Decorate Modes", test_genlist17);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Tree and Decorate All Mode", test_genlist18);
|
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Full Widget", test_genlist19);
|
2014-05-26 23:53:11 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Item Search By Text", test_genlist20);
|
2014-01-12 08:06:17 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Focus", test_genlist_focus);
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Item Styles", test_genlist_item_styles);
|
2013-11-05 20:11:23 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Multi Select", test_genlist_multi_select);
|
2013-11-13 00:03:49 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Del", test_genlist_del);
|
2015-09-23 04:50:05 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Filter", test_genlist_filter);
|
2016-01-04 14:05:29 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Show/Bring", test_genlist_show_bring);
|
2016-04-24 02:46:45 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Cache", test_genlist_cache);
|
2016-08-09 06:30:07 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Reusable Contents", test_genlist_reusable);
|
2018-05-02 16:16:49 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Genlist", "Genlist Item Show", test_genlist_item_show);
|
2013-11-05 20:11:23 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid", test_gengrid);
|
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid 2", test_gengrid2);
|
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Group", test_gengrid3);
|
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Show/Bring_in", test_gengrid4);
|
2014-07-22 19:35:20 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Search by Text", test_gengrid5);
|
2013-11-05 10:32:50 -08:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Styles", test_gengrid_item_styles);
|
2014-03-17 12:10:33 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "Gengrid Update Speed", test_gengrid_speed);
|
2014-03-22 08:49:41 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Focus", test_gengrid_focus);
|
gengrid: add item cache in gengrid for efficient realize/unrealize operation.
Summary:
gengrid realize/unrealize items each smart calculation if their posiiton is updated.
This concept will be occurred useless view object creation and deletion.
So instead of delete items in unrealize function, push item cache into cache list,
and pop item cache from cache list in realize function to reuse item view object
more efficiently.
the cache concept is already implemented in genlist widget and this patch is improved
item cache of genlist cache.
@feature
```
NOTICE: This patch is written under the D2561 Patch which add elm_gengrid_item_fields_update.
So it must submitted after D2561.
```
Test Plan:
I've tested below three cases,
1. tested ith this patch in elementary_test and checked all gengrid features are working properly.
2. tested with changing CACHE_MAX to another value which is set 40 in default
and checked all gengrid features are working properly.
3. tested with set it->item->nocache true, and checked cache is never generated
and checked all gengrid features are working properly.
Reviewers: raster, Hermet, seoz, jaehwan, singh.amitesh
Subscribers: eagleeye, singh.amitesh, Jaehyun
Differential Revision: https://phab.enlightenment.org/D2641
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 07:28:07 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Update", test_gengrid_update);
|
2016-06-30 19:52:39 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Disabled Item Focus", test_gengrid_disabled_item_focus);
|
2016-10-04 23:36:04 -07:00
|
|
|
ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Custom Size", test_gengrid_item_custom_size);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "General", "Scaling", test_scaling);
|
|
|
|
ADD_TEST(NULL, "General", "Scaling 2", test_scaling2);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "3D", "Evas Map 3D", test_3d);
|
2014-03-25 08:26:46 -07:00
|
|
|
ADD_TEST(NULL, "3D", "GLViewSimple", test_glview_simple);
|
|
|
|
ADD_TEST(NULL, "3D", "GLView Gears", test_glview);
|
|
|
|
ADD_TEST(NULL, "3D", "GLView Many Gears", test_glview_manygears);
|
2017-03-07 18:52:59 -08:00
|
|
|
ADD_TEST(NULL, "3D", "GLView GL ES 3.x", test_glview_gles3);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2013-12-23 04:25:25 -08:00
|
|
|
ADD_TEST(NULL, "Web", "Web", test_web);
|
2013-12-27 05:23:21 -08:00
|
|
|
ADD_TEST(NULL, "Web", "Web UI", test_web_ui);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Input", "Gesture Layer", test_gesture_layer);
|
|
|
|
ADD_TEST(NULL, "Input", "Gesture Layer 2", test_gesture_layer2);
|
2011-12-21 00:47:56 -08:00
|
|
|
ADD_TEST(NULL, "Input", "Gesture Layer 3", test_gesture_layer3);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Input", "Multi Touch", test_multi);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Input", "Gesture", test_gesture_framework);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Selectors", "Index", test_index);
|
|
|
|
ADD_TEST(NULL, "Selectors", "Index 2", test_index2);
|
2015-08-04 06:55:18 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "Index 3", test_index3);
|
2012-11-29 00:39:26 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Index Horizontal", test_index_horizontal);
|
2013-09-02 21:26:16 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "FileSelector", test_fileselector);
|
|
|
|
ADD_TEST(NULL, "Selectors", "FileSelector Entry", test_fileselector_entry);
|
|
|
|
ADD_TEST(NULL, "Selectors", "FileSelector Button", test_fileselector_button);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Actionslider", test_actionslider);
|
|
|
|
ADD_TEST(NULL, "Selectors", "Menu", test_menu);
|
2012-05-13 22:20:19 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "Menu 2", test_menu2);
|
2013-09-02 21:26:16 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "DiskSelector", test_diskselector);
|
|
|
|
ADD_TEST(NULL, "Selectors", "ColorSelector", test_colorselector);
|
2015-04-05 13:02:03 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "Color Classes", test_colorclass);
|
2013-09-02 21:26:16 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "SegmentControl", test_segment_control);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Hoversel", test_hoversel);
|
2013-11-13 03:32:31 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Hoversel Focus", test_hoversel_focus);
|
2013-08-15 21:13:36 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "Radio", test_radio);
|
2013-09-02 21:26:16 -07:00
|
|
|
ADD_TEST(NULL, "Selectors", "FlipSelector", test_flipselector);
|
|
|
|
ADD_TEST(NULL, "Selectors", "DaySelector", test_dayselector);
|
2012-12-27 05:38:33 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Main menu", test_main_menu);
|
combobox: add new widget.
Summary:
Combobox is a combinational widget of a drop-down list and single line entry.
Based on the text entered in the entry, the list items are filtered accordingly.
Signed-Off By: Cedric Bail <cedric.bail@free.fr>
Signed-Off By: Divyesh Purohit <div.purohit@samsung.com>
Test Plan: test_combobox.c is added to elementary test
Reviewers: raster, shilpasingh, cedric, jpeg, stefan_schmidt
Reviewed By: raster, shilpasingh, cedric
Subscribers: SanghyeonLee, shashank0990, singh.amitesh, tasn, raster, seoz, poornima.srinivasan, rajeshps, govi
Differential Revision: https://phab.enlightenment.org/D2537
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:22:46 -08:00
|
|
|
ADD_TEST(NULL, "Selectors", "Combobox", test_combobox);
|
2019-05-29 04:03:37 -07:00
|
|
|
ADD_TEST_EO(NULL, "Selectors", "Efl.Ui.Radio_Box", test_efl_ui_radio);
|
2012-12-27 05:38:33 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Cursors", "Cursor", test_cursor);
|
|
|
|
ADD_TEST(NULL, "Cursors", "Cursor 2", test_cursor2);
|
|
|
|
ADD_TEST(NULL, "Cursors", "Cursor 3", test_cursor3);
|
|
|
|
ADD_TEST(NULL, "Cursors", "Cursor Layout", test_cursor4);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller", test_scroller);
|
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller 2", test_scroller2);
|
2015-05-19 06:00:18 -07:00
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller 3", test_scroller3);
|
2015-09-02 00:16:04 -07:00
|
|
|
ADD_TEST(NULL, "Scroller", "Page Scroller", test_scroller4);
|
2016-06-22 16:55:07 -07:00
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller on Popup", test_scroller5);
|
2018-11-26 08:30:19 -08:00
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller 6", test_scroller6);
|
2018-11-28 05:17:28 -08:00
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller 7", test_scroller7);
|
2019-07-16 10:41:47 -07:00
|
|
|
ADD_TEST(NULL, "Scroller", "Scroller Simple", test_scroller_simple);
|
2017-12-18 04:08:25 -08:00
|
|
|
ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller", test_efl_ui_scroller);
|
2019-07-17 10:59:35 -07:00
|
|
|
ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller Simple", test_efl_ui_scroller_simple);
|
2019-07-17 11:08:41 -07:00
|
|
|
ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller Simple2", test_efl_ui_scroller_simple2);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
// FIXME: add frame test
|
|
|
|
ADD_TEST(NULL, "Boundaries", "Bubble", test_bubble);
|
|
|
|
ADD_TEST(NULL, "Boundaries", "Separator", test_separator);
|
2020-01-17 07:06:52 -08:00
|
|
|
ADD_TEST_EO(NULL, "Boundaries", "Separator", test_ui_separator);
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Range Values", "Spinner", test_spinner);
|
2017-11-27 06:37:17 -08:00
|
|
|
ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin", test_ui_spin);
|
|
|
|
ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin.Button", test_ui_spin_button);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Range Values", "Slider", test_slider);
|
|
|
|
ADD_TEST(NULL, "Range Values", "Progressbar", test_progressbar);
|
2013-09-09 23:47:13 -07:00
|
|
|
ADD_TEST(NULL, "Range Values", "Progressbar 2", test_progressbar2);
|
2018-01-16 22:52:58 -08:00
|
|
|
ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Progressbar", test_ui_progressbar);
|
2017-12-11 20:58:39 -08:00
|
|
|
ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Slider", test_ui_slider);
|
2018-05-14 22:16:00 -07:00
|
|
|
ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Slider_Interval", test_slider_interval);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
2012-03-19 00:27:49 -07:00
|
|
|
ADD_TEST(NULL, "Booleans", "Check", test_check);
|
|
|
|
ADD_TEST(NULL, "Booleans", "Check Toggle", test_check_toggle);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
2018-05-02 05:10:16 -07:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST_EO(NULL, "Tab Pager", "Efl.Ui.Tab_Pager", test_ui_tab_pager);
|
2019-07-04 16:02:43 -07:00
|
|
|
ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Plain", test_ui_spotlight_plain);
|
|
|
|
ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Scroll", test_ui_spotlight_scroll);
|
|
|
|
ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Stack", test_ui_spotlight_stack);
|
2020-02-14 10:02:14 -08:00
|
|
|
ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Custom animation", test_ui_spotlight_animation);
|
2019-07-04 16:02:43 -07:00
|
|
|
ADD_TEST_EO(NULL, "Spotlight", "Navigation stack", test_ui_stack);
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
|
|
|
|
ADD_TEST(NULL, "Popups", "Hover", test_hover);
|
|
|
|
ADD_TEST(NULL, "Popups", "Hover 2", test_hover2);
|
2013-09-23 00:14:56 -07:00
|
|
|
ADD_TEST(NULL, "Popups", "Hover 3", test_hover3);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Popups", "Notify", test_notify);
|
|
|
|
ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip);
|
2012-02-23 05:57:59 -08:00
|
|
|
ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2);
|
2015-02-05 03:02:24 -08:00
|
|
|
ADD_TEST(NULL, "Popups", "Tooltip 3", test_tooltip3);
|
2017-02-27 03:13:06 -08:00
|
|
|
ADD_TEST(NULL, "Popups", "Tooltip 4", test_tooltip4);
|
2012-03-05 15:51:56 -08:00
|
|
|
ADD_TEST(NULL, "Popups", "Popup", test_popup);
|
2017-11-28 18:47:43 -08:00
|
|
|
ADD_TEST_EO(NULL, "Popups", "Efl.Ui.Popup", test_ui_popup);
|
2018-11-16 02:11:50 -08:00
|
|
|
ADD_TEST_EO(NULL, "Popups", "Efl.Ui.Popup.Alert", test_ui_alert_popup);
|
|
|
|
ADD_TEST_EO(NULL, "Popups", "Efl.Ui.Popup.Alert.Scroll", test_ui_scroll_alert_popup);
|
|
|
|
ADD_TEST_EO(NULL, "Popups", "Efl.Ui.Popup.Alert.Text", test_ui_text_alert_popup);
|
|
|
|
ADD_TEST_EO(NULL, "Popups", "Efl.Ui.Popup.Anchor", test_ui_anchor_popup);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar);
|
|
|
|
ADD_TEST(NULL, "Times & Dates", "Calendar 2", test_calendar2);
|
2012-04-24 16:07:36 -07:00
|
|
|
ADD_TEST(NULL, "Times & Dates", "Calendar 3", test_calendar3);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Times & Dates", "Clock", test_clock);
|
2013-12-17 17:42:17 -08:00
|
|
|
ADD_TEST(NULL, "Times & Dates", "Clock Edit", test_clock_edit);
|
|
|
|
ADD_TEST(NULL, "Times & Dates", "Clock Edit 2", test_clock_edit2);
|
|
|
|
ADD_TEST(NULL, "Times & Dates", "Clock Pause", test_clock_pause);
|
2012-03-05 03:07:05 -08:00
|
|
|
ADD_TEST(NULL, "Times & Dates", "Datetime", test_datetime);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Times & Dates", "Efl.Ui.Calendar", test_efl_ui_calendar);
|
|
|
|
ADD_TEST_EO(NULL, "Times & Dates", "Efl.Ui.Clock", test_ui_clock);
|
2018-04-25 00:43:53 -07:00
|
|
|
ADD_TEST_EO(NULL, "Times & Dates", "Efl.Ui.Datepicker", test_ui_datepicker);
|
|
|
|
ADD_TEST_EO(NULL, "Times & Dates", "Efl.Ui.Timepicker", test_ui_timepicker);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Text", "Label", test_label);
|
2015-01-29 16:10:43 -08:00
|
|
|
ADD_TEST(NULL, "Text", "Label Slide", test_label_slide);
|
|
|
|
ADD_TEST(NULL, "Text", "Label Wrap", test_label_wrap);
|
evas_textblock: content fit feature
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
Reviewed By: woohyun
Subscribers: a.srour, #committers, #reviewers, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9280
2019-12-11 21:22:45 -08:00
|
|
|
ADD_TEST(NULL, "Text", "Textblock Fit", test_textblock_fit);
|
evas: font glyphs texture garbage collector
Summary:
Introduce two public APIS
```
#define EVAS_FONT_DATA_CACHE_TEXTURE 0x01
/**
* Set the limit in bytes for memory allocated by font glyphs in evas.
* @param[in] bytes cache size in bytes, pass negative value to ignore the limit.
* @param[in] options for caching, pass 0x1 to set the texture cache (in case of accelerated rendering).
*
* @since 1.24
*/
EAPI void evas_font_data_cache_set(signed long long int byte, int options);
/**
* @}
*/
/**
* Get the limit in bytes for memory allocated by font glyphs in evas.
* @param[in] options for caching, pass 0x1 to get the texture cache (in case of accelerated rendering).
* @return Returns font allocated memory cache limit, if value is negative this means no limit.
* @since 1.24
*/
EAPI signed long long int evas_font_data_cache_get(int options);
```
Test Plan:
elementary_test => Text Memory
You need a tool to observe Video memory allocation.
1- If you have detected Graphics card then use **radiontop** or **nvidia-smi** ).
2- If you have Integrated Graphics card, then you can detect memory allocation on RAM use.
----------------------------------------------
this example allows only 50 MByte Video memory texture allocated by font glyphs
```
#include <Elementary.h>
typedef struct _APP
{
Evas_Object *tb1;
Evas_Object *btnLoad;
} APP;
char *text = "<align=center><color=#4DE0FFFF underline=on underline_color=#4DE0FFFF><a href='tel:1234567890'>1234567890</a></color>😀😁😂🤣😃😄😅😆😉😊😋😎😍😘😗😙😚☺🙂🤗🤔😐😑😶🙄😏😣😥😮🤐😯😪😫😴😌🤓😛😜😝🤤😒😓😔😕🙃🤑😲☹🙁😖😞😟😤😢😭😦😧😨😩😬😰😱😳😵😡😠😇🤠🤡🤥😷🤒🤕🤢🤧☻😈👿👹👺💀☠👻👽👾🤖💩😺😸😹😻😼😽🙀😿😾🙈🙉🙊👦👧👨👩👵👶👼👨⚕️👩⚕️👨🎓👩🎓👨🏫👩🏫👨⚖👩⚖👨🌾👩🌾👨🍳👩🍳👨🔧👩🔧👨🏭👩🏭👨💼👩💼👨🔬👩🔬👨💻👩💻👨🎤👩🎤👨🎨👩🎨👨✈️👩✈️👨🚀👩🚀👨🚒👩🚒👮♂️👮♀️🕵️♂️🕵️♀️💂♂️💂♀️👷♂️👷♀️👳♂️👳♀️👱♂️👱♀️🎅🤶👸🤴👰🤵🤰👲🙍♂️🙍♀️🙎♂️🙎♀️🙅♂️🙅♀️🙆♂️🙆♀️💁♂️💁♀️🙋♂️🙋♀️🙇♂️🙇♀️🤦♂️🤦♀️🤷♂️🤷♀️💆♂️💆♀️💇♂️💇♀️🚶♂️🚶♀️🏃♂️🏃♀️💃🕺👯♂️👯♀️🕴🗣👤👥👫👬👭💏💑👪👨👩👧👨👩👧👦👨👩👦👦👨👩👧👧👨👦👨👦👦👨👧👨👧👦👨👧👧👩👦👩👦👦👩👧👩👧👦👩👧👧💪🤳👈👉☝️👆🖕👇✌🤞🖖🤘👊🖐✋👌👍👎✊👊🤛🤜🤚👋👏✍👐🙌🙏🤝💅👂👃👣👀👁👅👄💋💘❤💓💔💕💖💗💙💚💛💜🖤💝💞💟❣💌💤💢💣💥💦💨💫💬🗨🗯💭🕳👓🕶👔👕👖👗👘👙👚👛👜👝🛍🎒👞👟👠👡👢👑👒🎩🎓⛑📿💄💍💎🐵🐒🦍🐶🐕🐩🐺🦊🐱🐈🦁🐯🐅🐆🐴🐎🦌🦄🐮🐂🐃🐄🐷🐖🐗🐽🐏🐑🐐🐪🐫🐘🦏🐭🐁🐀🐹🐰🐇🐿🦇🐻🐨🐼🐾🦃🐔🐓🐣🐤🐥🐦🐧🕊🦅🦆🦉🐸🐊🐢🦎🐍🐲🐉🐳🐋🐬🐟🐠🐡🦈🐙🐚🦀🦐🦑🦋🐌🐛🐜🐝🐞🕷🕸🦂💐🌸💮🏵🌹🥀🌺🌻🌼🌷⚘🌱🌲🌳🌴🌵🌾🌿☘🍀🍁🍂🍃🍇🍈🍉🍊🍋🍌🍍🍎🍏🍐🍑🍒🍓🍅🥝🥑🍆🥔🥕🌽🌶🥒🍄🥜🌰🍞🥐🥖🥞🧀🍖🍗🥓🍔🍟🍕🌭🌮🌯🥙🥚🍳🥘🍲🥗🍿🍱🍘🍙🍚🍛🍜🍝🍠🍢🍣🍤🍥🍡🍦🍧🍨🍩🍪🎂🍰🍫🍬🍭🍮🍯🍼🥛☕🍵🍶🍾🍷🍸🍹🍺🍻🥂🍽🍴🥄🔪🏺🎃🎄🎆🎇✨🎈🎉🎊🎋🎍🎎🎏🎐🎑🎀🎁🎗🎟🎫🎖🏆🏅🥇🥈🥉⚽️⚾️🏀🏐🏈🏉🎾🎱🎳🏏🏑🏒🏓🏸🥊🥋🥅🎯⛳🏌️♂️🏌️♀️⛸🎣🎽🎿⛷🏂🏄♂️🏄♀️🏇🏊♂️🏊♀️⛹️♂️⛹️♀️🏋️♂️🏋️♀️🚴♂️🚴♀️🚵♂️🚵♀️🏎🏍🤸♂️🤸♀️🤼♂️🤼♀️🤽♂️🤽♀️🤾♂️🤾♀️🤺🤹♂️🤹♀️🎮🕹🎲♠️♥️♦️♣️🃏🀄🎴🌍🌎🌏🌐🗺🏔⛰🌋🗻🏕🏖🏜🏝🏞🏟🏛🏗🏘🏙🏚🏠🏡🏢🏣🏤🏥🏦🏨🏩🏪🏫🏬🏭🏯🏰💒🗼🗽⛪🕌🕍⛩🕋⛲⛺🌁🌃🌄🌅🌆🌇🌉⛼♨️🌌🎠🎡🎢💈🎪🎭🖼🎨🎰🚂🚃🚄🚅🚆🚇🚈🚉🚊🚝🚞🚋🚌🚍🚎🚐🚑🚒🚓🚔🚕🚖🚗🚘🚙🚚🚛⛟🚜🚲🛴🛵🚏🛣🛤⛽🚨🚥🚦🚧🛑⚓⛵🚣♂️🚣♀️🛶🚤🛳⛴🛥🚢✈🛩🛫🛬💺🚁🚟🚠🚡🚀🛰🛎🚪🛌🛏🛋🚽🚿🛀🛁⌛⏳⌚⏰⏱⏲🕰🕛🕧🕐🕜🕑🕝🕒🕞🕓🕟🕔🕠🕕🕡🕖🕢🕗🕣🕘🕤🕙🕥🕚🕦🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜🌡☀️🌝🌞⭐🌟🌠☁️⛅⛈🌤🌥🌦🌧🌨🌩🌪🌫🌬🌀🌈🌂☂️☔⛱⚡❄☃️⛄☄🔥💧🌊🔇🔈🔉🔊📢📣📯🔔🔕🎼🎵🎶🎙🎚🎛🎤🎧📻🎷🎸🎹🎺🎻🥁📱📲☎️📞📟📠🔋🔌💻🖥🖨⌨🖱🖲💽💾💿📀🎥🎞📽🎬📺📷📸📹📼🔍🔎🔬🔭📡🕯💡🔦🏮📔📕📖📗📘📙📚📓📒📃📜📄📰🗞📑🔖🏷💰💴💵💶💷💸💳💱💲✉📧📨📩📤📥📦📫📪📬📭📮🗳✏✒🖋🖊🖌🖍📝💼📁📂🗂📅📆🗒🗓📇📈📉📊📋📌📍📎🖇📏📐✂️🗃🗄🗑🔒🔓🔏🔐🔑🗝🔨⛏⚒🛠🗡⚔🔫🏹🛡🔧🔩⚙🗜⚗⚖🔗⛓💉💊🚬⚰⚱🗿🛢🔮🔮🏧🚮🚰♿🚹🚺🚻🚼🚾🛂🛃🛄🛅⚠️🚸⛔🚫🚳🚭🚯🚱🚷📵🔞☢☣⬆️↗️➡️↘️⬇️↙️⬅️↖️↕️↔️↩↪⤴️⤵️🔃🔄🔙🔚🔛🔜🔝🛐⚛🕉✡☸☯️☦☮🕎🔯♈♉♊♋♌♍♎♏♐♑♒♓⛎🔀🔁🔂▶️⏩⏭⏯◀️⏪⏮🔼⏫🔽⏬⏸⏹⏺⏏🎦🔅🔆📶📳📴♻️📛⚜🔰🔱⭕✅☑✔✖❌❎➕♀️♂️⚕➖➗➰➿〽✳✴❇⁉️❓❔❕❗〰🔟💯🔠🔡🔢🔣🔤🅰️🆎️🅱️🆑️🆒️🆓️ℹ🆔️Ⓜ️🆕️🆖️🅾️🆗️🅿️🆘️🆙️🆚️🈁🈂🈷🈶🈯🉐🈹🈚🈲🉑🈸🈴🈳㊗㊙🈺🈵▫️◻◼◽◾⬛⬜🔶️🔷️🔸️🔹️🔺️🔻💠🔘🔲🔳⚪⚫🔴🔵🏁🚩🏴🏳🏳️🌈⚀⚁⚂⚃⚄⚅⛾♾🇦🇨🇦🇩🇦🇪🇦🇫🇦🇬🇦🇮🇦🇱🇦🇲🇦🇴🇦🇶🇦🇷🇦🇸🇦🇹🇦🇺🇦🇼🇦🇽🇦🇿🇧🇦🇧🇧🇧🇩🇧🇪🇧🇫🇧🇬🇧🇭🇧🇮🇧🇯🇧🇱🇧🇲🇧🇳🇧🇴🇧🇶🇧🇷🇧🇸🇧🇹🇧🇼🇧🇾🇧🇿🇨🇦🇨🇨🇨🇩🇨🇫🇨🇬🇨🇭🇨🇮🇨🇰🇨🇱🇨🇲🇨🇳🇨🇴🇨🇷🇨🇺🇨🇻🇨🇼🇨🇽🇨🇾🇨🇿🇩🇪🇩🇯🇩🇰🇩🇲🇩🇴🇩🇿🇪🇨🇪🇪🇪🇬🇪🇭🇪🇷🇪🇸🇪🇹🇪🇺🇫🇮🇫🇯🇫🇰🇫🇲🇫🇴🇫🇷🇬🇦🇬🇧🇬🇩🇬🇪🇬🇫🇬🇬🇬🇭🇬🇮🇬🇱🇬🇲🇬🇳🇬🇵🇬🇶🇬🇷🇬🇸🇬🇹🇬🇺🇬🇼🇬🇾🇭🇰🇭🇲🇭🇳🇭🇷🇭🇹🇭🇺🇮🇨🇮🇩🇮🇪🇮🇱🇮🇲🇮🇳🇮🇴🇮🇶🇮🇷🇮🇸🇮🇹🇯🇪🇯🇲🇯🇴🇯🇵🇰🇪🇰🇬🇰🇭🇰🇮🇰🇲🇰🇳🇰🇵🇰🇷🇰🇼🇰🇾🇰🇿🇱🇦🇱🇧🇱🇨🇱🇮🇱🇰🇱🇷🇱🇸🇱🇹🇱🇺🇱🇻🇱🇾🇲🇦🇲🇨🇲🇩🇲🇪🇲🇬🇲🇭🇲🇰🇲🇱🇲🇲🇲🇳🇲🇴🇲🇵🇲🇶🇲🇷🇲🇸🇲🇹🇲🇺🇲🇻🇲🇼🇲🇽🇲🇾🇲🇿🇳🇦🇳🇨🇳🇪🇳🇫🇳🇬🇳🇮🇳🇱🇳🇴🇳🇵🇳🇷🇳🇺🇳🇿🇴🇲🇵🇦🇵🇪🇵🇫🇵🇬🇵🇭🇵🇰🇵🇱🇵🇲🇵🇳🇵🇷🇵🇸🇵🇹🇵🇼🇵🇾🇶🇦🇷🇪🇷🇴🇷🇸🇷🇺🇷🇼🇸🇦🇸🇧🇸🇨🇸🇩🇸🇪🇸🇬🇸🇭🇸🇮🇸🇰🇸🇱🇸🇲🇸🇳🇸🇴🇸🇷🇸🇸🇸🇹🇸🇻🇸🇽🇸🇾🇸🇿🇹🇦🇹🇨🇹🇩🇹🇫🇹🇬🇹🇭🇹🇯🇹🇰🇹🇱🇹🇲🇹🇳🇹🇴🇹🇷🇹🇹🇹🇻🇹🇼🇹🇿🇺🇦🇺🇬🇺🇳🇺🇸🇺🇾🇺🇿🇻🇦🇻🇨🇻🇪🇻🇬🇻🇮🇻🇳🇻🇺🇼🇫🇼🇸🇽🇰🇾🇪🇾🇹🇿🇦🇿🇲🇿🇼8<br/><br/><br/><br/>Sent from my Samsung Galaxy smartphone.</align>";
int font_size = 200;
int counter = 0;
void _button_clicked(void *data, Evas_Object *obj, void *event_info)
{
APP *app = data;
font_size -= 5;
Evas_Textblock_Style *style = evas_textblock_style_new();
char buffer[100] = {0};
sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
evas_textblock_style_set(style, buffer);
evas_object_textblock_style_set(app->tb1, style);
evas_textblock_style_free(style);
style = NULL;
}
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
APP *app = calloc(1, sizeof(APP));
Evas_Object *win, *scroller1, *scroller2, *box;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_util_standard_add("", "");
elm_win_autodel_set(win, EINA_TRUE);
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
scroller1 = elm_scroller_add(win);
evas_object_size_hint_weight_set(scroller1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(scroller1, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_font_data_cache_set(50 * 1024* 1024, EVAS_FONT_DATA_CACHE_TEXTURE );
app->tb1 = evas_object_textblock_add(win);
Evas_Textblock_Style *style = evas_textblock_style_new();
char buffer[100] = {0};
sprintf(buffer, "DEFAULT='font=NotoColorEmoji font_size=%i color=red ellipsis=-1.0 wrap=mixed'", font_size);
evas_textblock_style_set(style, buffer);
evas_object_textblock_style_set(app->tb1, style);
evas_textblock_style_free(style);
style = NULL;
evas_font_cache_set(evas_object_evas_get(app->tb1), 0);
int w,h;
evas_object_textblock_text_markup_set(app->tb1, "");
evas_object_size_hint_min_set(app->tb1, 400, 400);
elm_object_content_set(scroller1, app->tb1);
elm_box_pack_end(box, scroller1);
elm_object_content_set(win, box);
app->btnLoad = elm_button_add(win);
elm_object_text_set(app->btnLoad, "Scale Font");
evas_object_smart_callback_add(app->btnLoad, "clicked", _button_clicked, app);
evas_object_show(app->btnLoad);
evas_object_move(app->btnLoad, 0, 20);
evas_object_resize(app->btnLoad, 150, 20);
evas_object_textblock_text_markup_set(app->tb1, text);
evas_object_textblock_size_formatted_get(app->tb1, &w, &h);
evas_object_size_hint_min_set(app->tb1, 400, w/400 + h + 150);
evas_object_resize(win, 400, 400);
evas_object_show(box);
evas_object_show(scroller1);
evas_object_show(scroller2);
evas_object_show(win);
elm_run();
return 0;
}
ELM_MAIN()
```
Reviewers: raster, woohyun, zmike, cedric, bu5hm4n, Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8737
Differential Revision: https://phab.enlightenment.org/D11943
2020-07-24 02:36:27 -07:00
|
|
|
ADD_TEST(NULL, "Text", "Text Memory", test_text_memory);
|
2015-09-02 12:51:46 -07:00
|
|
|
ADD_TEST(NULL, "Text", "Label Ellipsis", test_label_ellipsis);
|
evas_common_format_color_parse: support color names
Summary:
efl user can now specify colors by there names ( not only Hex RGB/RGBA values), which is very convenient specially for first time users (where user may think it is supported by default)
<color=#FF0000> == <color=red> == <color==RED>
there are two main types of color names and values ( X11, web colors), here we are using X11 color.
============
Update for documentation pages should be added like:
https://www.enlightenment.org/_legacy_embed/evas_textblock_style_page.html#evas_textblock_style_color
I do not know how to update it :(
Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
efl_exit(0);
}
static void
_gui_setup()
{
Eo *win, *box;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Hello World"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_markup_set(efl_added,
"<color=red>this is red color line(color = red)<color><br>"
"<color=#0000FF>this is blue color line (color = #0000FF)<color><br>"
"<color=gray>this is gray color line (color = gray)<color><br>"),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.9),
efl_gfx_hint_align_set(efl_added, 0.5, 0.5),
efl_text_multiline_set(efl_added,EINA_TRUE),
efl_pack(box, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, box,
efl_text_set(efl_added, "Quit"),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
efl_pack(box, efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
_gui_quit_cb, efl_added));
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()
```
Reviewers: woohyun, bowonryu, segfaultxavi, vtorri
Reviewed By: segfaultxavi, vtorri
Subscribers: vtorri, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9153
2019-06-25 10:20:02 -07:00
|
|
|
ADD_TEST(NULL, "Text", "Label Colors", test_label_colors);
|
2017-03-08 02:19:36 -08:00
|
|
|
ADD_TEST(NULL, "Text", "Label Emoji", test_label_emoji);
|
2020-07-16 01:59:22 -07:00
|
|
|
ADD_TEST(NULL, "Text", "Label Variation Sequence", test_label_variation_sequence);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Text", "Efl.Ui.Textpath", test_ui_textpath);
|
2019-12-11 09:09:56 -08:00
|
|
|
ADD_TEST_EO(NULL, "Text", "Efl.Canvas.Textblock style", test_canvas_textblock);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Stored Surface Buffer", "Launcher", test_launcher);
|
|
|
|
ADD_TEST(NULL, "Stored Surface Buffer", "Launcher 2", test_launcher2);
|
|
|
|
ADD_TEST(NULL, "Stored Surface Buffer", "Launcher 3", test_launcher3);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Focus", "Focus", test_focus);
|
|
|
|
ADD_TEST(NULL, "Focus", "Focus 2", test_focus2);
|
2014-02-02 08:24:11 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus Hide/Del", test_focus_hide_del);
|
|
|
|
ADD_TEST(NULL, "Focus", "Focus Custom Chain", test_focus_custom_chain);
|
|
|
|
ADD_TEST(NULL, "Focus", "Focus Style", test_focus_style);
|
2014-02-03 00:44:16 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus On Part", test_focus_part);
|
2014-02-04 03:29:29 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus 3", test_focus3);
|
2014-02-05 02:17:41 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus Object Style", test_focus_object_style);
|
2015-06-01 21:42:00 -07:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus Object Policy", test_focus_object_policy);
|
2016-12-16 15:25:18 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus 4", test_focus4);
|
2017-12-10 11:35:42 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus 5", test_focus5);
|
2018-01-05 09:22:53 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus 6", test_focus6);
|
2018-12-03 02:46:48 -08:00
|
|
|
ADD_TEST(NULL, "Focus", "Focus 7", test_focus7);
|
2014-02-05 02:17:41 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2012-03-29 13:31:35 -07:00
|
|
|
ADD_TEST(NULL, "Naviframe", "Naviframe", test_naviframe);
|
naviframe improvements:
- fixed theme to look less like an arse:
- overlap theme is translucent
- naviframe title visibility toggle is now animated
- item pop/push animation now applies to title area as well
- icon without title label is now centered (see Naviframe 2 test)
- title label and subtitle are now centered among the free space, should not overlap buttons anymore.
- title will use a font-size range, trying to not overlap buttons anymore.
- title will use ellipsis, trying to not overlap buttons anymore.
- prev/next buttons do not have a fixed min/max size anymore
- emit signals elm,state,title_label,show and elm,state,title_label,hide
- by default the previous button label is the title of the previous page
however by using a regular elm_button with an icon and long label
exposes a bug with button theme. And there is a conceptual issue: if
the previous button label is too big, it will look horrible. We should
have a maximum size that, if reached, should have ellipsis. This
should be a different elm_button style, with
elm/button/base/naviframe/back_btn/default being an alias to it.
SVN revision: 74403
2012-07-25 14:08:53 -07:00
|
|
|
ADD_TEST(NULL, "Naviframe", "Naviframe 2", test_naviframe2);
|
2015-05-05 09:13:12 -07:00
|
|
|
ADD_TEST(NULL, "Naviframe", "Naviframe 3", test_naviframe3);
|
2012-03-29 13:31:35 -07:00
|
|
|
ADD_TEST(NULL, "Naviframe", "Naviframe: Complex", test_naviframe_complex);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Dividers", "Panel", test_panel);
|
2014-07-06 23:08:45 -07:00
|
|
|
ADD_TEST(NULL, "Dividers", "Panel Scrollable", test_panel2);
|
2011-11-09 04:06:12 -08:00
|
|
|
ADD_TEST(NULL, "Dividers", "Panes", test_panes);
|
2019-04-12 05:40:04 -07:00
|
|
|
ADD_TEST(NULL, "Dividers", "Panes Flush", test_panes_flush);
|
|
|
|
ADD_TEST(NULL, "Dividers", "Panes Left Fold", test_panes_left_fold);
|
|
|
|
ADD_TEST(NULL, "Dividers", "Panes Right Fold", test_panes_right_fold);
|
|
|
|
ADD_TEST(NULL, "Dividers", "Panes Up Fold", test_panes_up_fold);
|
|
|
|
ADD_TEST(NULL, "Dividers", "Panes Down Fold", test_panes_down_fold);
|
2017-11-20 03:07:33 -08:00
|
|
|
ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panes", test_panes_minsize);
|
2018-12-19 18:32:28 -08:00
|
|
|
ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel", test_ui_panel);
|
|
|
|
ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel Scrollable", test_ui_panel2);
|
2017-11-20 03:07:33 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Standardization", "Conformant", test_conformant);
|
|
|
|
ADD_TEST(NULL, "Standardization", "Conformant 2", test_conformant2);
|
2012-11-15 02:43:26 -08:00
|
|
|
ADD_TEST(NULL, "Standardization", "Conformant indicator", test_conformant_indicator);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Helpers", "Store", test_store);
|
2012-03-05 05:13:26 -08:00
|
|
|
// ADD_TEST(NULL, "Helpers", "Factory", test_factory);
|
2011-11-30 09:44:00 -08:00
|
|
|
|
2012-12-05 14:24:00 -08:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "System", "Notification", test_sys_notify);
|
2012-12-27 05:38:40 -08:00
|
|
|
ADD_TEST(NULL, "System", "Systray Item", test_systray);
|
2012-12-05 14:24:00 -08:00
|
|
|
|
2013-03-16 23:36:30 -07:00
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Drag & Drop", "Genlist DnD Dflt Anim", test_dnd_genlist_default_anim);
|
|
|
|
ADD_TEST(NULL, "Drag & Drop", "Genlist DnD User Anim", test_dnd_genlist_user_anim);
|
|
|
|
ADD_TEST(NULL, "Drag & Drop", "Genlist-Gengrid DnD", test_dnd_genlist_gengrid);
|
2013-11-28 06:04:08 -08:00
|
|
|
ADD_TEST(NULL, "Drag & Drop", "Features DnD", test_dnd_multi_features);
|
2014-03-13 06:08:08 -07:00
|
|
|
ADD_TEST(NULL, "Drag & Drop", "Types DnD", test_dnd_types);
|
2013-03-16 23:36:30 -07:00
|
|
|
|
2011-11-09 04:06:12 -08:00
|
|
|
//------------------------------//
|
2013-04-10 13:14:21 -07:00
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Copy And Paste", test_cnp);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Weather", test_weather);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Icon Desktops", test_icon_desktops);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Floating Objects", test_floating);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Configuration", test_config);
|
2013-12-14 13:59:45 -08:00
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Accessibility", test_access);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Accessibility2", test_access2);
|
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Accessibility3", test_access3);
|
2016-07-10 21:13:38 -07:00
|
|
|
ADD_TEST(NULL, "Miscellaneous", "Font overlay", test_config_font_overlay);
|
2016-12-16 01:59:05 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
|
|
|
ADD_TEST(NULL, "Evas", "Masking", test_evas_mask);
|
2017-06-11 13:25:39 -07:00
|
|
|
ADD_TEST(NULL, "Evas", "Gfx Filters", test_gfx_filters);
|
2017-02-09 22:26:53 -08:00
|
|
|
ADD_TEST(NULL, "Evas", "Snapshot", test_evas_snapshot);
|
2017-06-07 23:11:21 -07:00
|
|
|
ADD_TEST(NULL, "Evas", "Map", test_evas_map);
|
2019-02-20 12:32:41 -08:00
|
|
|
ADD_TEST_EO(NULL, "Evas", "Efl.Gfx.Mapping", test_efl_gfx_mapping);
|
2011-11-09 04:06:12 -08:00
|
|
|
|
2013-08-16 14:18:07 -07:00
|
|
|
//------------------------------//
|
2015-01-07 23:06:34 -08:00
|
|
|
ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable);
|
|
|
|
ADD_TEST(NULL, "Widgets Disable/Enable", "Layout", test_layout_disable);
|
2017-11-23 21:41:31 -08:00
|
|
|
|
|
|
|
//------------------------------//
|
2017-11-23 22:17:05 -08:00
|
|
|
ADD_TEST_EO(NULL, "Widgets Part", "Part Background", test_part_background);
|
2017-12-14 01:03:21 -08:00
|
|
|
ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow);
|
2019-08-21 01:53:14 -07:00
|
|
|
|
|
|
|
//------------------------------//
|
2019-12-31 06:53:16 -08:00
|
|
|
ADD_TEST_EO(NULL, "Vector Animation", "Vector Graphics Animation", test_efl_ui_vg_animation);
|
2019-10-01 22:32:33 -07:00
|
|
|
ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider);
|
2019-08-21 01:53:14 -07:00
|
|
|
|
2010-03-15 19:15:37 -07:00
|
|
|
#undef ADD_TEST
|
|
|
|
|
2010-09-08 16:04:49 -07:00
|
|
|
if (autorun)
|
|
|
|
{
|
2013-07-05 23:10:50 -07:00
|
|
|
char *tmp = _space_removed_string_get(autorun);
|
2010-09-08 16:04:49 -07:00
|
|
|
EINA_LIST_FOREACH(tests, l, t)
|
2011-11-23 19:22:32 -08:00
|
|
|
{
|
2013-07-05 23:10:50 -07:00
|
|
|
char *name;
|
|
|
|
|
|
|
|
if (!t->name || !t->cb) continue;
|
|
|
|
|
|
|
|
name = _space_removed_string_get(t->name);
|
|
|
|
if (!strcasecmp(name, tmp))
|
2011-11-23 19:22:32 -08:00
|
|
|
{
|
|
|
|
t->cb(NULL, NULL, NULL);
|
2013-07-05 23:10:50 -07:00
|
|
|
free(name);
|
2011-11-23 19:22:32 -08:00
|
|
|
break;
|
|
|
|
}
|
2013-07-05 23:10:50 -07:00
|
|
|
free(name);
|
2011-11-23 19:22:32 -08:00
|
|
|
}
|
2013-07-05 23:10:50 -07:00
|
|
|
free(tmp);
|
2011-08-26 00:40:51 -07:00
|
|
|
|
2013-07-05 23:10:50 -07:00
|
|
|
if (!l)
|
|
|
|
ERR("'%s' is not valid test case name\n", autorun);
|
2010-09-08 16:04:49 -07:00
|
|
|
}
|
2012-01-03 20:52:30 -08:00
|
|
|
tt = t;
|
2011-08-28 21:00:17 -07:00
|
|
|
|
2012-02-23 05:57:54 -08:00
|
|
|
if (test_win_only)
|
|
|
|
{
|
|
|
|
EINA_LIST_FREE(tests, t)
|
2012-04-03 07:26:17 -07:00
|
|
|
free(t);
|
2012-02-23 05:57:54 -08:00
|
|
|
|
2013-07-05 23:10:50 -07:00
|
|
|
if (!l)
|
2017-10-17 10:38:24 -07:00
|
|
|
efl_exit(0);
|
2013-07-05 23:10:50 -07:00
|
|
|
|
2012-02-23 05:57:54 -08:00
|
|
|
return;
|
|
|
|
}
|
2010-09-08 16:04:49 -07:00
|
|
|
|
2010-03-15 19:15:37 -07:00
|
|
|
if (tests)
|
2019-07-24 10:16:58 -07:00
|
|
|
{
|
|
|
|
_menu_create(NULL);
|
|
|
|
ecore_event_handler_add(ECORE_EVENT_KEY_UP, (Ecore_Event_Handler_Cb)_my_win_key_up, NULL);
|
|
|
|
}
|
2009-07-06 23:46:51 -07:00
|
|
|
|
2012-08-16 14:34:11 -07:00
|
|
|
/* bring in autorun frame */
|
|
|
|
if (autorun)
|
2012-01-03 20:52:30 -08:00
|
|
|
{
|
2012-08-16 14:34:11 -07:00
|
|
|
Evas_Coord x, y;
|
|
|
|
evas_object_geometry_get(tt, &x, &y, NULL, NULL);
|
|
|
|
elm_scroller_region_bring_in(sc, x, y, 0, 0);
|
2012-01-03 20:52:30 -08:00
|
|
|
}
|
2013-12-14 12:45:57 -08:00
|
|
|
|
|
|
|
/* set an initial window size */
|
2020-01-19 02:51:29 -08:00
|
|
|
evas_object_resize(win, 480 * elm_config_scale_get(), 490 * elm_config_scale_get());
|
2013-12-14 12:45:57 -08:00
|
|
|
evas_object_show(win);
|
2008-09-29 23:58:56 -07:00
|
|
|
}
|
|
|
|
|
2015-04-06 12:33:50 -07:00
|
|
|
static char *
|
|
|
|
colorclass_tl_cb(char *str)
|
|
|
|
{
|
|
|
|
/* FIXME: translate? */
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_List *
|
|
|
|
colorclass_list_cb(void)
|
|
|
|
{
|
|
|
|
Eina_List *l, *ret = NULL;
|
|
|
|
Eina_Iterator *it;
|
|
|
|
Eina_File *f;
|
|
|
|
|
|
|
|
it = edje_file_iterator_new();
|
|
|
|
if (!it) return NULL;
|
|
|
|
EINA_ITERATOR_FOREACH(it, f)
|
|
|
|
{
|
|
|
|
l = elm_color_class_util_edje_file_list(f);
|
|
|
|
if (l)
|
|
|
|
ret = eina_list_merge(ret, l);
|
|
|
|
}
|
|
|
|
eina_iterator_free(it);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2016-06-24 15:32:21 -07:00
|
|
|
static void
|
|
|
|
_main_loop_death(void *data EINA_UNUSED,
|
2016-08-30 05:34:10 -07:00
|
|
|
const Efl_Event *ev EINA_UNUSED)
|
2016-06-24 15:32:21 -07:00
|
|
|
{
|
|
|
|
struct elm_test *t;
|
|
|
|
|
|
|
|
EINA_LIST_FREE(tests, t)
|
|
|
|
free(t);
|
|
|
|
|
|
|
|
eina_log_domain_unregister(_log_domain);
|
|
|
|
}
|
|
|
|
|
2011-02-27 16:14:11 -08:00
|
|
|
/* this is your elementary main function - it MUST be called IMMEDIATELY
|
|
|
|
* after elm_init() and MUST be passed argc and argv, and MUST be called
|
2016-06-24 15:32:21 -07:00
|
|
|
* efl_main and not be static - must be a visible symbol with EAPI_MAIN infront */
|
|
|
|
EAPI_MAIN void
|
|
|
|
efl_main(void *data EINA_UNUSED,
|
2016-08-30 05:34:10 -07:00
|
|
|
const Efl_Event *ev)
|
2008-12-18 00:12:27 -08:00
|
|
|
{
|
2016-06-24 15:32:21 -07:00
|
|
|
Efl_Loop_Arguments *arge = ev->info;
|
2011-07-11 07:46:16 -07:00
|
|
|
Eina_Bool test_win_only = EINA_FALSE;
|
2020-06-02 20:15:05 -07:00
|
|
|
Eina_Bool autoclose = EINA_FALSE;
|
2010-09-08 16:04:49 -07:00
|
|
|
char *autorun = NULL;
|
|
|
|
|
2016-07-06 15:52:05 -07:00
|
|
|
if (arge->initialization)
|
|
|
|
{
|
|
|
|
_log_domain = eina_log_domain_register("elementary_test", NULL);
|
|
|
|
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(ev->object, EFL_EVENT_DEL, _main_loop_death, NULL);
|
2013-04-16 22:16:47 -07:00
|
|
|
|
2016-07-06 15:52:05 -07:00
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
2016-06-24 15:32:21 -07:00
|
|
|
|
2016-07-06 15:52:05 -07:00
|
|
|
/* tell elm about our app so it can figure out where to get files */
|
|
|
|
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
|
|
|
|
elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
|
|
|
|
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
|
|
|
|
elm_app_info_set(efl_main, "elementary", "images/logo.png");
|
2011-09-29 13:58:22 -07:00
|
|
|
|
2016-07-06 15:52:05 -07:00
|
|
|
elm_color_class_translate_cb_set(colorclass_tl_cb);
|
|
|
|
elm_color_class_list_cb_set(colorclass_list_cb);
|
|
|
|
|
|
|
|
/* put here any init specific to this app like parsing args etc. */
|
|
|
|
}
|
2011-04-28 08:10:25 -07:00
|
|
|
|
2010-09-08 16:04:49 -07:00
|
|
|
/* if called with a single argument try to autorun a test with
|
|
|
|
* the same name as the given param
|
|
|
|
* ex: elementary_test "Box Vert 2" */
|
2019-07-24 09:44:31 -07:00
|
|
|
if (eina_array_count(arge->argv) >= 2)
|
2014-10-30 01:00:22 -07:00
|
|
|
{
|
2019-07-24 09:44:31 -07:00
|
|
|
unsigned int i;
|
|
|
|
for (i = 1; i < eina_array_count(arge->argv); i++)
|
2014-10-30 01:00:22 -07:00
|
|
|
{
|
2019-07-24 09:44:31 -07:00
|
|
|
char *arg = eina_array_data_get(arge->argv, i);
|
|
|
|
if ((!strcmp(arg, "--help")) ||
|
|
|
|
(!strcmp(arg, "-help")) ||
|
|
|
|
(!strcmp(arg, "-h")))
|
|
|
|
{
|
|
|
|
efl_loop_quit(ev->object,
|
|
|
|
eina_value_string_init("Usages:\n"
|
|
|
|
"$ elementary_test\n"
|
|
|
|
"$ elementary_test --test-win-only [TEST_NAME]\n"
|
|
|
|
"$ elementary_test -to [TEST_NAME]\n\n"
|
2020-06-02 20:15:05 -07:00
|
|
|
"$ elementary_test --autoclose\n\n"
|
2019-07-24 09:44:31 -07:00
|
|
|
"Examples:\n"
|
|
|
|
"$ elementary_test -to Button\n\n"));
|
|
|
|
return ;
|
|
|
|
}
|
|
|
|
/* Just a workaround to make the shot module more
|
|
|
|
* useful with elementary test. */
|
|
|
|
if ((!strcmp(arg, "--test-win-only")) ||
|
|
|
|
(!strcmp(arg, "-to")))
|
|
|
|
{
|
|
|
|
test_win_only = EINA_TRUE;
|
|
|
|
}
|
2019-07-24 13:19:26 -07:00
|
|
|
else if (eina_streq(arg, "--all") || eina_streq(arg, "-a"))
|
|
|
|
all_tests = EINA_TRUE;
|
2020-06-02 20:15:05 -07:00
|
|
|
else if (eina_streq(arg, "--autoclose"))
|
|
|
|
autoclose = EINA_TRUE;
|
2019-07-24 09:44:31 -07:00
|
|
|
else if ((i == eina_array_count(arge->argv) - 1) && (arg[0] != '-'))
|
|
|
|
autorun = arg;
|
|
|
|
|
2014-10-30 01:00:22 -07:00
|
|
|
}
|
|
|
|
}
|
2018-03-10 05:47:12 -08:00
|
|
|
else if (eina_array_count(arge->argv) == 3)
|
2011-07-11 07:46:16 -07:00
|
|
|
{
|
|
|
|
}
|
2010-09-08 16:04:49 -07:00
|
|
|
|
2020-06-02 20:15:05 -07:00
|
|
|
my_win_main(autorun, test_win_only, autoclose); /* create main window */
|
2015-10-15 06:02:56 -07:00
|
|
|
|
2016-06-24 15:32:21 -07:00
|
|
|
/* FIXME: Hum, no exit code anywhere anymore ? */
|
2008-12-18 00:12:27 -08:00
|
|
|
}
|
2011-02-27 16:14:11 -08:00
|
|
|
/* all elementary apps should use this. but it should be placed right after
|
2016-06-24 15:32:21 -07:00
|
|
|
* efl_main() */
|
|
|
|
EFL_MAIN()
|