Commit Graph

29 Commits

Author SHA1 Message Date
Marcel Hollerbach 1e73201169 efl_ui_spin: add tests for basic spin features
this tests for the correct event emission. And checks the wheel
interaction.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9221
2019-07-08 19:56:32 +02:00
Cedric BAIL 47c5736ef9 elementary: rename Activew_View to Spotlight.
View is something that is expected in the context of MVVM, so using it somewhere else is
going to lead to some confusion. Spotlight does descrive the objective of all of this
widget in actually a more explicit way as they all give the spotlight to one sub widget
at a time.

I have also renamed the View_Manager to be just Manager as the View there wasn't useful.
2019-07-05 19:18:22 +02:00
Xavi Artigas 8a0cad6435 Efl.Ui.Progressbar: Add explicit display control of progress label
Summary:
Add a property (show_progress_label) to allow controlling whether the progress
label displaying the exact progress is shown or not.
This was possible in Legacy but the functionality was lost in Unified.

Updated elementary_test to showcase this property, and also the other label
formatting options, which where not tested anywhere.

Added a simple progressbar unit test. It only checks that retrieved value is the
same as the set value, so it is more of a placeholder for future tests.

**This is needed by a future patch which will introduce more formatting options that clash with the current implementation.**
The presence of a formatting function was used to decide if the progress label was shown or not. This explicit property simplifies things.

Test Plan:
Everything builds and passes tests.
`elementary_test -to Efl.Ui.Progressbar` should show a few more bars with different formatting labels, and a checkbox to toggle rendering of one of them.

Reviewers: bu5hm4n, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9202
2019-07-03 08:34:03 +02:00
Mike Blumenkrantz 39833fe168 tests/efl_ui: add suite_helpers.h to efl_ui_suite.h
no need to manually include this for every file

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9187
2019-06-27 09:45:11 +02:00
Marcel Hollerbach 1e86c2bf93 efl_ui_win: repair scene event emission
It appears that EVAS_CALLBACK_FOCUS_IN / OUT is wrong here, as this is
for when a object gets focus but not the scene.

However, the inital event emission still does not work correctly, this
needs some further investigation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9138
2019-06-20 17:14:57 +02:00
Marcel Hollerbach c9177a9f8d Introduce Efl.Ui.Radio_Group & Efl.Ui.Radio_Box
Radio_Group is a interface that manages that radio groups can be grouped inside a
external object, the current API of radio was considered confusing in
that regard. It is implemented in the Radio_Group_Internal class which
is private to EFL, a instance of it can be found with get due to the
class function in efl_ui_radio.eo. This architecture was taken like
this, in order to have implementation and interface seperated. With
those two seperated we can inherit from regular widgets, implement the
interface, and composite attach the internal object to the regular
widget. This makes a lot of things easier.

Radio_Box is a class which is extending Efl.Ui.Box, which has an
internal Radio_Group. This is extremly usefull for cases where you just
want to have a list of radio buttons in your UI. The radio group is also
exposed using composition to the internal object. Simular things can be
done for the table.

For now i did not add API to find the group of a radio button. However,
this can be quickly added if requested.

ref T7867

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9058
2019-06-20 16:02:00 +02:00
Marcel Hollerbach 3a5f506b0e efl_ui_check: make it undependend of nstate
Summary:
check can only display 2 states, and is only designed to do so.
Additionally, nstate inherits from button, which
brings in autorepeat, which is hileriously broken on check and cannot
really work.

Right now there is not even support in the theme for clickable. So its a
good idea to get rid of this for now IMO.

ref T7865

Reviewers: stefan_schmidt, zmike, segfaultxavi, akanad, YOhoho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7865, T7867

Differential Revision: https://phab.enlightenment.org/D9018
2019-06-13 09:21:38 -04:00
Marcel Hollerbach 79fe0121ee efl_ui_active_view: introduce a experimental new widget
this widget tries to replace efl.ui.stack efl.ui.flip & efl.ui.pager
In general those widgets do the same thing, they get content. And
display them with some sort of animations. The new idea here is, that
the basic widget active_view only handles the ownership etc. of the
content that gets added to this. Then there is a view_manager object. The
view_manager object gets notified over the new contents, and requests for
displaying particular contents. The transition then handles those
things.

The version here is feature complete with Efl.Ui.Stack and Efl.Ui.Pager.
Additional features can be implemented in the corresponsing transition
classes. Examples and tests will follow

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8784
2019-05-30 11:48:16 +02:00
Hosang Kim 55751f1204 evas_callbacks: fix emission of EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED
Summary:
When I add "efl_event_callback_add(btn, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _cb, NULL)",
_cb is not called. Because of callback_mask is not set correctly.

Test Plan: unit test

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8528
2019-04-03 09:32:21 -04:00
Yeongjong Lee 77f2782d29 ui.box_stack: refactor layout_update
Summary:
This patch remove evas_box function from Efl.Ui.Box_Stack and add unit test.

Depends on D8214

Test Plan:
1. make check
2. elementary_test -to 'efl.ui.box_stack'

Reviewers: zmike, Jaehyun_Cho, cedric

Reviewed By: zmike, Jaehyun_Cho, cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8094
2019-03-20 10:37:42 -04:00
Yeongjong Lee fbc7c31b33 ui.box_flow: refactor layout_update
Summary:
This patch remove evas_box function from Efl.Ui.Box_Flow and add unit test.
Depends on D8214

Test Plan:
1. make check
2. `elementary_test -to 'efl.ui.box'` with 'flow' checkbox.

Reviewers: zmike, Jaehyun_Cho

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8219
2019-03-08 08:22:08 -05:00
Yeongjong Lee e4e5b5a349 test/ui_table: add unittest for Efl.Ui.Table
Summary:
{F3627728}
{F3627729}
ref T5487

Depends on D7892

Test Plan: make check

Reviewers: jpeg, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7840
2019-02-27 14:45:34 -05:00
Marcel Hollerbach aef19e9017 efl_ui_widget: introduce a new API
Summary:
this new API can be used to get a easy to use iterator, to iterate
through all the children of a specific widget.

ref T7553

Reviewers: stefan_schmidt, zmike, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: woohyun, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Differential Revision: https://phab.enlightenment.org/D8014
2019-02-27 13:29:08 -05:00
Yeongjong Lee 3118bfc34b efl_ui_relative_layout: introduce new relative container
Summary:
Efl.Ui.Relative_Layout is a container which allows you to position and size with
relation to each other.
it is possible to position and size using relation like edje even though
you don't know a edc script.
Position and size can be changed dynamically using widget APIs.

@feature

ref T5487

Test Plan:
make check
examples
elementary_test -to 'efl.ui.relative_layout'

Reviewers: cedric, Hermet, Jaehyun_Cho, zmike, bu5hm4n, jpeg, segfaultxavi

Reviewed By: Jaehyun_Cho, segfaultxavi

Subscribers: segfaultxavi, kimcinoo

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7524
2019-02-22 19:47:47 +09:00
Yeongjong Lee b1f280f0c2 test/ui_box: add unittest for Efl.Ui.Box
Summary:
Testcase
{F3613173}
{F3613174}

ref T5487
Depends on D7750

Test Plan: make check

Reviewers: jpeg, barbieri, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7463
2019-02-13 09:23:01 -05:00
Cedric BAIL d1b1dce5ff elementary: add a test for Efl.Ui.Model_Homogeneous.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7663
2019-01-30 12:06:20 -08:00
Mike Blumenkrantz dc8e46a926 tests: move efl_ui focus tests into efl_ui_suite
ref T6815

Differential Revision: https://phab.enlightenment.org/D7827
2019-01-30 13:32:04 +01:00
Mike Blumenkrantz 2137154d2a tests: move efl_ui_image test -> efl_ui_suite
ref T6815

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7825
2019-01-30 10:11:41 +01:00
Mike Blumenkrantz 633a2e506c tests: move efl_ui_layout tests into efl_ui_suite
also use legacy api for elm_layout swallow test

ref T6815

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7824
2019-01-30 10:11:40 +01:00
Mike Blumenkrantz 7628bd76ed tests: move image_zoomable into efl_ui_suite
ref T6815

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7807
2019-01-30 09:44:32 +01:00
Mike Blumenkrantz 166dafb0d8 tests: add atspi test for efl_ui_suite
this is just a copy of the existing suite but with some small changes to
use (mostly) eo apis

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7806
2019-01-30 09:44:31 +01:00
Mike Blumenkrantz 9f3d87ccca tests: modify efl_ui_suite to use same test infrastructure as elm_suite
this should enable us to begin moving efl_ui tests into the proper suite
instead of sticking them all into elm_suite

also move grid tests to efl_ui_suite

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7765
2019-01-30 09:04:57 +01:00
Cedric BAIL 97e210d727 elementary: enable efl_ui_suite tests for meson build.
Summary: Depends on D7661

Reviewers: SanghyeonLee, felipealmeida, segfaultxavi, zmike

Reviewed By: SanghyeonLee, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7382

Differential Revision: https://phab.enlightenment.org/D7662
2019-01-29 09:26:51 -05:00
Marcel Hollerbach 20ddd4c679 efl_app: introduce app_main for getting the app object
This brings in the possibility to receive the app object from bindings.
With the app object you can listen to pause / args / terminate / resume
events.

fix T7509

Differential Revision: https://phab.enlightenment.org/D7480
2018-12-20 12:56:54 +01:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Carsten Haitzler 9c8749b99a ecore - go back to args 0 being the command and 1+ being actual args
so this is then inconsistent with efl.exe and efl.thread, so go back
to being normal with 0'th arg being the binary itself jsut to make
sure we have conistent usage.
2018-03-07 02:32:15 +09:00
Carsten Haitzler 1bdd9e4dd1 ecore - a different take on efl.app class as a super class to efl.loop
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.

every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical

no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit

for really quick examples on using this see:

https://phab.enlightenment.org/F2983118
https://phab.enlightenment.org/F2983142

they are just my test code for this.

Please see this design document:

https://phab.enlightenment.org/w/efl-loops-threads/
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 568b524411 tests: add test for efl.ui header compilation 2018-02-26 15:05:36 -05:00