Commit Graph

20 Commits

Author SHA1 Message Date
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 3029227fa1 eo: Change eo_override to avoid struct passing and GCC construct
This is a (minor) API & ABI break in Eo.h!

I say minor as eo_override shouldn't be used yet (EO is unstable
and this patch includes all the use cases in EFL).

I'm not very happy about the new form of the macro, but it avoids
two things:
- passing in a struct (valid in C, but never used in EFL)
- using a GCC construct to create structs on the fly

It was inspired by the event array define, but I don't think
we need the runtime memcpy here.

See also:
https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html
2016-07-19 17:55:07 +09:00
Jean-Philippe Andre 03ec8204bf tests: Show use of eo_override for custom layout
This requires the previous fix in eo to actually work.
2016-07-18 18:00:26 +09:00
Jean-Philippe Andre bed1e28d85 elm test: Shut up coverity warning
CID 1354839

It was non-sensical as there would be no iterator
if there are no children.
2016-07-13 12:58:43 +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 8ce859f484 Tests: Convert Ui.Box and Ui.Grid to Efl.Gfx APIs
Let's remove all evas_object_ stuff from there. :)

This also changes hint_request into hint_min.
2016-06-09 17:07:02 +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
Jean-Philippe Andre 31279d2513 Efl.Pack: Replace pack_direction with Efl.Orientation
Since I first made the pack_direction before orientation
existed, the names didn't match. This should improve API
consistency.
2016-06-03 16:52:31 +09:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Jean-Philippe Andre 902950018b Efl: Introduce Efl.Container and unify APIs
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
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre 2d946d03ae Efl.Pack: Rename methods and properties
- 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
2016-04-20 11:15:53 +09:00
Jean-Philippe Andre 4a16e83c56 elm_text/box: Use real widgets to show off box layout 2016-04-20 10:47:40 +09:00
Jean-Philippe Andre a0f92d9bef Efl.Ui.Grid: Implement custom layout functions
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).
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre e4889ca367 Ui.Box: Fix flow layout
Set align, fix usage with eo_add(EFL_UI_BOX_FLOW_CLASS).
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre f2eff88640 Efl.Ui.Box: Add pack_align property
While at first I wanted to remove the box_align / table_align
properties, it ends up being a necessary value in some cases.
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre 4b7ca8846d Elm_test/Ui.Box: Implement example custom layout function
This shows how to implement a layout function, with the
required Eo class boilerplate (note: could probably be
simpler with the appropriate macros, or a better solution
to create classes on the fly in C).

The layout function itself is awful, but shows that "it works".
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre a84468cf4b Elm_test: Add test case for Ui.Grid
Right now the proper layout functions for Ui.Grid are not
implemented, so most controls don't work. This tests that the
grid works fine as a table.
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre 548efd7fa4 Efl.Ui.Box: Implement flow layouts
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.
2016-04-20 10:47:40 +09:00
Jean-Philippe Andre 94228d2683 Elm_test: Add basic test case for the new box api 2016-04-20 10:47:40 +09:00