Commit Graph

27 Commits

Author SHA1 Message Date
Minkyu Kang a83643d134 elementary: gengrid - check the edge correctly
Summary:
The routine of checking edge of left side, divide position by row.
Since the result of fisrt item of last line is 1, that item was not checked as edge.
This patch is for fixing it.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>

Test Plan:
elementary_test -to gengrid2
append items (about 6)
horizontal mode on and item loop enable
check item loop is working properly

Reviewers: cedric, jpeg, Hermet, SanghyeonLee

Subscribers: jehun.lim, SanghyeonLee, cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-25 14:37:11 -07:00
SangHyeon Lee 73095ad7ad gengrid: support for non homogenous items
Summary:
Dimensions of gengrid items can be altered for
non homogenity.

Care must be taken however to set the homogenous
size for items using elm_gengrid_item_size_set().

In horizontal mode only the heights will change
and in vertical mode only the widths. Fixed dimension
will be as set with elm_gengrid_item_size_set().

This is forked by https://phab.enlightenment.org/D2422

Test Plan:
elementary_test -to "Gengrid Resized Items"
Current test program provides focus autoscroll
and item looping options.

Reviewers: raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4330
2016-10-19 15:48:51 +09:00
Marcel Hollerbach 4b2d459783 gengrid: call this on the pam class not on the normal class
this fixes gengrid.
2016-10-13 16:27:38 +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
Jee-Yong Um 9f7ce792f0 elementary: remove unused SMART_NAME strings
Summary: Smart name strings are not used any more.

Reviewers: Hermet, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4261
2016-09-01 11:33:04 +09: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
Jean-Philippe Andre 3b175fd7e9 elm: Fix some ERR messages following previous patch
This simply avoids calling functions on NULL objects, since
the previous patch would ERR out rather than silently ignore
the problem.

I just add explicit NULL checks before calling the functions,
so it's clear the object could be NULL (in the widget).
2016-08-26 17:15:05 +09: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
Cedric BAIL 323000c83b elementary: clear callbacks before destroying object to avoid crash.
@fix

T3188
2016-07-06 10:39:23 -07:00
Daniel Juyung Seo 3627fa7883 elm/gengrid: Fix null pointer dereferences.
CID: 1357210 and 1357209.
2016-07-04 07:31:15 +09:00
Jehun Lim effe9b1696 gengrid: fix focus issue when prev/next item is disabled
Summary:
After setting focus to disabled item, focus does not work properly.
It is necessary to consider disabled state of each item
when selecting next focused item.

Signed-off-by: Jehun Lim <jehun.lim@samsung.com>

Test Plan:
1. elementary_test -to 'gengrid disabled item focus'
2. check 'item select on focus disable'
3. move focus to disabled item
4. observe focus and compare before this patch

Reviewers: cedric

Subscribers: minkyu, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4115
2016-07-01 17:20:40 +09:00
Jinyong Park 3271ec8d18 theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum

* related history : 4ca3ef4514
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.

@fix

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

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4073
2016-07-01 15:09:43 +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
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 b2355d7da3 Evas: Rename Selectable_Interface to Efl.Ui.Selectable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre 31c4fd1f7c Evas: Rename Scrollable_Interface to Efl.Ui.Scrollable 2016-06-10 18:06:15 +09:00
Jean-Philippe Andre d67171940f Evas: Rename Draggable_Interface to Efl.Ui.Draggable 2016-06-10 18:06:10 +09:00
Jean-Philippe Andre e691de04be Evas: Rename Clickable_Interface to Efl.Ui.Clickable
Event prefix is efl_ui:
 EFL_UI_EVENT_CLICKED
 EFL_UI_EVENT_CLICKED_DOUBLE
 ...

The event prefix could be reduced to efl but I personally
prefer with UI.
2016-06-10 17:33:53 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
godly.talias afb4a194a8 Added feature to bring focused item to viewport on click
Summary:
Currently when an item in gengrid is focused and if it is scrolled
off the viewport halfly and if it user clicks on it, it won't be
scrolled into viewport. Only non-focused items will be scrolled into
viewport when clicked.

Test Plan:
elementary_test -> Gengrid focus -> Click an item ->
           Scroll it little bit out of viewport -> Click again

Reviewers: prince.dubey, shilpasingh, cedric, raster, SanghyeonLee

Subscribers: seoz, rajeshps, govi, jpeg

Differential Revision: https://phab.enlightenment.org/D3977
2016-05-30 14:39:37 +09:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00