Commit Graph

104 Commits

Author SHA1 Message Date
Vincent Torri ba22016c4c tests: fix warnings and undef ref on Windows (using meson :-) )
Summary: we need to include evil_private.h so that some symbols are declared

Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9129
2019-06-20 12:50:35 +01:00
Carsten Haitzler 346e5d1324 edje src - mark with efl version so we don't get warnings 2019-05-13 14:40:08 +01:00
Marcel Hollerbach 4edf8036e0 meson: correctly use the correct dependency
Summary:
edje_cc calls epp, so we should not only add edje_cc to the depends on
target, but rather also ensure that epp is availble. Additionally, this
removes unneccessary depends on declarations when we do cross compile.
Depends on D8561

Reviewers: zmike, segfaultxavi, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8562
2019-04-05 08:15:39 -04:00
Yeongjong Lee 4628021fe5 efl_container: remove content_remove
Most of classes implements Efl.Container.content_remove are just calling "unpack"
except of "Efl.Canvas.Layout" and "Efl.Ui.Layout".
This patch remove the asymmetrical API and add content_remove API of
"Efl.Canvas.Layout" and "Efl.Ui.Layout" that child can be remove without efl_part
APIs.

ref T7576

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7913
2019-02-27 21:20:33 +01:00
Mike Blumenkrantz a5e183ad5d efl.canvas.object: clip -> clipper && clipees -> clipped_objects
Summary:
also clipees_has -> clipped_objects_count

ref T7555

Depends on D8039

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7555

Differential Revision: https://phab.enlightenment.org/D8040
2019-02-27 13:17:37 -05:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Marcel Hollerbach 1763afb391 edje: implement container api
the container api returns the number of added swallows.
the content iterator returns a iterator over all swallowed objects.

The reason this is only for swallows is that the interface explicitly
mentions UI elements at the count. Since i am believing the the result
of the count operation should mirror to the amount of elements in the
iterator, the iterator only returns swallowed objects.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7748
2019-01-26 11:41:58 +01:00
Carsten Haitzler 6dedfddda7 meson - edje_cc use -fastcomp for fast builds in mesa 2019-01-24 14:04:07 +00:00
Marcel Hollerbach 5b98ebab4a meson: abstract edje_cc exec lines
the array is calling the shell etc. this makes cross building easier.

Differential Revision: https://phab.enlightenment.org/D7413
2018-12-06 15:13:34 +01:00
Carsten Haitzler 791cd5b157 edje test - part content should be null as nothing is swallowed yet
fix test
2018-11-10 16:31:18 +00:00
Carsten Haitzler eae67c02e3 edje test - fix unused return val and actually check its value 2018-11-09 11:43:59 +00:00
Daniel Hirt e8ed36af10 Canvas layout: fix test for meson builds
Fixes T7456
2018-11-08 11:44:05 +02:00
Daniel Hirt face90632e Canvas layout: support more Efl.Text.* with efl_part
This adds many Efl.Text.* that are useful for manipulating the
underlying TEXTBLOCK object's propeties using efl_part.

This has been implemented as part of the "user-defined" properties of
the layout part, so that the changes on the part persist across load of
different groups.

Note that text styles have precedence over the TEXTBLOCK (Canvas.Text)
object's properties. if an edc provides a style, the properties it
manipulates as part of the "base:" string would not be affected by this
API.

In general, this helps reducing the amount of styles for objects (or
modes of the same objects) that share the same setup, but are different
in some properties (e.g.  ellipsis, wrap etc).

@feature

Canvas layout: add text part "expand" property

This adds "expansion modes", which are essentially the same as min/max
hints in the edje part's 'description.text' fields.

The user can then customize his widget to different modes without being
forced to create a new edje group in the theme.

Note that there is an added check in case one of the min/max text flags
are provided from the theme. In such case, all flags from this new API
will be ignored.
This fortifies misuse where the flags are set both in theme and the API.

@feature
2018-11-06 18:33:56 +02:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Yeongjong Lee 9fc687a8c3 edje: call recalc in part_text_get if there is no available text data
Summary:
If edje_text_get is called before any edje_text_set function call, it return
null, because rp->typedata.text->text is only set by edje_text_set function.
If there is no available text data, find it from rp(edc).

ref 7bbf18a950

Test Plan: make check

Reviewers: zmike, id213sin, herdsman

Reviewed By: id213sin

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6961
2018-09-28 16:14:00 +09:00
Mike Blumenkrantz 588830280f tests/edje: fix object parenting for swallow tests
Summary:
recent safety check patches exposed issues here where tests were
incorrectly written to pass evas objects as edje object parents,
resulting in new test failures after this began to be detected and
treated as an error

Reviewers: netstar

Reviewed By: netstar

Subscribers: netstar, cedric, #reviewers, #committers

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6851
2018-08-16 19:47:32 +01:00
Mike Blumenkrantz 5794f6f7af tests/edje: add test to verify that swallow objects exist during DEL callback
Summary:
this mimics expected behavior by enlightenment

for 2.0, this behavior should likely be changed since the INVALIDATE event
should be the last expected point at which a parent<->child relationship
continues to exist in any form

ref D6540
Depends on D6554

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6555
2018-07-12 16:29:51 +09:00
Mike Blumenkrantz b05a5cb4c7 tests/edje: split edje tests into separate files
Summary:
this will speed up tests and make it slightly less intimidating to
add new tests

Reviewers: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6554
2018-07-12 16:25:15 +09:00
Chris Michael 9a9970ae62 tests: Update edje test to wrap edje_object_part_object_get with
Summary:
freeze/thaw

@ref T6884

Depends on D6403

Reviewers: zmike, ManMower

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6884

Differential Revision: https://phab.enlightenment.org/D6404
2018-06-25 11:32:33 -04:00
Youngbok Shin 69b5d67367 edje: fix text set/get issue without edje calculation
Summary:
Some changes broke really basical function behavior of text.
I couldn't get text from an edje object which I just set to the given edje object.
In the past code, edje called recalc function before trying to get text.
So, this patch bring that code to fix this issue.
@fix

Test Plan: Included. Run "make check"

Reviewers: herdsman, raster, cedric, woohyun, devilhorns

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6364
2018-06-22 12:30:59 +03:00
Marcel Hollerbach d1e1adf0bc edje: fix edje_part_helpers refcounting
Summary:
the reference from efl_reuse was forgotten & the parent relation was not
correctlty setted, which led to the fact that NOREF was never emitted.
This caused that thte object never really was destructed probebly, and
thus the del_interceptor_cb was not executed, and the object simply
leaked.

The test checks that those properties are correctly set, additionally a
error is printed in the efl code when a part has not the expected
reference properties. This also enforces errors when users are doing
wrong things with objects returned by efl_part.

Reviewers: ManMower, zmike

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6254
2018-06-10 17:01:33 +02:00
Marcel Hollerbach bb2037748a edje: a new testcase for what was happening before
Summary:
this checks explicitly that the lifecycle is alive.

Depends on D6223

Reviewers: cedric, zmike, JackDanielZ

Subscribers: cedric, #committers, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
2018-05-28 21:50:19 -07:00
Youngbok Shin cd0bd865eb edje: fix backward compatibility issue caused by legacy cursor funcs
Summary:
edje_object_part_text_cursor_prev/next/up/down has return value.
It has to return EINA_TRUE when only it successed.
But, when these funcs moved to legacy, it changed to return EINA_TRUE
whenever it fails or success. It must return EINA_FALSE when it fails.
@fix

Test Plan:
- Run test suite
  make check

Reviewers: herdsman, raster, cedric, woohyun

Subscribers: zmike

Differential Revision: https://phab.enlightenment.org/D5972
2018-05-02 19:48:46 +03:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Carsten Haitzler e30fb6945e fix evas test suite to now init both ecore and evas.... correctly.
see c8dcc4327b803e9b8ad2a0985e756c924946c442 - basicall evas depends
on ecore these days... thus requires ecore be initted THEN evas. ...
which in theory is an abi break for those using evas and ONLY evas
long ago from when efl was separate... but it''s how we're building
these days.

@fix
2018-01-05 02:34:16 +09:00
SangHyeon Lee 0f16a06710 interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary:
Change name of 'grid' to 'table' for matching on common ui naming
and avoiding confusion with 'gengrid' and 'grid view'.
grid will be introduced as grid image view after.

Test Plan:
checked make & make install
checked make check - there are errors but not related with these changes.
checked make examples - there are errors in cxx but not related with these changes.
checked make discheck - failed
test in elementary_test with Efl.Ui.Table and Table_static.

Reviewers: raster, cedric, jpeg, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5668
2017-12-19 14:25:08 +09:00
Amitesh Singh 54ae9cc18b edje: rename Edje.Object to Efl.Canvas.Layout 2017-12-06 13:12:29 +09:00
Amitesh Singh c7aa3b2f83 edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc 2017-12-05 16:18:32 +09:00
Amitesh Singh 7b3fde4d4b edje: rename intf Efl.Canvas.Layout.Signal to Efl.Layout.Signal 2017-12-05 16:18:32 +09:00
Youngbok Shin de9f0aff57 edje: don't return negative width and height from _parts_extends
Summary:
It should return width and height with positive values or zero.
@fix

Test Plan: make check

Reviewers: raster, jpeg, cedric

Reviewed By: raster

Subscribers: jiin.moon

Differential Revision: https://phab.enlightenment.org/D5422
2017-11-06 11:06:41 +09:00
Jean-Philippe Andre 04d3cc4eb9 edje: Fix make check
Oops. The API was tested.
See 19dff85519
2017-10-13 11:07:28 +09:00
Jean-Philippe Andre 1fb306fd3e edje: Fix make check :(
No idea how I missed that one... (except that make check is now broken
for C++, again)
2017-09-18 17:40:38 +09:00
Jean-Philippe Andre efac7d523a edje: Move signal APIs to an interface
This interface will be used by elm_layout as well.

Ref T5315
2017-08-04 11:52:16 +09:00
Sungtaek Hong d545929845 edje_signal: reduce member count when deleted edje_signal_callback is found
Summary:
 - when deleted callback is found _edje_signal_callback_move_last() is called
   in order to pack match array.
 - during _edje_signal_callback_move_last() index skips when another deleted
   callback is found, but does not reduce members_count.
 - this duplicates a remaining callback and calls the callback twice.

Test Plan:
1. add multiple edje_signal_callback by edje_object_signal_callback_add()
              which have the same source, signal, func but different data.
           2. delete first and last callback by
              edje_object_signal_callback_del/edje_object_signal_callback_del_full.
           3. emit edje_signal.
           4. observe one callback is called twice.

Reviewers: SanghyeonLee, conr2d, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4985
2017-07-17 15:05:20 +09:00
Jean-Philippe Andre bca55bb52f edje: Add test case for signal_recursive_process 2017-05-30 14:39:24 +09:00
Jean-Philippe Andre bc38a4c639 check: Bump version to 0.9.10 and change macro
Changing ck_assert_ptr_nonnull() to ck_assert_ptr_ne() in order to
require "only" check >= 0.9.10. ck_assert_ptr_nonnull() was
introduced in 0.11.0. ck_assert_ptr_ne() is already used a lot
in the test suite so a recent version of check is required.
2017-05-30 11:02:05 +09:00
Jean-Philippe Andre 9d48350ae4 edje: Implement EO API for message_send
Since this uses generic_value (aka Eina_Value), there is an
implicit type detection and conversion. I did not attempt to
cover all types (namely string+int and string+float and even
less sets of those) as I believe they aren't really used. Or
they most likely could be replaced by multiple messages rather
than a single message.

Note: should we pass ptr(generic_value) instead of generic_value?
The API looks a little odd in C when passing by value.

@feature
2017-05-24 13:02:20 +09:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Jee-Yong Um ed7febb2c5 edje_cc: allow combine lazEDC keywords
Summary:
Fix parsing error which occurs when lazEDC keyword is combined
with other keyword by period. (like parts.rect)

@fix

Test Plan: Download attached file and run "make"

Reviewers: Hermet, cedric, jpeg

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4309
2016-09-23 11:56:19 +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 269fc4f7a6 evas: Remove common interface and use provider_find
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.

Use eo_provider_find in each implementing class.
2016-06-21 16:13:04 +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 915e09aed3 Evas: Rename Evas.Rectangle as Efl.Canvas.Rectangle 2016-06-02 18:57:30 +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
Jean-Philippe Andre 99924852ab Efl: Remove part name in Efl.Container (use Efl.Part)
This touches Edje and also Elementary where part names are used.
This commit blew up in size since now all content part APIs
(get, set, unset) require to use Efl.Part instead.

This is a big refactoring commit, but no logic should
have been changed. Fingers crossed.
2016-05-26 19:55:50 +09:00
Jean-Philippe Andre 35fc3f5130 Edje: Test proxy objects more
This tests that a cached object is not reused invalidly if
it was ref'ed.
2016-05-24 18:50:58 +09:00