Commit Graph

143 Commits

Author SHA1 Message Date
Mike Blumenkrantz b0bb09ef7a Efl.Access: resolve more name conflicts
children -> access_children
type -> access_type
2018-02-15 13:28:45 -05:00
Mike Blumenkrantz a6566ef8ae elm_interface_scrollable: use 'mirrored' from Efl.Ui.Base 2018-02-15 13:11:01 -05:00
Mike Blumenkrantz 504ad62a6b elm_genlist: parent -> parent_item 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz f45e972c8c Elm.Widget.Item: focus -> item_focus 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 5263f311f4 efl_widget_item: remove 'del'
this now uses regular efl_del
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 8b7bbb2398 efl.access: name -> i18n_name 2018-02-15 13:11:00 -05:00
Marcel Hollerbach d447967b76 elm_gen****: do not call realize on items
better rely on the adapter and wait for realization so the adapter is
wether created or not even created but used with content. This fixes
item content focus, crashes at startup and a freeze in genlist test!
2018-01-26 15:11:50 +01:00
Marcel Hollerbach b2be688ccc elm_genlist: prepare the item when its set
so the border element is set accordingly on the parent manager which
then can be picked up for focus relations.

ref T6453
2018-01-23 21:27:45 +01:00
Jean-Philippe Andre 2c66616179 genlist: Avoid a call to NULL
elementary_test -to genlist
-> LOTS of warnings, when creating the genlist, as the items aren't
ready yet. This just avoids the WRN as recalc will happen later anyway.
2018-01-22 20:38:37 +09:00
Jean-Philippe Andre 20570f74d3 widget: Move on_focus_update to Focus.Object
Following @taxi2se's recommendation. This is indeed a focus method, and
Widget already inherits from Focus.Object.

Ping @bu5hm4n who probably wants to adapt this further.

Ref T5363
2018-01-19 17:30:04 +09:00
Jean-Philippe Andre c35f257bf2 widget: Remove item from on_focus_update
It's legacy stuff, and always NULL.
2018-01-19 17:17:01 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Cedric BAIL 526415d903 eo: make efl_provider_find a @const function. 2018-01-04 11:45:10 -08:00
Jean-Philippe Andre 116f24fd78 elm: Rename struct to Efl.Ui.Widget.Focus_State
Ref T5363
2017-12-12 12:01:46 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00
Marcel Hollerbach 38b3ef1b8c elm_genlist: use the correct elm_object_focus_get function
genlist does not get focus anymore, only its children are getting them.

fix T6425
2017-11-30 20:07:52 +01: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
Prasoon Singh 248cb96c42 elm_genlist: Add signals to communicate drag start and stop to atspi client.
Summary:
Send signal EFL_ACCESS_STATE_ANIMATED when dragging starts and stops to atspi clients and also set EFL_ACCESS_STATE_ANIMATED
when reorder mode is enabled.

Test Plan: When reorder happens atspi client should receive object:state-changed:animated signal.

Reviewers: kimcinoo, shilpasingh

Reviewed By: shilpasingh

Subscribers: cedric, govi, rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5515
2017-11-22 14:17:41 +09:00
Andrii Kroitor c37226ef5e elm_genlist: fix rare segfault
Conditions:
- style is "double_label"
- the is some content for items (i.e elm_label)
- elm_genlist_filter set was once called after genlist creation with
  NULL data
- label_get callback uses elm_genlist_item_prev_get on its current item
- at least one item is added as a sub-item
- ~2 blocks of items are added afterwards
- items are added quickly while holding 'enter' on an elm_button

@fix
2017-11-17 10:16:41 +02:00
Jean-Philippe Andre e9ebe5c676 elm: Define and rename internal atspi struct in EO
This thing is used by only 2 EO APIs that are marked as @beta. I wonder
if the @beta tag or the ptr() expression made it work for eolian,
because it simply wasn't defined in EO.

I'm renaming it just so that it's more consistent with the new names
used by atspi (and EO API in general).
2017-11-16 12:00:18 +09:00
Lukasz Stanislawski c838e30a24 elm: Rename elm_interface_atspi_widget_action mixin
Reviewers: jpeg

Subscribers: jenkins, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5400
2017-11-16 12:00:18 +09:00
Andrii Kroitor a2532b8ef0 genlist: fix state corruption of content
When using reusable content, genlist preserves old object's state and is
expecting reusable_content_get callback to change all needed properties.
But there was an inconsistency: it was silently re-enabling the old content.

@fix
2017-11-15 10:57:10 +02:00
Lukasz Stanislawski 6505f535f6 elm: evaluate MULTISELECTABLE state for genlist and gengrid
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5452
2017-11-13 12:08:57 +09:00
Marcel Hollerbach b364293b0c genlist: implement item focus
this implements item-content focus for genlist. feel free to notify me
if there are any crashes or something simular.

ref T6181
2017-11-12 12:04:11 +01: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
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
Godly T.Alias 0496b7988a Genlist Item Pin Feature
Summary:
**@feature** T6241

This feature enables genlist to pin an item to viewport which will
be available always for user to view/select.

**Use Case**:
In a big list of music, most times when user finds a song which they
like, before playing that they may want to go through the entire list
to check whether there is some other good songs, but
after seeing the entire list user have to again scroll back to the
position of item which they liked to play it then.
In this case item pinning can be used, so that the item
which they want to keep for future selection can be pinned
and then it will remain in viewport, finally when user want to do
operation on item, it will be readily available in viewport.

Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>

Test Plan: Elementary Test -> Genlist -> Double click on items to enable/disable pinning

Reviewers: raster, cedric, prince.dubey, SanghyeonLee

Subscribers: rajeshps, jpeg, shilpasingh

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5340
2017-11-01 16:11:30 +09:00
Jean-Philippe Andre 585be9e24f genlist: Simplify some logic
Item prev/next/first/last.

If true, break, else, break.
EO_OBJ(x) is safe on NULL.
Add a simple macro to simplify inlist handling.
Overall simplify the code.
2017-10-25 22:54:52 +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
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
Jean-Philippe Andre 83d063692f genlist: Fix crash on item delete
See d3440a9867

Fixes T6033
2017-10-18 20:01:35 +09:00
Marcel Hollerbach a38f5c3892 elm_genlist: for now disable this code
it will return later
2017-10-10 19:28:48 +02:00
Lukasz Stanislawski 3e6cc83369 elm: rename Elm.Interface.Atspi.Selection => Efl.Access.Selection
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5165
2017-09-19 11:18:22 +09:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
SangHyeon Jade Lee d3440a9867 genlist: process item block positioning before relative item deleted
process item for positioning proper relative block before it's
relative item is deleted.

Signed-off-by: SangHyeon Jade Lee <dltkdgus1764@gmail.com>
2017-09-15 12:11:55 +09:00
SangHyeon Jade Lee 50149e95cd genlist: fix decorate mode dangling pointer in deletion
fix decorate mode crash issue reported by Jack Daniel in T6000
which is occured by dangling pointer in item deletion on decorate mode.

Signed-off-by: SangHyeon Jade Lee <dltkdgus1764@gmail.com>
2017-09-12 18:41:37 +09:00
Jean-Philippe Andre c0d7ea4af0 widget: Rename on_focus to on_focus_update (EO)
on_focus seems to imply that focus was just given to the widget, but
that function is called on any focus change (in and out).

Ref T5363
2017-09-01 10:09:37 +09:00
Jean-Philippe Andre b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Jean-Philippe Andre 692282e67a widget: Move item_loop_enabled to scrollable (EO)
I was told that the scrollable interface is being redesigned for EO.
This API definitely does not belong to the base Widget class, as it's
quite specific to item-based scrollable widgets, such as lists and
grids. Since Elm.Interface_Scrollable is itself being revamped, it is a
good place to move that EO API for now.

Ref T5363
2017-08-30 17:29:52 +09:00
Jean-Philippe Andre 8c1f771a67 widget: Use rectangle for focus_hilight
Ref T5363
2017-08-29 16:22:47 +09:00
Jean-Philippe Andre 0a0bbe5fda widget: Rename hook "access" (EO)
This is also another protected and beta API. Meant to be overridden by
subclasses, but belongs to a still unstable API.

The difference between the internal legacy and the EO API is really bad.
Same as with activate (previous commit).

Ref T5363
2017-08-29 10:40:53 +09:00
Jean-Philippe Andre 3f9c239b27 widget: Make sub_object add/del protected (EO)
Also prefix with widget.

I want to rename this as child rather than sub. It's inconsistent with
the other parent/child hierarchies. Anyway the various hierarchies are
confusing, so let's keep this name :)

Ref T5363
2017-08-23 20:56:37 +09:00
Jean-Philippe Andre 06ec847a7c widget: Use EO function pointer for on_show_region
This is as much a test of the EO function pointer as it is a clean up of
this widget API.
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 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +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
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00