Commit Graph

61030 Commits

Author SHA1 Message Date
Xavi Artigas 39aee23368 docs: Clarify docs for Efl.Screen. 2019-02-14 13:20:28 +01:00
Marcel Hollerbach 7ab9b48151 build: enable eolian_gen bootstrapping for cross compile
this enables travis to build eolian_gen before cross compiling in mingw.
This is done in order to make eolian_gen patches easier on CI.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7930
2019-02-14 13:00:58 +01:00
Marcel Hollerbach ac60610573 build: add a option to bootstrap eolian
this is here in order to make cross compiling easier, and we can just
provide the *all the time changing* eolian_gen binary.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7929
2019-02-14 13:00:56 +01:00
Marcel Hollerbach a49c783c32 build: fix autotools release tarbal generation
this file was forgotten when initially writing this patch.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7928
2019-02-14 13:00:55 +01:00
Stefan Schmidt b39d3990e9 tests: guard eina bool variable to avoid compilation failure on windows
The timeout_reached bool is only used in this function when HAVE_FORK is
available. This is not the case on windows. Eina.h would only be
included with fork available so the Eina_Bool type causes a compilation
fail on windows. Guarding them as the other parts of the function using
it solves the problem.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7947
2019-02-14 13:00:54 +01:00
Carsten Haitzler c695dde8c3 ecore wl2 - remove pointless sntrcpys causing warnings
again pointless:

strcpy(dest, x); -> len - strlen(x); strncpy(dest, x, len);

code put in causing new warnings. this kind of "get rid of strcpy" is
actua;;y dangerous as it's more likely a mistake is made along the way
and bugs are added. strcpy's  should be reviewed and if ok - left
as-is. doing otherwise makes the code worse, not better and raises
risk. it now also produces warnings at compile time which creates
noise we just shouldnt' have.
2019-02-14 09:31:02 +00:00
Jaeun Choi e39c710858 test/efl_ui_pager: add NULL checking after calloc() function 2019-02-14 16:10:15 +09:00
Jaeun Choi dea75d0f32 efl_page_transition_scroll: avoid explicit null dereference 2019-02-14 14:23:42 +09:00
Yeongjong Lee 63cbdd3008 efl_pack: move layout,updated event to Efl.Pack_Layout
Summary:
'layout,updated' event is more suitable for Efl.Pack_Layout which have
layout_update method.

Test Plan: make

Reviewers: segfaultxavi, cedric, Jaehyun_Cho

Reviewed By: segfaultxavi, Jaehyun_Cho

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7906
2019-02-14 12:57:13 +09:00
Jaehyun Cho 94be8a88d3 eet_dictionary: remove dead code
If index value is not -1, then eet_dictionary_string_add() returns.
Therefore, it does not need to check the index value after that.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7922
2019-02-13 16:37:10 -08:00
Wonki Kim 1cdedaa33b ecore_con: Fix potentional problems around ecore_con
non-thread safe functions are used like rand(), strerror().
this patch replace them with thread safe one.
and also this patch contains a change to fix a memory leak problem.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7917
2019-02-13 16:37:08 -08:00
Xavi Artigas 19fcd6e60f eolian: allow tagging complete classes as BETA
Summary:
This allows using the @beta tag in classes, like this:
class @beta Efl.Foo extends Efl.Bar { ... }

This will surround the class definition in the .eo.h file with an
EFL_BETA_API_SUPPORT #define, equivalent to tag every method and
event with @beta.

Test Plan: Nothing changes since no class uses this tag yet

Reviewers: q66, bu5hm4n, zmike

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7933
2019-02-13 18:48:02 +01:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01:00
Thierry 56f06d21c1 ecore-x: only modify _ecore_key_grabs when key is toggled
A New entry is added to _ecore_key_grabs even when no key was grabbed.

Summary:  The key grab and ungrab functions should return which keycode was used. Proposed by pascal@ordissimo.com

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7923
2019-02-13 11:39:39 -05:00
Derek Foreman 87cf5188b4 ecore_wl2: Make our wayland socket handling thread safe
By using the prepare read code properly we can do wayland dispatch of
multiple queues in multiple threads.  I'm not advocating we ever do so,
but if a library (perhaps a gl implementation) wants to dispatch its own
queue, and that happens in a separate thread from our event loop, we
probably don't want the world to explode.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7915
2019-02-13 10:33:41 -06:00
Derek Foreman 66ce295fc9 ecore_main: Add ECORE_FD_ALWAYS flag
This allows an fd handler to be called after select exits unconditionally.

Our wayland client code needs this to be thread safe, as it needs to
call prepare_read before entering select, and then either read or
cancel_read after select.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7914
2019-02-13 10:33:40 -06:00
Marcel Hollerbach 46885653bc eo: remove class functions from eo
As in the previous commit explained, we want to get rid of class
functions in eo, and make them just c functions right away.

This commit removes the class parameter from the eo_class_function_set
call, and adjusts the tests to not depend on class functions anymore.
Class functions are now not tested anymore, tests that used them as a
way to test *things* are adjusted to test them now with object
functions, tests that just tested the working of class functions are
dropped.

This fixes T7675.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7902
2019-02-13 16:59:59 +01:00
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
Marcel Hollerbach 3b2a5a429b efl_input: remove the API of efl_input_instance_get
there is basically no reason for this API. You can only use the API when
you know the class, when you know the class you can also just know the
function to call to get this API.
The reason this API needs to go is that we don't want to use
polymorphism on class-functions.

ref T7675

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7900
2019-02-13 16:59:57 +01:00
Wonki Kim 33c4041950 ecore_wl2: replace strcpy with strncpy
Summary: this patch replaces a volnerable function with a safer one.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7920
2019-02-13 10:43:23 -05:00
Wonki Kim 80b364f392 ecore_evas: fix a potentional deref after null problem
Summary:
this patch modify a logic to return after,
failing to call eore_evas_buffer_allocfunc_new function.

Reviewers: Hermet, bu5hm4n, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7918
2019-02-13 10:42:24 -05:00
Christopher Michael 0fed1c77ae Revert this as it should not have been pushed yet
Revert "ecore_wl2: Make our wayland socket handling thread safe"

This reverts commit efa85f35f4.
2019-02-13 10:01:47 -05:00
Christopher Michael 4c587ef679 Revert this as it should not have been pushed yet
Revert "ecore_main: Add ECORE_FD_ALWAYS flag"

This reverts commit b5e90ebe0d.
2019-02-13 10:01:22 -05:00
Wonki Kim e355373e32 ecore_wl2: fix a non-thread safe call.
Summary:
this patch contains a change to
replace non-thread safe call 'strerror' with eina_error_msg_get.

Reviewers: cedric, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7921
2019-02-13 09:58:11 -05:00
Derek Foreman efa85f35f4 ecore_wl2: Make our wayland socket handling thread safe
Summary:
By using the prepare read code properly we can do wayland dispatch of
multiple queues in multiple threads.  I'm not advocating we ever do so,
but if a library (perhaps a gl implementation) wants to dispatch its own
queue, and that happens in a separate thread from our event loop, we
probably don't want the world to explode.
Depends on D7914

Reviewers: zmike, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7915
2019-02-13 09:58:06 -05:00
Derek Foreman b5e90ebe0d ecore_main: Add ECORE_FD_ALWAYS flag
Summary:
This allows an fd handler to be called after select exits unconditionally.

Our wayland client code needs this to be thread safe, as it needs to
call prepare_read before entering select, and then either read or
cancel_read after select.

Reviewers: cedric

Reviewed By: cedric

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7914
2019-02-13 09:58:06 -05:00
Yeongjong Lee 27e101da4b ui.box: implement homogeneous mode
Summary:
On homogeneous mode, children are of the same weight and of the same min size
which is determined by maximum min size of children.

Depends on D7750

Reviewers: Jaehyun_Cho, zmike, jpeg

Reviewed By: zmike

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7889
2019-02-13 09:23:01 -05:00
Yeongjong Lee b1f280f0c2 test/ui_box: add unittest for Efl.Ui.Box
Summary:
Testcase
{F3613173}
{F3613174}

ref T5487
Depends on D7750

Test Plan: make check

Reviewers: jpeg, barbieri, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7463
2019-02-13 09:23:01 -05:00
Yeongjong Lee 846492ebd7 ui.box: refactor layout_update
Summary:
Current layout_update doesn't consider max hint priority. for example, if it
has hint_max, the size is hint_max value regardless of weight or fill.
moreover, if it has hint_aspect with hint_max, hint_min can be ignored.
(test that aspect(1,3) max(50,150), min(70, 70) then, size has (50, 150))
It seems that hint_max is considered as high priority. however, if hint_min
greater than hint_max, hint_max is ignored.

In order to resolve the hint priority conflict, this refactoring supports
following hint priority.
1) HintMin
2) HintMin + HintAspect
3) HintMargin
4) HintMax
5) HintAspect
6) HintWeight, HintFill
7) HintAlign

ref T5487

Specific unit test is D7463

Test Plan:
make check
elementary_test -to 'efl.ui.box'

Reviewers: jpeg, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: segfaultxavi, zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7750
2019-02-13 09:23:01 -05:00
Jaeun Choi 0ab6c36404 efl_ui_pager: change data type 2019-02-13 20:47:04 +09:00
Marcel Hollerbach 9ad84605b6 Revert "elm_config: fix elm_config_save not to wake idle processes up"
This reverts commit 8b0b9ed281.

There have been issues with this commit, for further informations,
please see https://phab.enlightenment.org/D7354 for more details.
2019-02-13 12:30:00 +01:00
Jaeun Choi bad145f313 edje: add missing NULL checks 2019-02-13 19:41:29 +09:00
Xavi Artigas f4e5d32107 mono examples: Fix after removing init method
This was preventing "make examples" from working.
2019-02-13 11:31:31 +01:00
Jaeun Choi ce7914c67e edje: add missing NULL check 2019-02-13 19:02:46 +09:00
Jiyoun Park e8fe0c9c92 evas_image: fix pixels_dirty_set(False) makes wrong object-change-list.
Summary:
evas_object_image_pixels_dirty_set(img B, False) means
1. app want to mark image object's data is not dirty anymore
2. app don't want to be called get_pixels callback.

that does not mean image need to be redraw.

evas_object_image_pixels_dirty_set(img B, True) means
1. image object's data is dirty, so image object need to be redraw.
2. app want to be called get_pixels callback.

but pixels_dirty_set(img B, FALSE) function also set o->changed to true,
it cause problem related with rendering

Below case is the example of problem.

1. Smart object A
2. Child image object B
3. app call pixels_dirty_set(FALSE) inside pixels_get_callback
   pixels_get_callback is called inside the image object B's rendering.

enlightenment's e_comp_object_render do upper job.

After adding preload fetch,
evas_object_image_render_post can call evas_object_change.

https://phab.enlightenment.org/D7157

evas_render_updates_internal

0. enlightenment call evas_object_image_pixels_dirty_set(img B, TRUE)
   o->changed = 1;
   evas_object_change(img B)
1. smart obj A is in render_objects
2. evas_object_image_render_pre B, o->change=0
3. evas_render_mapped (Smart A)
     3-1. evas_render_mapped (img B)
         : enlightenment call evas_object_image_pixels_dirty_set(img B, False)
         : o->changed=1

     3-2. evas_object_change_reset(img B)
4. pending_change(img B)
     4-1. evas_object_image_render_post(img B)
          o->changed=1 (3-1 step) evas_object_change(img B)->evas_object_change(Smart A)

5. render_post_reset
   smart A is chaged(4-1 step), so, called   evas_object_change_reset(Smart A)
   ###smart A is reset(5 step), img B is changed(4-1 step). after this case,
    img B never get change to be redraw.

Reviewers: Hermet, cedric, zmike, ManMower

Reviewed By: Hermet

Subscribers: zmike, ManMower, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7821
2019-02-13 11:16:16 +09:00
Marcel Hollerbach 3b262340ba Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f7510.

I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.

And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)

The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.

Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.

The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 21:42:33 +01:00
Marcel Hollerbach 06160466e8 Revert "Revert the env object because it's broken portability - please redo"
This reverts commit d6294fa22b.
2019-02-12 21:34:27 +01:00
Carsten Haitzler d6294fa22b Revert the env object because it's broken portability - please redo
setenv and unsetenv are not portable. i explained to you at fosdem
there are issues and it's why i used putenv in the original
implementation and even though it's a pain (the string tou pass to
putenv is a pointer used literallt from there on in and you get it
from getenv, thus making ownership a pain -this is a libc issue we
can't readily solve). use putenv like the original code. then put it
back in. vtorri now has windows porting issues with the setenv use. i
knew there was a reason that still existed...

in addition your in_sync stuff is broken.  psuedocode:

// assuming BLAGH env is not set to anything here
c = efl_core_env_get(global_env, "BLAH");
...
putenv("BLAH=10");
...
c = efl_core_env_Get(global_env, "BLAH");

i will get NULL in both cases for c ... but i should get "10" for the
2nd in reality. reality is lots of code across application code and
libraries will at times mess with the environment. it has to work with
this. the prior implementation did work with this.

Revert "ecore: here comes a env object"
  This reverts commit 2373d5db5b.

Revert "efl_task: remove env from this object"
  This reverts commit c3d69f66a6.
2019-02-12 20:22:28 +00:00
Carsten Haitzler a57c7f7510 Revert command line array object because it's broken by design
Revert "ecore: get rid of commands in efl_task."
  This reverts commit 616381e9cf.
Revert "ecore: here comes a command line object"
  This reverts commit 48e5684b3c.

1. this is broken:

EOLIAN static const char*
_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
   return eina_strdup(pd->string_command);
}

it returns a const char * BUT it duplicates it on return. no. a big
fat honking NO. return a char * or don't duplicate. pick.

2. _efl_core_command_line_command_array_set() is broken by design. it
accepts an array of strings, but the strings are owned by the caller
who creates the array (requiring they free them up themselves after
this call) but the array becomes owned by the callee. the code here frees the
incoming array but doesn't care about the string content of it. it's
leak heaven waiting to happen (or bugs when someone wants to access
the array they create to walk it to free the strings they put into it
after it is set).

i brought this up and it was dismissed. now exactly he issue i brought
up is there with mixed ownership and the added complexity as well as
transfer of some ownership but not others.

go back and think about this so it isn't broken by design.
2019-02-12 19:54:35 +00:00
Marcel Hollerbach e908142da6 build: also build eo-tests with debug profile
this checks that eo-dbg is also working in the same manner as normal eo

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7911
2019-02-12 16:24:24 +01:00
Marcel Hollerbach fac3fa1c88 efl_ui_focus: delete elements on invalidate
this lead to ERR's. A element is invalidated while the composition
element is invalidated, which means, not yet deleted, but the Pointer
will fail a call to efl_isa.

Differential Revision: https://phab.enlightenment.org/D7623
2019-02-12 11:25:31 +01:00
Marcel Hollerbach 87373bf66c eo: efl_isa with a EFL_OVERRIDE_CLASS should return true
this is important, as basically every single class etc. can be a
EFL_OVERRIDE_CLASS. This makes efl_override work with eo_debug.

Differential Revision: https://phab.enlightenment.org/D7910
2019-02-12 11:20:21 +01:00
Marcel Hollerbach 0221ff480d eo: the object size changes for the eo_debug profile
Differential Revision: https://phab.enlightenment.org/D7909
2019-02-12 11:20:21 +01:00
Marcel Hollerbach bbe0151670 eo: fix typo
this while loop is actaully iterating obj->xref, therefore we should not
take the pointer of data_xrefs.

Differential Revision: https://phab.enlightenment.org/D7908
2019-02-12 11:20:21 +01:00
Marcel Hollerbach 616381e9cf ecore: get rid of commands in efl_task.
Note that the usage in efl_thread.c should and could be removed.
the problem with its usage is that when the ARGUMENTS event is fired,
noone ever had the chance to subscribe to the loop of the thread yet. So
all in all this is unneccessary, since noone could ever touch that.

Differential Revision: https://phab.enlightenment.org/D7517
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 48e5684b3c ecore: here comes a command line object
the mixin for now can carry a command, which can be setted as an string.
The string is then parsed again, this is done in order to make sure that
everything that needs escaping really is escaped or parsed correctly.

Differential Revision: https://phab.enlightenment.org/D7516
2019-02-12 11:19:28 +01:00
Marcel Hollerbach c3d69f66a6 efl_task: remove env from this object
the env operations are moved to the efl.core.env objects, which can be
used there.

Differential Revision: https://phab.enlightenment.org/D7514
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 2373d5db5b ecore: here comes a env object
the env object can be used to alter and edit the content of environment
variables. Additionally, the class efl.core.env can be used to to setup
a not applied set of environment variables, which then can be applied
later (in the future) to set it directly to a spawned process for
example, or as a general key/data storage. A efl.core.env object can
also be forked off, which makes it easy to customize predefined objects.

ref T7514

Differential Revision: https://phab.enlightenment.org/D7510
2019-02-12 11:19:28 +01:00
Jaehyun Cho a7eb0695b8 efl_ui_format: fix to display %% and unknown format element
This fixes 2 things as follows.

1. Displays format string "%%" as "%".
   Like printf does, "%%" is displayed as "%".

2. Displays unknown format element as it is.
   In format string "(50%)", ")" is an unknown format element.
   Although format string has unknown format element, the format string
   is displayed like printf does.

The cause of the issue displaying "0%" which was mentioned on
a96933f964 is as follows.

The default format string of progressbar is set as "%.0f%%".
Therefore, if progressbar's format string is not set, then "%" postfix
is always displayed.

This commit reverts commit a96933f964.
This commit restores commit b4112b9735.
This commit restores commit be770d37fb.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7856
2019-02-11 15:41:07 -08:00
Stephen 'Okra' Houston 7b19573895 elm_progressbar test: Add test for custom format strings to show when %% is not escaped correctly.
This adds a test that sets a custom progressbar format string that includes a custom percent (%%) that should be escaped to just one percent (%).  This case has been broken and fixed many times and is broken again so it makes sense to now add a check for it to try and prevent the continual breakage.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7745
2019-02-11 15:41:04 -08:00