Commit Graph

31312 Commits

Author SHA1 Message Date
Carsten Haitzler b90a8a1819 elm theme - add overlay and blank styles for buttons
useful for things like entice
2021-03-31 11:29:33 +01:00
Vincent Torri 769066f606 Evas avif loader: fix segfault when the avif loader tries to load a non avif image
Test Plan: entice is not crashing

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12254
2021-03-31 10:29:50 +01:00
Vincent Torri 15078f757b Evas: add raw image extensions
Summary:
See https://en.wikipedia.org/wiki/Raw_image_format
for the list of the raw extension files

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12253
2021-03-30 21:19:17 +01:00
Vincent Torri e52391c585 Avif image loader: add another check to verify that libavif has been built with an AV1 decoder
Summary: libavif can be built without a AV1 decoder. Check this in the image loader

Test Plan: entice

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12252
2021-03-28 21:56:55 +01:00
Carsten Haitzler db081f9648 ecore evas ews - deprecate/remove
it's broken. it doesnt render anything. input is broken. it isn't in
use so it doesnt justify fixing. no one has complained it's brokne
thus proof of it not in use, so proof that it's not needed, so do the
right thing and nuke it to save work

@feat
2021-03-28 13:56:33 +01:00
Carsten Haitzler 5687e0e928 exactness - fix build due to removal of files from default theme 2021-03-27 19:21:46 +00:00
Carsten Haitzler cf6b3667c3 evas - gl add export for getting dmabuf formats and modifiers
we need this to do formats and modifiers properly... and this is what
broke on the rpi4 - it started using  interesting formats etc. ... new
feature to support a bug fix in e

@feat
2021-03-26 20:31:27 +00:00
Carsten Haitzler 80140f7724 evas - gl - respect yinvert now as it ... seems to work. 2021-03-26 20:31:06 +00:00
Carsten Haitzler 49ac4121cf elm - efl ui tab - raise the selected tab item obj so we can do tabs
need stacking to relfect tabs if the theme wants to look like tabs...
which is what i am doing with flat.
2021-03-23 21:09:47 +00:00
Carsten Haitzler 5f4524295a efl ui scroller - support signals for up/down/elft/right show/hide 2021-03-21 01:37:20 +00:00
Carsten Haitzler 796e345da1 evas - gl - stop leaking images and never freeing them from cache
the subject says it all

@fix
2021-03-20 21:58:25 +00:00
junsu choi 3666574f88 ector image: Prevents drawing images outside buffer
Summary:
A crash may occur when image size is set larger than buffer.
So, modify boundary of the image drawing the image
so that it does not go out of the buffer.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12251
2021-03-18 17:10:05 +09:00
Hermet Park b9b2b72205 ecore_con: add null check for safety. 2021-03-16 10:28:27 +09:00
Marcel Hollerbach 046c5cd58e eeze_scanner: do not crash
the free logic here was wrong. The udev_device_get_parent results get
automatically unrefed when the original device is deleted.

This caused random segfaults when starting e.
2021-03-15 14:16:34 +01:00
Marcel Hollerbach 5215421570 efl_ui_collection: disable desktop_entry behaviour when in api call
otherwise only the last item would have been selected.
2021-03-14 14:34:14 +01:00
Carsten Haitzler ec52433f3a elm - fix emitting of signals to theme for label existence
@fix
2021-03-12 10:51:14 +00:00
Carsten Haitzler aa7be1a96d evas gl - remove freed gl image from context image list
fix asan memory mis-access

@fix
2021-03-09 16:04:45 +00:00
Carsten Haitzler 6899bd034c elm conffig - display icons if using elm icon theme
also use different sample icons i think work better
2021-03-04 13:44:30 +00:00
Shinwoo Kim 9da41a50cb evas_object_smart: enhance logic checking clipper visibility
Summary:
If current clipper object is equal to previous clipper object,
then the value of visible (or alpha) is same, because it is same object.

But there is a case that current visible value is different with
previous visible, when clipper object is same.

I added this patch to cover above case to draw childern of map.
See following flow.

  evas_render_mapped
    > if (_evas_render_has_map(obj) && !_evas_render_can_map(obj))
      > if (!changed) changed = evas_object_smart_changed_get(obj);

The evas_object_smart_changed_get returned FALSE, even though
current visible value is different with previous one in the same
clipper object.

Reviewers: raster, Hermet, herb, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12250
2021-03-03 16:44:28 +09:00
Carsten Haitzler 91f07de890 efl ui format - now dont leak and dont double free 2021-03-02 13:20:00 +00:00
Carsten Haitzler 81f962da75 efl ui format - only sety format fun to null if format func free exists 2021-03-02 13:11:35 +00:00
Carsten Haitzler 67acb15a1f elm slider - don't double-free output format. 2021-03-02 12:52:53 +00:00
Christopher Michael 914a85159b ecore_wl2: Remove legacy teamwork stuff
This patch removes the remainder of the Teamwork protocol &
implementation. The module has been removed from Enlightenment for
some time now so there is no need to generate a protocol or have any
legacy code remaining..
2021-03-01 11:22:58 -05:00
Christopher Michael f174e739e1 ecore-evas-wayland: Remove wayland wobbly windows junk
Never worked properly, is unsupported by upstream wayland, and is just
general clutter so let's remove it.
2021-03-01 10:33:31 -05:00
Christopher Michael 350b65fc21 ecore_wl2: Remove wayland wobbly windows stuffs
This cleans up the www mess that never worked properly and is
unsupported with no plans to ever be used
2021-03-01 10:32:08 -05:00
Christopher Michael fbfcb4b309 wayland_protocol: Remove wayland wobbly windows junk
This protocol never fully worked properly, is unsupported & unused,
would never be accepted in upstream wayland, and is just generally
worthless so let's remove it. There are no plans to ever support it...
2021-03-01 10:29:50 -05:00
Christopher Michael 95a88f5a6c eeze_disk: fix potential memory leak
If allocation for disk fails, then we leak memory from previously
called _new_device function.

This patch based on D12223 from akanad (Wonki Kim)

ref D12223
2021-02-25 10:05:26 -05:00
Christopher Michael 691621336a eeze_disk: Remove extra blank lines
NB: No functional changes
2021-02-25 09:57:47 -05:00
Christopher Michael 369f2b3d87 efl_loop: Fix unchecked return value
Small patch to check return value of eina_value_get reported by Coverity

Fixes CID1400919
2021-02-25 09:40:29 -05: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 359435bed9 eina_promise: Fix unchecked return value
Small patch to check return value of eina_value_get reported by Coverity

Fixes CID1400993
2021-02-25 09:27:15 -05:00
Christopher Michael 0df61dc4fd elm_glview: Fix unchecked return value
Small patch to check return value of evas_gl_make_current reported by
Coverity.

Fixes CID1401018
2021-02-25 09:25:25 -05:00
Christopher Michael 732e622a82 eina_value: Fix unchecked return value
Small patch to check return value of eina_value_type_setup reported by
Coverity

Fixes CID1401023
2021-02-25 09:23:23 -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 598b7a1be6 elm_slider: Fix unchecked return value
Small patch to check the return value of eina_value_get reported by
Coverity

Fixes CID1401061
2021-02-25 09:11:17 -05:00
Christopher Michael d70f9484c6 ecore: Update to not use deprecated mallinfo
mallinfo (the structure) and mallinfo (the function) have both been
deprecated in favor of mallinfo2 which has been updated to
handle allocations > 4GB.

This patch updates ecore usage of deprecated mallinfo to use
mallinfo2. If the system does NOT have mallinfo2, then this code will
fallback to using mallinfo.
2021-02-25 08:25:29 -05:00
Carsten Haitzler 9f142be03c elm - efl ui format - remove leak on format info 2021-02-25 11:18:51 +00: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
Christopher Michael 1842d3997a Revert "ecore: Update to not use deprecated mallinfo"
Reverting this, for now, because some distro's are still not
updated... This should probably use a malloc version check, but I
don't have time this week for a proper fix...

This reverts commit 17137316ee.
2021-02-17 10:53:15 -05:00
Shinwoo Kim ccf77acc22 eeze: fix a potention memory leak
Summary:
if udev device get parents fails, memory leaks.
this patch fixes the problem.

Reviewers: raster, Hermet, jsuya, herb, ali.alzyod, devilhorns

Reviewed By: ali.alzyod, devilhorns

Subscribers: ali.alzyod, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12249
2021-02-17 10:18:43 +09:00
Christopher Michael 17137316ee ecore: Update to not use deprecated mallinfo
mallinfo (the structure) and mallinfo (the function) have both been
deprecated in favor of mallinfo2 which has been updated to handle
allocations > 4GB.

This patch updates ecore usage of deprecated mallinfo to use mallinfo2
2021-02-16 12:41:56 -05:00
Shinwoo Kim f8a98e5bf2 gl: remove memory leak of orient_set
Summary:
The tex->pt->references is descreased by
evas_gl_common_texture_free -> pt_unref

if tex->references is 0

And tex->pt->texture is removed by
evas_gl_common_texture_free -> pt_unref -> glDeleteTextures

if tex->pt->references is 0

The evas_gl_common_texture_free decreases tex->references only
if tex->references is bigger than 0. There is no chance to decrease
tex->pt->references at this point.

So if orient_set increases both references of tex and tex->pt, then
the tex->pt->reference is not decreased till tex->references is 0.

So do not increase tex->pt->references in eng_orient_set.

Reviewers: raster, cedric, Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12243
2021-02-13 11:51:16 +00: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
Vincent Torri ec4ef69115 Efreet: fix file:// scheme on Windows
Summary: On Windows, file:///c:/path/to/file is correct and not managed. Use a Win API for manage it correctly

Test Plan: test case

Reviewers: raster, cedric

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12244
2021-02-06 14:49:54 +00:00
Vincent Torri d8d52861a6 Efreet: do not translate standard directories on Windows
Summary: The directories on hard disk are not translated on Windows

Test Plan: test case

Reviewers: raster, cedric

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12246
2021-02-06 14:38:55 +00:00
Carsten Haitzler f323664bc7 evas - gl engine - look for extension in the right extension string set
this fixes slow operation on what seems to be a minority of instances
that dont advertise the extension in both egl and gl strings

@fix
2021-02-06 14:38:55 +00:00
Jaehyun Cho d3d3af369b edje_entry: fix a potential error of null deref
Summary:
This is a patch to fix a potential error of null dereferencing.
This patch is based on D12087.

Reviewers: Hermet, jsuya

Reviewed By: jsuya

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12241
2021-02-04 11:00:14 +09:00
Shinwoo Kim ab969c5915 eet, emile: safety++
Summary:
(1) EVP_MD_CTX_new could return NULL
(2) EVP_DigestUpdate returns 0 for failure.
  https://www.openssl.org/docs/man1.0.2/man3/EVP_DigestUpdate.html

Reviewers: raster, Hermet, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: SPAM-roll99, devilhorns, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12237
2021-02-04 10:11:33 +09:00
Carsten Haitzler 90e5fd831d ecore-x - vsync - also log the direct device timestamp if it goes back 2021-02-03 02:26:54 +00:00
Carsten Haitzler 4013c98af1 ecore_x - vsync ... this handles time going backwards
yes - time went backwards. we get time from the device driver and
vsync events... this is so incredibly wrong ... it should not have
ever happened... but it did and that caused all sorts of bad things to
happen to animators. this guards against that and tries to get the
system clock time and if that doesnt work it just takes last time +
0.901.

@fix
2021-02-03 00:43:20 +00:00
Carsten Haitzler 9890c2b135 evas - tga loader - ignore origin as it leads to valid tga's not loading
@fix
2021-02-01 18:06:43 +00:00
Carsten Haitzler 6f803ad233 ecore x - allow vsync animator to delay by some fraction of a frame
@feat
2021-02-01 18:06:43 +00:00
junsu choi 77c9adf1fd Efl.Canvas.Vg.Object: Skip render, if size of the drawing area is 0
Summary:
If the size of the boundary of path is 0, there is no area to draw.
Therefore, it is the same as hide().
If there is no area to draw, there is no need to create a buffer or perform rendering.

Test Plan: N/A

Reviewers: Hermet, kimcinoo

Reviewed By: Hermet

Subscribers: devilhorns, cedric, #reviewers, #committers, herb

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12235
2021-02-01 09:59:33 +09:00
Alastair Poole 44425e7489 ecore_file_monitor: add kevent backend.
Summary:
This is a very simple kevent backend, very similar to the eio_monitor
implementation. On BSD systems, some core features within in E and
other applications are always using the poll engine, which is not
ideal.  This is better, and simpler.

Reviewers: devilhorns, raster, bu5hm4n, vtorri

Reviewed By: vtorri

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12239
2021-01-31 14:45:46 +00:00
Ali Alzyod 39c305cf86 efl_ui_textpath: mathmatical calculations
Summary: Reduce number of sqrt calls.

Reviewers: cedric, raster, bu5hm4n, vtorri, woohyun, Hermet

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

Tags: #efl

Maniphest Tasks: T8747

Differential Revision: https://phab.enlightenment.org/D11949
2021-01-29 11:53:16 +02: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
Christopher Michael 6a3522352b ecore-evas: Formatting fix
NB: No functional changes
2021-01-27 15:11:57 -05:00
Carsten Haitzler e1226ecfff elm - test - genlist - add more callback event printfs for testing 2021-01-27 11:56:42 +00:00
Wonki Kim 257dced038 eeze walk: fix a memory leaking
Summary:
there is a memory leak in a logic for walking along child-parent relation,
in case of device_get_sysattr_value failure.
this patch fixes the leak.

Change-Id: I95e9484b1549d1c794ec529c995af33da9b8a0ee

Reviewers: bu5hm4n, zmike

Subscribers: raster, SPAM-TeresaButler, vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12224
2021-01-25 08:55:24 +00:00
Carsten Haitzler d37958c1b0 ethumb - fix asan complaint on mis-accessing struct after free in client
@fix
2021-01-24 15:59:55 +00:00
Carsten Haitzler c40e80dd48 elm - fix elm_config args parsing/collecting
@fix
2021-01-21 19:41:19 +00:00
Wonki Kim 728d4dba16 slider: fix a potentional crashing problem
null pointer dereferencing could happen once eina_value_setup fails.
this patch fixes the problem in adavnace

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12173
2021-01-19 16:33:13 -05:00
Carsten Haitzler 0d9cc0a562 evas - let's not set dynamic img hints if extns not there 2021-01-14 19:48:18 +00:00
Shinwoo Kim 34b0d0e973 gl: remove invalid read and write
Summary:
There could be 2 evas_gl_image referencing 1 evas_gl_texture.
evas_object_image_orient_set could make this case.
In this case, when one evas_gl_image is removed(free), the evas_gl_texture
is not removed because its reference count.
After this point, if the other evas_gl_image is removed without drawing
(see function evas_gl_common_image_draw, line "im->tex->im = im")
then evas_gl_texture is reading invalid adress when it is removed.

Reviewers: Hermet, jsuya, herb, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12229
2021-01-14 13:47:26 +09:00
Carsten Haitzler f6d0bc1b29 evas - missing EVAS_API - add. 2021-01-11 11:04:32 +00:00
Felipe Magno de Almeida c118886043 emotion: emotion EAPI macro to EMOTION_API in Emotion library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  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, woohyun, jptiz, lucas

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12227
2021-01-11 10:31:30 +00:00
Carsten Haitzler 0472f21979 evas webp loader - stop complainig its an invalid file
when a file has no extension to guess by.. evas goes back to trying
every loader until one works. this leads to noise. loaders should not
printf/stder or eina log err anything if the file seems to not be valid.

@fix
2021-01-06 14:13:04 +00:00
Carsten Haitzler c3577929b3 elm - genlist - fix leak if someone steals objects on unrealize
elm_genlist_item_all_contents_unset() can steal away the item content.
this is how you do a cache of your own objects... BUT this meant
genlist couldnt remove its hash entires... as it lost them. this fixes
that. leak fixed. (this affected evisum)

@fix
2021-01-03 19:36:50 +00:00
Carsten Haitzler b27a0f2b2d ecore - call freeq reduce again on idle enter...
this led to a nasty leak unless you had ilders runnig every now and
again. freeq would just epxand and expand...

@fix
2021-01-03 19:36:50 +00:00
Felipe Magno de Almeida 6f23a9daa1 ector: Rename EAPI macro to ECTOR_API in Ector library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  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, woohyun, jptiz, lucas

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12226
2021-01-01 17:34:01 -03: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 86493e160a ecore_con: Rename EAPI macro to ECORE_CON_API in Ecore Con 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: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12225
2020-12-28 13:58:06 -03:00
Wonki Kim b1c9b8cec0 eeze_syspaty: fix a potention memory leak
Summary:
if udev device get sysname fails, memory leaks.
this patch fixes the problem.

Change-Id: I2d02a6e6eb98e9262255ab3c02cf99f347b8c5f9

Reviewers: bu5hm4n, Hermet, zmike

Reviewed By: Hermet

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12222
2020-12-24 11:48:53 +09:00
Woochanlee 9a31278299 elm_gesture_layer: fix config value type
Summary:
The value will read as unsigned char not double.

@fix

Reviewers: Hermet, raster, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12195
2020-12-24 11:48:08 +09:00
Woochanlee ed0c46fa3b eo_base_class: Avoid useless memory alloc
Summary:
The pd->ext will be NULL when the target object on invalidate state or edje object or isolated object etc..

In above case, If data is NULL and ext is not needed, it seems there is no need to create a node.

Reviewers: raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12206
2020-12-24 11:47:04 +09:00
Wonki Kim 37cecd5413 eeze_net: fix a potentional memory leak case
Summary:
if `net` equals zero and `device` has allocated properly at the same time, memory leaks.
this patch fixes it.

Reviewers: Hermet, bu5hm4n, zmike

Reviewed By: Hermet

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12221
2020-12-24 11:43:28 +09:00
Carsten Haitzler 00f5eed1d2 evas - avif - fix for 0.8.2 libavif that broke api
also require 0.8.2 ... as well - no point trying to support older
versions forever and this is still experimental.

fixes T8844
@fix
2020-12-18 11:28:10 +00:00
Vincent Torri 5f3152a30b Evas, Eolian: install missing *_api.h files
Summary: previous patches forgot to install *_api.h

Reviewers: raster, felipealmeida, lucas, jptiz

Reviewed By: lucas, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12216
2020-12-17 15:28:26 +00:00
junsu choi 745012e6c2 edje_data: Add missing descriptor for image.max(min).limit
Summary:
Edje_Part_Description_Image uses EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB,
EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB is missing max.limit and min.limit descriptors.
Therefore, max:SOURCE and min:SOURCE did not work in EDC.
Adds a descriptor to it.

https://www.enlightenment.org/_legacy_embed/edcref.html#sec_toplevel_images
max [width] [height] or SOURCE
The maximum size of the state. A size of -1 means that it will be ignored in one direction.
When max is set to SOURCE, edje will enforce the part to be not more than the original image size.
The part must be an IMAGE part.

Test Plan:
{F4230539}
edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
./test

Reviewers: Hermet, Jaehyun_Cho, cedric, raster

Reviewed By: Hermet

Subscribers: #reviewers, #committers, kimcinoo, herb

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12215
2020-12-17 12:50:48 +09: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 75f07e41c0 ecore_audio: Rename EAPI macro to ECORE_AUDIO_API in Ecore Audio 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, lucas, jptiz

Reviewed By: vtorri, lucas

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12212
2020-12-15 11:36:42 -03:00
junsu choi 1f9e528b50 evas: Prevent null pointer access
Summary: add null check

Test Plan: N/A

Reviewers: Hermet, cedric, kimcinoo, raster

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12213
2020-12-15 11:47:41 +00:00
Felipe Magno de Almeida 8d2c652104 evil: Fix fcntl for F_SETLK and F_SETLKW wrong length calculation
Summary:
If length and start are both 0, size is wrongfully negative. Besides,
using length as a delimitator in a range means that [0, length) is a
half-closed interval, so we don't need to subtract by 1.

Reviewers: vtorri, woohyun, lucas, jptiz

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12208
2020-12-14 11:50:48 -03:00
Felipe Magno de Almeida 4e5b01f8a0 eio: Rename EAPI macro to EIO_API in Eio 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, lucas, jptiz

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12210
2020-12-14 11:45:35 -03:00
Carsten Haitzler a43c2dad50 evas generic pdf - handle cleanupp on crashes in poppler and other errors
if poppler_init fails or it crashes in poppler or a timeout we didnt clean
up the tmpdir... this forces a cleanuo and ups timeout to 30sec.
2020-12-12 02:22:06 +00:00
João Antônio Cardoso dc0173fdf6 Fixing conversion from size_t to high-low dwords for _WIN64.
Reviewers: vtorri, woohyun, lucas, jptiz

Reviewed By: vtorri, jptiz

Subscribers: joaoantoniocardoso, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12207
2020-12-09 17:12:10 -03:00
João Antônio Cardoso 2b08306875 evil: Define environ macro when using VS based on UCRT definition
Summary:
Microsoft Visual Studio defines _environ, but not environ. Create
a macro #define environ _environ like other analogous solutions

Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>

Reviewers: vtorri, woohyun, joaoantoniocardoso, lucas, jptiz

Reviewed By: jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12209
2020-12-09 16:53:30 -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
Woochanlee cfd17f145a edje_util: Fix memory leak
Summary:
evas_object_data_set call callc for internal node.
It's not free before call evas_object_data_del or evas_object_data_set(obj, NULL)

Reviewers: raster, cedric, Hermet

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12205
2020-12-08 12:17:57 +00:00
Shinwoo Kim 25dba9ebcf png: handle 9-patch ends with stretch
Summary:
The strech region has paired information; total and strechable.
Refer to function _strech_region_load retrieving strech region info.

But if 9-patch information line ends with strechable,
png did not push the strechable information.
And it leads to devide by zero.

This patch is adding strechable info to the strech region,
if 9-patch information ends with strechable.

Test Plan:
[Code]
{F4219278}
{F4219280}

[Test]
ECORE_EVAS_ENGINE=opengl_x11 ./evas-image-9patch ./end_with_strech.9.png

Reviewers: Hermet, jsuya, herb, cedric

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12204
2020-12-07 16:53:08 +09:00
Felipe Magno de Almeida 1aef7c697a eldbus: Add Eldbus.h include entry point header to eldbus_instrospection.h
Summary:
Add #include Eldbus.h so we can have EAPI definition for
eldbus_instrospection.h header

Reviewers: jptiz, lucas, vtorri, woohyun

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12202
2020-12-06 12:39:32 -03:00
Felipe Magno de Almeida b01cc905ea eio: Add weak symbol
Summary:
Add definition for EAPI_WEAK because this macro will be needed when we
change how Eolian generates import/export symbols for the Eio library.

=  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: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12201
2020-12-06 12:32:34 -03:00
Felipe Magno de Almeida 3523f106b8 benchmark: Remove unnecessary import and export macros from benchmark executables
Summary:
Benchmark executables do not need to export and import symbols because
they are not loaded by other executables. Removing is important because
EAPI will be removed in some later commit and would break benchmark
executables.

=  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

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12200
2020-12-06 12:25:19 -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
Carsten Haitzler 650578b573 evas - fix build on bigendian
macro forgot to () a param ... so it broke on bigendian as it has
spaces and a | ...

fixes T8860
2020-11-30 14:28:36 +00:00
Carsten Haitzler b59b605021 evas gl - experiment with dithered gl rendering
this adds a dither func (4x4 dither matrix) to experiment with higher
quality rendering in gl - this assumes you have a normal 8bit per
channel buffer for now (99% of people) and will approximate values in
between the 256 steps 8 bits provides by using the dither matrix based
on gl_FragCoord position. it's just a flag in the shader flags for now
so can be turned on/off in code. this definitely makes blurs look much
better... everything else seems basicall the same. let's see how this
goes.

@feat
2020-11-27 15:02:58 +00:00
Felipe Magno de Almeida f08f0548da eolian: Rename EAPI macro to EOLIAN_API in Eolian 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: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12196
2020-11-25 11:43:53 -03:00
Lucas Cavalcante de Sousa 4797602e84 efl_mono: Use architecture independent ECANCELED
Summary:
`efl_mono` was assuming ECANCELED as in Linux, which made some tests
fail.

`test_simple_futere_cancel` and `test_cancel_after_resolve` checks if
the returned error code is `ECANCELED` but `Eina.Error.ECANCELED` was
base on Linux `ECANCELED` which is diferent from OSX causing:
```
[ ERROR       ] AssertionException: /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:138 (test_simple_future_cancel) Left hand side "Eina.Error(89)", right hand side "Eina.Error(125)"
at Test.AssertEquals[T](T lhs, T rhs, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 73
at TestSuite.TestPromises.test_simple_future_cancel() in /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:line 138
[        FAIL ] TestPromises.test_simple_future_cancel
```
```
[ ERROR       ] AssertionException: /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:256 (test_cancel_after_resolve) Left hand side "Eina.Error(89)", right hand side "Eina.Error(125)"
at Test.AssertEquals[T](T lhs, T rhs, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 73
at TestSuite.TestPromises.test_cancel_after_resolve() in /Users/lucas/expertise/efl1/src/tests/efl_mono/Promises.cs:line 256
[        FAIL ] TestPromises.test_cancel_after_resolve
```

And `iwraper.cs:WrapAssync` was only considering Linux `ECANCELED` thus causing
a rise of an `Efl.FutureException: Future failed` instead of the expected
`TaskCanceledException` making fail at `TestEoAsyncMethods.test_async_cancel`:
```
[ RUN         ] TestEoAsyncMethods.test_async_cancel
[ ERROR       ] AssertionException: Assertion failed: /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:175 (test_async_cancel) AggregateException must have been TaskCanceledException
   at Test.Assert(Boolean res, String msg, Int32 line, String file, String member) in /Users/lucas/expertise/efl1/src/tests/efl_mono/TestUtils.cs:line 53
   at TestSuite.TestEoAsyncMethods.<>c.<test_async_cancel>b__1_0(Exception x) in /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:line 175
   at System.AggregateException.Handle(Func`2 predicate)
   at TestSuite.TestEoAsyncMethods.test_async_cancel() in /Users/lucas/expertise/efl1/src/tests/efl_mono/EoPromises.cs:line 171
[        FAIL ] TestEoAsyncMethods.test_async_cancel
```

Depends on D12156

Test Plan:
Compare with master and note that with this diff all tests pass.
- Configure as especified by Enlightenment man page + `-Dbindigns=mono -Ddotnet=true`:
```
meson -Dsystemd=false -Dv4l2=false -Davahi=false -Deeze=false -Dx11=false -Dopengl=full -Dcocoa=true -Dnls=false -Demotion-loaders-disabler=gstreamer1,libvlc,xine -Decore-imf-loaders-disabler=scim,ibus -Dbindigns=cxx,mono -Ddotnet=true build
```
- Build normally
- Test `efl-mono-suite`

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: ProhtMeyhet, cedric, #reviewers, #committers, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12157
2020-11-25 10:44:41 -03:00
Lucas Cavalcante de Sousa 4de94638a6 efl-mono: Correctly load dynamic libs for OSX
Summary:
OSX libs end with `.dylib`, so it made failed to load libs, for instance
dl name is `dl.dylib` making it unable to load as it was before
(`libdl.so`).

Test Plan:
Compare with master and note that this diff is able to fail on tests, and
not about importing libs.
- Configure as especified by Enlightenment man page + `-Dbindigns=mono -Ddotnet=true`:
```
meson -Dsystemd=false -Dv4l2=false -Davahi=false -Deeze=false -Dx11=false -Dopengl=full -Dcocoa=true -Dnls=false -Demotion-loaders-disabler=gstreamer1,libvlc,xine -Decore-imf-loaders-disabler=scim,ibus -Dbindigns=cxx,mono -Ddotnet=true --prefix=$PWD/prefix build
```
- Build normally
- Test `efl-mono-suite`

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: stefan_schmidt, cedric, #reviewers, #committers, woohyun

Tags: #efl, #expertise_solutions

Differential Revision: https://phab.enlightenment.org/D12156
2020-11-25 10:43:47 -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
Hermet Park 6b1f281f17 ui transit: improve zoom effect smoothness by subpixel rendering.
Summary:
evas image might have a better quaility if scaling/transform is not necessary,
so we have a condition to check if image is axis-aligned transformed or not.

On the other hand sub-pixel(floating point coordinates unit) rendering necessary
if image has an effect such a zooming. This would result in a smoother effect
than integer coodinate system.

We need a more precise condition to confirm this,
so we intrduce "anti-alias" option to decide the condition.
now, anti-aliased objects will have a sub-pixel rendering always.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12194
2020-11-25 10:11:59 +09:00
Carsten Haitzler 841ceced52 ecore x - dont free previous resource db 2020-11-22 21:14:56 +00:00
Carsten Haitzler 148aec9d9c ecore-x - add xresource set/get/load etc.
new ecore-x calls to support the things xrdb does

@feat
2020-11-22 20:33:07 +00:00
Shinwoo Kim 5f8e4dabea evas gl: make 9 patch work
Summary:
The 9 patch is using image_stretch_region_get, but GL did not override it.
So the 9 patch did not work for GL engine at all.

Test Plan:
Evas_Object*img = evas_object_image_filled_add(evas);
evas_object_image_file_set(img, "test.9.png", 0);
evas_object_show(img);

Reviewers: Hermet, jsuya, herb, cedric

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12192
2020-11-20 11:22:55 +09:00
Ali Alzyod f56004db6e evas_textblock: reduce content fit calculations
Reviewers: woohyun, id213sin

Reviewed By: woohyun, id213sin

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12187
2020-11-19 10:29:48 +02:00
Ali Alzyod ac2987b363 elm_entry: legacy smart selection[start,cleared] callback fix
Summary:
due to changes in latest text apis in unified, legacy selection call back [start,clear] does not work anymore,
Now add the support for legacy callback [selection,start   selection,cleared]

Reviewers: woohyun, bowonryu, stefan_schmidt

Reviewed By: bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12126
2020-11-18 15:54:57 +02: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
Felipe Magno de Almeida 8f9255e2c1 evil: Rename EAPI macro to EVIL_API in Evil 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: raster, vtorri, jptiz, lucas, woohyun

Reviewed By: vtorri, jptiz

Subscribers: ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12182
2020-11-12 17:40:21 -03:00
Carsten Haitzler 64ce7a2c45 ecore evas - wayland clients - dont set invalid min/max width
max width < 0 is wrong.. dont set it. min width < 1 for efl is
stupid/invalid and dont set it either, so clamp these and now things
work right in corner cases.

@fix
2020-11-10 12:01:52 +00:00
Carsten Haitzler fff5b4919e evas - object - grabs - dont delete NULL event grabs
segv while shutting down and removing grabs - obj->events was null...
dont follow that poointer while deleting grabs.

@fix
2020-11-10 08:12:18 +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
junsu choi 888e1e7401 vg_load_svg: Prevent memory overflow for tag_name
Summary:
When copying tag_name, if length of referenced string is longer
than general case, it is not used as tag_name.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: kimcinoo, herb, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12185
2020-11-02 13:05:45 +09:00
Youngbok Shin 94c2d2295f evas/textblock: apply style paddings in fit calculation
Summary:
The style paddings should be calculated for fitting text into
the given object's size.

Test Plan:
1. Put shadow effect in your style string.
"... style=shadow,far_bottom shadow_color=#000 ..."

2. Apply fit option( and ellipsis to see how it goes wrong without this patch.)

3. See results.

Reviewers: woohyun, ali.alzyod

Reviewed By: woohyun, ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12183
2020-10-28 14:50:23 +09:00
Felipe Magno de Almeida e9ee9cc3a0 evil: undef setlocale to avoid recursion
Summary:
evil_setlocale implementation must not call itself, so it must #undef
setlocale to avoid replacing with evil_setlocale.

Reviewers: vtorri, jptiz, lucas

Reviewed By: vtorri, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12184
2020-10-27 11:05:51 -03: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
junsu choi 3274390f73 vg_load_svg: Implement ClipPath feature
Summary:
Supports case of using style attribute for defined <clipPath> and node.
In SVG, <clipPath> can be used as a "clipPath" attribute or a style "clip-path".
If there is a clip-path node, save it as a composition node and
use composition method(matte_alpha) to compose it.

Below node types support clip-path.
<circle>
<ellipse>
<g>
<path>
<polygon>
<polyline>
<rect>

Test Plan:
Please see attached svg files
{F4026162}

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, cedric, herb, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12179
2020-10-14 19:16:53 +09:00
Vincent Torri 25e64a9a4e Ecore_Win32: add the API ecore_win32_window_maximized_set()
Summary:
ecore_evas win32 engine is updated to support it. This fixes the
"maximized/unmaximized" elm "windows states" test.

Test Plan: elm_test

Reviewers: raster, jptiz, felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12177
2020-10-13 15:19:39 +01:00
Vincent Torri b9df223fa2 Ecore_Evas win32: fix activate() function
Summary: activating the function needs un-iconified first

Test Plan: elm windows status tests

Reviewers: raster, jptiz, felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12176
2020-10-13 15:19:26 +01:00
junsu choi d5f728bd72 evas svg: Fix build error
Fix build error from 9e14a57020
2020-10-12 19:03:58 +09:00
Hermet Park 9e14a57020 evas svg: avoid unnecessary memory clear. 2020-10-12 18:37:55 +09:00
junsu choi 862e65c260 vg_load_svg: Add points copy of missing polygon/polyline
Summary:
When using <use> node, do atrribute copy.
At that time, when target(url) is polygon or polyline,
points array is not copied, causing a problem in output.
So, add missing array copy.

Test Plan:
 - Test SVG code

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
    <g opacity="0.5">
        <defs>
            <polygon id="test" opacity="0.5" points="41.8,14.5 22.2,14.5 22.2,22.8 41.8,40.7"/>
        </defs>
        <use xlink:href="#test"  overflow="visible"/>
    </g>
</svg>

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, kimcinoo, herb, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12174
2020-10-12 18:37:26 +09:00
Vincent Torri 0742a6c78e Ecore_Evas win32 module: do not set evas viewport size to 0
Summary: When a window is iconified, its size is 0x0 and is passed to evas viewport. Set the size to 1x1 in that case

Test Plan: Elementary "windows states" test

Reviewers: raster, jpcordovae, felipealmeida, jptiz

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12171
2020-10-10 13:56:03 +01: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
Carsten Haitzler 0c79b8f94b efl ui image - dont cancel preload on image if image is an edje object
fixes invalid request on non-image object.
@fix
2020-10-09 13:34:23 +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
Vincent Torri 0a08a860a8 Ecore_file: on Windows, fix errno value when dst exists.
Summary: This also fixes the saving of elementary_config file

Test Plan: execution of elementary_config

Reviewers: jptiz, raster

Reviewed By: raster

Subscribers: johnny1337, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12165
2020-10-06 15:09:31 +01:00
Carsten Haitzler 387a720091 eina - eina eifle - rename eina_file.c to indicate its for posix 2020-10-05 16:22:24 +01:00
Hermet Park b6a98bb3be elementary image zoomable: fix non supported oversized image.
Summary:
if image size is larger than system support, photocam can not show the image.

Not like other types of image, photocam is originally designed for huge-size of image,
this result is not allowed by users, we should avoid the worst case as we can do.

This might not be the best idea, so you can improve it if you have a better solution.

Reviewers: kimcinoo

Reviewed By: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12164
2020-10-05 12:56:03 +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
Vincent Torri de5ac32870 Windows: fix copy'n paste
Summary: fix seat id and clean cnp data when needed

Test Plan: Ctrl-c and Ctrl-V (elm-->app, app--> elm elm-->elm)

Reviewers: jptiz, walac, cochisecesar, bu5hm4n, felipealmeida, raster

Reviewed By: felipealmeida, raster

Subscribers: netstar, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12166
2020-09-30 13:59:27 +01:00
Carsten Haitzler 3d351b98c2 efreet - windows - still call stat but skip lstat/readlink
now stat is filled with data on windows

@fix
2020-09-29 10:32:02 +01:00
Youngbok Shin 85a0af8281 evas: sw font draw - protect against null pointer access
The image data of dst could be null in a rare case.
@fix

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12163
2020-09-28 13:44:50 -04:00
Marcel Hollerbach 4700af9c7d build: addition to abf0e9dffe
the fix is also needed in ecore_imf modules.

Thank you Ross!
2020-09-25 14:07:47 +02:00
Vincent Torri e4866ae3ff fix order and simplify a bit order of _init|_shutdown functions
Summary:
in bin/
ecore_evas.c : remove useless ecore_init
eetpack.c : remove use eina_init and evas_init
eet_main.c : reorder eet_init
efl_debug.c : remove useless eina_init
efl_debugd : reorder log domain
ethumbd.c : remove eina_init
ethumbd_client.c : remove ecore_init (which was anyway misplaced)

Test Plan: compilation

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12162
2020-09-25 10:30:20 +01:00
Vincent Torri 994904098c Ethumb: reorder _init/shutdown functions, ecore and evas init/shutdown are useless, as ecore_evas already manages them
Test Plan: compilation

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12161
2020-09-25 10:30:04 +01:00
Vincent Torri 9bfba0867d edje_external_inspector: re-order _init a bit: log after eina, remove ecore_init/shutdown as it is already managed by edje_init/shutdown
Reviewers: raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12160
2020-09-25 10:29:54 +01:00
Marcel Hollerbach abf0e9dffe build: fix dependencies of software engine
before the efl-one refactoring ecore_x_deps contained all the
dependencies for x11. After that not anymore, however, we should link
software_x11 to x11 libs directly, which is again happening after this
here.
2020-09-24 10:35:53 +02:00
Shinwoo Kim 46eca1108c evas vg: check vg changed
Summary:
It is not able to render even though vg object has a chance to render,
because evas_object_smart_changed_get checks only Evas_Object_Protected_Data,
when Efl_Canvas_Vg_Object_Data.changed is TRUE.

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12152
2020-09-24 12:16:49 +09:00
Stefan Schmidt 080dbdee51 edje: efl: add new EFL_VERSION_1_26 define for new dev cycle
Thios allows to mark edje file supported for specific versions.
2020-09-22 20:27:18 +02:00
junsu choi 0b5f658510 efl_gfx_path: When path end(Z,z), Current point are returned to starting point(M,m)
Summary:
When path ends with 'z' or 'Z' command, if 'm' comes as next command,
the current point is incorrectly referenced.
Since 'Z', 'z' means to close the path,
so, Save point and reuse it when 'M' or 'm' is called.

Test Plan:
[Error Case]
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
    <path d="M 52.17,20
             H 11.92
             V 43
             H 52.17
             Z
             m -1.5,21.5
             H 13.42
             v -20
             H 50.67
             Z
" fill="#a8b7c1" stroke="#F00" stroke-width="0.5" />
</svg>

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, kimcinoo, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12158
2020-09-22 14:52:42 +09:00
Vincent Torri 3aeffe0bec elm_config: don't prepend /tmp/ to file name
eina_file_mkstemp() already takes care of this.

Differential Revision: https://phab.enlightenment.org/D12155
2020-09-21 11:26:23 +02:00
Stefan Schmidt ddd0736264 Revert "elm - collection view - check return and fix coverity wanring"
This reverts commit f3fdcf5692.

This commit leads to ninja test timeout. When returning result here the
future will never fire and we will keep spinning.
2020-09-21 11:09:07 +02:00
Carsten Haitzler 1638a79bd6 elm - toiolbar - use correct theme icon for more item
there is a specific thme icon for "more" items when a toolbar
compresses. it literally was not being used. it should use it.
"go-down" that it was using isn't exactly very expressive of what this
item does...

@fix
2020-09-21 09:35:06 +01:00
Carsten Haitzler 52b02055f4 ecore - efl thread - dont close invalid < 0 fd's
fix CID 1396951
2020-09-20 00:20:42 +01:00
Carsten Haitzler ca4b939364 ecore - efl exe - check returns of open and dup2 for stdin etc. fds
check returns - fix CID 1397002
2020-09-20 00:20:42 +01:00
Carsten Haitzler 568dd7e45b eina bench - have default values inside benc dtoa
addess CID 1400856
2020-09-20 00:20:42 +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
Carsten Haitzler 485ecc24ed eina thread - check return of pthread_attr_init
fix CID 1401031
2020-09-19 23:37:22 +01:00
Carsten Haitzler 2bea2c7b87 emotion - check return of eet data write
fix CID 1401040
2020-09-19 23:34:39 +01:00
Carsten Haitzler ec4076b895 ethumb - fix idx range check
fix CID 1402612
2020-09-19 23:15:44 +01:00
Carsten Haitzler d64d4568bd ethumb - fix index range check
fix CID 1402628
2020-09-19 23:13:08 +01:00
Carsten Haitzler fd93bed3d1 ethumb - fix index range check
fix CID 1402631
2020-09-19 23:11:53 +01:00
Carsten Haitzler fa2f0b67b9 ethumb - check size read
fix CID 1402633
2020-09-19 23:09:05 +01:00
Carsten Haitzler 99636bdd5f ethumb - check inoput index from stdin
fix CID 1402646
2020-09-19 23:03:20 +01:00
Carsten Haitzler e243a60bb2 evas - psd loader - check read values to try make coverity happy
this is trying to fix CID 1402688, 1402687, 1402682, 1402665. not sure
it will or will not but it does dot i's and cross t's
2020-09-19 22:32:57 +01:00
Carsten Haitzler f3fdcf5692 elm - collection view - check return and fix coverity wanring
fix CID 1405808
2020-09-19 20:38:12 +01:00
Carsten Haitzler f76d925318 ecore con url - curl is actually optional and only needs to init on use
ecore_con_utl_init is kind of pointless when we can init at the first
use of a url and just have it fail. the problem is anyone initting
ecore_con's url stuff will then pull in curl at that point and not
laer "on first use" which is kind of nw how the dlopen fun was
intended, so push it off until then.
2020-09-19 18:29:55 +01:00
Vincent Torri 364323881c elm_config: remove useless init|shutdown of ecore_win32 and eocore_cocoa (done in ecore_evas module), and useless wayland variable
ecore_win32 and ecore_cocoa was init. wayland variable was also unused

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12149
2020-09-18 09:04:00 -04:00
nerdopolis 57354e01ec call sd_seat_can_tty to determine if ttys should be used, instead of hard-coding seat0
Summary: All TTYs are on seat0, but not all seat0s have TTYs

Reviewers: #efl, devilhorns

Reviewed By: #efl, devilhorns

Subscribers: bu5hm4n, stefan_schmidt, raster, cedric, #reviewers, #committers

Tags: #efl

Reviewed-by: Christopher Michael <devilhorns@comcast.net>
Differential Revision: https://phab.enlightenment.org/D12143
2020-09-18 11:48:19 +02:00
Woochanlee 875f05cef5 evas_outbuf: Fix memory leak.
Summary: In certain use cases, when image data is created twice, the existing memory pointer is isolated and a memory leak occurs.

Reviewers: raster, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8813

Differential Revision: https://phab.enlightenment.org/D12148
2020-09-17 17:23:42 +09:00
Woochanlee ca2900be8a evas_main: Fix memory leak.
Summary: If the inlist has only one item when it removed. the data is not freed in descturctor.

Reviewers: Hermet, raster, vtorri

Reviewed By: Hermet

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12147
2020-09-17 17:23:10 +09:00
Shinwoo Kim e5958965e8 evas vg: check object changed as well 2
Summary:
evas cannot render vg object if Efl_Canvas_Vg_Node_Data flag is not
EFL_GFX_CHANGE_FLAG_NONE and Evas_Object_Protected_Data.changed is FALSE,
when vg object marks its node as changed.

Above case could be possible if vg object render_pre is not called, and
only nd->vd->obj->changed is set to false by evas_object_change_reset.

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12142
2020-09-17 10:40:25 +09: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
junsu choi 35f17a13fa vg_load_svg: Support dasharray attribute for stroke
Summary:
It supports stroke-dasharray, one of the stroke properties of svg.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray

Test Plan:
[Test SVG]
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
  <!-- No dashes nor gaps -->
  <line x1="0" y1="1" x2="30" y2="1" stroke="black" />

  <!-- Dashes and gaps of the same size -->
  <line x1="0" y1="3" x2="30" y2="3" stroke="black"
          stroke-dasharray="4" />

  <!-- Dashes and gaps of different sizes -->
  <line x1="0" y1="5" x2="30" y2="5" stroke="black"
          stroke-dasharray="4 1" />

  <!-- Dashes and gaps of various sizes with an odd number of values -->
  <line x1="0" y1="7" x2="30" y2="7" stroke="black"
          stroke-dasharray="4 1 2" />

  <!-- Dashes and gaps of various sizes with an even number of values -->
  <line x1="0" y1="9" x2="30" y2="9" stroke="black"
          stroke-dasharray="4 1 2 3" />
</svg>

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: kimcinoo, herb, cedric, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12146
2020-09-15 12:11:49 +09:00
junsu choi 53e8bf9dab Efl.Canvas.Vg: When VG container has transparency, ector buffer created synchronously
Summary:
If the container has transparency, it internally alpha blends with ector buffer.
So ector buffer must be created synchronously.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, cedric, herb, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12140
2020-09-11 17:02:24 +09:00
junsu choi 725219e319 vg_load_svg: Add Mask, ClipPath nodees as dummy.
Summary:
Mask and clippath TAG are not supported yet.
If this TAG is used, the Child TAG declared with this TAG may cause problems.
To prevent that, declare them as Unknown types until they are supported. (display=none)

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12139
2020-09-11 11:49:09 +09:00
junsu choi fbf8db3699 vg_load_svg: Fix missing loader.gradients update
Summary:
When both <defs> and <svg> gradients are declared,
the update of gradient declared in is omitted.
Therefore, this patch fixes any missing gradient updates.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: #reviewers, #committers, cedric, herb, kimcinoo

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12138
2020-09-11 11:48:30 +09:00
junsu choi 0e01e9778c Efl.Canvas.Vg.Object: Fix typo
Summary:
The 3th parameter of ector_buffer_pixels_get is the width.
So chnage px to pw.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12141
2020-09-11 11:46:59 +09:00
Myoungwoon Roy, Kim f59a166063 docs: Correct the mismatched group name in Evas.
I had found mismatched group name in Evas and fixed them.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12134
2020-09-10 09:21:31 +02:00
junsu choi d9c3b3f1b9 vg_load_svg: Supports case when only rx or ry is declared
Summary:
In relation to the declaration of rx and ry attribute of rect, the following three cases occur.
rx="10" (or ry="10"
rx="10" ry = "0" (or rx="0" ry = "10")
rx="10" ry = "10"
To cover these case, we check the rx and ry declarations.

Test Plan: N/A

Reviewers: Hermet, smohanty

Subscribers: kimcinoo, herb, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12137
2020-09-10 14:59:29 +09:00
Shinwoo Kim 7b7f69e09f evas vg: check object changed as well
Summary:
evas cannot render vg object if Efl_Canvas_Vg_Object_Data.changed is ture
and Evas_Object_Protected_Data.changed is false, when vg object marks itself
as changed.

Above case is possible depending on the draw area which is calculated by
eng_output_redraws_next_update_get. If this function returns NULL,
the vg object render function is not called, and vd->changed remains true.
Only vd->obj->changed is set to false by vas_object_change_reset.

Reviewers: Hermet, jsuya, herb, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12136
2020-09-09 12:14:48 +01:00
Jaehyun Cho cb059ea0af elm_gesture_layer: fix crash caused by elm_gesture_layer_cb_del in cb
elm_gesture_layer_cb_del can be called in Elm_Gesture_Event_Cb cb set by
elm_gesture_layer_cb_set and cb_info of the cb is free in the cb.

This causes crash if cb_info is searched with EINA_INLIST_FOREACH.
2020-09-07 15:18:12 +09:00
Carsten Haitzler 5d058c98fd elm cnp - make matchers const and static too 2020-09-05 15:03:44 +01:00
Marcel Hollerbach f8ef50eaaa elm_cnp: adjust image type to real format
we should never say that we have image/png etc. if we do not have the
respective format. Otherwise we are just confusing the other client.

With this you can copy things from elm to thunderbird / libreoffice
writer / firefox / telegram / chromium.

Please note if you test this: Start *a new xorg session* it was
discovered that xorg clients tent to be totally confused if there was a
protocol error before, or some wrong mime type was delivered before,
thunderbird even likes to crash if this is not done.

This should at some point be extended to more image types.
2020-09-05 09:43:43 +02:00
Marcel Hollerbach 6e85742b42 ecore_evas_x: reply in *any* way with XdndStatus
otherwise Xorg stops sometimes to continue sending callbacks to us.
Which results in a broken state maschine.
2020-09-04 18:30:36 +02:00
Carsten Haitzler 8cb57ecc1b ecore x - fix typo in internal backdoor api to get vsync debug 2020-09-04 14:42:07 +01:00
Carsten Haitzler e0d21286c2 ecore drm - increase timeout for flips from 0.05 to 2.0 sec
so our timeout is far too agressive. we cant stay hung on buggy
devices/drivers though so make the timeout 2s instead of 0.05s so we
dont go retrying flips too agressively which causes stuttering

@fix
2020-09-04 13:25:52 +01:00
junsu choi 39ccd92394 vg_load_svg: Fix pointing to wrong parent
Summary:
If defs type is open empty style, it is not included in stack.
Because the current logic is weak to group tags in sibling relationships.
If defs of open-empty type is placed before the group tag,
the group tag refers to the wrong parent. This patch prevents it.

This change is the same concept as the D12127, which was reverted to 5065c9d0c2.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, herb, kimcinoo, #committers, #reviewers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12129
2020-09-04 11:14:59 +09:00
Myoungwoon Roy, Kim add087837c docs: Add the missing API page name to elementary and evas
I had found missing API reference page name. There should be page name to each API defgroup

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12128
2020-09-03 11:17:53 +02:00
Carsten Haitzler 9544c87428 edje - calc - handle swallow disappearing mid-calc due to callabcks
callbacks attached to move/resize etc. can change a swallow and ..
well.. i hit a crash where it happens. so handle this case.

@fix
2020-09-03 09:42:31 +01:00
Hermet Park 5065c9d0c2 Revert "SvgLoader: Defs type nodes are not saved in loader's node list."
This reverts commit 40b6e44947.

This has some side effects, we will intrdouce it again after fix it.
2020-09-03 16:45:27 +09:00
junsu choi 40b6e44947 SvgLoader: Defs type nodes are not saved in loader's node list.
Summary:
If there is an empty (unused) <defs /> inside the svg file, this can cause problems.
<defs> node is managed separately in loader->def.
So it doesn't have to be added to loader's list.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers, kimcinoo, herb

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12127
2020-09-02 18:34:59 +09: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 e2a1cdfda7 build: only find env once
this was a bit messy, and we might have caused a bug on the ML with
that.
2020-09-02 09:25:51 +02:00
Marcel Hollerbach f9ade56cf8 efl_ui_focus_manager_calc: fix CID
coverity was complaining that the DIRECTION ACCESS macro might access
over a negative direction. However, complement of a 2D direction is
always a 2D direction. But coverity cannot detect that.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 9fb91f4a9f eldbus: use the const macros we have
clang warns about that, its rather harmless, but nicer.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 13a76dded0 efl: resolve warnings over misleading code
this is meant to be like this, but clang thought of an intention mistake
here that went unsighted.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 9673ed6269 benchmarks: specify this outside extern "C"
uint128 is defined as a c++ specific type.
2020-09-01 14:12:31 +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
Marcel Hollerbach 0817c49e75 efl: remove unused functions
these are not used, if they are used again in the future, they can be
get back via git.
2020-09-01 14:12:31 +02:00
Marcel Hollerbach 5f73d13047 efl: remove bool and string pointer mixup 2020-09-01 14:12:31 +02:00
Woochanlee 8198345e1f edje_cc: Fix uninitialized scalar variable
Summary:
mo_path can using for fprintf in using_file function without initialize.
fix coverity.

Reviewers: Hermet, raster

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12120
2020-09-01 21:02:57 +09:00
Carsten Haitzler d5d7c55302 elm icon/thumb - fix handling of a wider range of video extns
the xetension list for video files was far too small. it menas it
missed many kinds of video files. this fixes that to have a much wider
range/list.

@fix
2020-09-01 12:26:01 +01: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
Vincent Torri ba3b082d06 eeze_mount binary: more secure check extension ('.iso' and not 'iso')
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12123
2020-09-01 09:35:49 +02:00
Vincent Torri 2261332969 ecore_file_can_exec: fix .bat case
the test on the .bat file was too early

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/D12122
2020-09-01 09:35:46 +02:00
Vincent Torri d910fa3fa7 Evil: add gettimeofday()
Add gettimeofday implementation based on the mingw one, using a more acurate function if Windows >= 8

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/D12111
2020-08-31 14:24:08 +02:00
Vincent Torri 33304d656c Ecore: more precise implementation of ecore_time_get on Windows
Implement directly monotonic clock on Windows, to have more accurate results

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/D12112
2020-08-31 14:24:05 +02:00
Vincent Torri 45cabae42b ecore-file: fix ecore_file_can_exec() on Windows
on Windows access() has no support of X_OK (see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/access-waccess?view=vs-2019), use SHGetFileInfo() instead

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/D12118
2020-08-31 14:08:21 +02: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
Vincent Torri 07d6a25c20 elm_theme: more secure check extension as '.edj' and not 'edj'
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D12121
2020-08-31 11:16:40 +02:00
Carsten Haitzler 4098515779 evas load - dont lose skip flg update after async head skip load fix
119d9f39dd fixed async loads when head
skip was on but it broke informing the evas image object of the file
handles etc. by losing the skip head flag in the image entry. this
fixes that
2020-08-30 18:46:48 +01:00
Carsten Haitzler 119d9f39dd evas - image cache - fix loading with skip head on to load changed files
changed files were not being detected as stas was being skipped if
skip head was enabled. this means we totally didnt see changes to
files if loaded this way until caches were cycled/flushed/removed

@fix
2020-08-30 12:05:17 +01:00
Carsten Haitzler 5a125ccfa4 eina - statgen (stat generation) - fix enable api to actually enable
it wasn't being enabled thus missing an entire optimization limiting
stats to "once per frame" etc. to avoid overly syscall+io happy code
from having as much of an impact

@fix
2020-08-30 12:04:13 +01:00
Carsten Haitzler 07138e1e1d ecore exe - fig signal block to unblock again - some sys dont on exec
it seems some libc's or systes dont reset signal mask blocks on
exec(). this unblocks manuaklly jus befor eexec, moves blocking to
before fork and adds a "nuke all signal handlers" in the child process.

fixes T8797
2020-08-28 13:50:49 +01:00
Shinwoo Kim b954640db8 efl_ui_image: update orientation immediately
Summary:
It is able to get orientation information of inlined image object.
This information should be same during its life time.

The inlined image object got correct information only after size
calculation, so there is a kind of timing issue.

An example will be attached for more details.

I am not sure what the regression bug mentioned on D6855, but
this will keep compatibility of behavior.

Actually it seems that the compatibility was broken by D9686
which does not call _efl_ui_image_sizing_eval immediately.

Test Plan: {F3947703}

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12114
2020-08-28 14:54:11 +09:00
WooHyun Jung ece7010a4a elm_config: rescale is needed when font or font size is changed
Summary:
This patch fixes the issue that any application is not rescaled
when font or font size is changed by elementary_config.

Test Plan:
1. run elementary_test
2. run elementary_config
3. change the font in elementary_config
4. check the button size in elementary_test

Reviewers: id213sin, ali.alzyod, devilhorns, raster

Reviewed By: devilhorns, raster

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12117
2020-08-28 10:16:29 +09:00
Carsten Haitzler 13c125803e evas device - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler 5437afea1a elm access - fix enum cast warning - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler 3ae4f76247 edje - fix enum cast warning - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler be71903937 elm - efl ui text - fix enum return to use right enum 2020-08-25 13:21:25 +01:00
Carsten Haitzler e8109c678d elm - main - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler eab898e592 edje - fix enum cast warnings - checked values 2020-08-25 13:21:25 +01:00
Carsten Haitzler d30c1111bc evas - canvas - fix enum cast warning by removing cast 2020-08-25 13:21:25 +01:00
Carsten Haitzler e4bf0554f7 evas - image - fix enum cast warnings - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler c8f7692800 evas vg - fix warning for enum casts with explicit ones - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler c640dd7d18 elm - flip - fix enum cast warnings - cheked values match 2020-08-25 13:21:25 +01:00
Carsten Haitzler 77b3d11c8d evas - callbacks - fix casting warnings - checked flags are the same 2020-08-25 13:21:25 +01:00
Carsten Haitzler 76701f606c evas - image+proxy - fix enum cast warnings with casts - checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler e0888cbbef evas - sw generic - fix enum cast warn - valid checked 2020-08-25 13:21:25 +01:00
Carsten Haitzler 1c90fd41bc evas - obj main - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler ad6573bbfe evas - canavs vg shape - cast enums - valid - checked - fix warnings 2020-08-25 13:21:25 +01:00
Carsten Haitzler 2b264c606a ecore evas, edje - fix use of evas seat device enum 2020-08-25 13:21:25 +01:00
Carsten Haitzler d54d4fb9c8 elm cnp/dnd - use right evas device enum for seat 2020-08-25 13:21:25 +01:00
Carsten Haitzler c565403bda elm scroller - fix mapping of block enums - was broken 2020-08-25 13:21:25 +01:00
Carsten Haitzler ea1d4ecfdb elm - focus legacy - fix enum implicit casts with explicit - valid
these casts are valid (i checked) to make them explicit and remove
warnings
2020-08-25 13:21:25 +01:00
Carsten Haitzler fbbde6e8a8 elm - efl ui widget - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler 70d0fcfc90 elm image - zoomable - fix enum warnings with valid casts 2020-08-25 13:21:25 +01:00
Carsten Haitzler 880973ebcf evas - sw generic - fix enum passing with casts or correct types fix wrn 2020-08-25 13:21:25 +01:00
Carsten Haitzler ed12d482d5 evas - legacy events - cast enums after checking its ok - wrn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler aac4dd3066 evas events - cast enums after checking their values match - fix wrns 2020-08-25 13:21:25 +01:00
Carsten Haitzler 13d4c546f9 ecore evas - use correct enums for legacy funcstions to remove warns 2020-08-25 13:21:25 +01:00
Carsten Haitzler f6e33361ed elm - efl ui win - fix enum handling with explicit casts where needed
warnings and cash enums to show we really do keep enums in sync
2020-08-25 13:21:25 +01:00
Carsten Haitzler aad95dd625 ecore evas - module - use correct enums 2020-08-25 13:21:25 +01:00
Carsten Haitzler 7b3096f947 evas - gl generic - use correct enums for types 2020-08-25 13:21:25 +01:00
Carsten Haitzler b3c5008284 exactness - injecotr - alloc correct buffer size
didn't account for null bytes... fix.
2020-08-25 13:21:25 +01:00
Carsten Haitzler e9adfbae00 exactness - cast enum assign - it is valid due to values. warn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 1b12294efb tests - evas vg - use proper enuams for evas vg api - warn fix 2020-08-25 13:21:25 +01:00
Carsten Haitzler 5f709aa0d3 tests - evas vg - use evas enumas not efl ui - warn fix 2020-08-25 13:21:25 +01: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
Carsten Haitzler 5da1229484 ecore con - curl - fix error map to map right enum
this would print the wrong error to eina log - this fixes this

@fix
2020-08-25 13:21:25 +01:00
Ali Alzyod 805545ab68 evas_font_query: add Use parentheses within macros
Differential Revision: https://phab.enlightenment.org/D12116
2020-08-25 12:38:56 +02:00