Commit Graph

1109 Commits

Author SHA1 Message Date
Tom Hacohen 537b138a23 Eo composite: change composite objects to not be tied to parent
This commit breaks behaviour!
Re-parenting no longer detaches composite objects, so watch out.

Now you can have an object be a composite object of an object although
it's not its child. This allows widgets to do things like having an
object as the child of a child object while still making it a composite
object to the main object.

With this change, composite objects don't keep a reference to the child,
but instead composite "bonds" are implicitly removed when either the
parent or the child are destructed.
2016-05-05 16:45:12 +01:00
Felipe Magno de Almeida 6124039c8f eolian-cxx: Added test for the removal of the .Base class requirement
Test creates class with the same name as the namespace of another class
2016-05-04 21:14:26 -03:00
Cedric BAIL a1bd7a7499 ecore: add timeout promise test. 2016-05-04 15:42:59 -07:00
Cedric BAIL 950701b738 ecore: silence warning in job test. 2016-05-04 15:42:59 -07:00
Marcel Hollerbach c66695bedb eo: replace loop_get with object_find
Summary:
object_find is more generic, so other mechanisms can also reuse the
code.
The object itself has to support the function, so there is no need for
eo_isa which would have a negative performance impact.
The base class implementation calls interface_get on the parent, so a
override of the function can just call the super function to continue in
the recursion.

Test Plan: just run the eo test suite

Reviewers: raster, tasn, jpeg

Reviewed By: tasn, jpeg

Subscribers: felipealmeida, netstar, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3909
2016-05-04 10:43:55 +02:00
Larry Jr 5230309b02 Eio: fixed eio_model_test_monitor_add
fix filename comparison in the test for deleted file
2016-05-03 18:48:01 -03:00
Larry Jr 24864af5c4 Eldbus: re-enable eldbus_tests_model by default 2016-05-03 16:49:29 -03:00
Larry Jr d418e98237 Eldbus: fixed eina_promise callback in eldbus test model 2016-05-03 16:49:29 -03:00
Cedric BAIL 0a77ae5c4a elementary: fix build with missing function. 2016-05-03 11:18:06 -07:00
Stefan Schmidt fc51b44ed4 tests: eio: re-enable eio test cases
Have been disabled with 0c76f82a. They pass here so re-enabling.
2016-05-03 11:30:23 +02:00
Stefan Schmidt b917eb4c25 tests: eio: use the correct eina_promise_* functions
When these changes got it with 0c76f82a31
they used the non existing symbols ecore_promise_value_get and
ecore_promise_then (most likely due to an unfinished refactoring)

Make sure we actually use the correct eina_promise_ symbols and add NULL
for the error callback which is now needed.
2016-05-03 09:36:37 +02:00
Cedric Bail 664d677201 ecore: add test case for Efl.Loop.Job. 2016-05-02 18:17:09 -07:00
Cedric Bail cfdc09fa93 ecore: fix promise test wrong use of EINA_UNUSED. 2016-05-02 18:17:09 -07:00
Larry Jr ba20e94201 Eldbus: eldbus_model_test disable by default
This test assumes an existing dbus-daemon running.
2016-05-02 18:37:04 -03:00
Larry Jr 7bbc5ec623 Eldbus: fixed property_set in Eldbus.Model_Proxy 2016-04-29 20:55:37 -03:00
Felipe Magno de Almeida e69f41001b eio: Fix unused variable warnings in test
Use of EINA_UNUSED in unused parameters
2016-04-29 17:32:23 -03:00
Felipe Magno de Almeida 46903d76f5 eolian: Fix promise generation with multiple parameters
When generating multiple parameters, they inadvertedly got
replaced by __eo_promise. Replacing all arguments to the
promise pointer.
2016-04-29 17:15:51 -03:00
Larry Jr 0c76f82a31 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Jean-Philippe Andre 0c2027b2af Edje: Add test case showing lifecycle of proxy object
This is for efl_content_get proxy objects (BOX & TABLE).
2016-04-29 13:32:01 +09:00
Tom Hacohen 7c4fce78df Eo tests: Mark unused variables as such. 2016-04-26 16:29:18 +01:00
Jean-Philippe Andre ff8ee01432 Efl: Rename some packing functions and return bool
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.
2016-04-26 16:48:55 +09:00
Jean-Philippe Andre f19da66843 Edje: Add test case for edje table
This tests the EO and Legacy APIs
2016-04-26 14:09:36 +09:00
Jean-Philippe Andre 12146ddea6 Edje: Return text defined in EDC in part_text_get
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
2016-04-26 11:36:23 +09: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
Jean-Philippe Andre 24177057d0 Edje tests: Add test case for access_part_list
This tests eo and legacy apis
2016-04-26 11:36:23 +09:00
Jean-Philippe Andre e1092b84eb Edje: Adapt to Efl.Container
This basically renames swallow into content.
2016-04-26 11:36:23 +09: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
Felipe Magno de Almeida 535a069a23 eolian-cxx: Remove .Base requirement
Remove requirement that class can't have the same name as another
class's namespace.
2016-04-21 18:31:53 -03:00
Stefan Schmidt a41f9ad870 tests: eo: switch to generic eo_key_del, fix build
Since 5e09d1307b we use the generic eo_key_del
for all of these.
2016-04-21 11:41:44 +02:00
Carsten Haitzler 5e09d1307b eo base - remove the duplicated key dels and just do eo_key_del() now
this rationalizes all the duplicated key dels (key_data, key_obj and
key_value).
2016-04-21 18:02:31 +09:00
Carsten Haitzler 26b5eb8a26 eo base - add loop_get for base class
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
2016-04-21 15:19:36 +09:00
Cedric BAIL c0bce3e23e eolian: add tests for restartable event. 2016-04-20 15:53:33 -07:00
Cedric BAIL 7cb53a3ae2 eo: let's check that this nested restarted event are working somehow. 2016-04-20 15:52:41 -07:00
Stefan Schmidt 500750323d tests: fix another redefine of Ecore_Cb build break 2016-04-20 15:31:13 +02:00
Tom Hacohen 115b69fd47 Eolian cxx tests: don't redefine Ecore_Cb. 2016-04-20 13:30:50 +01:00
Carsten Haitzler bc4d43a1cc eo base: names - add finding functions to fund by name
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
2016-04-20 18:29:41 +09:00
Carsten Haitzler 45456d9e82 eo base - add value keys in addition to object and void ptr data keys
eina value would allow any value to be attached to an eo object and
also be freed nicely too. this would allow any generic data to go
there without overloading a void * that us c coders love to abuse.

@feature
2016-04-19 18:36:57 +09:00
Carsten Haitzler 96142eef96 eo - add object comments - esp useful for erigo and gui builders
also useful for debugging and more. this also makes both name/id and
comment an extension blob of ram so objects dont keep growing
boundlessly in memory usage/size

@feature
2016-04-19 17:21:21 +09:00
Carsten Haitzler 86e7d642d5 eo - add object names/ids esp useful for erigo as it wants object names
also evas objects have names too, so add this as this was discussed
and now the feature is in. there is nothing to find objects by name
yet. that's more api's and features to add after this.

@feature
2016-04-19 16:34:53 +09:00
Carsten Haitzler 1bf509548c eina value test - gix blob check to check only relevant fields
the value check for blobs was checking unused fields in a union and
thats just bad. check only fields that matter to the blob.

@fix
2016-04-19 16:33:33 +09:00
Jee-Yong Um 11cdd13945 edje: add test for edje_object_part_box_insert_after()
Summary:
This test checks the validity of edje_object_part_box_insert_after().
It depends on D3733.

Reviewers: jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-04-18 16:21:07 -07:00
Tom Hacohen 70537370a1 Edje tests: Add parent upadting tests to edje. 2016-04-18 10:10:23 +01:00
Tom Hacohen cd26435434 Elm layout: Add parent updating tests to elm layout. 2016-04-18 10:10:23 +01:00
Tom Hacohen b337558fd6 Edje tests: Fix tests when running out of source and remove hack.
There was a seriously horrible hack here to workaround this issue. This
hacks goes all the way back to 3e07236. The essence of the hack was to
try the system files for the tests (and I guess that's why we were
shipping them although we really shouldn't).

This change fixes the file lookup for out of source files.

Hat-tip to zmike for pointing me to abs_top_buildir.
2016-04-15 18:18:22 +01:00
Tom Hacohen 68417186a9 Elm test layout: Fix indentation. 2016-04-15 15:41:36 +01:00
Tom Hacohen c1781eb9c8 Elementary tests: Migrate the suite to the efl test infra. 2016-04-15 14:39:56 +01:00
Chris Michael 08482e1ca4 elput: Add test framework for Elput library
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-13 14:16:17 -04:00
Felipe Magno de Almeida 35dd5b5cab eina: Fix promise error with eina_promise_all
Fix value_set and error_set signatures which were receiving a
owner. They actually receive the promise and not the owner, this
caused wrong access to memory and were not visible by warnings because
the functions are casted.

This problem caused errors in which it seemed that promise had
actually error'ed when questioned it.
2016-04-13 14:44:19 -03:00
Cedric BAIL fedc8939cc eldbus: make tests suite more robust to initialization count change. 2016-04-12 10:40:58 -07:00
Carsten Haitzler 8be56c9498 eo - add object sotrage in generic values with ref/unref
this adds eo_key_obj_set/get/del() like with data but for object
handles so the obj is ref'd as long as the key and parent obj exists
and then unreffed on deletion. it also tracks deletion of reffed
objects like weak refs and then removes the key automatically.

@feature
2016-04-13 01:06:40 +09:00