Commit Graph

224 Commits

Author SHA1 Message Date
Amitesh Singh 7144f278f5 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:19:29 +09:00
Amitesh Singh 29b47e0a07 focus: remove focus.get{} from widget.eo
This is taking care by focus manager now.
2017-11-29 19:25:14 +09:00
Jaehyun Cho 4b18e754de elm_part_helper: Change macro name for default content part 2017-11-29 13:43:21 +09:00
Jean-Philippe Andre 8608e8dc70 part bg: Fix up some unnecessary complexity
See previous commit :)

Note: right now the background part has a small 3d indent which comes
from the legacy theme being used. This will be fixed soon.
2017-11-24 16:12:31 +09:00
Sungtaek Hong 3c47a4f9f9 efl_ui_layout: create efl_ui_bg when efl_part for background is called.
Reviewers: woohyun, jpeg, cedric

Subscribers: felipealmeida, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5151
2017-11-24 16:00:22 +09:00
Jean-Philippe Andre e9d7436fd2 widget: Add EINA_UNUSED 2017-11-24 14:36:01 +09:00
Sungtaek Hong 8f2369c5b6 efl_ui_widget: secure elm_legacy_add flag
Summary:
_elm_legacy_add goes back to EINA_FALSE after setting sd->legacy.
if constructor get called again after going back to EINA_FALSE,
sd->legacy should remain EINA_TRUE.
also, elm_legacy_add() should not be called non-elm_widget.

Test Plan:
Run elementary test->Efl.Ui.Text.Label.
Check legacy flag in _elm_theme_object_set() for efl_ui_win.
Check legacy flag for efl_ui_text after scrollable text is added.

Reviewers: jpeg, woohyun

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5529
2017-11-24 14:32:36 +09:00
Shilpa Singh 11292dec35 efl_access: Add attribute_append, attributes_clear APIs
Summary:
Add attribute append and attributes clear API, attributes of widget/widget_item helps in adding additional information
about the widget/widget item in the form of key-value pair.

Test Plan:
Query the attributes using atspi_accessible_get_attributes in atspi_client and an hash table consisting
of updates attributes should be returned.

Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com>
Signed-Off By: Lukasz Wlazly <l.wlazly@partner.samsung.com>

Reviewers: kimcinoo, lukasz.stanislawski

Subscribers: cedric, govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5510
2017-11-22 11:54:45 +09:00
Marcel Hollerbach 78664198bd elm_widget: remove focused unfocused events
the ones form efl.ui.focus.object are now taken.
2017-11-21 20:37:21 +01:00
Marcel Hollerbach 6b85f7dbdf elm_widget: move event emission to a callback
the callback gets triggered if the new event got triggered.
2017-11-21 20:37:20 +01:00
Marcel Hollerbach 8c68c85706 elm_widget: dont use the inner var for searching the top widget
you think there is only one elm_parent behind the elementary property
parent? Oh no! Elm_Notify and Elm_Popup have theire own parent fields,
and those fields are not returned when calleing elm_widget_parent_get,
they are also not given to the elm_widget implementation of
elm_widget_top_get, so a call to elm_widget_top_get stalls at elm.notify
or elm.popup.

fix T6389
2017-11-21 16:32:27 +01:00
Pawel Aksiutowicz 36b6935304 elementary: removed warning from elm_widget
Reviewers: stanluk, lukasz.stanislawski, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5506
2017-11-20 16:13:46 +01:00
Marcel Hollerbach b93e744e1f elm_widget: simplify code
there is now a utility function
2017-11-17 16:08:14 +01:00
Marcel Hollerbach f8badf1c06 elm_widget: remove focus set
calling this function was not working at all, so its gone now
2017-11-17 16:08:14 +01:00
Marcel Hollerbach 07cb2d2dcd efl_ui_focus_object: document the bahaviour of the manager property 2017-11-15 13:21:22 +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
Jean-Philippe Andre 80b0ef7537 elm: Fix make check (code_widget)
elm_code_widget is causing a lot of trouble as it's relying on internal
access to elementary, without being built as part of elementary.so. Many
EAPI symbols are exported that shouldn't need to be, as they are only
internals of elm.
2017-11-07 14:59:01 +09:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +09:00
Marcel Hollerbach 08d104498c efl_ui_focus_manager: improve debug informations 2017-11-01 15:26:52 +01:00
Jean-Philippe Andre 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23:31 +09:00
Jean-Philippe Andre 006546a042 elm: Use auto_unref for parts
This avoids leaks.
2017-10-24 14:49:12 +09:00
Jean-Philippe Andre 1b481f0ae8 widget: Rename events to EFL_UI_WIDGET_EVENT_XXX
This only affects the events (and the data type has an alias).

Ref T5363
2017-10-24 14:37:45 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Marcel Hollerbach 0b81f9c808 elm_entry: correctly emit unfocus signals to the edje object 2017-10-20 11:54:08 +02:00
Marcel Hollerbach f720115f08 elm_widget: update parent instead of unregister for the case of parent
change

This means we maintain the focus state over a parent change
2017-10-19 15:20:59 +02: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 0376092c78 elm_widget: print a error if there is no provider 2017-10-17 17:31:23 +02:00
Marcel Hollerbach e2975a1fcb elm_widget: also do not register if the top widget is not a win
this is currently quite a performance break, since that call is quite
heavy, lets see if we can optimize it later
2017-10-17 17:31:23 +02:00
Marcel Hollerbach 881815ec57 elm_widget: only register if you have to
first step into the direction of making that more secure
2017-10-17 17:31:23 +02:00
Marcel Hollerbach aa4c3c9eb7 elm_widget: move evaluation for registeration of widget
this is now earlier done, so we can reacted based on that
2017-10-17 17:31:23 +02:00
Jean-Philippe Andre c9c9e6a209 elm: Rename Elm.Activate to Efl.Ui.Activate
Note: This is an EO-only beta API.

Ref T5329
2017-10-17 17:31:38 +09:00
Marcel Hollerbach 0a814a0c71 elm_widget: support logical parents that are not elm_widgets 2017-10-16 11:02:13 +02:00
Marcel Hollerbach e25d494590 elm_widget: do not cache the provider
if turns out that caching the provider here is a problem, since a parent
changing does not change the provided provider
2017-10-16 11:02:12 +02:00
Marcel Hollerbach 4edba079c4 elm_widget: also unregister if the logical parent changes 2017-10-16 11:02:12 +02:00
Cedric Bail 6fb1e2ff68 elementary: remove unused variable. 2017-10-13 12:58:01 -07: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
Jean-Philippe Andre ccee1c0944 eo: Simplify debug_name_override
Simply pass in the strbuf and don't expect the callee to own it. This
makes things simpler and safer (it'll crash only if the callee frees
said strbuf, and shouldn't leak). efl_ebug_name is new in the upcoming
release, EFL 1.21.

Realised this after talking with Amitesh. Thanks.

See 999dbd9764
And c4769ff898
2017-10-13 10:57:00 +09:00
Jean-Philippe Andre 72f1fbf4f1 widget: Rename focus_region (EO)
This region has little to do with focus, as it's more of a region of
interest within the widget, and not directly related to the highlight
geometry, for instance. It's related to focus in the sense that only
widgets with focus would really care about this region.

I decided to change this name after talking with @bu5hm4n.
Note that gengrid uses this but is also completely broken (the focus
highlight floats around and you don't even see the focused item).

Note: This is very close to show_region but I'm not sure those can be
merged safely (since the default "focus_region" is NULL while the
default "show_region" is the widget's geometry).

Ref T5363
2017-10-12 19:33:04 +09:00
Marcel Hollerbach 48129e7a8e elm_widget: also eval all children when we are visible 2017-10-10 21:23:42 +02:00
Marcel Hollerbach 7880dcd7d4 elm_widget: remove apis we dont need anymore 2017-10-10 19:30:01 +02:00
Marcel Hollerbach 65aff8c82c elm_widget: use the user_manager for setting focus 2017-10-10 19:28:47 +02:00
Jean-Philippe Andre f75d2e6be2 widget: Make focus_mouse_up_handle internal
I don't think this belongs to the public EO API.

Ref T5363
2017-10-10 18:53:43 +09:00
Carsten Haitzler 4a9d168ac3 elm widget - event legacy propagation - remove coverity warning
fix CID 1379920 - event_flags is actually never NULL or undefined in
the function logic. it's always set to point to the specific event
flags field depending on struct type or the function will return
before using the pointer.
2017-09-29 09:09:04 +09:00
Carsten Haitzler dea4e5aa46 elm widget - fix possible null ptr access found by coverity
_propagate_event_legacy checked event_flags ptr for null then just
derefs it anyway... so check everywhere. fixes CID 1379920
2017-09-28 15:28:00 +09:00
Jean-Philippe Andre 5f96c6fb4b widget: Remove domain_part_text_translatable from EO
This removes the last remaining legacy-style part API from Widget.
I think this is redundant with the property "translatable_text"
introduced in Efl.Ui.Translatable.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre e9dfcb44ff widget: Implement translation API in layout
This moves the API entry points from Widget to Layout parts. I don't
think the other widgets support translation, but that is easy to fix.
The actual code implementation remains in elm_widget.c.

Legacy-only widgets are covered by Part_Legacy, while all EO widgets
that have text inherit from Layout (except Win but I don't think the
window title was translatable in legacy).

This removes 2/3 remaining part APIs from Widget.

Ref T5363
2017-09-26 17:58:07 +09:00
Jean-Philippe Andre 839c4ed395 elm: Introduce interface Efl.Ui.Translatable
This will be used to replace the part translation API in Elm.Widget. It
should work for both parts and non-parts (ie. the main text of a button,
for instance).

For now I'm taking the following approach:
 - All efl_text_set/get strings are untranslatable, i.e. get() returns
   the visible string, set replaces and can not be translated.
 - translatable_text_set/get needs to be used to enable automatic
   translation, which in turns calls efl_text_set to modify the visible
   string. Thus, translatable applications will have to use
   efl_ui_translatable_text_set a lot more than efl_text_set, unless
   they translate strings application-side.

Note that some other frameworks take a simpler approach equivalent to
calling efl_text_set() with an already translated text. This prevents
runtime language changes of the application, unless the application
handles them specifically.
2017-09-26 17:58:07 +09:00
Marcel Hollerbach 884bf2d06b elm_widget: abort is probebly a bit too much 2017-09-23 22:34:08 +02:00
Jean-Philippe Andre 282928465c elm: Resolve part alias in legacy APIs only
This fixes make check.
2017-09-21 12:28:20 +09:00
Jean-Philippe Andre 28b387821d elm: Split off text and content for efl_part
This is VERY tricky.
For legacy, just create an internal class that has both. It's easier
this way. For parts that are handled by Layout directly, we know from
Edje which type to return.

For EO objects we should know from the part name which kind of part we
are dealing with:
 - text (overridden by the widget)
 - content (overridden by the widget)
 - special (new efl_part based functions)
 - generic (handled by Layout)

Note: Efl.Ui.Slider was handling "span size" on ALL parts. That's bad...
This is now limited to "span" only.
2017-09-21 12:27:34 +09:00