Commit Graph

66424 Commits

Author SHA1 Message Date
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