Commit Graph

442 Commits

Author SHA1 Message Date
Savio Sena 34c3d4ded7 tests: Added config.h to tests. 2014-07-18 18:55:56 -03:00
Daniel Kolesa ae3eb2b942 eolian: make event type syntax consistent 2014-07-15 23:50:34 +01:00
Daniel Kolesa 00f99a874d eolian: add test for extern 2014-07-15 15:50:58 +01:00
Carsten Haitzler 3c130836ad new eina api/object - eina thread queues
@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.
2014-07-15 20:39:13 +09:00
Daniel Kolesa 17a6bb122b eolian: add tests for struct types plus fix a double free and name storage on the way 2014-07-14 12:11:48 +01:00
Daniel Kolesa c9744596de eolian: builtin bool type, and change the eo files to use that 2014-07-11 14:40:49 +01:00
Daniel Kolesa 5d4cc031f9 eolian: s/dflt/default/g 2014-07-11 14:30:22 +01:00
Daniel Kolesa e3cb885f10 eolian: fix testsuite 2014-07-11 11:52:45 +01:00
ms ce8d67922f test_test
Reviewers: kimcinoo

Reviewed By: kimcinoo

Subscribers: kimcinoo, cedric

Differential Revision: https://phab.enlightenment.org/D1153
2014-07-10 10:39:06 +02:00
Daniel Kolesa 580aea04cd eolian: refactoring step six
Move Eolian_Function as well, plus fix const correctness of several API funcs.
2014-07-09 20:59:31 +01:00
Daniel Kolesa accdd50f50 eolian: refactoring step five
Move from all instances of Eolian_Type to Eolian_Type*.
2014-07-09 17:18:02 +01:00
Daniel Kolesa 52e68f986e eolian: fix tests (update according to API changes) 2014-07-09 17:04:00 +01:00
Daniel Kolesa 53fb9515e9 eolian/generator: add asterisk on inout too 2014-07-08 14:15:36 +01:00
Wonguk Jeong 23815453f4 evas: jpeg loader - add tests for EXIF flip, transpose, transverse.
Summary:
Previously, there was rotation test only. (90 CW, 180 CW, 90 CCW)
Flip vertically, flip horizontally, transpose, transverse tests are added

D1126 will make added tests be passed.

Reviewers: raster, cedric, jpeg

CC: seoz, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:12:31 +02:00
Savio Sena 4e6825d6ac eolian-cxx: Removed Wshadow warnings.
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
2014-07-04 20:04:32 -03:00
Jérémy Zurcher a7dfaef215 Revert "ecore: animator use eo_add() instead of eo_add_custom()"
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.
2014-07-03 23:05:57 +02:00
Jérémy Zurcher ec4ffb86d6 ecore: animator use eo_add() instead of eo_add_custom()
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
2014-07-03 22:33:15 +02:00
Jérémy Zurcher 46a78e8c9d eo: constructor tests do not use eo_add_custom(..)
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
2014-07-03 10:44:15 +02:00
Felipe Magno de Almeida 30df128be5 eldbus-cxx: Implementation of eldbus C++ API
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
2014-07-03 16:28:23 +09:00
Daniel Kolesa c8e2e8d48a eolian: @own -> own 2014-06-30 18:10:29 +01:00
Daniel Kolesa d967b6df32 eolian/tests: warning fixes 2014-06-30 17:20:39 +01:00
Daniel Kolesa e84275cc37 eolian: make tests pass 2014-06-30 17:20:39 +01:00
Daniel Kolesa ba362d350f eolian: transform tests to the new @own syntax 2014-06-30 17:20:39 +01:00
Daniel Kolesa 8221e9dd45 eolian: modify all eo files according to the new type syntax 2014-06-30 17:20:38 +01:00
Wonguk Jeong 573f477272 jpeg laoder: exif orientation test added
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
2014-06-29 13:04:16 +02:00
Daniel Kolesa a83e28ca3d tests/eolian: fix for the new namespace syntax 2014-06-20 10:52:00 +01:00
Daniel Kolesa e9f4890747 eolian: fix end-of-file checking, move namespaces from :: to . 2014-06-20 10:46:04 +01:00
Savio Sena 656d280e6a Eina-Cxx: Added native type constructors and examples.
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
2014-06-20 01:00:14 +01:00
Daniel Kolesa ee24425ab5 eolian: remove semicolon termination of classes 2014-06-20 00:01:56 +01:00
Daniel Kolesa fc72ca590d eolian: allow omitting of () in class with no inherits, fix up tests 2014-06-19 16:30:18 +01:00
Jean-Philippe Andre f7a14e945f Emotion tests: Fix compilation warning 2014-06-19 10:28:19 +09:00
Daniel Hirt 2b40860f78 Evas/Textblock: Introduce PS deletion bug test and fix
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
2014-06-17 11:11:33 +01:00
Youngbok Shin 3e81b73aa8 evas/tests - textblock: add a test case for item format with ellipsis.
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
2014-06-10 15:17:41 +01:00
Daniel Zaoui 75175d7eaf Eolian/Tests: expand the usage of the generation process.
The function executing the Eolian generator was using specific options.
This patch permits addition other kinds of generation tests.
2014-06-08 12:40:12 +03:00
Cedric BAIL 8dcb75ad09 edje: simplify and deprecate stub function. 2014-06-07 18:13:39 +02:00
Tom Hacohen 3b70b4f28f Evas textblock: Fix crash when cutting ligatures with formats.
"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
2014-06-04 10:14:24 +01:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Tom Hacohen 10626ff538 Eo: Fix and use the abstract class .eo file.
Until now it was just there, but never generated or used.
2014-06-03 09:19:19 +01:00
Tom Hacohen d9263e6571 Eo base: rename event_freeze_get to event_freeze_count_get.
This is needed because of a possible clash between the method event_freeze
and the property event_freeze with bindings.
2014-06-02 12:50:23 +01:00
Tom Hacohen f92e5d50f9 Eo: Add eo_finalize. A func that's called at the end of eo_add.
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
2014-05-30 11:22:36 +01:00
Daniel Hirt 177135ff0d Evas/Textblock: add support for ellipsis values
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
2014-05-29 15:52:01 +01:00
Daniel Zaoui dc3178404f Eolian: modify 'implement' API parameters.
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.
2014-05-29 14:48:05 +03:00
Daniel Zaoui d9e177e61b Eolian: add the super invocation for developer code generation.
Now the eo_do_super is invoked for constructors overridding in a
inheriting class.
2014-05-29 10:03:45 +03:00
Daniel Zaoui d949e9b41b Eolian: fix test.
Constructor has to be defined in the constructors section and not as a
method.
2014-05-29 09:58:27 +03:00
Tom Hacohen 75b56c7589 Eo legacy events: Add legacy events tests.
These tests test mixing legacy events with eo events.
2014-05-28 12:28:18 +01:00
Vitor Sousa a9f58d0d13 Fixed rbegin/rend implementation on the Eina C++ ranges.
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
2014-05-28 17:49:06 +09:00
MinJeong Kim 61cecf1f3f eina-tiler:add union, subtract, intersection, equal apis for tilers
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
2014-05-28 16:51:30 +09:00
Jean-Philippe Andre fea2c14ede Eolian test: Fix other compilation warnings 2014-05-28 11:18:51 +09:00
Jean-Philippe Andre d02ecd7d9d Eolian test: Fix test on hardened gentoo
Invalid snprintf, why declare MAX_PATH and then use PATH_MAX?
2014-05-28 11:18:37 +09:00
Daniel Zaoui 8e4700ce65 Eolian: add support of namespaces.
It is now possible to define a class in a .eo file as e.g:
Elm::Widgets::Button.
Elm and Widgets will be the namespaces of the class Button.

@feature
2014-05-26 13:56:06 +03:00