Commit Graph

38 Commits

Author SHA1 Message Date
Sungtaek Hong cb25699dac efl_ui_legacy: add new interface to indicate legacy widget
Summary:
For now, how to check whether a widget is legacy or not
is to check flags in private data or static flag, which is set
during elm_legacy_add.
If Efl.Ui.Legacy interface is added, it can be easilly checked
by efl_isa(obj, EFL_UI_LEGACY_INTERFACE)

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5748
2018-01-24 18:14:26 +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
Jean-Philippe Andre 71ee800521 efl: Merge Flipable and Orientation
No need to split: those two are used in all the same classes, since the
split between Orientation and Ui.Dir.

Note that the enum types remain in the main namespace.
2018-01-18 17:29:28 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Wonki Kim 47bf356435 scroller: Introducing Efl.Ui.Scroller
Summary:
scrollable widgets had a interface_scrollable as a mixin so that the
widgets had a 'is-a' relation with interface_scrollabe.  however, new
scroller concept don't have 'is-a' relationship, but 'has-a'
relationship.  scrollable widgets should have a scroll manager inside
them, then scroll manager handles event from user and api
implementations.  and also we cut the features such as paging because
there will be aka 'elm_pager'.

we are expecting that the new concept make us to maintain the scroller
easier.  please excuse for many unorganized code and logics. : (

[contained commit]
scrollable: add efl_ui_scroller example
scrollable: refactoring for behavior in case of multiple scroller
scrollable: remove repetitive scrollbar code.
scrollable: combine calculating bounce distance code.
scroll_manager: mouse up function refactoring
scroll_manager: mouse move function refactoring
scroll_manager: warp animator wip
scroll_manager: fix denominator value when calculating flicking behavior.
Fix to disconnect bounce animator once animation is done
gather duplicated animator drop logics
gather duplicated conditions
Rearrange prototypes and append comment
Add manipulate functions for animators
scroll_manager: change member_add function.
scroll_manger: apply mirroring logic
scroll_manager: apply scrollbar
apply API to scroller widget
scroll_manager: apply scroll event callback
Change logics for all about scroll animating
efl_ui_pan: add efl_ui_pan
scrollable:  change content_min_limit to match_content
scroll theme: apply overlapped scrollbar
+ many others!

Reviewers: akanad, woohyun, cedric, jpeg

Subscribers: jenkins, cedric, jpeg

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

Note by @jpeg:
Unfortunately this patch comes in a massive single blob, after too many
rebase operations. It has now come to a point where I think the API is
nice and it works as I'd expect.
Now I only wonder how applicable this will be for Efl.Ui.List. As we can
see Photocam (legacy and unified API) could be transformed to use this
new API.
2017-12-19 10:26:25 +09:00
Amitesh Singh bdc3969452 edje: rename intf Efl.Canvas.Layout_Group to Efl.Layout.Group 2017-12-05 16:18:32 +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
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
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 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 64ebdd9c7b photocam: Use Eina.Rect for image_region 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 89a7d9ea8e efl: Use Eina.Size2D for image size 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre b19ee757e5 efl: Use Eina.Size2D in Gfx.View 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 942cbbed73 edje: Use Eina.Size2D for group min & max size 2017-09-18 17:26:53 +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 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 031ae12c2f elm: Rename some EO widget class names
It was discussed a while ago that Zoomable was a poor name in some
languages, like python.

This changes, in Efl.Ui, to use underscores:
 - Image.Zoomable
 - Grid.Static
 - Box.Flow
 - Box.Stack
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre acdef50276 photocam: Fix key zoom in/out
Zoom +/- doesn't work well as this is a multiplication factor.

Test scenario:
 - elementary_test -to Photocam

Then click on the image, and press + or - on the keyboard.

@fix
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 2450038436 widget: Remove sub_obj arg to resize_object_set
This removes an argument that was false only for a single widget:
naviframe. Hopefully this logic is now simpler, even though it involves
a small hack within naviframe itself.

Ref T5363
2017-08-09 12:21:42 +09:00
Jean-Philippe Andre 240cc9e501 edje: Move size_min/max and data to an interface
The new interface is:
  Efl.Canvas.Layout_Group

I'm not fan of the name.

Ref T5315
2017-08-04 11:52:17 +09:00
Amitesh Singh 0787b739cd efl.ui.image.zoomable: Add missing edje.group_size_min/max_get
This supresses the warnings when photocam is used as
an external edje object.
2017-07-27 19:06:27 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Amitesh Singh 488e1c20e9 Efl.Ui.Image.Zoomable: move legacy APIs at the bottom of the file. 2017-06-23 13:11:54 +09:00
Amitesh Singh 02e9af50a1 Efl.Ui.Image.Zoomable: rename data get macros 2017-06-23 09:15:21 +09:00
Amitesh Singh 7a7fca0bf2 Efl.Ui.Image.Zoomable: make zoomable to work with edj file
image.zoomable can load edj files now.

usage:
efl_file_set(zoomable, "../somefile.edj", "mygroupname");

test:
elm_test -> photocam
click "open" btn
select an edj file, it would show first group in selected edj file.

@feature
2017-06-09 20:22:42 +09:00
Amitesh Singh 66a79ece6b Efl.Ui.Image.Zoomable: implement efl.play.get/set
ref T5352
2017-06-08 17:39:45 +09:00
Amitesh Singh 835262f592 Efl.Ui.Image.Zoomable: implement efl.player.playable.get
ref T5352
2017-06-08 17:39:45 +09:00
Amitesh Singh bd1ee1b083 Efl.Ui.Image.Zoomable: implement Ui.Image.icon property
@feature
2017-06-02 18:32:09 +09:00
Taehyub Kim e7b302d89f efl_ui_image_zoomable: fix wrong initial value for zoom mode
Summary:
fix wrong initial value for ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL mode

@fix

Test Plan:
1. set zoom mode of photocam to ELM_PHOTOCAM_ZOOM_MODE_AUTO_FILL in text_photocam.c example
2. run elementary_test -to photocam
3. check it is working well

Reviewers: jpeg, cedric, raster, Hermet, singh.amitesh

Reviewed By: singh.amitesh

Differential Revision: https://phab.enlightenment.org/D4921
2017-05-30 20:33:26 +09:00
Amitesh Singh 6fe568d9ac elm: rename elm_photocam to Efl.Ui.Image.Zoomable
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-29 14:52:36 +09:00