This renames some APIs from Efl.Pack in order to try and
make them more sensible. Feedback welcome.
Also, most APIs now return bool, where false is quite unlikely
to happen.
This moves the part_box and part_table APIs to a fake object
like was done in Edje Object.
This also adds support a few new APIs to those containers,
so they behave exactly like Edje.Object.
This is another implementation bit of "eo_part".
This fixes on top of 49a27688b1, which
assumed somehow that table items had names, although that
might not be the case. In my situation, name = NULL and there
was a crash everytime I clicked on the clock widget.
This function was returning only the text defined by part_text_set.
This is a behaviour change, as part_text_get() no longer returns NULL
if there is a string defined in EDC. But this now means that the actual
value displayed on screen can be retrieved by a simple API call.
@feature
This is similar to the previous patch for Box,
but for Table.
Those new EO API as well as the legacy ones still need to
be tested (no test case in make check...)
@feature
This removes Efl.Pack_Named which had a terrible name,
removes Elm.Container which should have been renamed
Efl.Ui.Container anyway, and introduces an interface
Efl.Container instead.
The hierarchy tree is now changed as objects don't inherit
from Efl.Container (it's an interface, not a regular class)
but only implement it. Obviously it is very easy to
reintroduce an Efl.Ui.Container parent class if we need it,
but I guess it should have some actual logic. It's basically
part of what Elm.Widget already does.
Some function names have been modified to look better in C
with the efl_content prefix.
@feature
As discussed on the mailing list we're taming the icon_standard code.
This means that icon themes are set by the user not the app.
Deprecate all the icon_lookup calls etc and remove the behaviour.
Add a config panel to elementary_config where the theme can be selected.
this is copied from weston, except all the code which is supposed to be of
struct type "offer" has been renamed "source" and then reused in the same way
that weston uses "offer" in order to maximize reader confusion
deleting the source here is invalid since the selection only changes in the
corresponding callback from the wayland interface
The definition of where to load icons is now up to the user
(through the configuration of the icon_theme config value)
rather than being defined in code per-app or even per-component
Summary:
The toolbar's box was resized in _sizing_eval(), _resize_job().
In _sizing_eval(), the box was resized according to its minimum size.
And in _resize_job(), toolbar would recalculate it and resize the box again.
If _sizing_eval() was called after resizing the box properly from _resize_job(),
the box was shrank before calling the next job.
If the box's minimum size is needed for calculation in the job callback,
it shouldn't change box's size before the job callback.
@fix
Test Plan: N/A
Reviewers: jaehwan, eagleeye, woohyun, cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D3911
If the table item has a name, posible case when item name length, with
index, will be 12. The 12 is predefined length for box index.
Quote Cedric
In a box, the index is one dimension, one int, thus the length
of it (from int to string) will always fit inside 12 bytes. That's
where this 12 comes from. That's also how the unique name of that item
is defined.
This commit separate the items name generation by part type, it will be
more correctly.
@fix
so geneirc data, wrefs, comments and id's are not that common so put
them all into their own memory segment that's allocated separately to
the core object so we only use this memory when needed. we already had
an extension section anyway so it's not new - just using it now for
more of the rarer bits of data. 2 more pointers gone from most objects
anyway and now extension code handling is a bit cleaner.
so memory for class id -> ptrs is mallocs. this means it likely will
be next to other memory malloced. which means overrunning memory
someone mallocs could walk into the class table and corrupt it. we put
eo ids in mmaped regions to avoid this if possible in case of buggy
code. let's do it for classes too.
this also now allocs in larger chunks. for mmap its in page chunks
(which can hold either 1024 or 512 classes depending on 32 or 64bit).
reallocs still work if mmap is not there and we do them in chunks of
128 classes (it seems that we start at about 70 or so classes atm when
elm_test starts and it grows to ~100 or let's do 128 as that's pretty
much our base as a power of 2 and we now dont realloc much).
if an object iot reffed or not hide on del. it should have been this
way before eo. eoifications i think messed a few things up.
this does bring up an issue... in eo we have no way to explicitly do
stuff on eo_del regardless of references at the time. this needs to be
solved.
@fix
lots of long paths for monitoring file paths for icons etc. are in
memory for efreetd. this reduces that memory by sharing them much more.
@optimization
Summary: moved mempools adding to separate method to avoid this problem in future
Reviewers: cedric, reutskiy.v.v
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D3903
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Summary:
For EDJE_RP_TYPE_SWALLOW objects (like GROUP, SWALLOW, EXTERNAL),
edje_object_part_object_get() will return NULL or transparent rectangle.
The note is added to have developers use edje_object_part_swallow_get()
in that case.
Reviewers: jpeg, Hermet, cedric
Reviewed By: cedric
Subscribers: Hermet
Differential Revision: https://phab.enlightenment.org/D3859
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
So it seems we are using Eina_Hash_Iterator quite a lot more than before.
This lead to a huge amount of alloc/free of Eina_Rbtree_Iterator that
was noticable in Enlightenment callgrind trace. This patch make it vanish
from the trace :-)
This patch ports the existing session recovery protocol from
Ecore_Wayland so that it is used inside Ecore_Wl2.
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
We use the summary line in various places where such a big block of text looks
ugly. In general we handle it a bit like our commit messages. One line summary
which should stand alone with more details and explanantions following after a
empty line.
Summary :
when mouse up happens, item must be focused, and after that,
select must be called.
current logic, focus is already called inside the select function
and again focus set is called in the end of mouse_up,
so if user new focused widget inside the select callback,
mouse_up forcely take the focus into the item again.
select callback should comes after the focus callback calls
to work properly.
@fix
this means that on loop_get on any obj as long as its a child of a
loop obj... it'll retunr that loop now. it will work. no more code
needed.
we can shortcut this with ui/gfx objects returning the mainloop
singletone.
this code is mostly copied from weston:
78d4bf9a3ec990dceee23fd53962a69891352a0e
9c93179023fe894e417ccd20533d72d672d976fc
credit to Carlos Garnacho <carlosg@gnome.org> as original author
fix T3455
@feature
Correct support all types of program actions for constructing
list of targets.
There are 3 group of actions, that related to targets:
- Does not support targets at all.
- Support only parts as targets.
- ACTION_STOP, that supported parts and other programs as targtes.
@fix
base class objects will ask their parent object to get the loop. this
means it recurses all objects regardless of type until it finds an
object that returns a proper loop object - eg a loop object returns
itself, a window, gfx/ui object returns the mainloop object etc. etc.
@feature
The idea is that when you are processing those events from within
they won't call twice any of the event until all of them are processed
at least once (Or one of them did return EINA_FALSE).
these files were created containing code which was very obviously copied from
weston. when copying code, copyright headers must also be copied in order to
comply with licenses.
Summary:
To ensure initialize all fields of Ecore_Event_Mouse_XXX,
use calloc() instead of malloc().
Test Plan: N/A
Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike
Subscribers: jpeg, input.hacker, JHyun
Differential Revision: https://phab.enlightenment.org/D3906
Box, Table and Grid now belong to legacy land.
Their Evas counterparts are already not installed anymore,
and Efl.Ui.Box and Efl.Ui.Grid are here to replace those
widgets (note: code was initially copy & pasted).
This should fix installed EO files consistency.
this finds child objects by walking the child tree searching children
by using the search string which can be name, class:name and both
class and name can also be a glob.
@feature
- Children are now contents
- Efl.Pack_Layout is now a separate class and
merges Pack_Engine.
- Removed dumb class Efl.Pack_Item
- Updated docs
- Added pack_ or grid_ prefixes to some methods
Untested yet. Will need to add the common 3 classes:
- standard
- homogenous
- homogenous max_size
And then implement a true custom layout function, that
respects weights in a certain manner (need to define it
clearly).
This fixes the linear API usage with a table.
TODO:
- remove internal table (as it doesn't support layout funcs)
- implement multiple layout functions (regular, homogenous, ...)
This reuses the Evas.Box code, since we are still using the
box internally. The flow layout function is far from perfect
(it works well only with items of same height).
This shows how to use specific layouts provided by EFL.
So, since we don't have function pointers, all the solutions
to reimplementing the layout function are quite convoluted:
1. use events
2. reimplement layout func
3. use an extra object
4. use a generic class (non instanciated)
Promises don't apply here (layout will run multiple times).
Problems:
1. Multiple event callbacks will be called, resulting in
potential performance impact, extra events, etc...
Also, there is no way to define standard implementations
that would be provided by the framework.
2. Reimplementation of a function requires extra EO work
(create an EO class, etc...), doesn't allow on-the-fly
change of the layout method.
3. Probably the best solution is to have an object implementing
the layout. But this means creating an extra object along
with the container.
4. To avoid the extra object, use a class, and reimplement
a @class function. This unfortunately requires extra
EO work.
Solution 4. has been selected, but it's not very nice...
This is only a partial implementation, work in progress.
The grid object should be a replacement for evas and elementary's
table and grid. Only the layout of items inside the container
is different, otherwise the API should be the same.
For now, this widget is based on an evas table but the full
layout logic will need to be reimplemented, eventually.
@feature
This should be the only linear packing container.
This replaces: evas box and elm box.
Edje box needs to be kept around for compatibility,
but it stays an EDC object only (for apps).
Lots of things are still to be fleshed out in this
box implementation:
- Simplify smart object / elm widget code
- Maybe stop using evas object box altogether
- Implement other layout strategies
@feature