Commit Graph

3230 Commits

Author SHA1 Message Date
Carsten Haitzler 6c9784b918 elm - test - disable 2 negative tests that are failing to fail
efl ui suite passes now
@fix
2022-01-04 14:13:32 +00:00
Carsten Haitzler ebd8632dba elm test - disabble elm mpa focus tes - map widget is disabled
,map is broken - it has been for ages so its been disabled, disable in
test.
2022-01-04 14:06:49 +00:00
Carsten Haitzler f817041d69 elm test - disable excess video tests - gst freezes internally
gst seems to multi-init even tho we avoid it or something... when you
don't fork check. disable all but 1 video test then.

@fix
2022-01-04 14:06:06 +00:00
Carsten Haitzler 4ccbe49b92 elm tests - disable toggle test - changed theme
fix tests to pass

@fix
2022-01-04 13:34:28 +00:00
Shinwoo Kim 24c4fbb99e tests: enhance evas_map test
Reviewers: raster, Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12296
2021-10-18 09:10:17 +01:00
Shinwoo Kim 2728408cd1 tests: add evas_map test
Reviewers: raster, Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12295
2021-10-12 08:36:23 +01:00
Christopher Michael 3f1d183c06 eina-test: Fix unchecked return value
Coverity CID1401015 complains about an unchecked return value here, so
let's check that fread actually succeeded (return > 0).

Fixes CID1401015

@fix
2021-09-21 10:35:34 -04:00
Carsten Haitzler 39b48ca430 Revert "fix warnings about redefinting EWAPI etc. due to windows EAPI changes"
This reverts commit e2d6691d52.
This reverts commit c02b796fdb.
This reverts commit 6c969f6b7d.
This reverts commit 74204bccd7.
This reverts commit 1304d95717.
This reverts commit 7c85be9674.

revert the EAPI changes that break cxx bindings build. sorry :( more
fixes needed than i thought
2021-05-26 15:46:25 +01:00
Felipe Magno de Almeida 74204bccd7 ecore: Rename EAPI macro to ECORE_API in Ecore library
Summary:
=  The Rationale =

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: vtorri, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12271
2021-05-23 20:47:23 +01:00
Ali Alzyod a129ea3bc0 TextBlock: Fix content Fit with Markup-font-size
Summary:
This patch fixes wrong behavior for text block content fit when markup contains a part with specified font sizes (these parts will not be fitted by content fit algorithm).

+ THIS STILL NEED TEST TO BE ADDED

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12275
2021-05-23 19:54:20 +01:00
Wander Lairson Costa 65d528a379 Implement eina_thread for native windows
Summary:
eina: Implement Eina_Thread for native windows

The implementation design respects the fact that Eina_Thread is an
uintptr_t. Thus we allocate the thread struct in the heap and return a
pointer to it.

As such, we store the created thread structure in the target thread
TLS slot. For threads that were not created through eina API, in
eina_thread_self we allocate a new structure, push it to the TLS slot
and mark it to be freed on thread exit.

Reviewers: jptiz, vtorri, cedric, walac

Reviewed By: jptiz, cedric

Subscribers: raster, cedric, #reviewers, #committers, lucas

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12037
2021-04-17 16:00:32 -03:00
Marcel Hollerbach 665d62485b tests: fix efl_ui_suite 2021-04-01 15:22:57 +02:00
Christopher Michael 3e5629f125 eio_test_manager: Fix unchecked return value
Small patch to check return value of eina_value_convert reported by
Coverity

Fixes CID1400976
2021-02-25 09:33:42 -05:00
Christopher Michael 3a07f18294 eldbus_fake_server: Fix unchecked return value
Small patch to check return values of
eldbus_message_iter_arguments_get reported by Coverity.

Fixes CID1401042
2021-02-25 09:18:46 -05:00
Christopher Michael d0288f4730 eina_tests: Fix argument cannot be negative
Coverity reports that 'fd' returned from 'open' here returns a
negative number. Passing a negative number to the 'write' function is
not allowed, so we should change the 'fail_if' checks here to make
sure 'fd' is not negative.

Fixes CID1400940

@fix
2021-02-24 08:00:13 -05:00
thierry1970 97f95e7362 Added the heif loader
Summary: that supports images : *.heif, *hiec and *.avif I have disabled *.avif images, there is already a loader.

Reviewers: stefan_schmidt, raster

Subscribers: raster, vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12135
2021-02-06 18:58:04 +00:00
Ali Alzyod e138962dd7 evas_textblock: allow default font size to be set without fontname
Reviewers: woohyun, bowonryu, id213sin

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12211
2021-01-29 09:05:51 +02:00
Carsten Haitzler ff73049593 efl ui tests - disable cursor movement test as some systems have issues
i just want travis to pass again for now...
2020-12-29 20:42:18 +00:00
Carsten Haitzler b8cccbdd95 efl ui test - set cursor pos compare right 2020-12-28 21:57:12 +00:00
Carsten Haitzler 2f1795d8bc efl ui tests - for now use plain ascii to test if travis fail bc of fnt 2020-12-28 20:56:52 +00:00
Felipe Magno de Almeida 0363fd8238 evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 23:06:12 -03:00
Felipe Magno de Almeida 138e9e5294 eo: Rename EAPI macro to EO_API in Eo library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: jptiz, lucas, vtorri, woohyun

Reviewed By: jptiz, lucas, vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12203
2020-12-09 13:52:25 -03:00
Felipe Magno de Almeida 8d18009419 eolian: Add -e parameter to pass export symbol to eolian generator
Summary:
Eolian generator must have a parameter so it can generate the correct
symbol export/import macro for the API generated.

This makes it possible to define the symbols as being local to a
single DSO without the need to guard the generated headers or
generated source files with #define and #undef preprocessor
statements.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: q66, vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12197
2020-12-04 10:35:35 -03:00
Felipe Magno de Almeida ccc1849263 eina: Rename EAPI macro to EINA_API in Eina library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: jptiz, lucas, woohyun, vtorri, raster

Reviewed By: jptiz, lucas, vtorri

Subscribers: ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12188
2020-11-25 09:42:47 -03:00
Carsten Haitzler 6b47edd998 evas test - fix evas suite image data compare
the test was wrong and waiting to fail. it worked by luck before, but
it was comparing a deleted image's data vs a new one that replaced it.

this fixes that. makes the test suite now reliable. asan pointed this
out.

@fix
2020-11-13 09:51:13 +00:00
Carsten Haitzler ddfa2ef41c Revert "eo_test_general.c: Make eo_signals tests pass on Windows"
This reverts commit fc949660f7.
2020-11-05 12:17:42 +00:00
Wander Lairson Costa fc949660f7 eo_test_general.c: Make eo_signals tests pass on Windows
Summary:
EFL_CALLBACKS_ARRAY_DEFINE reorders the callbacks according to
efl_callbacks_cmp. efl_callbacks_cmp compares the address of the desc
field, which depends on the memory layout generated by the linker.

To make the test run deterministically, we define the array of callbacks
manually.

Reviewers: vtorri, felipealmeida, raster

Reviewed By: raster

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12043
2020-11-04 18:56:37 +00:00
abdulleh Ghujeh d6a6dd54a1 efl.ui.text : Fixing cursor movement using keyboard arrows/mouse click
Summary:
if we have an emoji or a cluster combining multiple Unicode inside ui textbox, we can move the cursor inside the emoji/cluster using keyboard arrows/mouse click.
so we should use cluster movement instead of character movement (same as entry).

{F3868931}

this should resolve T8666

Test Plan:
  #define EFL_EO_API_SUPPORT 1
  #define EFL_BETA_API_SUPPORT 1

  #include <Efl_Ui.h>

  static void
  _gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
  {
     efl_exit(0);
  }

  static void
  _gui_setup()
  {
     Eo *win, *box;

     win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
                   efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
                   efl_text_set(efl_added, "Hello World"),
                   efl_ui_win_autodel_set(efl_added, EINA_TRUE));

     // when the user clicks "close" on a window there is a request to delete
     efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);

     box = efl_add(EFL_UI_BOX_CLASS, win,
                  efl_content_set(win, efl_added),
                  efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));

     efl_add(EFL_UI_TEXTBOX_CLASS, box,
             efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
             efl_gfx_hint_align_set(efl_added, 1.0, 1.0),
             efl_text_markup_set(efl_added, "A&#x262a;&#xfe0f;"),
             efl_pack(box, efl_added));
  }

  EAPI_MAIN void
  efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
  {
     _gui_setup();
  }
  EFL_MAIN()

Reviewers: ali.alzyod, zmike, woohyun, bu5hm4n

Reviewed By: ali.alzyod, woohyun

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8666

Differential Revision: https://phab.enlightenment.org/D11745
2020-10-20 19:20:28 +09:00
Vincent Torri 6bc22474bd elua test: fix undeclared variable
Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12172
2020-10-09 23:26:00 +01:00
Vincent Torri eacee53c2e Evil : move mkstemp(s) and mkdtemp in eina_file directly
Summary:
Also replace all mkstemp(s) and mkdtemp with the eina_file functions in
the source

Test Plan: run eina_file test

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12170
2020-10-08 11:58:11 +01:00
WooHyun Jung 509e3fcc7a Revert "Revert "evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)""
This reverts commit 173b3a108e.
This was reverted because of freezing codes for release.
Now, release work was over. So, I think it's ok to restore this.
2020-10-08 12:32:53 +09:00
Carsten Haitzler 42c123d1d7 singularize srand in eina_init - only once in one place
simplify down to having a single srand() in eina_init and use urandom
if it works and is there - if not, time(NULL) will do. it's the best
we can...
2020-10-03 20:46:50 +01:00
Carsten Haitzler 82de87dfc5 evas test - check return of ftell and malloc and handle properly
fix CID 1400871
2020-09-20 00:20:36 +01:00
Ali Alzyod 3bd066c7db evas_textblock: prevent textnodes with <ps>/<br> without format node
this will prevent textnodes content with <ps> or <br> without format node

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12145
2020-09-16 14:40:55 +02:00
Vincent Torri af8bf56c98 eina file test: check rmdir result.
Fix CID 1432267

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12125
2020-09-02 10:44:19 +02:00
Marcel Hollerbach c40c279308 eldbus_fake_server: fix string format usage
we know that there is no % etc. formatting in this string, however, we
can just use the ck abort msg macro from libcheck directly.
2020-09-01 14:12:31 +02:00
Stefan Schmidt 173b3a108e Revert "evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)"
This reverts commit 1ab71284db.

We are in freeze.
2020-09-01 13:00:33 +02:00
Youngbok Shin 6e02557535 evas_textblock: remove style padding from native width and formatted height
Summary:
The style padding was included in native width(not in native height)
and formatted height(not in formatted width).
This is so weired. In addition, there is no enough document about
the relation between formatted size, native size and the style padding.
This issue is caused by a confusing code which is about how to handle
the style padding on item's width and height.("x_adjustment"!)

When Evas calculates "c->wmax" in line finalization stage, it explicitly subtract
style padding from line width. So, I assumed the formatted size has not to include
style padding. It is same for the native size.

The style padding will not be included in formatted size and native size by this commit.
@fix

Test Plan:
A test case is included in this commit.

Evas_Object *tb = evas_object_textblock_add(evas);

newst = evas_textblock_style_new();
evas_textblock_style_set(newst, "DEFAULT='font=Sans font_size=50 color=#000 text_class=entry'");
evas_object_textblock_style_set(tb, newst);

evas_object_textblock_text_markup_set(tb, "<style=far_soft_shadow>Test</>");
evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b);
fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4));

/* Size with style padding */
evas_object_textblock_size_formatted_get(tb, &w, &h);
evas_object_textblock_size_native_get(tb, &nw, &nh);

/* It is non-sense if the following condition is true. */
fail_if((w + l + r == nw) && (h == nh + t + b));

Reviewers: raster, ali.alzyod, woohyun, bowonryu

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12110
2020-09-01 19:39:13 +09:00
AbdullehGhujeh 1ab71284db evas_textblock: rainbow flag emoji treated as two clusters(update unibreak to version 4.2)
Summary:
if we have rainbow flag emoji (&#x1f3f3;&#xfe0f;&#x200d;&#x1f308;)
we can use mouse/keyboard to move cursor inside it because we break it into two clusters, we break on 1F308,

This is wrong as we should treat emoji as a single cluster (based on rules mentioned in Unicode segmentation standard “Do not break within emoji modifier sequences or emoji ZWJ sequences” (https://unicode.org/reports/tr29/#GB11 )).

this issue happens because we don’t give 1F308 its correct grapheme break property value, I think this is a bug in the unibreak library as this Unicode 1F308 should have word break class value equals to Glue_After_ZWJ (based on https://www.unicode.org/reports/tr29/tr29-31.html#Glue_After_Zwj_WB and http://unicode.org/Public/emoji/5.0/emoji-zwj-sequences.txt) which will not make it break and we will get a single cluster.

I noticed that the current unibreak lib used in EFL  seems to implement Unicode 9  (latest is Unicode 13) which uses obsolete and unused grapheme break property, such as E_Modifier & Glue_After_ZWJ, so if a new emoji introduced (rainbow flag was introduced after Unicode 9)  and based on Unicode 9 it should use property  E_Modifier or Glue_After_ZWJ we will have issue with it.

So I have updated unibreak lib using latest released version of unibreak (4.2) which implement Unicode 12.

I needed to remove **BREAK_AFTER(i)** to pass the tests in D1140 as spaces do not break on latest update (also related to T995).

{F3868712}

this should fix T8665 & T8688

Reviewers: ali.alzyod, woohyun, bowonryu, zmike, segfaultxavi, bu5hm4n

Reviewed By: ali.alzyod

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8665

Differential Revision: https://phab.enlightenment.org/D11743
2020-09-01 19:33:52 +09:00
João Paulo Taylor Ienczak Zanette abc308accb eina: Replace remove with rmdir and delete tmpstr
Although the [remove manpage](https://linux.die.net/man/3/remove) states that `remove(...)` deletes
either a file or a directory, this is not true in Windows as it can be seen in
[MSDN docs for
remove](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/remove-wremove?view=vs-2019):

> **(Function description)**
>
> Delete a file.
>
> **Return Value**
>
> Each of these functions returns 0 if the file is successfully deleted.
> Otherwise, **it returns -1 and sets errno either to EACCES to indicate that the
> path** specifies a read-only file, //**specifies a directory**//, or the file
> is open, or to ENOENT to indicate that the filename or path was not found.

This implementation detail caused the Eina test to fail and not removing the
temporary directory.

This patch changes the use of `remove` to the directory-specific `rmdir`, which
is guaranteed to remove the directory. Additionally, it also deletes the
Eina_TmpStr that holds the temporary directory path.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12115
2020-08-31 11:16:43 +02:00
Carsten Haitzler 603102577b tests - efl ui config - use proepr elm enums for elm apis 2020-08-25 13:21:25 +01:00
Carsten Haitzler c984939762 tests - elm spinner - use proper elm enum - warning fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 125986e27b tests - elm slider - fix possile use of uninit var warning 2020-08-25 13:21:25 +01:00
Wander Lairson Costa 1ee6e020bb eina_test_lock.c: Implement clock_gettime for Windows
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12023
2020-08-20 09:36:23 +02:00
João Paulo Taylor Ienczak Zanette bfc3e9f96e eina: Close file in unlink test
At least on Windows (didn't have the time to test on Linux yet),
running tests, even if they passed, there would be an Eina error on logs
pointing that a temporary file wasn't closed:

```
ERR:eina_file ../src/lib/eina/eina_file_common.c:1137 eina_file_shutdown() File [C:/Users/joao_/AppData/Local/Temp/aaaa_file_test_EBpVea] still open 1 times !
```

In the end, it was the `eina_file_test_unlink` that would create a temporary
file but never close it, being caught only by `eina_shutdown()`.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12062
2020-08-20 09:36:20 +02:00
Vincent Torri 047b59d934 eet test: use eina_file_mkstemp, fix include for vc++
Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12108
2020-08-19 15:59:55 +02:00
Ali Alzyod eed4068fa2 evas_textblock: myanmar script rendering with e vowel.
Summary: Resolve rendering e vowel (0x1031) with Myanmar(Burmese) with zero width non joiner (0x200C)

Test Plan: ninja test

Reviewers: woohyun, bowonryu

Reviewed By: bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12102
2020-08-18 19:15:12 +09:00
AbdullehGhujeh eb0f7183dd Efl Canvas Text : canvas textblock changed not fired for shadow format (style_apply)
Summary:
If shadow format changed using style_apply , the event EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED will not be fired.
also added tests for it.

Reviewers: ali.alzyod, woohyun

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11078
2020-08-18 18:10:04 +09:00
Ali Alzyod 4ad272a8c3 evas_object_textblock: utf8_to_markup support all escapse chars
Summary: update evas_textblock_text_utf8_to_markup to support all escape characters

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", "App");
   elm_win_autodel_set(win, EINA_TRUE);

  textblock = evas_object_textblock_add(win);
  char * aaa = evas_textblock_text_utf8_to_markup(textblock,"A<<>>\"A\'\tA");
  // aaa ==  "A&lt;&lt;&gt;&gt;&quot;A&apos;<tab/>A";
   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,480);
   evas_object_resize(win,320,480);

   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()

```

Reviewers: lauromoura, CHAN, woohyun, bu5hm4n, bowonryu, tasn, herdsman

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8843
2020-08-18 17:34:02 +09:00
Marcel Hollerbach 812e9f9f09 eo: set idx on exit to 1 not to 0
if this is set to 0 the next iteration in the upper frame event would
decrement the 0 again leading to a overflow making the iteration and
callback array overflow.

Long story short: set ifx to 1 to prevent overflow, test added.

fixes T8787

Differential Revision: https://phab.enlightenment.org/D12101
2020-08-12 11:18:10 +02:00