These inits and shutdown are already done in elocation_init() directly. As we
do not use any of its functionality here we better concentrate on elocation
unit tests in here.
This breaks make check and distcheck when run more than once. I first look
seems to indicate that the hardcoded /tmp/rootDir is not removed during
shutdown and fials to be created the next time as it is already present.
When removing it manually another problem with the subdir popped up. No
time to fix this just before I want to do the release so this gets
reverted. Please fix this up and submit it again for 1.13. Thanks.
This reverts commit cb84017a3f.
This commit alone is fine but it does changes to another commit that needs
reverting as it breaks make check / distcheck and thus this one has to be
reverted as well.
This reverts commit 652e2f688b.
Much confusion with this spaghetti code of #ifdefs and clocks.
So, we can't use CPU clocks for the timedwait, this doesn't make
sense (and it's explicit in the manpage, too).
But we can use CLOCK_MONOTONIC or CLOCK_MONOTONIC_RAW which are
much better than the wall clock (because of ntp updates, etc...)
The test case tests that the cond actually waited for as long as was
requested and for not too long either.
This is hopefully a final fix for T1701.
Summary:
Added 2 test cases. First to test initialise, shutdown Ecore_File module and second to test all file operation functions defined in the module.
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1600
Summary:
Added test suite for ecore_input with one test case.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1602
Summary:
_ecore_con_init_count should not go below zero. I've added a test case to test this and also the code to fix this.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1603
Summary:
Added test suite for ecore_fb with test for ecore_fb_init
w
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1594
This adds a fragile test for cedric's fix from commit
3550c38080.
It assumes that all the added 64 functions are in order and that each
eo_op chain is 32 in length. As long as those don't change, this should
be a decent test.
Summary:
If WAYLAND_DISPLAY is not set or if wayland-0 fd doesn't exist in the XDG_RUNTIME_DIR path, then this test case fails. That should not be the case. So made changes in the test case.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1590
Summary:
_ecore_drm_init_count should not go below zero. So added test case to verify that.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1589
Summary:
Added a test case to calling ecore_wl_shutdown before ecore_wl_init. The return value of ecore_wl_shutdown should not go below 0.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1584
Summary:
Adding test-suite to ecore_drm with one test case.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1583
Summary:
Added a test case for ecore_wayland to test ecore_wl_init by passing the socket name. Wayland display is created and a socket is added to the display, then this socket is passed to ecore_wl_init to connect. It should successfully connect. Then
ecore_wl_shutdown is called to verify if it closes.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1560
For some reason, they were normal functions instead of eo functions,
which makes them harder to bind, less safe, and just wrong.
This commit fixes that.
Summary: The first version of .eet format is added. All changes due to discussion in D1307 are done.
Reviewers: artem.popov, se.osadchy, reutskiy.v.v, Hermet, raster, cedric, Oleksander
@feature
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1477
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Currently, in cursor geometry get function, the text direction is not
returned if cursor is under cursor.
This patch fixs it by returning text direction for under cursor.
@fix
Reviewers: tasn
Subscribers: herdsman, cedric
Differential Revision: https://phab.enlightenment.org/D1505
Summary:
This fixes an issue that causes BiDi text to get wrapped even when
resizing the textblock to its native size.
The way we find the last visual item in the native line is wrong. The
'visual_pos' describes the visual position in the formatted layout, in
which wrapping may occur. So, this is really bad to use it for native
width calculations as well.
Also, there's no need to actually reorder the line - we just need the
last visual item.
This adds and uses a function very similar to _layout_line_reorder, in
which we retrieve the last visual item in the native line. This
function does not do any actual reordering, as the native layout is
disposed of after calculation is done.
Also, added GET_ITEM_LEN macro for convenience.
Fixes T1532
@fix
Test Plan: Added to evas textblock test suite in this patch
Reviewers: tasn
Subscribers: id213sin, JackDanielZ, cedric
Maniphest Tasks: T1532
Differential Revision: https://phab.enlightenment.org/D1353
Summary:
Created test suit for ecore_wayland and added test case for ecore_wl_init and ecore_wl_shutdown.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1498
Summary:
In some cases of char or word wrapping, an empty line might be
accidentally added at the end of the paragraph. That line contains
no items. Of course, this line should not exist.
One outcome of this is that it causes wrong height values of the
paragraph, when the finalizing code uses the
_layout_last_line_max_descent_adjust_calc, which in turn
looks at that empty line to calculate the descent values.
@fix
Test Plan: Char-wrap and word-wrap tests to test suite included in this revision.
Reviewers: tasn
Subscribers: JackDanielZ, cedric
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D1444
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
preserves the old behaviour (for bindings).
eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
to zombie-land even if still refed).
Summary:
New test case for Eina_Trash was added
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: raster, cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1460
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Make check would even fail on 32bit machines because of that:
Lua tables are not arrays and lua_next doesn't ensure the order
of the elements as I wrongly assumed.
@fix
Fixes T1615
From now on, there are 5 builtin complex types, particularly accessor, array,
iterator, hash and list. All other types are simple - they can't have a complex
part. Also, the <> now binds to the type itself, not the pointer. More builtin
complex types will be added as needed.
Local and base class functions are supported.
When @empty is provided, dummy functions (initializing the parameters with default
values if needed) are generated.
When @auto is provided on properties, access to internal data variables is done. On
set, it will assign parameters values to private data members. On get,
parameters are set with private data members values.
See the supplied tests as examples.
@feature
Now they're registered correctly. Also, add new API, eolian_implement_is_virtual.
Also, deal with get/set properly (when filling in additional implements)
This is needed when get properties or methods have to return a
value in case of failure or to initialize parameters.
The way used is to generate an intermediate function that will
initialize the parameters and then invoke the "user" function.
Summary:
Evas Textblock ellipsis is handled in a item.
When the ellipsis item is added in the text, some characters are cut off
considering width of ellipsis character.
But, it is handled in only one text item.
If there are many short text item, the ellipsis item can be cut off visually.
And there was a bug in the patch when text is displayed in two lines or more.
The bug is also fixed.
Fixes Phab ticket T1213
@fix
Test Plan: This commit includes test case.
Reviewers: woohyun, seoz, sohyun, tasn, raster
Subscribers: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D1360
This enables checking if an object is being created, or has already been
finalized. This is useful in functions that you want to allow
only during the creation phase (i.e inside the eo_add()).
if you don't init (or set engine) on an emotion object, itstill works
- it chooses the default engine.. whihc i now have set as gst1. :) one
less thing that HAS to be done on init. better.
Because of Eina_Value being less than optimal in our usage, we're dropping it in Eolian.
This simplifies the code and makes it easier to bind to other languages, which
will aid new generators. Also, we're dropping long double support from eo files
and expressions as it causes an ABI breakage in gcc 4.4.
This change adds a new API to retrieve the legacy prefix for enum members
and also adds support for generating enums into the C generator. Besides that,
it prevents generation of entire struct contents when the .eo file declares
a named struct inside of a typedef - as the struct itself gets generated later on.
Also added API to retrieve value of a variable (forgot about that one)
and made it impossible to create extern constants (doesn't make sense)
as well as made it impossible to give extern globals values.
This way we can only lex expr related tokens (operators etc.) when actually
about to parse an expression. That allows stuff like nested complex types
without the lexer treating the endings as right shift.
This tests that even with multiline ellipsis, the ellipsis in the second
line is not overdone (i.e it only does ellipsis as needed).
This is a test for something we found out when we applied D1311 (for T1213).
This patch fixes an issue causing text to be cut off in some cases.
The problem was that we were calculating line width and alignment before
we did any bidi calculations, which in turn caused us to use the wrong
text items for those calculations.
Many thanks to Daniel Hirt for investigating this deeply, finding all
the nitty-gritty and generally pointing me to where the problem is.
Daniel also provided the test case.
His patch (D1291) was close, but not enough.
Fixes T1496
@Fix
This reverts commit d408408283.
this breaks mult-line "long" filenames in efm. 2nd line is just ...
for almost all of them (ones that are actually in need of 3 or more
lines). break break! REVERT!
Summary:
Evas Textblock ellipsis is handled in a item.
When the ellipsis item is added in the text, some characters are cut off
considering width of ellipsis character.
But, it is handled in only one text item.
If there are many short text item, the ellipsis item can be cut off visually.
Fixes Phab ticket T1213
@fix
Test Plan: This commit includes test case.
Reviewers: woohyun, seoz, sohyun, tasn
Subscribers: herdsman, cedric
Differential Revision: https://phab.enlightenment.org/D1311
so the test suites were useless because they didn't ecompile what was
generated. it was missing a ) at the end of calling eo_do_super to
start with. it was missing a call to do_uper fo destructors too. also
it didnt deal with the #include "blah.eo.c" at the file end either so
it produced uncompilable src at the start. again - also fix. this also
fixes test case comparisons to match the now correct generation that
compiles.
Summary:
In items loop of _size_native_calc_line_finalize,
last_it should be replaced with new item according to position.
But, visual_pos is not prepared and it is always zero in the function.
So, we need to update visual_pos.
And when textblock only has LTR text,
we can replace last_it according to item list sequence.
@fix
Test Plan:
It includes test cases using the following test case.
1. "i<b>。</b>"
2. "。<b>i</b>"
Reviewers: seoz, woohyun, sohyun, tasn
Subscribers: raster, herdsman, cedric
Differential Revision: https://phab.enlightenment.org/D859
Summary:
We can define a style tag as opener, closer and own closer.
If there is a markup tag that is matched to style tag,
it is reprocessed to format node inside of textblock.
But, when the format node will be converted to markup text,
'/' character can be appended to text at closer and own closer style tag.
Even if original markup tag does not has '/' character,
it will be appended according to format node information.
It makes some issue when compare input text with output text.
@fix
Test Plan: This commit includes test case.
Reviewers: woohyun, raster, sohyun, tasn
Subscribers: herdsman, cedric
Differential Revision: https://phab.enlightenment.org/D1037
Summary:
Word start/end works incorrectly when it goes to new line or line begins with spaces.
Ex: In elementary_test/Entry, place cursor at the end of line, press ctrl + right arrow keys: cursor moves to begin of next line. In this case, cursor should move to end of 1st word in next line.
Ex2: In elementary_test/Entry, add some spaces to begin of 2nd line (" uses markup"), place cursor at the first word ("uses"), press ctrl + left arrow keys twice, cursor moves to begin of 2nd line. In this case, cursor should move to begin of last word in 1st line.
This patch provides a fix by considerring next/previous text node to move cursor to correct place.
@fix
Reviewers: woohyun, raster, tasn
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1140
Summary:
change eina_tiler_intersection to return a NULL if intersection
of two tilers doesn't exist. and add test case to check it.
This doesn't break ABI/API as this call could already return a NULL value and it
should have been handled by the caller anyway. This just make an expected behavior
more correct.
Test Plan: run eina_suite after building eina test suite
Reviewers: cedric, raster, torori, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1205
Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
@feature
This is a new feature for eina (and EFL) - a zero-copy thread message
queue for sending messages from one thread to another or from the
ecore mainloop to or back to the mainloop from threads. It has a
complete test suite too.
Summary:
Removes Wshadow warnings by prepending/appending radices to
the target variables and parameters.
Reviewers: felipealmeida
CC: cedric
Differential Revision: https://phab.enlightenment.org/D1118
mmhhmm, missing @ Constructor tag, bad for the bindings,
maybe we must split animator and timeline into 2 classes,
maybe support callback hot swaping ...
This reverts commit ec4ffb86d6.
Summary:
- use defauld constructor instead of custom one.
- we don't allow construction of an animator with a NULL callback function,
this is checked in overriden eo_finalize.
- we don't support changing this callback once the object is created,
such calls will call ERR() and return.
see 46a78e8c and f92e5d50 for eo_add_custom() -> eo_add() details
Reviewers: tasn
Reviewed By: tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D1113
as stated in f92e5d50, instead of using eo_add_custom() thus a custom
constructor and maybe overriding the default constructor to block it,
- use the default constructor to build the object
- add calls to eo_add(), to initialize the object
eo_add(class, parent, val_a_set(1), val_b_set(2), ... );
- override eo_finalize to validate the object and if needed,
use eo_error_set(obj) to abort object construction
Summary:
Applications can:
void method_callback(void* data, const Eldbus_Service_Interface* iface,
const Eldbus_Message* message);
struct { ... } data_struct;
Eldbus_Method methods[] =
{
"method1", ELDBUS_ARGS("b", "bool"), ELDBUS_ARGS("b", "bool"), ELDBUS_METHOD_FLAG_HAS_DATA
, (Eldbus_Method_Cb)&method_callback, &data_struct
};
And method_callback will be called with data parameter pointing to data_struct global object.
Also, Eldbus-cxx supports registering an interface passing a lambda or
function object as method. For example:
edb::service_interface iface = edb::service_interface_register
(c, path, interface
, es::method("SendStringAndBool"
, [expected_string, expected_bool] (std::string const& n, bool b
, bool* out)
{
std::cout << "Running SendStringAndBool" << std::endl;
ck_assert(n == expected_string);
ck_assert(b == expected_bool);
*out = b;
return n;
}
, es::ins<std::string, bool>("string", "bool")
, es::outs<std::string, bool>("string", "bool")
)
);
When a request for "SendStringAndBool" with the proper signature is
called, executes the lambda and replies with the return value and
its bool* out parameter value.
Reviewers: cedric, woohyun, raster
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D1052
Summary:
currently, normal orientation tests are only added.
I'm going to add flipped orientation tests as well after I put related code in jpeg loader (currently it's not supported)
Reviewers: raster, cedric, jpeg
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D1098
Summary:
This patch allows us to construct efl::eina:: types from
their respective C types.
Reviewers: cedric, felipealmeida, q66
Reviewed By: q66
CC: smohanty, woohyun, raster, cedric
Differential Revision: https://phab.enlightenment.org/D1068
Summary:
This test should make the test suite fail. It sets "a<ps>b" and
"a<ps/>b" markups, and deletes the PS format. Essentially, these two
different markups should have the same result by this deletion. Instead,
only the <ps/> format gets deleted properly.
A follow-up commit is added with this as a fix.
Evas/Textblock: fix deletion of PS bug
Fixes an issue with deletion of "<ps>". Format deletion was only
performed for formats that are own-closers. This sets the paragraph
separator to be an own-closer format.
@fix
Reviewers: tasn
Reviewed By: tasn
CC: JackDanielZ, id213sin
Differential Revision: https://phab.enlightenment.org/D1046
Summary:
When item format is cutoff by ellipsis, *_cursor_format_item_geometry_get API
should be failed at the item position.
But, it can be success and returns abnormal geometry.
Reviewers: woohyun, tasn
CC: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D974
"f<color=#f00>i</color>f" could cause textblock to crash. It doesn't
crash anymore. It doesn't render the colours correctly either, but at
least this is the first step.
This is the start of fixing T1308
@bugfix
This function lets you hook at the end of eo_add and override it for a
class. This is essentially the first step towards killing custom
constructors. Instead of having a custom constructor, you should just
do:
eo_add(CLASS, parent, a_set(3), b_set("eou"));
eo_constructor is called at the beginning for pre-init things.
eo_finalize is called at the end, for actually finalizing and doing
things. This cleans up the API and possibly saves a lot of things that
would have been stupid and slow in the past, like loading an elm widget
with an existing theme, and then changing the theme.
** This breaks Eo ABI, please recompile elementary and everything else that
creates eo objects.
@feature
Summary:
This enables textblock to support more values other than 1.0.
For 0 <= ellipsis < 1.0, it splits the text such that it fits the
textblock's width. The ellipsis is relatively position according to the
ellipsis value, and characters are removed also relatively.
For example, a value of 0.5 will position the ellipsis right in the
center of the textblock's width, while removing characters equally right
and left from the center.
Basic approach to this feature was to do some work before the layout
process. We calculate the expected total width of the items, and by how
much we exceed from the textblock's width. Afterwards is it just some
careful work to set the boundaries of the width we want to cut, and
deciding which characters we need to removed to fulfill this requirement.
The rest is splitting the text and visually-removing the part we
need to cut.
This is all handled before any logical lines are created, so the
_layout_par function remains almost intact. A designated _ellip_prev_it
field in the Paragraph struct instructs after which item we place the
ellipsis item, if at all.
Note that we keep the fast path for ellipsis 1.0, as heavier work needs
to be done for the other values.
Added tests to evas_suite for a range of ellipsis values.
Also, multiline is unsupported at the moment.
@feature
Test Plan: Anything that uses Evas Textblock (single-line, please)
Reviewers: tasn, id213sin, raster
CC: cedric, JackDanielZ, raster
Differential Revision: https://phab.enlightenment.org/D905
The function eolian_implement_information_get was returning strings for
the class and the function. It was written in this way at the beginning
because it was not needed to verify the correctness of the class and
the function.
Now that we have the namespace feature, this function must check it,
meaning that the class and the function are now known.
So we can return them instead of returning the strings.
The generators had to find the class from the classname. It is no more
needed.
The C++ generator has been adapted to this new API.
Summary:
Fixed the rbegin/rend functions returning switched reverse iterators.
Added code to some unit tests for comparing elements in reverse order, in interest of
checking the correctness of the rbegin/rend functions.
Reviewers: felipealmeida, cedric, woohyun, smohanty, raster
Reviewed By: felipealmeida
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D901
Summary:
Support union, subtract, intersection, equal(comparison) between tilers.
@feature
Test Plan: Test with added test case(src/tests/eina/eina_test_tiler.c) and the example(src/examples/eina/eina_tiler_02.c)
Reviewers: gwanglim, devilhorns, raster, zmike, cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D880
Until now, the functions giving access to class information were taking
the class name as parameter.
Except the fact that we needed to search into a hash table for the internal
class structure, no flexibility is possible.
This change consists in modifying most of the APIs using the class name
with a new Eolian_Class type and adapt the code of the C and C++
generators accordingly.
By using -gi option, the generator appends the functions that are
present into the given eo file and missing into the developer file
(given via -o option as an in/out file).
@feature
It includes parser updates, database fill and tests on basic and complex
types.
One can define types in this way:
type Evas_Coord: int; /* Simple type definition */
type List_Objects: Eina_List * <Eo *>;
@feature
Summary:
Mainly from the examples but also from libunibreak and tests/eet.
I'm not sure if it's really worth to remove warnings from the examples
-- because it adds pedantic-ness to something supposed to be didatic,
but I leave for you guys to judge.
Reviewers: tasn, cedric
CC: felipealmeida, raster, smohanty, cedric
Differential Revision: https://phab.enlightenment.org/D896
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Summary:
Some fonts has combination information for "ff".
When harfbuzz is enabled with the font, evas text ellipsis logic can be broken.
Reviewers: tasn, woohyun, cedric
Reviewed By: tasn
CC: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D870
Some comment/commit message improvements by TAsn.
Summary:
This patch adds 'eolian_cxx' -- a C++ bindings generator --
to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate
.eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated
bindings).
src/bin/eolian_cxx: The eolian_cxx program.
src/lib/eolian_cxx: A header-only library that implements the C++ code
generation that binds the .eo classes.
=Examples=
src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example,
it just uses some "dummy" generated C++ classes.
src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how
pure C++ classes inherit from .eo generated classes.
src/examples/evas/evas_cxx_rectangle.cc: More realistic example using
the generated bindings Evas Cxx. Still a bit shallow because we don't
have full fledged .eo descriptions yet, but will be improved.
=Important=
The generated code is not supported and not a stable API/ABI. It is
here to gather people interest and get review before we set things in
stone for release 1.11.
@feature
Reviewers: cedric, smohanty, raster, stefan_schmidt
CC: felipealmeida, JackDanielZ, cedric, stefan
Differential Revision: https://phab.enlightenment.org/D805
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Yes, it's a bad move. But I'd rather avoid breaking make check
for now until I have a proper test suite.
The script language has been changed to Lua, and so its
limitations and syntax are not the same. Remember this is a beta
API so it shouldn't even be exposed to normal apps.
This adds filter support to Image objects as well.
The exact same filters can run on Text and on Images
(provided some colorspace limitations are respected).
This basically adds:
- Support for RGBA input buffer
- Eo entry points for Image filter support
- Implement basic filter support in Evas_Image
Before this change, all the .eo files of the directories given with -I
option were parsed. Most of this information was not necessary at all,
since only the classes belonging to the inheritance of the class given
as parameter were needed.
Now, during the parsing of the given class, the inherits classes are
searched and parsed.
A condition is needed to make it work well. To find a filename for a
class, we consider the lowercase of the class name as the filename we
have to parse.
e.g, Elm_Button -> elm_button -> elm_button.eo
It considerably reduces the generation time.
A fix in the tests was needed.
It includes too fixes for the complex type. If I had listened to Tasn,
I would have detected them a long time ago.
But he didn't insist enough. He just said:
"Write your tests, ?#@*&%! french!"
Summary:
2 threads run 'eo2_do(o, a(), b());'
- A goes first, creates an object, enters 'eo2_do(o, a(), b());'
in a() call, it blocks, releases B and waits for it.
- B when released, creates an object, enters 'eo2_do(o, a(), b());'
in a() call, it joins and releases A, then blocks.
- A returns from a(); and enters b() using current call stack frame,
which is the one pushed by B! then pop the frame and releases B.
- B does as above using the stack pushed by A!
Summary:
Modified syntax for eina C++ log to imitate the macro call as returning a stream. So, instead of:
EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain, "foo " << 5);
It is now used as:
EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain) << "foo " << 5;
Which more closely resambles using IOStreams in C++.
@feature
Reviewers: cedric, barbieri, smohanty
Reviewed By: barbieri
CC: cedric
Differential Revision: https://phab.enlightenment.org/D623
Summary: Evas textblock can't cut off text properly when it has separated items.
Reviewers: tasn, woohyun, raster
Reviewed By: raster
CC: cedric, herdsman
Differential Revision: https://phab.enlightenment.org/D667
It seems that a different version of freetype is causing some different
values to be calculated for some glyphs. Also, we consider the whole
font list when calculating max ascent/descent, so there will always be
differences there.
This commit just laxes the tests, requiring the values to be at least
the values we expect from our font.
Fixes T1079
Tokenizer's approach of looking back is horrible and breaks the
following simple case (bug I had that lead to this patch):
"string\\"
As the parser would get the end quote and check the previous character
if it was a backslash and it was, but it was not escaping the quote,
but being escaped by the previous backslash.
The best approach is to first check for escape and then go to
quote. Escape is simple and only the following byte, so we enter
escape, process the byte and then are back to regular mode (be it
quote or unquote).
Added testcase so we avoid breaking it again.
@bugfix cherry-pick
This happens with many texts. The issue occurs when the width of the
last char is larger than it's advance. Before this patch, we didn't the
width into account when calculating width, thus causing clipping issues
in some cases.
Summary:
Added efl::eina::malloc_clone_allocator to be used with ptr_* data
structures for wrapping structures allocated by EFL in C.
This allows for example:
void foo(Eina_List* l)
{
efl::eina::ptr_list<int, efl::eina::malloc_clone_allocator> list(l);
}
If the standard efl::eina::heap_no_clone_allocator is used, the
deallocation code uses C++ delete operator, which causes undefined
behavior because the allocation was originally done with malloc.
Reviewers: cedric
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D614
Summary:
Added eina_log support for C++ using the following macros:
For logging into a domain:
EINA_CXX_DOM_LOG
EINA_CXX_DOM_LOG_CRIT
EINA_CXX_DOM_LOG_ERR
EINA_CXX_DOM_LOG_INFO
EINA_CXX_DOM_LOG_DBG
EINA_CXX_DOM_LOG_WARN
And for logging into the default domain:
EINA_CXX_LOG
EINA_CXX_LOG_CRIT
EINA_CXX_LOG_ERR
EINA_CXX_LOG_INFO
EINA_CXX_LOG_DBG
EINA_CXX_LOG_WARN
The usage is simple as can be seen in the tests:
efl::eina::log_domain domain("error_domain_name");
domain.set_level(efl::eina::log_level::critical);
EINA_CXX_DOM_LOG_CRIT(domain, "something went wrong with the following error: " << error);
@feature
Reviewers: cedric
CC: raster, savio, cedric, sanjeev
Differential Revision: https://phab.enlightenment.org/D605
Summary:
Added inarray, inlist, ptr_array and ptr_list's range types named: range_inarray, range_inlist, range_ptr_array and range_ptr_list.
Each has two "flavours": mutable and not mutable. The const versions are parameterized by a const parameter. For example: range_ptr_list<int const> and the mutable doesn't have the const, so: range_ptr_list<int>.
The difference between the two is that the const versions can't modify the elements from the sequence, while the mutable allows so. Also, the const receives a Eina_Array const* while the mutable must have a Eina_Array*.
Reviewers: cedric
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D613
Summary:
Added support for exceptions on ecore_main_loop_thread_safe_call_async and
ecore_main_loop_thread_safe_call_sync. Also optimized the transport of the
return value through a parameter on ecore_main_loop_thread_safe_call_sync.
ecore-cxx: Changed uses of alignas for aligned_storage in C++11
Reviewers: cedric, raster
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D593
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
The current implementation of eina_convert_itoa cannot convert INT_MIN.
When the input number is negative, the function negates it and this is
an undefined behavior for INT_MIN since -INT_MIN cannot be represented
in a signed int.
@fix T1062
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
as we don't support multiple composites of the same class,
and know at class elaboration how many composites we should have,
we can create the composites array and pack it at the end of the object.
In a previous commit I mentionned that make check would fail
if PulseAudio is not running. Well, this is a bit excessive,
especially for buildbots where it doesn't have to be running.
So let's check that PulseAudio is running before failing.
Other errors should still be caught.
A simple "pulseaudio --check" should do the trick.
EFL can be built with PulseAudio support even if PA is
not present on the system. In that case, ecore_suite will
hang forever. Let's just catch the error instead.
Note: make check will fail if PA is not available (but not hang)
This is not related to Tom's recent mail (but yeah it reminded me
of this bug^^)
Fixes T732.
The point of this binding is to enable the support for easy lambda for ecore function
that wont be using Eo. See the tests on how to use those.
Reviewers: cedric, raster
CC: savio, cedric
Differential Revision: https://phab.enlightenment.org/D582
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
eo_composite_attach fail if the class of the composite is not
listed in the parent class extensions, or if there is already a
composite of the same class. The later because calls are
forwarded to the first responding composite, see _eo_op_internal().
The goal of this library is to make the life of C++ developers easier
when having to manipulate Eina datatype by providing a layer to abstract
those data type in C++. Check examples for now. Documentation will come
soon, but we are pushing that rather sooner to get feedback on those bindings.
As you will notice, this library is just composed of headers. There is no .so
and we do think it is better this way. Reducing ABI and API stability issue for
applications developers who are the primary target of this binding.
Also please note that you will need to have C++11 to use this binding.
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
* New --loop: restart the playback when end reached
* New --position: start the playback from the last know position
* Fixed double -R option. now -r is --reflex and -R is --copyright
Loop and last-position was implemented yet, this commit just made
them optionally, so the default behaviour of the test reflect the
default behaviour of emotion.
Force render into an Ecore_Evas, and check that the pixels
are valid:
- Not all transparent (can't really happen)
- Not all black (since there's a black rect behind the text)
- All valid premultiplied values (A >= R,G,B)
Yes, it's a bit slow. But at least it really checks something :)
Set filter on a text object and check the object's geometry.
Get the padding and the geometry so we're sure they match.
Also, pad_get would return 0 if the filter did not compile,
so this checks that these filters are valid.
This test uses some Devanagari text that should have more complex
clusters than what latin text can provide. This is a more complex
wrapping case that should be tested and haven't been tested until now.
NOTE: do we really need to maintain 2 different groups for the reflex effect?
The 2 groups differ only for the added reflection part.
Isn't enough to show/hide the reflection part when requested?
Summary:
delete_cb is called at thread exit for each Eina_TLS keys used by the thread
Details:
posix:
pthread_key_create(key, delete_cb); does it
win32/wince:
eina_tls_free/new un/registers key&&cb into a static eina_list.
eina_tls_set add the key to an eina_list in Eina_Thread_Win3.
this list is cleared and callbacks are called in _eina_thread_join()
Test Plan: win32/wince has to be tested, I have no setup to do it.
Reviewers: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D489
It is sometime useful to start from a defined buffer, but to not touch it
until needed. This make life of caller more easier as they don't need to
duplicate the buffer themself as Eina will now take care of that.
In the previous commit, style padding has been changed, so
that lines don't get extra space just because there's a special
style (glow, ...)
This adds some test cases that check the actual geometry of the
lines relatively to each other.
NOTE: This test does not fail before the padding commits, as
_relayout_if_needed() adjusts the padding properly.
This patch will detect how many more times ecore_init was called
during initialization and use that as a threshold to do a clean shutdown.
It is a necessary evil as we do have ecore module that will initialize
eldbus that will then reinit ecore_init from within ecore_init and without
a chance for the application to act on it.
I also reenable a test to make sure we will catch earlier this kind of issue.
This patch is necessary to work around the fact that if you have some
ecore system module installed, they will be initialized and may use another
library like eldbus that will call ecore_init again. So ecore_init will be
different from 1, but still be a success.
My patch does introduce a work around a problem in that situation. Calling
ecore_shutdown wont work at this stage, as we do have module that did initialize
ecore also. And the only way to make ecore_shutdown happen is to unload those
module and that wont happen as they where initialized from inside ecore... lala !
Yes, we never shutdown ecore properly when we have ecore module that use
something like eldbus.
Ecore system module may use dbus, so when you init ecore, it may init eldbus a few
more time (depending on the module that are present on your system). This result in
eldbus_init returning a valid init, but different from 1. This patch update the test
to take that into account.
Summary: Added a test for range_text_get case on the text that include multi text node.
Reviewers: tasn, woohyun, seoz
CC: cedric
Differential Revision: https://phab.enlightenment.org/D398
This should fix the test hangs on Jenkins. Fixed them for me.
The problem was, that the timeout was not handled correctly.
The server object was deleted, but the mainloop was not stopped.
The lock on the main hash was taken to late (after we took the decision
to remove the targeted Eina_File from the cache), this means it was possible
to get an Eina_File from the cache that was going to be removed. This patch
attempt to fix that potential race condition.
Hopefully should fix T461.
This reverts commit 1714fe93f4.
We actually want this type, it makes things clearer.
Conflicts:
src/tests/eo/function_overrides/function_overrides_inherit2.c
src/tests/eo/function_overrides/function_overrides_simple.c
src/tests/eo/suite/eo_test_class_simple.c
Markup_get was misbehaving and returning wrong results with some escaped
chars. markup_to_utf8 was working correctly. Merged the code together
and now both are consistent and correct.
Thanks to WooHyun for reporting.
The tests were failing on jenkins (gentoo), and on arch, but passing on an
old ubuntu. Ubuntu patches freetype, and that's probably the reason for that
with the tests more lax, both work.
NOTE: I have no idea why we did require emotion_test to only work
in tree. If you have an explanation, I would be glad to ear it. In the
mean time, this patch restore the use of emotion_test when your build
tree is not around.
Add the moment, it only support simple type. Need iterator for more
complex type. It also expect a pointer to an Eina_Value and not directly
an Eina_Value, let me know if you prefer the opposite and maybe I
should rename it EET_T_PVALUE.
It seems someone thought it was fun to have rel2.offset behave
differently than rel1.offset...
A rel2.offset of 0 actually means the size is increased by one pixel.
Acocunt for that in the tests.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Test less values in between, but still have a decent combination of
large/small values to test.
Fixes -WTasn
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This may break under heavy load so we shouldn't rely on it. Instead make
sure that time only moves forward.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
We want to introduce a new mechanism concerning the data of the Eo
objects.
The goal is to improve the memory management by defragmenting the memory
banks used by the Eo objects. The first phase has been done by raster
and consists in allocating the objects into a separate memory region
that the one used by malloc. So now, we know where our objects are
located.
Now, moving objects means moving data of objects. The issue we have here
is that a lot of data pointers are stored into data of other objects,
e.g Evas Object data into lists for rendering...
We need a way to reference the data and eo_data_get doesn't provide us
that. So we need to improve the API for data extraction by requesting
from the developer if the data will be stored or not. Five functions are
supplied:
- eo_data_scope_get: no referencing, the data pointer is no more used after
exiting the function.
- eo_data_ref: reference the data of the object. It means that while the
data is referenced, the object cannot be moved.
- eo_data_xref: reference the data of the object but for debug purpose,
we associate the objects that references. Same behavior as eo_data_ref
for non-debug.
- eo_data_unref: unreference the data of an object.
- eo_data_xunref: unreference the data of an object previously
referenced by another object.
I deprecated the eo_data_get function. Most of the time,
eo_data_scope_get needs to be used.
In the next patches, I changed the eo_data_get to the corresponding
functions, according to the usage of the data pointer.
The next step is to find all the places in the code where the data is
stored but not yet referenced. This will be done by:
- requesting from every object to unreference all data to other objects.
- moving all the objects from one region to another
- requesting from every object to rerefenrence the data.
- debugging by hunting the segmentation faults and other weird
creatures.
input_attach, input_detach, format_set, and source_set now return an
Eina_Bool
Tests, examples and edje_multisense adapted
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
- re-enabling split BiDi cursor tests, disabled in 0d68ffbe;
ligatures tests are still disabled;
- change "fail_if" to "ck_assert_int_*",
because it prints error message with values;
- fixing usage of embedding LTR/RTL codes in tests;
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
Switch from absolut microseconds since epoch to a monotonic clock with
realtive values. Switch from unsigned long long to double.
This aligns it with how we present time in efl. ecore_time_get is used
when possible. For the tizen modules we convert the the epoch timestamp
we get into a double. This is still a working monotone clock source.
As this will be released the first time with 1.8 we don't have any API
break here.
Together with eeze_sensor_module_register/unregister these are the functions
that are irrelevant for developer when they just want to use the eeze_sensor
API.
Still all three need to be marked with EAPI as they are used in the backend
modules and due to our visibility hidden usage the module loading would fail
if we remove EAPI from them.
Moving them into the private header should give an indication that these are
not meant for pure API users.
These functions let you pass an array of callbacks instead of just one.
It's more memory efficient to use this if you just add a bulk of events
on the same object.
This commits breaks ABI, and breaks API of the EO_EV_CALLBACK_ADD/DEL
signals (the event info passed).
Some of tests fail on e5-jenkins-slave-x86_64-1.
Tests seem right and pass locally,
but not on the server.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
If query at x coord, which points to rigth half of LTR char,
next position will be returned. The same for left half of RTL char.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
The way ecore_event_add() is used in the sensor modules takes care of
that already (not providing a free cb).
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
fail_if() from libcheck always writes to a file created with tmpfile(),
so it is not a good idea to call it millions of times. This wastes
memory and time, let's use both for something better. :-)
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
* Use an Eina_Hash for the garbage collector list.
* Turn off garbage collection on object that are unlikely to match.
This patch make 1.8 as fast as 1.7 again.
We now need to pass the current class to eo_do_super. This is faster and
more memory efficient and generally lets us do things better.
Using the eo_benchmarks we get ~20% speed-up.
That work clearly was possible thanks to Leandro. If you want more information
go to his blog : http://tia.mat.br/posts/async_io_with_coroutines/ .
The main difference with his implementation is more portable and not thread safe.
It does not have a custom swapcontext (would make sense as we don't need to save
the sigcontext) so it will be less fast. If people are ready to contribute asm
patch for that purpose I will be happy to apply them.
As for portability this code should work on all architecture we already support
thanks to a nice hack with setjmp/longjmp borowed from libcoroutine. We do use
Fiber for Windows support, but as 1.8 is completely borken in that regard, this
is theorical work only.
Thinks left to do :
- Eoify the API
- Documentation
- More tests
- Add support for coroutine in fd handler
- Add coroutine support to ecore_thread api
- Write some example
The issue happens when selecting in strings that have both bidi and different
scripts in the same bidi run. E.g: "עבריתenglishрусскийעברית".
SVN revision: 83786
If we pass the last argument as TRUE, that means user want to know the actual
bus id of the bus name and if the bus name is not registered it never notify
the user.
This bug was insert when fixing another one, because of that there more code
here to fix the previous bug too.
Patch by: José Roberto de Souza <zezsouza@gmail.com>
SVN revision: 83082
This was stupid from the start, but now it casuse even more issues.
We'll have to just add a configure option to it when the time comes.
SVN revision: 82989
This commit is for all the poor souls that see no need to update their system
each day with everything the world may offer just to be sure they have the
latest. This commit is for people that like the idea of having something
working when it did so the day before. Kudos fot Tom for pointing out the
function.
SVN revision: 82980
it's basically not testing anything, just calling the API :-( Added
some tests that check if the listed type is of that type (mouse,
touchpad, joystick).
SVN revision: 82949
improve: use ck_assert_str_eq() instead of fail_unless(strcmp() == 0),
it's shorter and will print a proper error message on failure.
fix: timeval changed from seconds to asctime(), cope with that.
fix: hash tests now search for substrings and thus are not prone to
algorithm changes. the format is pretty simple to avoid false results.
SVN revision: 82945
Print the name of each test together with the status so it's easier to
check which test failed/passed regardless the test's output:
./src/tests/efreet/efreet_test 2>/dev/null | grep -e "^FINISHED"
The tests themselves should not print to stdout, so we wouldn't need the
grep. But this is already better than we had before.
SVN revision: 82782
This improves the tests on freebsd, which doesn't have clearenv() (
though this commit was untested on such environement). clearenv was
rejected from POSIX so we better aim to stop its usage. However since
tests use setenv() this may lead to leaks, but it's better a leak than a
failing test.
On Linux all tests that were passing continue to pass.
SVN revision: 82779
This one was a painful bitch. The edbus2 port was quite broken, mainly
leaking eina_stringshare and also not adding the '\0' to the strings
that are represented as bytearray (paths cannot be utf8 to avoid
translations).
Emotion plugin was also quite bogus and the video thumbnail as edje
(animated) is not working yet due bug in Edje_Edit api -- someone
needs to investigate this, seems strange.
Emotion plugin also had a bug that it was deleting the object from
inside object callback.
Now it seems to work. Please report if it does not.
SVN revision: 82675
this one was quite a huge work, but hopefully it's correct.
NOTES:
* removed vlc generic module, it should go into a separate package.
* gstreamer is enabled by default (see --disable-gstreamer)
* xine is disabled by default (see --enable-gstreamer)
* generic is always built statically if supported
* gstreamer and xine can't be configured as static (just lacks command line options, build system supports it)
* v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2)
* emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled.
TODO (need your help!):
* fix warnings with gstreamer and xine engine
* call engine shutdown functions if building as static
* remove direct usage of PACKAGE_*_DIR and use eina_prefix
* add eina_prefix checkme file as evas and others
* add support for $EFL_RUN_IN_TREE
* create separate package for emotion_generic_modules
* check docs hierarchy (doxygen is segv'in here)
SVN revision: 82501
* tests will run locally now, not just from installed files.
* efreet_init_new(NULL) is valid, actually used by efreet_desktop_save()
SVN revision: 82428
efreet used an uncommon PACKAGE_DATA_DIR without the package name
because it used that to populate default variables.
Add another variable for that and make PACKAGE_DATA_DIR more common.
Tests still fails like crazy, and they assume installed data :-(
SVN revision: 82426
this is still in progress, mostly the multisense stuff is pending.
it seems that when we merge ecore_audio in edje the libremix and
similar are gone, at least from Edje, and will be in ecore_audio
itself (or pulseaudio).
Changes:
* __UNUSED__ to EINA_UNUSED
* binaries (epp, embryo_cc, edje_cc) now consider EFL_RUN_IN_TREE and
will assume the binaries are still not installed, running from
build tree location (needs more testing, maybe doesn't work with
srcdir != builddir, still doesn't solve cross compile builds)
SVN revision: 82139
Changes also in this commit:
* fix missing EAPI in symbols used by modules
* removed old libudev and libmount support as agreed by discomfitor/zmike
* replaced __UNUSED__ with EINA_UNUSED
* fixed docs hierarchy
SVN revision: 82100
Cedric suggested that we migth not be able to open the cert files. And he
was right. The CERT_DIR define checked for an absolute path in TESTS_SRC_DIR
but that get set to .. in Makefile_Eet.am as it sits in src/. Now the define
evaluated to src/tests/eet/.. where no cert files could be found.
I could not see a good reason for the suffix here so I just removed it.
Vincent, if there was a reason I was not able to see please fix it in a
different way. It was the least invasisve fix I could see.
SVN revision: 79838
It doesn't affect proto/eobj so no need to do it there too.
There are things we only test if NDEBUG is not passed to Eo. Eo itself was
compiled with NDEBUG but the tests were not notified about it so those tests
failed.
Many thanks to Vincent and Stefan for bugging me about it non-stop, without
you guys, I may never have gotten to it.
SVN revision: 79059
I can't be sure that distcheck is fixed as the check of eet is failing.
I've disable the run of the eina test for now as it is *very* long. I'll
re-enable it once eet check is running flawlessly
SVN revision: 76772