Commit Graph

49 Commits

Author SHA1 Message Date
Xavi Artigas bd62513232 Add missing Slider header to Efl_Ui.h
Summary: Without this, apps need to include Elementary.h to use unified sliders, which is bad.

Test Plan: Create an app that uses sliders and only include Efl_Ui.h. Magic!

Reviewers: zmike, bu5hm4n, cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9358
2019-07-19 18:55:40 +02:00
Marcel Hollerbach 52adb65aea efl_ui_spin_button: add test suite
this adds a testsuite to emulate and check the usage of buttons in the
spin button widget. This also verifies that the correct events are
emitted. (For now, the testcases from spin are also copied over, since
they inherit from each other)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9232
2019-07-08 19:56:42 +02:00
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 e776f5f0d7 Efl.Ui.Format revamp
This class helps widgets which contain a numerical value and must display it,
like Progressbar (units label), Spin, Spin_Button, Slider (both units and popup
labels, in legacy), Tags (when in shrunk mode) or Calendar (year_month label).

Previously this was a mix of interface and mixin: widgets had to support setting a
formatting func, and the mixin offered support for formatting strings, by setting
an internal formatting func. On top of that, the spinner widget supported "special
values", a list of values that should be shown as certain strings instead.

This has now been simplified and unified:
Widgets including this mixin can use the formatted_value_get() method which accepts
an Eina_Value and returns a string. Thats's it.
The mixin adds three properties to the widget (format_values, format_func and
format_string) which users can use to tailor formatting. The widget does not need
to know which method has been used, it just retrieves the resulting string.
This removes a lot of duplicated widget code, and adds functionality which was
missing before. For example, all widgets support passing a list of values now.

Widgets must implement the apply_formatted_value() method so they are notified
of changes in the format and they can redraw anything they need.

Tests have been added to the Elementary Spec suite for all cases.

Legacy widgets behavior has not been modified, although a few needed some code
changes.
2019-07-04 19:38:20 +02:00
Marcel Hollerbach 549c417853 efl_ui: include here efl_ui_item
Summary: this is actually a new class, it should be included here.

Reviewers: zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9200
2019-06-28 08:47:41 -04:00
Mike Blumenkrantz 0e65d0c651 efl_ui: remove nstate widget
Summary:
this doesn't seem to serve a purpose anymore and there's no point in
keeping it in tree

fix T7866

Reviewers: woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7866

Differential Revision: https://phab.enlightenment.org/D9176
2019-06-26 10:25:14 -04:00
Marcel Hollerbach 89102ecbd3 efl_ui_radio: cleanup API
This is a bit of a giant commit. However, the problem here is that
cleaning up the API went hand in hand with rewriting most of the usages.
In the process of renewing and removing old API the following was done:
- Legacy API testcases have been ported back to smart callbacks
- EO-API testcases have been ported to efl_add syntax
- weird event #defines have been removed
- Wrong constructor usage has been removed
- Ported to the new box object introduced before
- removed legacy API from efl_ui_radio
  -> no more ptr(int) q66 will do jumps of happiness
  -> no more ununderstandable group_add methods
  -> Seperated code in blocks only for legacy, and blocks only for
non-legacy

To verify this commit, you can check all the tests that have been
touched here. Additionally, the cxx example has been adjusted

ref T7867

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9060
2019-06-20 16:02:02 +02:00
Marcel Hollerbach 0a4beb291d efl_ui_stack: remove!
this can now be done with active_view. This is done in order to reduce
the LOC in elementary that basically do the same.

Differential Revision: https://phab.enlightenment.org/D8920
2019-06-19 07:38:08 +02: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
Marcel Hollerbach 52b2701bc3 efl_ui_suite: fix errors in focus tests
Summary:
there have been a few cases where things were just wrong. Like missing
regular nodes in a focus manager that received focus, and stuff like
this. This now fixes all those cases.

Reviewers: zmike, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9021
2019-05-28 12:01:50 -04:00
Marcel Hollerbach 64923b8db1 efl_ui: move clickable from efl to efl_ui
Summary:
efl_ui_clickable is now a mixin. The mixin now brings two APIs the press
and unpress API can be used to tell the implementation the state of the
presses. Within the implementation the calls to press / unpress are then
converted to longpress / clicked events.

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8820
2019-05-14 15:50:15 -04:00
Vincent Torri f218ac741c Windows : fix the definition of EAPI
Summary:
with autotools, EFL_BUILD was passed to the preprocessor for libraries and binaries, which was wrong. Only libraries must have EFL_BUILD defined. See T7797 for an explanation
This also fix EAPI in Ecore_Getopt.g and Efl_UI.h

Also note that all the wayland and drm Makefile's have not been touched

Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8602
2019-04-15 13:34:20 +01:00
Daniel Kolesa 58b8a3d163 efl: remove EFL_EO_API_SUPPORT macro
Summary:
Since we're now going to be shipping some eo classes as stable,
there is no point in keeping the eo api behind a macro, and it
should be enabled by default. Another case is beta classes, but
those are behind the EFL_BETA_API_SUPPORT guard.

This also changes includes around the place where things are
clearly broken (such as an included header needing something
from another header but that other header being guarded, notably
efl_ui_widget.h needing focus manager but focus manager being
behind beta in Elementary.h)

Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8322
2019-03-18 12:13:59 +01:00
Marcel Hollerbach 72b866b8b2 efl_ui: fix headers
Summary:
the function parameters is a only beta, so this function should be beta.
Depends on D8341

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8342
2019-03-14 14:26:30 -04:00
Jaehyun Cho dbe5cd3ac8 Efl_Ui.h: move stack and navigation headers to Efl_Ui.h
The following efl ui headers move from Elementary.h to Efl_Ui.h.
efl_ui_navigation_bar.eo.h
efl_ui_navigation_bar_part.eo.h
efl_ui_navigation_bar_part_back_button.eo.h
efl_ui_navigation_layout.eo.h
efl_ui_stack.eo.h
2019-03-12 14:40:56 +09:00
Mike Blumenkrantz 33f1094fd7 elm: unfuck public headers (only a little)
ideally Elementary.h should include only legacy code (T7667) and Efl_Ui.h
should include only eo code. this is not the case, and fixing it would
require undoing years of careful planning to make this type of thing extra
frustrating

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8233
2019-03-07 14:17:18 -08: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
Mike Blumenkrantz 335936e79d efl.ui.layout: split into abstract and real class
Summary:
most widgets inherit from layout to provide implementations for common
functionality such as content/text/theme get+set.

one of the things that layout also brings into its inheritance hierarchy
is efl.file and implementations for its methods. this becomes a problem
when the widget which inherits layout also wants to provide implementations
for efl.file methods (e.g., entry, which uses efl.file to load text files)
as it will result in calling all of the efl.file implementations up the
chain.

in the case of entry, this could result in the 'file' property eventually being
set to the current theme file in use by the entry's layout object, and then the
entry will attempt to autosave its content to the default theme file when it is
destroyed, corrupting the theme file and breaking everything

to solve this:

* efl.ui.layout remains an instantiable class which implements efl.file
* efl.ui.layout_base is the abstract class which provides all the methods of layout
  but should be inherited by all widgets which want to implement efl.file functionality

Depends on D8018

Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8032
2019-02-27 13:17:16 -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
Xavi Artigas c4bb24020b Stop defining EFL_BETA_API_SUPPORT in Efl_Core.h and Efl_Ui.h
Summary:
Including these headers does no longer mean that you want to use BETA API.
More and more methods in these libs will come out of BETA and they will
be usable without requiring EFL_BETA_API_SUPPORT to be defined by the app.

This concludes this patchset. Now apps can chose to define EFL_BETA_API_SUPPORT
or not, and they will have access to the requested API subset, but both options
are available.

Depends on D7951
Fixes T7692

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7952
2019-02-14 17:53:46 +01:00
Cedric BAIL aa0e89a590 elementary: add Efl.Ui.Widget_Factory.
The Widget_Factory is in charge of creating any object that inherit from Efl.Ui.Widget Class.
If the style property is connected to a model property, it will fetch it and build the widget
with that style. This factory is to be used with every View.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7704
2019-01-30 11:29:29 -08:00
Marcel Hollerbach a4ba9a351a efl_ui: mulibuttonentry is now tags
Summary:
further more it can be just included here, without this warning.
Depends on D7819

Reviewers: zmike, cedric, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7830
2019-01-30 13:44:45 -05:00
Mike Blumenkrantz 08875e5e42 efl_ui: add proto for efl_ui_focus_relation_free() into header
ref T7667

Differential Revision: https://phab.enlightenment.org/D7826
2019-01-30 13:32:04 +01:00
Mike Blumenkrantz 77b7646d56 efl_ui: include layout header in Efl_Ui.h
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7823
2019-01-30 10:11:38 +01:00
Cedric BAIL 4fe4f76b8c elementary: add a factory that handle caching for you.
This factory handle caching of one type of object and automatically empty the cache
when the application goes into pause.

Creating object is costly and time consuming, keeping a few on hands for when you next will need them help a lot.
This is what this factory caching infrastructure provide. It will create the object from the class defined on it,
set the parent and the model as needed for all items a Factory create. The View has to release the Item using the
release function of the Factory interface for all of this to work properly.

This is copying what Elm_Genlist was doing for you in the background and bring Efl interface to parity.

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7443
2019-01-09 11:02:11 -08:00
Cedric BAIL 88dbd866e0 elementary: rename Efl.Ui.Translatable -> Efl.Ui.L10n
If we are to choose Efl.Ui.I18n for the internationalization support, the localization API
should be named accordingly L10n.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7507
2019-01-02 11:03:53 -08:00
Cedric BAIL 327593e9b4 elementary: rename Efl.Selection -> Efl.Ui.Selection as it is only usable with User Interface related element.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7505
2019-01-02 11:03:49 -08:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
Summary:
Efl.Ui.Theme class is required to support language bindings.
Efl.Ui.Theme works based on current elm_theme features.

This patch fixes T7357.

Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee

Reviewed By: segfaultxavi, SanghyeonLee

Subscribers: SanghyeonLee, herdsman, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7357

Differential Revision: https://phab.enlightenment.org/D7244
2018-11-20 13:56:37 +09:00
Jaehyun Cho 0611620301 efl_ui_bg: remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget class
Summary:
Efl.Ui.Bg interface does not have any new property or method.
Moreover, Efl.Ui.Bg interface is not used by widgets except
Efl.Ui.Bg_Widget and Efl.Ui.Widget_Part_Bg.
Consequently, Efl.Ui.Bg interface can be replaced by other interfaces.

Due to Efl.Ui.Bg interface, the bg widget class name becomes
Efl.UI.Bg_Widget which is not synchronized with other widget names.

Therefore, to keep consistency with other widgets, it would be better to
remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget to Efl.Ui.Bg.

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7304
2018-11-20 10:24:05 +09:00
Hosang Kim 5db61e4d64 efl_ui_slider: refactor slider widget.
Test Plan: elementary_test -> Efl.Ui.Slider, Efl.Ui.Slider_Interval, slider

Reviewers: woohyun, cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: zmike, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5908
2018-05-15 14:16:00 +09:00
Xavi Artigas 9dcc31ed4a Efl.Access.Object (from Efl.Access)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:24 -07:00
Jaehyun Cho 0bebd097b5 elc_multibuttonentry: Fix to make multibuttonentry to be legacy only
To make multibuttonentry to be legacy only, inappropriate efl ui
interface usages are removed in multibuttonentry.
2018-04-20 14:07:35 +09:00
Mike Blumenkrantz 50e6b8ff4c efl_ui: do not include evas gl header if legacy support is not requested
this will not build without legacy
2018-02-26 14:47:25 -05:00
Mike Blumenkrantz 7372802c32 Efl.Access.Image: remove the whole class
this is a copy of Efl.Access.Component and serves no purpose
2018-02-15 13:11:00 -05:00
Jean-Philippe Andre 27c0d53f9b efl_ui: Disable includes that don't compile
Efl.Ui.Text:
The EO file contains a lot of references to legacy Elm types, which are
defined in elm_general. They should be checked and moved over to
efl_ui.eot if necessary.

Efl.Ui.Multibuttonentry:
This class was originally supposed to be based on a Model Item but as of
now the API is still uncertain, so MBE itself hasn't been worked on
more. Disable this from EO-only apps until its API is fixed.

Ref T6666
2018-02-06 21:27:37 +09:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Yeongjong Lee 210db8fc5d efl_ui_focus: merge efl_ui_focus_user and efl_ui_focus_object into one mixin
Summary:
focus_user and focus_object are similar classes. by merging them into
one mixin, we can maintain consistency.

Test Plan: make check

Reviewers: bu5hm4n

Subscribers: cedric, Jaehyun_Cho, woohyun, jpeg

Differential Revision: https://phab.enlightenment.org/D5734
2018-01-16 22:39:13 +01:00
Vincent Torri f2364053b4 ecore, elementary: remove useless inclusion of Evil.h on public headers when compiling with Visual Studio
Evil.h is already included on Windows in Eina.h
2018-01-04 13:00:00 -08:00
Carsten Haitzler 6ccfea3d51 Efl_Ui.h - remember to define EWAPI too 2017-12-27 14:55:15 +09:00
SangHyeon Lee 0f16a06710 interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary:
Change name of 'grid' to 'table' for matching on common ui naming
and avoiding confusion with 'gengrid' and 'grid view'.
grid will be introduced as grid image view after.

Test Plan:
checked make & make install
checked make check - there are errors but not related with these changes.
checked make examples - there are errors in cxx but not related with these changes.
checked make discheck - failed
test in elementary_test with Efl.Ui.Table and Table_static.

Reviewers: raster, cedric, jpeg, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5668
2017-12-19 14:25:08 +09:00
Sungtaek Hong 25136ddf8c efl_ui_bg: add Efl.Ui.Bg interface
Summary:
- Previous class efl_ui_bg moved to efl_ui_bg_widget.
- Scale_type moved to efl_image from efl_ui_image.
- Previous enum Efl_Ui_Image_Scale_Type moved to Efl_Image_Scale_Type.

Test Plan:
Run elementary_test
1.Image Scale Type
2.Efl.Ui.Bg
3.Efl.Ui.Win
4.Part Background

Reviewers: jpeg, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D5616
2017-12-18 20:49:45 +09:00
Cedric BAIL b20dd869a4 elementary: fix definition of EAPI. 2017-12-15 15:48:17 -08:00
Cedric Bail 88b2e28759 elementary: provide network when doing ui. 2017-11-14 20:14:01 -08:00
Cedric Bail 064f683458 elementary: fix typos in header inclusion rules. 2017-11-14 20:11:55 -08:00
Cedric Bail 663e31413a Revert "Revert series of patches from cedric (due to dependencies and conflicts)"
This reverts commit 2cea85db38.

Their was a typo that I made during cleanup of the patch before pushing that I didn't
notice broke some stuff. But also you may have an old efl_general.h in your elementary
directory that is now being picked instead of the one provided by the tree.
2017-11-14 20:08:09 -08:00
Carsten Haitzler 2cea85db38 Revert series of patches from cedric (due to dependencies and conflicts)
Revert "elementary: currently double declare elm_init/shutdown."
This reverts commit 44bb0c1848.
Revert "elementary: fix efl_ui_multibutton installed headers."
This reverts commit 32a213dc72.
Revert "elementary: introduce Efl_Ui.h."
This reverts commit df3d3f7334.
Revert "ecore: do not display error message on cancel."
This reverts commit 99654b7cd2.
Revert "efl: and don't forget to install the new dependencies."
This reverts commit 814ffb9b6b.
Revert "ecore: remove EFL_OBJECT_BETA as Efl_Core.h is for Efl new inerfaces."
This reverts commit 619d0f3cff.
Revert "ecore: move EAPI_MAIN from elementary to ecore."
This reverts commit e5d84da864.

as such commit e5d84da864 starts the
breaking. enlightenment, terminologya and other apps can't compile
against that efl anymore. 619d0f3cff
then makes this even worse with even more header errors and undefined
types. on top of this df3d3f7334 then
starts making elementary_test segfault when it runs. it wont even
start up.

asu such of these 7 commits in the first 4 (that are then relied on
later) 3 of these first 4 cause serious breakage. this simply is a
complete lack of testing changes, so i've rolled fl back to before
these things so it builds and works again and you can build against it.

PLEASE test these things. this looks ot me to be obviously a lack of
any testing... :(
2017-11-15 11:48:55 +09:00
Cedric BAIL 44bb0c1848 elementary: currently double declare elm_init/shutdown. 2017-11-14 16:55:49 -08:00
Cedric BAIL df3d3f7334 elementary: introduce Efl_Ui.h. 2017-11-14 16:36:17 -08:00