Commit Graph

110 Commits

Author SHA1 Message Date
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 1dad7e3e02 widget: Move signal functions to internal only
elm_widget APIs are internal only, even if they may be EAPI. The EAPI
here is for modules.

I believe this API is only required for layout objects, so simply should
remain in the layout class. Then you can do efl_isa() and call the
functions or accept error messages if you want to be more careless.

Ref T5363
2017-08-09 12:21:42 +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
Jean-Philippe Andre 999dbd9764 eo debug name: Use strbuf instead of slstr
This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 569ad0bac4 evas/edje/elm: Override debug_name in core classes
This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
2017-08-04 10:24:03 +09:00
Marcel Hollerbach 01af4dd13b elm_widget: fix warning 2017-07-26 15:52:54 +02:00
Jean-Philippe Andre d4b2eb1e7f elm: Move calls to efl_destructor(efl_super()) to the end
When destroying any object, its parent class destructor should
be called after the subclass destructor has been called. Only
some extremely limited work may be done after the super call.

This commit makes sure that all efl_destructor() overrides in
elementary are doing operations in the right order.

Also, remove a return void.
2017-07-25 14:43:12 +09:00
Marcel Hollerbach dd883a7064 elm_widget: only emit events when there is really a changed manager
A manager change to NULL is to be used as "this object is not registered
anymore" call, which will happen quite regular during shutdown.
2017-07-24 23:40:38 +02:00
Marcel Hollerbach 6f0b79fe4b elm_widget: call the events after eval outself with new manager/parent
otherwise we might end up with a node_get error, since the widget where
the event is called on is still registered in the wrong manager
2017-07-24 23:40:38 +02:00
Marcel Hollerbach b49df7128a elm_widget: only set focus.manager if we are really registering
otherwise we might set focus.manager even if we are not registered
2017-07-24 23:40:38 +02:00
Marcel Hollerbach 47ce995637 elm_widget: give feedback if registration was successfull or not
with this we can whipe out the focus.manager field in elm.widget so for
the case that something goes wrong we only get the error message where
actually something went wrong, and not the whole bunch of follow ups
where the code assumes its registered but it isnt.
2017-07-24 23:40:38 +02:00
Marcel Hollerbach 344a049ddb elm_widget: do not check for the visibility
it seems like the visibility is evalulated from different parent
relations, Just because the box (that is a container of a element) is
not visible, does not mean that the element in it is also not visible,
this somehow comes back to the box beeing deleted, the children beeing
reparented in evas, but not in elm. This is for now just a quickfix,
since those calls are just for optimization.

This fixes a load of errors once the elm_test window is closed

@fix
2017-07-20 12:00:13 +02:00
Marcel Hollerbach 1c9762d8ca elm_widget: do not register disabled logical nodes
this reduces the load of useless logical trees that

ref T5753
2017-07-18 17:51:38 +02:00
Marcel Hollerbach 92bad54778 elm_widget: eval all children if the disable property has changed
since all children could have a new register state in the manager

fix T5753
2017-07-18 17:51:38 +02:00
Marcel Hollerbach 8e2f5e8642 elm_widget: disable is a property across the tree
if a widget is disabled its children are also meant to be disabled.

ref T5753
2017-07-18 17:51:38 +02:00
WooHyun Jung 245940c093 Revert "elm_widget: separate elm_widget_item codes from elm_widget.c"
This reverts commit 4f8d20c826.
I'll apply this after finishing of release.
Thanks JP to give notification.
2017-07-17 13:45:08 +09:00
WooHyun Jung 4f8d20c826 elm_widget: separate elm_widget_item codes from elm_widget.c
This will help to focus on creating efl_ui_widget class work.
And, we need to change all the Elm_Widget_Item related logics to
factory or something else.
2017-07-17 11:22:46 +09:00
Daniel Hirt 544fedaeba Elm layout: only allow legacy for using NULL text parts
This is a follow-up to a4b79fdbe1.

efl_part no longer supports NULL parts.
NULL text parts are now aliased in legacy code beforehand.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2017-07-05 20:07:29 +09:00
Jean-Philippe Andre 59081043a8 elm: Always pass valid part name inside part APIs
This affects the legacy content_set/get/unset part APIs. This
should avoid some unwanted ERR messages in case an elm_object_
API is used on an elm widget that doesn't implement said API.

What this does is request the widget for the name of the default
part if NULL was passed in. Since some widgets are not elm_layout,
they have to override the API themselves, which is why I made it
an internal EO API (rather than a series of efl_isa()).

In theory, part should never be NULL when reaching the internal
implementation code in the widgets, at least for content.

In EO, efl_part(obj, NULL) should be invalid.

Ref T5629
2017-06-30 14:37:54 +09:00
Jean-Philippe Andre 9452a4ac49 widget: Avoid ERR in elm_object_content_ APIs
If content_part_{set,get,unset} are called on a widget that
is not a layout (or flip, and a few others), then some ERR
messages would be printed out.

We hide these ERR messages as all elm_object APIs should be
callable on an object for which elm_object_widget_check()
returns true.

Ref T5629
2017-06-30 14:37:54 +09:00
Jean-Philippe Andre 6bfbeff47e widget: Move mirrored_automatic to Efl.Ui.Base
This is, unlike what some of the documentation says, a public
API on elm_object. Let's place it along mirrored for consistency,
even if edje object will not implement it.

Ref T5363
2017-06-15 17:35:44 +09:00
Jean-Philippe Andre ece89aaaa8 widget: Make cursor_add/del internal
This API is meant to be used internally to elm, not from outside.
The public API only exposes part_cursor_set on layout, and a series
of cursor EAPIs.
2017-06-15 09:48:33 +09:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 2dc29cfbfd edje: Remove bool return from scale_set
It was always returning true. There is little point in returning
a bool here, an invalid scale value (eg. <= 0) wouuld lead to a
state where scale_get() != scale_set() and that's about it.
2017-06-12 11:50:30 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Marcel Hollerbach af858d1d93 elm_widget: add factory method to the widget
with this function you can trap the creation of the mangers, and change
the behaviour as you need it. For example returning a custom manager.
2017-06-09 10:16:19 +02:00
Jean-Philippe Andre 0d3fb8c2a5 widget: Remove unnecessary define
Looks like a copy & paste went wrong :)
Thanks @bu5hm4n
2017-06-08 18:49:56 +09:00
Bryce Harrington e1fbde9e5b elput: fix sp. usefull
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:04:43 -07:00
Jean-Philippe Andre 20a305a85d interfaces: Remove display_mode from EO size hints
This size hint is only used by naviframe, which is not part of
our EO widgets. I also believe it might be an even more confusing
hint than the others.

I kept the typedef as is in Evas_Legacy.h in case an app is
written using EFL_GFX_ instead of EVAS_...
2017-05-31 18:42:32 +09:00
Marcel Hollerbach ecc39f19c6 elm_widget: use a different pointer from sd
sd is used later below, which could then alter the wrong private data,
which is not part of the object.

CID 1374433
2017-05-20 21:03:15 +02: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 f0d0686096 widget: Remove widget_callback_add/del from EO
Those APIs are not bindable with EO since they pass in a function
pointer. Luckily they are barely used.

Ref T5329
2017-05-17 15:32:03 +09:00
Jean-Philippe Andre cc82c48b73 elm_widget: Remove widget_event_propagate from EO
It is an internal only API.

Ref T5312 (one less use of a legacy type)
2017-05-15 10:29:23 +09:00
Marcel Hollerbach 0ebe80fa0b efl_ui_focus_manager: rename api from geometry to focus_geometry
otherwise we would clash with efl.gfx.
2017-05-04 20:44:41 +02:00
Shinwoo Kim 3041b80b8b elementary: fix typo on comment
change "an widget" to "a widget".
2017-04-23 17:02:14 +09:00
Daniel Kolesa 3fb4bc336e eo: hide dbg_info from eo files
Continues b780cf2af2.
2017-04-21 17:59:32 +02:00
Carsten Haitzler a6253f44a9 elm widget - fix weak reference messup that causes segv's
welm widget weak refered the logical parent slot but never unreffed
the weak ref - ever. this should fix that. in fact it does. one crash
less with:

elementary_test -to "icon standard"

@fix
2017-04-21 16:14:06 +09:00
Marcel Hollerbach 716ec352d1 elm_widget: add unfocusable to debug informations 2017-04-20 14:38:58 +02:00
Marcel Hollerbach d481dd58ec efl_ui_frame: migrate to new focus system
when collapsed the subtree is unfocusable
2017-04-20 14:38:58 +02:00
Marcel Hollerbach 9b64e7316a elm_widget: evalulate show flag and call focus on super 2017-04-20 14:38:58 +02:00
Marcel Hollerbach 89cc2ca06a efl_ui_focus_manager: restructure node struct
a redirect can happen for logical OR normal
2017-04-20 14:38:57 +02:00
Marcel Hollerbach b53f3edd15 elm_widget: update focus register work
now it trackes changes of the parent manager. And registers more
reliable.
2017-04-20 14:38:57 +02:00
Marcel Hollerbach 4932ec5f63 elm_widget: add logical parent to interface
and evaluate all values correctly and emit the correct events
2017-04-20 14:38:57 +02:00
Marcel Hollerbach e614c96466 elm_widget: make sure we dont have a destructed logical parent 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 37ce83cc04 elm_widget: enhance focus handling of the widget
widgets will now use there widget parent as logical parent.
2017-04-20 14:38:57 +02:00
Marcel Hollerbach 1f8e6dcb37 elm_widget: add debugging informations for a manager in a widget 2017-04-20 14:38:57 +02:00
Marcel Hollerbach 97265254e6 elm_widget: make it a efl_ui_focus_object
it will register based on it can_focus flag
2017-04-20 14:38:57 +02:00
Jean-Philippe Andre 8ff2dffe7c evas/elm: Fix bad propagation of ON_HOLD flag
Test scenario:
  elementary_test -to "ExtScroller"

Try and modify a slider's value with the mouse wheel. Bad things
were happenning, as the flag ON_HOLD was not properly propagated
from the slider to the scroller. This is because the legacy
event_info structure inside the eo event info was not updated
with the new flag value.

By introducing a new EO only API, which is meant to remain
internal, we can use a single legacy info structure, fixing
this issue.

Note: In the future this API needs to be internal, not protected.

@fix
2017-04-12 18:43:15 +09:00
Jean-Philippe Andre 1166f753fb widget: Reduce WRN to DBG for on_focus_region message
Many widgets don't implement this function, and this case is
perfectly well handled by the caller. No need to WRN here.
2017-02-16 22:00:19 +09:00
Jean-Philippe Andre d689afccae group: Track calls to group_del
After a long search I found that fileselector was not calling
super.group_del on deletion, leading to the use of dangling pointers.
So let's verify that group_del is properly called.

See T4598
2017-02-15 20:11:22 +09:00