Commit Graph

172 Commits

Author SHA1 Message Date
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz e4b98a243b api: efl.gfx.hints.change,size,hints -> efl.gfx.hints.hints,changed
Summary:
this is consistent with other "changed" event naming

ref T7563

Depends on D7977

Reviewers: segfaultxavi, cedric, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7978
2019-02-21 18:46:36 +01:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
SangHyeon Jade Lee 053146598c efl_ui : rename model connect and factory connect to bind property and factory.
As we discussed in T7469 with V40,

efl_ui_model_connect
efl_ui_factory_model_connect

need to be renamed to

efl_ui_bind_property
efl_ui_bind_factory

for this work,
Efl.Ui.Model.Connect interface is changed as Efl.Ui.Bind,
and bind_property and bind_factory both method is supported by this interface.

bind_factory need Efl.Ui.Factory,
and Efl.Ui.Factory inheritted Efl.Ui.Bind,
so I little bit concerned about circular referencing, but so far, it works well.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7529
2019-02-11 11:06:13 -08:00
Mike Blumenkrantz d6992432c8 efl_ui_image: implement efl.file.mmap_get
this returns the current file, though the result is that the "current file"
could be changed asynchronously after this function is called

ref T5719

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7781
2019-01-26 12:21:57 +01:00
Mike Blumenkrantz d483302a13 efl_ui_image: implement remaining efl.layout.calc methods
this is just proxying the method calls onto the inner edje object if
the image is an edje object

ref T5719

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7741
2019-01-24 08:24:33 +01:00
Marcel Hollerbach 04c2d313d7 efl_ui_image: implement the last two APIs from edje
Summary:
this just takes the API and redirects it to the internal edje object if
there is any. If there is no edje object, then just default values are
returned.

ref T5719
Depends on D7738

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5719

Differential Revision: https://phab.enlightenment.org/D7739
2019-01-23 14:55:51 -05:00
Chris Michael 71baeab41d elementary: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather
than calling move & resize.
2018-11-21 11:25:58 -05: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
Hermet Park c4124f8b36 efl_ui_image: apply some image options as retained way.
Summary:
load_size will be applied when file is set,
orientation, flip would be applied when starting sizing calc.

These will gurantee applying options whether image is preset or not.

This is a regression bug by ae51c81a686ca47c93eedc99beaf3a84f8a9cb96

Reviewers: #committers, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6855
2018-08-21 10:38:54 -04:00
Yeongjong Lee e07b04f88c efl_ui_image: avoid a call to NULL
Summary:
Image object isn't created on constructor anymore. so that it need to check
whether image object exist.

Reviewers: Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6834
2018-08-16 10:01:47 -04:00
Yeongjong Lee 07692dc640 elm_image: create image object before call elm_image_object_get
Summary:
image object was created in group_add before 868e3308. if you call
elm_image_object_get before file_set, you can get NULL.
this patch avoid that.

Test Plan:
obj = elm_image_add(...);
img = elm_image_object_get(obj);

img should not be NULL.

Reviewers: Hermet, zmike

Reviewed By: zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6828
2018-08-16 10:01:37 -04:00
Hermet Park c4ff2cde25 elementary image: don't calc size using empty ones.
Summary:
Zero-sized image occasionally happens.
That occurs insane img/clipper region.

bj size => (w, h) then resize => (0, 0)
file_set(xx.jpg) then file_set (NULL)

Because of this, region could be flickered during prev/cur preloading images.

@fix

Reviewers: #committers, zmike

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6725
2018-08-08 15:52:37 +09:00
Hermet Park 868e3308b1 elementary image: apply lazy calculation and guarantee retained method.
Summary:
Image couldn't gurantee retained concept status.
This patch change to setting up image object on the request time,
recovering image status, removing unencessary jobs.

Reviewers: #committers

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6726
2018-08-02 09:25:27 -04:00
Marcel Hollerbach a6dea4007e efl_ui_image: apply the whole sizing eval
orientation no_scale etc. can have impact on the min max calculation.
Thus that should be called on every property set.

ref T7080

Differential Revision: https://phab.enlightenment.org/D6493
2018-07-02 18:17:20 +02:00
Larry Lira 0dfadc2322 elm: fix efl_model property_get and children_slice_get in views 2018-06-07 19:15:50 -03:00
Chris Michael 3920247ff6 elementary: Fix eina_safety return val
The function that this is used in returns Eina_Bool, but the safety
check was returning NULL
2018-05-04 07:07:41 -04:00
Jaeun Choi 473755fd66 efl_ui_image: add NULL check in elm_image_memfile_set() function
return EINA_FALSE if the data source is NULL elm_image_memfile_set()

@fix
2018-05-03 20:46:56 +09:00
Cedric BAIL 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Cedric BAIL a408c145e9 elementary: migrate Efl.Ui.Image to use the new Efl.Model API. 2018-04-30 14:21:12 -07:00
Xavi Artigas 5697f6e94b Efl.Gfx.Image* (From Efl.Image*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:40 -07:00
Xavi Artigas c837b321bf Efl.Image_Load_Controller* (From Efl.Image.Load*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:39 -07: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
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
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02: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
Jaeun Choi c950b17a57 efl_ui_image: add missing NULL check 2018-01-30 21:21:35 +09:00
Sungtaek Hong 30593b19ba Efl.Ui.Image: remove previous image when NULL is set
Summary:
when Efl.Ui.Image has an image,
         efl_file_set(efl_added, NULL, NULL) is not working.
         I think this should remove prevous image and go back to empty image.
         @fix

Reviewers: jpeg, cedric, eunue, woohyun, Jaehyun_Cho

Subscribers: Blackmole

Differential Revision: https://phab.enlightenment.org/D5742
2018-01-30 13:55:51 +09:00
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 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
Amitesh Singh 9db0ec554b interface: add Efl.Gfx.Color interface for color related APIs
This would eventually turn into mixin class later after adding
more color related helper functions.
2017-12-22 13:29:20 +09:00
Sungtaek Hong a2309c5083 efl_ui_image: apply load_size when API is called
Summary:
when  efl_image_load_size_set() is called, image only sets
internal variable and not apply to the internal image.
elm_image_prescale_set() is also affected.

Test Plan: Run elementary_test->Image Prescale

Reviewers: jpeg, eunue, woohyun

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5645
2017-12-18 20:49:46 +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
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +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 c7aa3b2f83 edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc 2017-12-05 16:18:32 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Amitesh Singh 10103b9b45 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:38:39 +09:00
Jean-Philippe Andre 029cf28745 image: Return file+key even for edje objects 2017-11-20 20:06:01 +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
Sungtaek Hong 40e23ca459 efl_ui_image: add new scale type: EFL_UI_IMAGE_SCALE_TYPE_TILE
Summary:
Tile is common type which can be used eg: background.
This is added to scale type which can be set/get by
efl_ui_image_scale_type_set/get()
@feature

Test Plan:
Run elementary test
           Run Image Scale Type
           Check radio "Tile".

Reviewers: jpeg, cedric, woohyun

Differential Revision: https://phab.enlightenment.org/D5119
2017-09-19 18:18:07 +09:00
Jean-Philippe Andre a3250f975a efl: Use Eina.Size2D for image load size 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 f53fe993a6 edje: Merge calc_size_min_restricted & calc_size_min
calc_size_min was just a helper passing 0,0 to the restricted form.
Let's not duplicate APIs in EO and use an optional argument instead.
Bindings should be nicer and C could use a macro if it's too cumbersome
to pass in 0,0.
2017-09-18 17:37:23 +09:00
Jean-Philippe Andre 641a58f735 edje: Use Eina.Size2D for min calc 2017-09-18 17:26:53 +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 cb3b4cc8d7 elm image: Fix async open to avoid multiple mmap
Reported by @jiin.moon:

In case of async_open for an elm_image, we try and open a file in a
thread, then map it and populate a bit, as this may take some time
(blocking I/O). This creates a mmap with eina_file_map_new. But later
evas image loaders will (usually) try and map the entire file with
eina_file_map_all() which creates another mmap. Since the size is
different (32Kb first then all) the returned map might be different
(it's up to the kernel to decide at this point).

So, in order to avoid having multiple maps on the same file, and try to
reduce the peak memory usage, we should prefer using the same map all
the time, i.e. the global one returned by eina_file_map_all().

This patch relies on the previous patch in eina_file which fixes
eina_file_map_populate() for the global map.

@fix
2017-09-18 11:58:53 +09:00
Lukasz Stanislawski a55f2c96d4 elm: rename Elm.Interface.Atspi.Image => Efl.Access.Image
Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5163
2017-09-12 15:48:39 +09:00
Mike Blumenkrantz 7745520852 efl_ui_image: maintain geometry for prev image while preloading new image
if prev_img exists then it is visible, so continue maintaining its geometry
until it is deleted

fix T5936

@fix
2017-08-25 14:48:12 -04: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
Amitesh Singh d5c80d61e7 Efl.Ui.Image: use internal func to detect legacy usage 2017-08-10 16:43:55 +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 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
Jean-Philippe Andre 3e5cfb83c0 elm: Remove custom layout signal APIs
This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 6df17b2ed0 edje: Split off calc APIs to an interface (EO)
Those APIs can then be used by Elm.Layout, hopefully
simplifying the API.

I wonder if the APIs should be prefixed "calc_" (as is)
or "layout_calc_". The extra "layout_" prefix would make
it common with other layout APIs (eg. signals, data,
size min/max, ...).

Ref T5315
2017-08-04 11:52:16 +09:00
Amitesh Singh 0d6cdd661c Efl.Ui.Image: fix crash on passing NULL file in file_set()
img was crashing on elm_image_file_set(image, NULL, NULL).

fixes T5697
2017-07-10 15:28:31 +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 2faeffde71 efl.ui.image: fix the old align behaviour in img.
After ab23a53094, evas_object_size_hint_align_set()
has stopped working on elm img and that patch was perfectly right
to do so but we don't change the old behaviour.
This patch is an effort to make evas_object_size_hint_align_set()
to work with elm img again.
make sure not to mix both eo apis and legacy apis.

Thanks to dave for reporting and jpeg to show the right fix.

fixes T4635
2017-07-06 18:35:06 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Amitesh Singh 75aa39ff8d Efl.Ui.Image: fix efl.player.playable.get API
an edje obj is always playable. return TRUE always.

@fix
2017-06-07 18:52:08 +09:00
Amitesh Singh 5882d343f0 efl.ui.image: fix icon_get API
If icon set is failed, icon_get should return NULL,
not the old icon name.

@fix
2017-06-05 17:09:19 +09:00
jiin.moon 2c119f54af elm_image: Fix previous image visible issue
Summary: Previous image still visible when elm_image_file_set has wrong file path.

Test Plan: self

Reviewers: jpeg, jypark, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: singh.amitesh, minkyu, cedric

Differential Revision: https://phab.enlightenment.org/D4888
2017-05-31 19:01:04 +09:00
Jean-Philippe Andre ce0d15ecb3 edje: Reshuffle a bit edje_object.eo
This changes a few method names:
 - freeze -> calc_freeze
 - thaw -> calc_thaw
 - update_hints -> calc_update_hints

Otherwise this is mostly about reshuffling the EO file itself
and changing documentation.

Ref T5315
2017-05-31 18:42:28 +09:00
Jean-Philippe Andre b114f8c66d evas/elm: Add Efl.Image.image_size read-only property
Following a remark in the mailing list, it is pretty clear that
Efl.Gfx.View.view_size is not as simple as "image_size".

I have defined this new image_size as being the size of the
image file, and not what's currently loaded. So it will not
apply to proxies, gl views, 3d scenes, etc... but only to
standard image files loaded with file_set or mmap_set.
Supported objects:
 - Efl.Canvas.Image (evas image)
 - Efl.Ui.Image (elm image)
 - Elm.Photocam (note: still needs some interface work)

@feature
2017-05-24 15:24:13 +09:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 331bf9f746 elm_image: Fix file_set when preload is disabled
If we disable preload, then the second file set on an elm_image
object would not trigger a deletion of the first image. As a
consequence, both images would be visible... really bad if there's
alpha or different dimensions!

Thanks Anand Kumar for the report!

@fix
2017-04-20 18:54:59 +09:00
Larry Jr 093c592188 efl: add efl_model and efl_ui_view classes
Efl.Model.Container and Efl.Model.Item to efl/interfaces are used
to create Efl.Model objects with predefined property values.
This is useful to any situation where we want an Efl.Model with
explicit defined property values.

Efl.Ui.View and Efl.Ui.Factory are used to connect Efl.Models with
Widgets, Elm.Layout and Efl.Ui.Image has changed to use news interfaces

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-06 15:26:21 -08:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
Cedric BAIL c994976cdb elementary: fix float warning in Efl.Ui.Image. 2016-12-20 16:39:30 -08:00
Gustavo Sverzut Barbieri fa8630a9b1 elm: convert downloads to efl_net_dialer_http.
Remove Elm_Url and use efl_net_dialer_http with an efl_io_copier to
fetch stuff.

The code was also slightly improved, particularly in elm_photocam
destruction be explicit and clear the grid before deleting... this
will ensure any pending preload are stopped before we remove the
backing memory.
2016-11-22 13:24:16 -02:00
Daniel Zaoui 381d93f1e2 efl_ui_image: fix removal of the internal evas image
During the replacement of the image with the new preloaded one,
the previous image is deleted but not removed from the list of
children of the icon (efl_ui_image), leading to Eo errors when
walking over the icon children.

@fix
2016-11-21 12:24:16 +02:00
Jaehyun Cho e64fa28284 efl_ui_image: guarantee user's mouse up event callback is called.
Summary:
Without propagating event by hit_rect, user's mouse up event
callback may not be called if image file is replaced in user's mouse
down event callback.

Test Plan:
1. Register mouse up event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_UP.
2. Register mouse down event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_DOWN.
3. Replace image file of elm_image by calling elm_image_file_set() in
mouse down event callback.
4. Mouse down on elm_image.
5. Mouse up on elm_image.
6. Since image file object is newly created in mouse down event
callback, mouse up event is not triggered for the newly created image
file object. As a result, mouse up event is not propagated to elm_image
and user's mouse up callback for elm_image is not called.

Reviewers: cedric, woohyun, eunue, jpeg

Reviewed By: jpeg

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-16 13:46:40 -08:00
Jean-Philippe Andre 9af981469d elm: Fix usage of invalid object type (image)
This fixes a a crash on NULL and ensures the EAPI call is
done on an elm_image. Just checking NULL is not good enough
as _efl_ui_image_sizing_eval() doesn't check the type first.
2016-11-03 17:22:14 +09:00
Jean-Philippe Andre a86e79141e elm: Fix disappearance of some elm images
After the commit 97c9fa64a4 (Remove group_show and group_hide),
some Efl.Ui.Image objects would not render properly. The reason
being that the object call to show() was aborted too early when
the image is still preloading.

This made for really random results as an image preload could
take more or less time, depending on chance.
2016-11-01 09:36:39 +02:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 62abe2cbff evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 52969ccd9b evas: Remove method group_color_set
Widgets should simply override efl_gfx_color_set and call
super all the way up to evas object.

Legacy compatibility with call interceptors and early call
abortion (eg. delete_me or obj->layer == NULL) are implemented
with an internal call. See the previous commit introducing the
API.
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 63088b583c elm_image: Add smart cbs for async open
This adds a few callbacks to inform applications about
async open and preload:
- load,open
- load,ready
- load,error
- load,cancel

This patch adds a new EAPI as well: elm_image_async_open_set.
This is the only way to use async file open with the legacy APIs
and should be easily matched with whatever EO API we end up using
(be it based on promises or events).

Alter the test cases for make check as they were using the
unstable EO API which I just removed.

Thanks @arosis for the original patch. And sorry for the huge
delay in merging this.

See also: https://phab.enlightenment.org/D4215

@feature
2016-09-23 11:28:14 +09:00
Jean-Philippe Andre 97a2d7ff33 elm_image: Move back download events to legacy only
The events for (async) image download will be redefined by
@cedric later. So, remove them from eo now and only keep their
legacy implementation.

Also, improve elm_test example and add docs.
2016-09-22 15:02:45 +09:00
Cedric BAIL b5f47fbcb9 elementary: patch got pushed before the complete fix. 2016-09-19 16:12:31 -07:00
Cedric BAIL 0d0ca579c6 elementary: be more conservative on the amount of data requested from disk. 2016-09-19 16:07:03 -07:00
Cedric Bail 351af26271 elementary: properly handle refcounting of file in efl_ui_image asynchronous image openning. 2016-09-14 16:52:08 -07:00
Carsten Haitzler be29f3f4ec efl ui image - fix janky blocking async image preload thread handling
fix the elm image threaded image preload to be far simpler and
actually threadsafe without blocking the mainloop at all even on
object deletion. this also ensures ar least the first 512M of any
async precached file are loaded in so the preload doesnt stall on
headers that are outside maybe the first 4k of the file. i saw this
happening all over the place in the test i created.

@optimize
2016-09-08 17:30:59 +09:00
Cedric BAIL e6a810efa7 elementary: fix call to efl_data_scope_get from another thread.
This should fix the breakage on elm_suite.
2016-09-07 11:42:29 -07:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00