Commit Graph

3008 Commits

Author SHA1 Message Date
Lauro Moura 40a980174b csharp: Add licensing information.
Summary:
C# bindings will be lincensed under Apache Sofware License 2.0.

This commit adds the license text to the licenses folder and a copyright
notice to the binding files.

Fixes T8039

Reviewers: woohyun, felipealmeida, vitor.sousa

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8039

Differential Revision: https://phab.enlightenment.org/D9414
2019-10-24 10:10:56 -03:00
Ali Alzyod 46f2d8acdc evas_object_textblock: add support for variation sequences
Summary: update font processing to handle variation sequences unicodes to select proper glypg in respect to variation seqences

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "");
   elm_win_autodel_set(win, EINA_TRUE);
   textblock = evas_object_textblock_add(win);
   efl_canvas_text_style_set(textblock,NULL,"DEFAULT='font=DejaVuSans font_fallbacks=SamsungColorEmoji color=#000 font_size=20'");
   evas_object_textblock_text_markup_set(textblock, "8&#xfe0f;&#x20E3;&#x262a;&#xfe0f;AAA&#x262a;&#xfe0E;1234567&#xfe0f;&#x20E3;");

   evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(textblock);
   evas_object_move(textblock, 0, 0);
   evas_object_resize(textblock, 320, 320);
   evas_object_resize(win, 320, 320);
   evas_object_show(win);
   elm_run();
   return 0;

}

ELM_MAIN()

```

Reviewers: woohyun, bowonryu, segfaultxavi, cedric, bu5hm4n

Reviewed By: woohyun, cedric

Subscribers: bu5hm4n, subodh6129, herdsman, segfaultxavi, zmike, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9053
2019-10-19 14:01:36 +09:00
Mike Blumenkrantz 20b592cef7 fix various trivial null derefs
Summary:
CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944,
     1383851, 1383847, 1382211, 1379921, 1379921

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10452
2019-10-18 13:30:10 -04:00
Mike Blumenkrantz 7b93d492d6 embryo: don't use sizeof() when strlen() is intended
Summary: CID 1402617

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10411
2019-10-18 13:29:20 -04:00
Yeongjong Lee cfa8baa152 mono: merge namespaces
Summary:
This patch merge namespaces to improve readablity.
Before
```
namespace Efl {
namespace Canvas {
```

After
```
namespace Efl.Canvas {
```

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10436
2019-10-17 14:35:37 -03:00
Yeongjong Lee 711823cb1d mono: remove underscores of Efl_Op_Description, Efl_Object_Ops
Summary:
C# does not use underscore in type name.

ref T8333

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8333

Differential Revision: https://phab.enlightenment.org/D10422
2019-10-17 14:24:01 -03:00
Yeongjong Lee ee33f93743 mono: make public static field const or readonly
Summary: This patch will fix CA2211 compiler warnings.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10423
2019-10-16 10:46:23 -03:00
Felipe Magno de Almeida 125f7b33ec csharp: Add since documentation to struct and struct fields
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10385
2019-10-15 16:01:08 -03:00
Lauro Moura 31bc3beb22 csharp: Avoid direct usage of some dllimport funcs
Summary:
Instead of accessing them directly, generated code should access them
only through proper managed wrappers.

JIT should take care of inline them.

This would allow D10338 without depending on the friendly assembly feature.

Reviewers: YOhoho, felipealmeida, brunobelo, woohyun, segfaultxavi

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10366
2019-10-15 10:11:09 -03:00
Felipe Magno de Almeida e60ba39364 csharp: Add since documentation to Async methods
Reviewers: lauromoura

Reviewed By: lauromoura

After review, fixed formatting and indentation.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8359

Differential Revision: https://phab.enlightenment.org/D10384
2019-10-14 00:48:19 -03:00
Lauro Moura 3358d9d475 csharp: Add since info to members related to events.
Like OnFooEvent, FooEvents, etc.

ref T8359

Differential Revision: https://phab.enlightenment.org/D10382
2019-10-12 19:20:58 -03:00
Lauro Moura b1a1cdc701 eolian-cxx: Rename fields to standard naming
Summary: bool fields were missing the `is_` prefix.

Reviewers: felipealmeida, brunobelo, segfaultxavi, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10380
2019-10-12 18:36:44 -03:00
Lauro Moura fb7c35269c csharp: Respect beta for type aliases
Summary: Also add beta info to `alias_def` in eolian_cxx.

Reviewers: brunobelo, felipealmeida, woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10315
2019-10-09 16:45:30 +02:00
Xavi Artigas 9dcfe4bbbc mono-docs: Merge Property and getter/setter docs
Summary:
Property docs, when present, should always be included in Property and Accessor
(setter and getter) docs.
Accessor docs, when present, should be included in their accessor method, and
also in the property method, as a side note.
This patch does just that.

Depends on D10285
Ref T8309

Test Plan: Generate docs and take a look at `Efl.Ui.Calendar`, for example, which has a bit of everything.

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8309

Differential Revision: https://phab.enlightenment.org/D10298
2019-10-09 16:18:30 +02:00
Lauro Moura 86191b02c7 eolian: Leave default text for libeolian users
Summary:
Instead of setting the default text at the library level, keep the
summary empty if nothing is provided.

The libeolian users them are free to check if the summary was actually
empty or a placeholder text was added.

ref T8309

Test Plan: Run attached tests

Reviewers: q66, segfaultxavi

Subscribers: cedric, brunobelo, #reviewers, felipealmeida, #committers

Tags: #efl

Maniphest Tasks: T8309

Differential Revision: https://phab.enlightenment.org/D10285
2019-10-09 16:18:30 +02:00
Lauro Moura d5c8d05292 csharp: Move locks inside AddRemove native handlers
Summary:
Instead of using a lock block in every method definition, we just need
them inside the actual methods adding/removing the handlers.

Kudos to @herb for the suggestion.

Reviewers: felipealmeida, herb, brunobelo

Reviewed By: brunobelo

Subscribers: cedric, #reviewers, herb, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9758
2019-10-04 10:12:57 -03:00
Bruno da Silva Belo 04a49f5875 csharp: Standardizing doc tag.
Reviewers: felipealmeida, brunobelo, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10280
2019-10-04 08:51:04 +02:00
Yeongjong Lee fa90880055 efl_gfx_arrangement: change content_padding param type and remove scalable
Summary:
This change `content_padding` parameter type to int from double for consistency
of size properties.

`scalable` should be handled in more common size API.

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

ref T7864

Test Plan: ninja test

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7864

Differential Revision: https://phab.enlightenment.org/D10154
2019-10-02 12:11:15 +02:00
junsu choi 3f51e30976 elementary_test: Add the value provider test for animation_view
Summary:
Add an Value Provider item to test vector animation on elementary_test.
This test is to apply Efl.Gfx.Vg.Value_Provider to the loaded efl_ui_animation object.
If Evas Vg Json(Lottie) Loader is not supported,
use the vector class to output the svg file.

Depends on D9874
Depends on D9897

Test Plan: elementary_test -> Value Provider

Reviewers: Hermet, kimcinoo, smohanty

Reviewed By: Hermet

Subscribers: cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10015
2019-10-02 14:38:45 +09:00
Xavi Artigas 09859cacf2 mono-docs: Formatting of @since tags
Use a line break <br/> now that we can properly escape these things.
Previously we appended (Since EFL X.XX) which didn't look very nice.
2019-09-30 18:05:07 +02:00
Lauro Moura 507061a145 bindings: Fix disposal of eolian state
Summary:
It was actually leaking before. Let's use some RAII classes that were
already there.

ref T8280

Reviewers: q66, felipealmeida, brunobelo

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8280

Differential Revision: https://phab.enlightenment.org/D10237
2019-09-30 16:08:24 +02:00
Marcel Hollerbach 93d77015c4 test_code: do not create a background by hand
the background here was wrong, it hasnt resizable hints, which means
that the whole object cannot be resized.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D10223
2019-09-30 10:46:32 +02:00
Mike Blumenkrantz 96be3cd83d efl_ui: remove efl_ui_text headers from Efl_Ui.h for now
these require legacy types and headers, which should not be brought into
this header

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10235
2019-09-30 10:33:34 +02:00
Mike Blumenkrantz 87d1d8f7e6 elm_test/radio: use eo type here
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10230
2019-09-30 10:33:28 +02:00
Jaehyun Cho 8937ee4cf6 eolian_mono: support beta for enum if mono-beta is enabled
Summary: this generates beta enum with `-Dmono-beta=true`.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, YOhoho

Reviewed By: YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10246
2019-09-30 15:51:31 +09:00
Yeongjong Lee d1dd3c30b9 eolian_mono: Respect beta for enum
Summary: this prevent generating beta enum with `-Dmono-beta=false`.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=false

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10245
2019-09-30 13:52:45 +09:00
Mike Blumenkrantz 2a1ef9fce7 elm_test: undef logging macros before redefining them in header
Summary: Depends on D10228

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10229
2019-09-27 14:34:32 -04:00
Mike Blumenkrantz b2165b8921 ecore_evas/convert: fix div by zero
Summary:
if one is 0, the printf line will divide by it

CID 1403900
Depends on D10206

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10207
2019-09-26 17:59:38 -04:00
Mike Blumenkrantz b5ee2f128f epp: remove extra variable passed in format specifier
Summary: CID 1402674

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10203
2019-09-26 17:59:19 -04:00
Daniel Kolesa b0ee540ec9 eolian: rename param direction enum and fields for consistency 2019-09-26 16:56:13 +02:00
Marcel Hollerbach 1df17abba5 efl_ui_*selectable: unify these APIs with the same c_prefix
Summary:
with this commit that api for single and multi selectable shares the
same prefix, which makes sense in c as we do not really differ between
those two types there anyway.

ref T7871

Reviewers: SanghyeonLee, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7871

Differential Revision: https://phab.enlightenment.org/D10183
2019-09-26 18:32:58 +09:00
SangHyeon Jade Lee 2c4db3b09a efl_ui : reverse the select method name to be ended verb on the last.
Summary:
our new method naming rule only allow verb at the last position,
so change name to fallow rule.

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: bu5hm4n, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10144
2019-09-25 17:12:51 +09:00
Mike Blumenkrantz 3d3cdc5955 efl/player: rename 'play' property to 'pause'
this is a bit of an overhaul wherein the existing 'play' mechanics are
all inverted. 'pause' is a state which stops playback but does not affect
the playback_position property.

this patch also includes implementations of Efl.Player::playing for
a couple classes which (now) only implement pause, as this is a requirement
for the objects to actually activate their animations

test cases:
* unit tests
* all elm_test animation cases
* elm_test video
* rage

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10114
2019-09-24 15:23:15 -07:00
Mike Blumenkrantz 89bee7a11a efl/player: merge start+stop methods into 'playing' property
this has some overlap with the existing 'play' property which will
soon be renamed. the intent here is that there is a property for
controlling the 'playing' state and then another property for managing
'pausing' the play state

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10113
2019-09-24 15:23:13 -07:00
Mike Blumenkrantz 9b0197e2af efl/player: pos -> playback_position
ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10112
2019-09-24 15:23:11 -07:00
Mike Blumenkrantz 5c2ea620a1 efl/player: prune properties duplicated in efl.playable
efl.playable implements a number of properties which are also present
in efl.player. playable was intended to be separate, so enforce this
split in all classes which use player

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10109
2019-09-24 15:23:09 -07:00
Bruno da Silva Belo 91ac3774b5 eolian: fixing switch case.
Summary: Scope of the switch breaks compilation.

Reviewers: felipealmeida, segfaultxavi, brunobelo

Reviewed By: brunobelo

Subscribers: segfaultxavi, cedric, brunobelo, felipealmeida, #reviewers, lauromoura, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10118
2019-09-24 18:00:05 -03:00
Cedric Bail d5a21c7998 elementary: add a basic test for MVVM infrastructure.
Differential Revision: https://phab.enlightenment.org/D10063
2019-09-24 11:12:46 -07:00
Daniel Kolesa 92da64a532 eolian: remove support for globals
This was meant to happen but did not previously happen. It is not
ideal to do it now but better do it while we still can.

In short, this removes one half of the variables API (keeps
constants as they are) and repurposes the API to be only for
constants. This is also better for consistency to match errors.
2019-09-24 18:27:37 +02:00
Daniel Kolesa 72698aa6f5 eolian: always allow implementation for eot files
This is so the build system can unconditionally generate .eot.c
without worrying whether there's something to generate.
2019-09-24 18:27:37 +02:00
Marcel Hollerbach 594fc08442 efl_ui_win: default the window type to basic
normally when you create a window, you just want to have it beeing a
basic window. If not you still can set the window type.

ref T8229

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10049
2019-09-24 16:00:44 +02:00
Bruno da Silva Belo 15897cd9c3 efl-mono: Additional blank line between all methods.
Summary:
For better indentation, adding a blank line in the end of
methods.

Test Plan:
using efl_ui_layout.eo.cs, efl_access_object.eo.cs, efl_part.eo.cs and efl_ui_factory_bind.eo.cs as references,
apply changes to the code then check the diffs of after and before of the references files

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Subscribers: cedric, felipealmeida, lauromoura

Tags: PHID-PROJ-uhnmnvlvunw6jgoqdnd4, #efl_language_bindings, #refactoring

Maniphest Tasks: T8167

Differential Revision: https://phab.enlightenment.org/D9712
2019-09-23 21:28:14 -03:00
Mike Blumenkrantz 696627ffcd elm_test: mark image_zoomable test as non-legacy
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10053
2019-09-23 12:57:22 +02:00
Stefan Schmidt a819a954bf elementary_codegen: check before use to avoid use after free
These might or might not have been freed already, depending on the
breaks form the above loop. Before we are having a use after free here
better check on it before free'ing another time.

Coverity IDs: 1402671, 1402701

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10047
2019-09-23 11:16:38 +02:00
Wonki Kim fe8715e9f6 test: Add a logic to check a size of Check
If I pack a check without any api calls into a box,
then it doesn't have the hint_min size which is defined on check edc.
I guess there are problems on sizing logic currently, so this patch helps people
to test the problem.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10038
2019-09-23 10:44:33 +02:00
Jaehyun Cho 01875756eb eolian_mono: add more verbs to generate C# method beginning with verb
Summary:
C# language binding generates C# method name beginning with verb by
checking verb list in name_helpers.hh.

Some verbs used in eo method are missing in the current verb list. So
they are added into the verb list.

In this scheme, there is a problem that some words can be used as a verb
in some methods but they also can be used as a noun in other methods.
(e.g. drag_start as a verb / cursor_word_start as a noun)

So "start" and "scroll" are not added to verb list in this patch.
To resolve the above problem, we may need a new eo syntax to rename or
reverse the name in language bindings.

Test Plan: Check C# method names in .eo.cs files if the name begins with verb.

Reviewers: felipealmeida, SanghyeonLee, woohyun, Jaehyun_Cho, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10001
2019-09-20 19:29:08 -03:00
Daniel Kolesa 53a3326ddc eolian: rename any_value_ptr -> any_value_ref for consistency 2019-09-20 18:03:39 +02:00
Lauro Moura 32f92d3d86 csharp: Add support for default param references in documentation
Summary:
This also adds the information of default values in `parameter_def`.
This will help adding actual default parameter support in the C#
bindings.

Thanks to @segfaultxavi for improved formatting and escaping.

Fixes T8224

Reviewers: segfaultxavi, felipealmeida, brunobelo

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, segfaultxavi, #committers

Tags: #efl

Maniphest Tasks: T8224

Differential Revision: https://phab.enlightenment.org/D10050
2019-09-20 16:23:54 +02:00
Mike Blumenkrantz 011022ae1b efl/radio/box: handle non-radio-objects
this improves the usefulness of radio box by presenting it as a box widget
which has the additional feature of being able to manage radio widgets

also fix all the image cases in elm_test which relied on there being only
a single box in the window

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9998
2019-09-18 18:04:59 +02:00
Mike Blumenkrantz ca86b98e40 build: fix elm header usage
.c files in src/lib/elementary should only include elm_priv.h to ensure
that all the include ordering is correct and that all necessary headers
are pulled in

.c files outside of src/lib/elementary should include either/both
Efl_Ui.h, Elementary.h as needed

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9978
2019-09-18 18:04:55 +02:00