Commit Graph

82 Commits

Author SHA1 Message Date
Marcel Hollerbach 97ece33134 efl_ui_focus_object: introduce a new event for focus geometry changes
before the move and resize events have been used. However, this turned
out to not work well, because not all registered items are real
efl.gfx.entity objects, there is also a custom property for getting the
focus geometry, so now this property is completed with a event that is
emitted when the focus geometry changes. With this event we can
reintroduce relation caching. Since all events are marked correctly
dirty now.

Differential Revision: https://phab.enlightenment.org/D7347
2018-11-26 11:37:04 +01: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
Marcel Hollerbach 9f758dc363 elm: update widgets that have documented focus and unfocused events
this emits focus and unfocus on those widgets.

fixes T7386

Depends on D7124

Differential Revision: https://phab.enlightenment.org/D7103
2018-11-15 13:55:37 +01:00
Marcel Hollerbach c5add3ef40 elm: add unfocus / focus signals to gen* and toolbar
this adds back unfocus / focus emitting when items in those containers
are getting focus.

Differential Revision: https://phab.enlightenment.org/D7100
2018-11-13 17:01:37 +01:00
Marcel Hollerbach 66aa76ad89 efl_ui_dnd: fixup leaking inits and code duplication
In fff4d1ba97 one selection_manager_get
method was patched to behave like this, however, it completly broke the
fact of *only-one-manager* since the same code was duplicated in a other
files (efl_selection.c). This now unifies this code, and adds back the
assertion for only one manager per window.

Additionally a shutdown function is added, the app never destroyes, but
the selection manager decided to init some subsystems itself
(ecore_x for example). This lead to to a leak of init counts in ecore_x,
which lead to elementary test suite issues. This is now *finaly* fixed.

Differential Revision: https://phab.enlightenment.org/D7105
2018-10-02 16:13:13 +02:00
Wonki Kim 6409cfa41b scroller: refactory a momentum scroll animator
Summary:
this patch refactories a momentum scroll animator logics.

1. animation duration

  animating runs within a one second now.
  and if it needs more time to animate, it decrease intepolation progress by dividing some value.
  current logic makes sense however, it is not easy to read to know how it works.

  this patch modify current logic to calculate distance to move, and time to animate.

2. distance to move

  we can apply simple physics something like mass of pan and friction of scroller itself.
  but this patch apply just geometric seqeunce to calculate distance to go.
  it's more easy to customize behavior of scroller than current sine graph based one.

3. accelerate logic

  scroller sets 'extra_time' to accelerate a scroller for now.
  but this patch modify logic not to use it.
  however it uses current momenutum velocity as a bais of next momentum animating.

@feature

Reviewers: zmike, #reviewers, Hermet

Reviewed By: #reviewers, Hermet

Subscribers: Hermet, cedric, zmike

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D6643
2018-08-29 15:58:10 +09:00
Bowon Ryu 522c5250ab efl_ui_tab_bar: implement select key bindings.
Summary:
by key bindings..
now we can select TAB with the Return/Space key.

Test Plan: elementary_test -to efl.ui.tab_pager

Reviewers: Jaehyun_Cho, Hermet

Reviewed By: Jaehyun_Cho

Subscribers: YOhoho, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6779
2018-08-21 15:31:49 +09:00
Daniel Zaoui 1ab3094dac Clouseau: use the config flag only for the old Clouseau 2018-06-15 10:10:50 +03:00
SangHyeon Lee ebdb3b71a1 cursor: fix ABI break in widget item cursor APIs
Summary:
fix ABI break in widget item cursor APIs
by efl_ui_cursor interface implementing.

item's view were not elementary widget mostly,
reimplementing efl_ui_cursor on efl_ui_widget
cannot resolve item's cursor API call.

Test Plan:
check,
elm_object_item_cursor_XXX
API is working properly on elm_object_item.

Reviewers: cedric, jpeg, raster

Reviewed By: raster

Subscribers: stefan_schmidt, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6046
2018-05-19 01:21:12 +09:00
Marcel Hollerbach a218c883c7 Introduce efl_ui_widget_focus_manager
Summary:
The mixin encapsulates the correct
- creation
- composition attaching
- Lifecycle handling

of the focus managers that are assosiated with the object.

This fixes error messages on shutdown, and additionally lifetime issues
where the composite_attached object was deleted before the object was
deleted.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: segfaultxavi, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6108
2018-05-16 13:30:28 -04: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
Mike Blumenkrantz 9c7f5ca33b elm: use build dir data when EFL_RUN_IN_TREE is set
Summary:
this prevents tests from loading user configs and providing inconsistent
results or accidentally modifying a user's config

fix T6863
Depends on D6013

Reviewers: cedric, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: stefan_schmidt

Tags: #efl

Maniphest Tasks: T6863

Differential Revision: https://phab.enlightenment.org/D6014
2018-05-14 18:26:21 +02:00
Marcel Hollerbach ad3d741fa0 elm_focus_legacy: remove useless function
it was only used in one place and had a wrong name.
2018-05-01 20:26:41 +02:00
Marcel Hollerbach e3049e4a16 efl_ui_widget: do not register if the child is missing in a custom chain 2018-04-30 19:24:47 +02:00
Marcel Hollerbach fdfcae968b elm_widget: Introduce elm_focus_legacy
Code located here is meant for a legacy tree and legacy widgets.
This is checked on the entry of the function
2018-04-30 19:24:47 +02:00
Woochan Lee ef2e6afd1f Intrudoce Efl Ui Date, Time interface and picker.
Summary: Create datepicker, timepicker with one manager class(efl_datetime).

Test Plan: datepicker, timepicker sample.

Reviewers: herb, Jaehyun_Cho, woohyun, SanghyeonLee

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5871
2018-04-25 16:48:21 +09:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Jaeun Choi e74ebca670 efl_ui_pager: Add Efl.Ui.Pager class and related classes
Efl.Ui.Pager is a widget which contains many pages in a linear fashion
and allows users to scroll through them.
Users can attach Efl.Page.Transition and Efl.Page.Indicator to a pager.
2018-04-23 20:33:04 +09:00
YeongJong Lee 2c8c7807f1 config: fix Efl.Ui.Slider key binding
Summary: this fixes T6796

Test Plan: elemetary_test -to slider

Reviewers: woohyun, Hermet, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Maniphest Tasks: T6796

Differential Revision: https://phab.enlightenment.org/D5962
2018-04-18 15:34:35 +09:00
Woochan Lee 0088189eee elementary: add new config value to handle tap finger size.
Summary:
The tap_finger_size value of the concept is different from the finger_size value used in the past.

We need a minimum value for recognize the gesture as a tap or not.

Since the actual screen has different screen sizes, there is a problem that the recognition rate of tap is lowered when using the existing value(finger_size)

Test Plan: elementary_test -> gesture sample.

Reviewers: cedric, woohyun, Jaehyun_Cho, herb, id213sin

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5842

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-09 10:36:43 -07:00
Mike Blumenkrantz 7bf389f3a7 elm: remove hacky calls to emotion_init/shutdown
these are irrelevant since emotion manages init/shutdown internally

fixes elm test pass state

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:27 +02:00
Carsten Haitzler ca93267670 Revert "theme: rename "default" theme to "dark""
This reverts commit d764e0b279.

The whole idea of renaming the default theme is an "api break" even if
config is changed. and symlinks don't work on windows as a solution.
(well on ntfs only as only as administrator, so they don't exist).

modifying config for switch from default to dark also will break the
case where someone put ~/.elementary/themes/default.edj there and it just
is different to the system one and how their theme changes on them as
it switches to dark.

basically we can't rename a theme like this mid-flight in efl. default is
default and has to stay that name. it can change the look, but not the
name.

i think the apparent reasoning behind this is not a good one. the work on
flat is temporary. i don't think we will ever maintain multiple "default
themes" as its just far too much work.

we can maintain color SCHEMES which are just a list of colorclasses and
colors for them - that's separate to a theme and would override. right now
these things don't exist. we are not going to create a dark.edj and a
light.edj just to store differing default colorclass values. we should be
doing the above with colorclass "color palette/scheme/whatever" files
that override those named colorclasses globally on init.

so reverting because this is an api break and we shouldn't break api
unless there is really absolutely no other choice.

here the choice is to just temporarily work in a branch and modify
default and then merge the branch when done.
2018-03-01 16:44:01 +09:00
Mike Blumenkrantz d764e0b279 theme: rename "default" theme to "dark"
this inhibits maintenance and development of multiple stock themes

a symlink is created to 'default.edj' to preserve compatibility
2018-02-28 16:02:39 -05:00
Mike Blumenkrantz 07d0fb03db theme: introduce theme overlay/extension matching
after this commit, efl base themes should now specify:

data.item: "efl_theme_base" "theme_name";

and overlays/extensions which match a given theme should use:

data.item: "efl_theme_match" "theme_name";

this will cause overlays and extensions with the data.item to only
be loaded when the corresponding theme is in use. note that this
should not be specified for theme-independent overlays/extensions
as it will completely block loading of themes
2018-02-28 16:02:38 -05:00
Mike Blumenkrantz fe0bd38f4c elm_theme: massively simplify internals
instead of maintaining separate lists for the file and the edje file,
maintain a single list of structs containing both of these

also dynamically manage a string list of files to preserve compat with
existing (bad) functions which return this directly
2018-02-28 16:02:38 -05: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
Thiep Ha 35339504b0 dnd: add efl_ui_dnd_container
efl_ui_dnd_container is the interface of dnd for container objects.
2018-01-11 17:56:24 +09:00
Thiep Ha 763daa870e cnp_dnd: add selection manager
Selection manager implements functions for selection (cnp)
and drag and drop.
All objects can uses it APIs. It also supports multi-seat.
2018-01-11 17:56:24 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Carsten Haitzler b7eb3c5fe8 elm_priv.h - improve defines, EAPI EWAPI etc. because sub-includes need
this also makes it build for windows
2017-12-27 14:54:13 +09:00
Sungtaek Hong dd4467505e efl_ui_widget: find new edc resource for efl_ui_widgets
new eo widgets(efl_ui_ prefix) finds new edc group in
data/elementary/themes/edc/efl/*.edc.
New group name is "klass/group:style" and "base" group name and
"default" style name can be omitted.

for now, separator for style is ':' but needs to be decided.
2017-12-08 15:57:26 +09:00
Marcel Hollerbach 53052abaa6 elm_widget_item: refactor logic from gengrid into seperated class 2017-11-11 20:21:56 +01:00
Marcel Hollerbach 1ff0d6462b elm_widget: add a new api for directly reevalulating widgets
usefull if the provider changes
2017-11-11 20:21:56 +01:00
Mike Blumenkrantz fd00e3de1a elm_config: add offline and powersave config members
these will be used by enlightenment in the future to notify applications of
global system states

@feature
2017-10-25 10:44:16 -04:00
Carsten Haitzler 64529eac19 elm config - finish flagging all other values that can be set by api
this now means any app that called elm_config_*set on any field at all
will keep what it set forever until it changes it even if shared/core
config changed.
2017-10-19 17:32:47 +09:00
Carsten Haitzler a04d8a929a elm config - track which vars you set locally and keep them as-is
this now flags about 1/4 of the config vars in elm config if you set
them locally so they wont change on conifg reload. i have just started
and this is the first batch. needs more work.
2017-10-19 17:32:47 +09:00
Lukasz Stanislawski 57aefc53c1 elm: rename Elm_Interface_Atspi_Accessible interface
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5341
2017-10-19 10:13:54 +09:00
Marcel Hollerbach 75f5ea686f efl_ui_focus: add parent_provider
thats just a little helper, where the logic to find and fetch the
provider is bound to the position in the widget tree, this means that
for example gengrid could change the way the logical parent is
evalulated. (For example to map the logical parent to a item)
2017-10-13 12:31:47 +02:00
Marcel Hollerbach 9790de4b0c elm: include those headers in Elementary.h 2017-10-11 09:51:33 +02:00
Marcel Hollerbach 6ba107b899 elm: introduce efl_ui_focus_layer
what it does is described in the mixin

this commit refactors inwin hover popup ctxpopup to use that behaviour.
Since it should do exactly that.
2017-10-10 19:28:47 +02:00
Jean-Philippe Andre e401b223f8 elm: Delete atspi root object on shutdown
Ugly implementation but this will do.

@fix
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre a2729d119d widget: Remove part_text from EO
It should be implemented as a efl_part() API.

For now I've only done a quick hack, as the only overrides were:

 - notify: already a Part implementation. Also it turns out the default
   theme does not even have any text part in the notify group.

 - combobox: not a Part implementation, but also very badly defined wrt.
   parts in general. efl_part() is handled by the parent class (button)
   which makes it tricky to override just for one function.

With this patch I'm trying to keep the same behaviour as earlier (where
efl_part() is used for layouts and there is a special path for
combobox).

Ref T5363
2017-08-30 18:33:15 +09:00
Daniel Zaoui 4337e77669 Fix PS3 backend removal (Cedric...)
When running elementary_test with ELM_ENGINE='buffer', we got a crash.
The removal of PS3 backend patch didn't remove ELM_SOFTWARE_PSL1GHT and
didn't shift the _elm_engines indexes.
ELM_SOFTWARE_DDRAW stayed at the index 13 (value NULL) instead of moving
to index 12.
A strcmp with NULL occurred, leading to the crash.

@Cedric, I excuse you to not have run Exactness your code before pushing
:P
2017-08-29 15:21:12 +03:00
Jean-Philippe Andre e9dffa723d win: Add Efl.Ui.Win_Inlined and remove parent2
Inlined windows are the only use case for parent2. We might as well want
to create a separate subclass for those special windows.

Ref T5322
Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre b588cefbae config: Automatically fix some key bindings
This changes the name used in the config file, without changing the
system config files yet. This restores key bindings for:
 - Win
 - Image
 - Video
 - Photocam

See also the previous commit.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre c4ac589455 widget: Remove all legacy event stuff in propagate
The EO API is now clean! Yay!

Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 20a5968c12 elm: Use a macro to handle key bindings
This factorizes the code and makes most widgets handle key down events
in the same way:
 - check that the object is not disabled, event is not on hold
 - figure out the key binding based on the class name
 - mark event as on hold

The class name is usually MY_CLASS_NAME but in some cases it was
MY_CLASS_NAME_LEGACY which may be different from the EO class name (eg.
elm_win vs. Efl.Ui.Win). In that case the key bindings are broken.

This breaks key bindings for the following widgets:
 - Win (focus)
 - Image ("clicked")
 - Video (move, play)

This fixes key bindings for the following widgets:
 - Nstate

Some widgets remain broken:
 - Photocam / Efl.Ui.Image.Zoomable

A patch will be applied to restore the key bindings for the above
breaks.
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 6372dcdc2d grid: Switch to Efl.Ui.Dir (EO)
Ref T5870
2017-08-10 14:42:08 +09:00
Jean-Philippe Andre b1488b98de efl.ui.box: Switch to Efl.Ui.Dir (EO)
This makes the default box vertical, just like in legacy.
The flow box is horizontal by default.

Ref T5870
2017-08-10 14:42:08 +09:00
Jean-Philippe Andre dee61f4097 elm: Cleanup theme and style set functions
This makes efl_ui_layout_theme_set() return a Theme_Apply error
code. The type is now public as Efl.Ui.Theme.Apply.

Ref T5329
Ref T5363
2017-08-09 17:08:24 +09:00