Commit Graph

77 Commits

Author SHA1 Message Date
Shinwoo Kim 8aaa350262 Use ERR instead of CRI if *DATA_GET* returns NULL
This patch set is for remains.
2018-02-01 14:20:57 +09:00
Jean-Philippe Andre 5b2ffb6bde evas: Fix invalid call to intercept
This fixes scrolling in rage.

Lessons learnt:
 - Do not trust raster's bisecting skills ^^,
 - Do not blame GCC until you're 100% positive about the exact code
   triggering an issue,
 - va_arg is unsafe, and can lead to crazy issues like this one,
 - va_arg passes (int x, int y) differently from Eina_Size2D sz, and
   optimization flags may also affect how that's done, or at least what
   kind of garbage data is used.
2017-09-19 16:35:28 +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
Carsten Haitzler 0f08ee686e evas box - fix longstanding bug where min size is miscalculated
this has affected edje for... like... ever. min size of boxes just
doesnt work. because evas box just doesnt do it right. this has led to
nasty things where edje box is just not usable if you use weight of 0.
btw weight 0 means "stay at min size no matter what even if we expand
the box to be bigger" in edje... which is totally broken and i can't
fix that without potentially breaking even more stuff... but let's
see. i've been using this for several days now and ... i can't find
breakage... so this should fix up SOME issues in edje.

@fix
2017-09-15 07:35:34 +09:00
Jean-Philippe Andre 7ef714924a evas: Fix crash with smart objects
This is due to the previous patches.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 8572cd5def evas/edje/elm: Remove all uses of clipped groups
This removes the uses of the *EO* class, obviously not the use of the
clipped smart objects.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre e380dae4bc evas: Remove group_del override from smart clipped 2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 230b234891 evas: Remove private data for clipped object
Another step towards merging both classes of smart objects.
2017-09-13 09:57:05 +09:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Mike Blumenkrantz 920c3a5d5e evas_box: add safety check for adding box children to multiple boxes
this is guaranteed to cause a crash or equally bad behavior, so ensure an
error is raised

@fix
2017-06-23 17:43:44 -04: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
Marcel Hollerbach c59a8ddebc evas: fix child position when the container is moved
when the position of the container is changed the children should also be
repositioned, so setting the changed flag.

The visual effect where you saw that was in luncher where items of the
bar did not get fully up.
2017-02-12 00:10:05 +01:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Chris Michael a50c811ab0 evas: remove float comparison warning for evas_object_box
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:49 -05:00
Jean-Philippe Andre fdcd926960 evas: Fix stacked box align
I added a way to respect the object's alignment when adding them
to a stacked box, but that alignment should only be used when the
box align is set to fill, otherwise both aligns would conflict.

See 3df7b717c9
2016-12-13 16:12:27 +09:00
Jean-Philippe Andre 3df7b717c9 evas/box: Add support for align with stacked boxes
@feature
2016-11-23 13:04:13 +09:00
Jean-Philippe Andre 9bf0df8f32 evas: Mark group_add/del as internal
Lacking a proper internal tag, I'm using both protected (it is
in fact a protected access function) and beta (to mark as unstable,
not real API).

New smart objects based on EO only should rely on constructor,
finalize and destructor exclusively. In theory, this should be fine.

Unfortunately it may be impossible to inherit from the Efl.Ui.Win
class as it uses a really bad hack and calls super.constructor
inside the finalize method.
2016-10-12 11:47:50 +09: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
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01: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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 28c917836c efl: Cleanup some code (return values)
This removes some useless code in various places, where the
switch from eo_do() to standard function call was not properly
refactored.

This changes:

type ret = 0;
ret = my_eo_function();
return ret;

To:

return my_eo_function();
2016-08-05 10:32:30 +09:00
Jean-Philippe Andre f067bc6f71 evas: Fix crash in Efl.Ui.Box
This goes back to a stupid comment I made in 93fad2a19f2507a:
  No idea why evas_box was overwriting smart_data.get
  (esp. since it was returning a private struct).
Well, it turns out the struct is NOT private and the smart
data pointer can be used by any user of evas box (including
Efl.Ui.Box).

Fixes T3926
2016-06-22 10:53:37 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre 9a052a740d Evas: Move smart_callbacks_descriptions to legacy 2016-06-17 19:25:47 +09:00
Jean-Philippe Andre 93fad2a19f Evas: Nove smart data get to smart class
It didn't make sense where it was.
No idea why evas_box was overwriting smart_data.get
(esp. since it was returning a private struct).
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre da1e53820b Evas: Fix usage of callback arrays
This should fix compilation of EFL for Windows (at least
this is one more step...)

- evas box
- evas table
2016-06-16 13:10:34 +09:00
Jean-Philippe Andre 254f5ef772 evas object: Move some events to efl_gfx and efl_image
This affects basic evas object events such as:
- show, hide, resize, move,
- changed size hints,
- restack,
- image preloaded, resize, unloaded

Also, switched names to shorter "present form" like "preload"
instead of "preloaded".
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre ff0124bdae evas object: Mark event free as @beta
Use EO_EVENT_DEL instead.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 37625fca91 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Jean-Philippe Andre e2176ed6a3 Edje: Replace edje_box_part with a fake eo proxy
This is basically an implementation of eo_part() but only
for Edje Box APIs. Legacy API is implemented on top of the
EO API.
2016-04-26 11:36:23 +09:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Amitesh Singh 7ff30befd1 evas box: don't allow duplicate child append
Add check for duplicate child addition and return null.
2015-10-30 13:49:03 +05:30
Subodh Kumar 4290567fd6 evas_box: fix children size and position calculation when padding is used for horizontal flow layout
Summary:
Fix children size and position calculation when padding is used

For each child size calculation padding is adjusted
but box height should include  padding.
Secondly, x and y position of children should not  include
the vertical and horizonatal padding as child size has already
included the given paddings.

@fix

Test Plan:
Please modify test_box.c file in
function test_box_vert2 as follows:

   bx = elm_box_add(win);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   elm_box_padding_set(bx, 50, 50);
   elm_box_layout_set(bx, evas_object_box_layout_flow_horizontal, NULL, NULL);
   evas_object_show(bx);

Now,
1. open elementary_test
2. box
3. Box vert 2 (observe box is broken)
4. Try resizing the window (observe)

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-04 16:22:49 +02:00
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
Avi Levin 7d493fb420 evas: porting evas smart callbacks to eo 2015-06-07 11:00:52 +03:00
Tom Hacohen 6efbfe227a Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
Jaehwan Kim 0822485465 evas_object_box: add MAGIC_CHECK when it is added.
@fix
2015-04-10 19:37:59 +09:00
Chris Michael b6f74c0a12 evas: Fix unintentional integer overflow
Summary: This fixes CID1261436: unintentional integer overflow

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-09 15:26:32 -05:00
Andrii Kroitor ef9cf8b78d evas: Evas_Box - layout_flow_horizontal and layout_flow_vertical fix
Summary:
Now minimum width hint (for horizontal layout) and minimum height hint (for vertical)
are set to largest item size rather than largest row/column.

@fix

Test Plan:
1. Run "elementary_test"
2. Maximize window
3. Unmaximize it
ExR: button boxes should return to start state.

Reviewers: cedric, seoz, Hermet

Subscribers: cedric, reutskiy.v.v

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-21 14:44:15 +02:00