Commit Graph

1768 Commits

Author SHA1 Message Date
Mike Blumenkrantz 7a82dfbcc7 edje: rename edje_types.eot to efl_canvas_types.eot and move include
this has no relation to legacy and should not be included in legacy headers

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10227
2019-09-30 10:33:25 +02:00
Daniel Kolesa 6d93dc4cbf eolian: rename event_prefix to event_c_prefix for consistency 2019-09-26 16:47:22 +02:00
WooHyun Jung 3bdd50e412 edje_legacy: add validation check to return legacy default value
Summary:
When invalid object comes, the return value should be
EINA_FALSE.

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10185
2019-09-26 08:59:31 -04:00
Mike Blumenkrantz b730443e2d efl/player: play_speed -> playback_speed
no functional changes

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10115
2019-09-24 15:23:16 -07:00
Mike Blumenkrantz 3d3cdc5955 efl/player: rename 'play' property to 'pause'
this is a bit of an overhaul wherein the existing 'play' mechanics are
all inverted. 'pause' is a state which stops playback but does not affect
the playback_position property.

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

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

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

ref T7877

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10109
2019-09-24 15:23:09 -07:00
Carsten Haitzler e3610b92b9 edje - physics - remove warning of unused arg if physics disabled
simple warning removal. no core changes.
2019-09-16 01:26:16 +01:00
Xavi Artigas 8c09c1cae8 docs: Move property docs to property level instead of set/get
Eolian @properties should be documented at the property level, and
documentation at the setter or getter level should be left to setter-
or getter-specific comments. There is usually no need at all to have
setter- or getter- specific comments.
Also, a property is not a method so descriptions should match that.

This patch removes lots of duplicated text, and will allow enabling
by default the eolian check that ensures that properties have proper
property-level docs.

No functional changes.
2019-09-13 12:30:03 +02:00
Mike Blumenkrantz 5489482484 efl: check file's mtime in efl.file::file_set to determine if file is the same
Summary:
historically, if the mtime of an edj file changes after being loaded,
the edje file should be reloaded. this needs to occur in a single call
with the previous user definitions intact, so verify that the mtime is
the same in efl.file::file_set when using the same file name

@fix

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9877
2019-09-11 13:38:21 -04:00
Marcel Hollerbach 3d03d4031d build: fix disabling of audio
Summary: this supports disabling audio building in efl.

Reviewers: tasn, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9873
2019-09-09 09:17:30 -04:00
Daniel Kolesa 4f4b58bf4c efl: change all occurences of @owned to @move 2019-09-06 17:01:05 +02:00
junsu choi 35f188239a edje_edit: Prevent dangling pointer. 2019-09-06 11:08:59 +09:00
Carsten Haitzler e6d9ea7539 fix more edje file set breaks
if group does change unloaidng first is bad because of the same
reasons - losing swallowed etc. content. so disable entirely.
2019-09-05 14:33:00 +01:00
Carsten Haitzler a70808fb96 fix a bunch of breaks that having a blind file unload has brought
We can't blindly unload here - this loses swallowed content (in swallows,
boxes, tables etc.) ... this here along with an actual implementation of file
unload broke the pager in E for starters as shading then unshading (double
click titlebar) a window would lose the mini preview image obj swallowed in.
also fullscreening would do it. this also broke gadget bar, the xkb gadget in
it too and more... so this is a particularly bad thing break.

@fix
2019-09-05 14:24:21 +01:00
Ali Alzyod 7a05d8d769 elm_entry: handle cursor delete/backspace with clusters consist of one or multible glyphs
Summary:
Cluster consist of one glyph, expected to be removed on backspace or delete key.
Cluster consist of multible glyph, expectd to remove part of on backspace or delete key.

This is behaviour founded in Android. (our current way of handling similar to Qt)

**New Behaviour**
{F3750386}

**Old Behaviour**
{F3750387}

Test Plan:
Auto Testing is challenging because there are no easy way to emulate keyboard down on elm_entry
```
#include <Elementary.h>

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

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("", "");
   elm_win_autodel_set(win, EINA_TRUE);

   box = elm_box_add(win);
   entry = elm_entry_add(box);

   evas_object_size_hint_weight_set(box,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(box,EVAS_HINT_FILL,EVAS_HINT_FILL);

   elm_entry_entry_set(entry,"<font=NotoColorEmoji wrap=mixed >🇧🇬อั🇧🇬อั&#x1F600;&#x1F600;&#x1F600;&#x1F600;&#x1F600;อั</font>");
   evas_object_size_hint_weight_set(entry,EVAS_HINT_EXPAND,0.9);
   evas_object_size_hint_align_set(entry,EVAS_HINT_FILL,EVAS_HINT_FILL);
   evas_object_show(entry);
   evas_object_show(box);

   elm_box_pack_end(box,entry);
   elm_win_resize_object_add(win,box);
   evas_object_resize(win,320,480);

   evas_object_size_hint_weight_set(entry,EVAS_HINT_EXPAND,0.1);
   evas_object_size_hint_align_set(entry,EVAS_HINT_FILL,EVAS_HINT_FILL);

   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()

```

Reviewers: tasn, woohyun, bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9628
2019-09-05 14:52:51 +09:00
subhransu mohanty 5370c2e795 edje/optimization: refactor edje_color_class_set() api.
Summary:
During _elm_config_color_overlay_apply() application can call this api
100's of time depending on how many overlay it wants add . As each color_class
set triggers the global color class apply chain 3 times (for color , outline and shadow)
just club them once and emit single color_class,set event.

Reviewers: Hermet, ali.alzyod, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9784
2019-08-29 14:31:52 -04:00
subhransu mohanty 35e385a1ec edje/style: append file prefix to textblock_style api that affects on file level
Summary:
All those api's are working on the Edje_file level so by appending the file prefix
and changing the argument to Edje_File leads to easy maintainability.

Depends on D9776

Reviewers: Hermet, ali.alzyod, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9777
2019-08-29 13:21:11 -04:00
Mike Blumenkrantz 9e0a285eea efl: implement efl.file::unload for classes that implement load
unload is a crucial method for classes that implement load, as this is
the method which is called during e.g., efl_file_simple_load() when
a new file is specified in order to destroy the previous object data

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9786
2019-08-29 17:17:08 +02:00
Hermet Park d723adf1ee Edje: ease the warning level.
We already take care the case, it's not so serious as to error.
2019-08-29 14:34:43 +09:00
subhransu mohanty e2663ba8f3 edje/style/optimization: Enable lazy computaion of styles.
Summary:
As user request for the evas_textblock_style through _edje_textblock_style_get()
api and that api implements lazy computation of the styles. By just marking the
style dirty (stl->cache=false) will be enough. no need to calculate the style
computaion at that time.

Reviewers: Hermet, ali.alzyod, kimcinoo, woohyun

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9776
2019-08-29 14:32:28 +09:00
subhransu mohanty 5f70cacd92 edje/textblock: Added edje_textblock_style_get() api.
Summary:
Now all textblock_style functionality are wrapped under api
for easy of optimization. so going forward no one should directly
acess the styles from the File . the styles should be acesses by
the internal api's provided by edje_textblock_style.

Reviewers: Hermet, ali.alzyod, woohyun, kimcinoo

Reviewed By: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9774
2019-08-29 11:35:24 +09:00
subhransu mohanty 4b511671de edje: refactor _edje_object_file_set_internal() part 2.
Summary:
- split functionality into smaller helper class
  _edje_process_colorclass() , _edje_process_sizeclass() and
 _edje_process_physics() for easy redability and maintenance.

Reviewers: Hermet, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9764
2019-08-28 16:23:55 +09:00
subhransu mohanty d7d9ed856f edje/style: remove dead code.
Summary: leftover from last refactoring.

Reviewers: Hermet, ali.alzyod

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9763
2019-08-28 14:07:05 +09:00
subhransu mohanty 4b2403d80c edje: refactor _edje_object_file_set_internal() function
Summary:
move the file related function to edje_cache so that code
is easy to read and maintainable and we don't have to do unnecessary
stuff for each edje object creation.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9761
2019-08-28 13:18:42 +09:00
subhransu mohanty 05ea1854a9 edje/load: pass Edje_File instead of Edje to _edje_extract_mo_files()
Summary:
Why :
1. The function operates on the Edje_File level not on Edje object
   level , so express it clearly in the function argument.
2. if its clear that this function works on file level then
   this should be called when the theme file loaded for the first time
   not on every Edje object creation.

Reviewers: Hermet, zmike, raster, cedric

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9753
2019-08-27 08:04:43 -04:00
subhransu mohanty fcc235b329 edje/optimization: replace eina_list with eina_array.
Summary:
We were creating 3 eina_list and destroying inside a for loop.
replace that with creating a single eina_array at start and use
eina_array_clean() function ro reuse the array.

Reviewers: Hermet, zmike, cedric, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9745
2019-08-27 07:42:14 -04:00
Yeongjong Lee 9c52484caf efl_pack_table: rename table_position to cell_column, cell_row
Summary:
Rename ambiguous `table_position` property. it is actually related to child
column, row.

ref T7900

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7900

Differential Revision: https://phab.enlightenment.org/D9611
2019-08-27 12:57:35 +02:00
subhransu mohanty 02b63b8260 edje/cache: Refactor _edje_cache_file_coll_open()
Summary:
This function does lot of things
- can be called only to load the file (by passing coll as null)
- can be called to load both file and open the collection from the file.
- handles the file_cache logic
- handles fixing the collection after reading from file.

this patch is targeting to split the responsibility to
smaller function for easy maintenance and code readability.

future patch to follow for splitting the file opening and collection
opening to two different function.

Reviewers: Hermet, raster, cedric, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9715
2019-08-26 08:31:08 -04:00
subhransu mohanty e742bf67e4 edje/style: optimize style_update function.
Summary:
If the style is readonly then we know for sure it dosen't have any text_class/color_class.
If a style has text_class tag then call update only once not for each text_class tag it has.

Reviewers: ali.alzyod, Hermet, cedric, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9641
2019-08-26 14:22:43 +09:00
Carsten Haitzler 8145d90ce7 edje signal matches - try number 3 to try plug all the holes
i found some more cases where the hash may change, so del and add from
the hash when this happens...

and... i found a nasty. _edje_signal_match_key_cmp compared pointers
like:

int return = ptr_a - ptr_b;

what happens if .... ptr_a and ptr_b are more than 2^31 (2gb) apart?
overflow (or underflow) and we return the wrong thing. i suspect this
is part of the problem and why my has remove/adds have not been
working because ... i suspect that maybe the hash dels have not been
finding things. i can't be sure right now, but it is an obvious
problem that i fixed by just doing if's and returning -1 or 1. also i
found a double-add or overwrite int he hash - when we shuffled with
_edje_signal_callback_move_last the matches CAN match exactly
something already in the hash thus adding it in will conflict with
what is already there as keys match. handle this cvase now and i have
seen segv's go away for now.

@fix
2019-08-23 19:36:42 +01:00
Carsten Haitzler a7273fc864 edje signal - let's not crash if something odd happens
better we dont just crash but err log it which can be set to abort
anyway.

@fix
2019-08-23 19:36:42 +01:00
subhransu mohanty 1e079a7568 edje/style: Enable lazy computaion of styles.
Summary:
Instead of updating all the styles in an Edje_File just mark them
dirty so that subsequent  call to style will recompute the new style before
returning the style.

Reviewers: ali.alzyod, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9697
2019-08-23 11:11:05 +09:00
Carsten Haitzler 456419f468 edje - signal callback matches/patterns try fix number 2
so i think there was also another bug as i saw this again now. this
should hopefully plug the signal/mtach memory bugs now by removing
and adding back to hash as the hash key relies on the memory addresses
of signal/src in the matches array which change on realloc. a bit
brute-forceey but... better than crashes.

@fix
2019-08-22 19:53:03 +01:00
subhransu mohanty cce73a2b4b edje/style: fix memory leak because of typo.
Summary:
We already have a escaped string for the font_source so
this code is unnecessary.

Reviewers: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9698
2019-08-22 14:22:23 +09:00
subhransu mohanty 7c08d7b97c edje/style: Avoid unnecessary evas_textblock_style computation.
Summary:
If the style is not readonly we always compute the style again when
requested by edje. so this computation is unnecessary.
By avoiding the computation here we will avoid style computation of all the styles in the edje
that is not readonly hence saving memory.

Reviewers: ali.alzyod, Hermet, cedric, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9693
2019-08-22 10:53:36 +09:00
Carsten Haitzler e15d9c86df eina file refs in edje/evas - audit them and plug holes where refs stay
in 1 situation at least we delete the eina file (close it) but keep
the ptr around (during destruction) which could cause issues with
callbaks and events on del and so on.... which may lead to multiple
closes where only one should happen ... which would explain my invalid
eina file ref problems i'm seeing. i carefully matched eina file
handle stores/opens/dups to closes in edje/evas and they seemed to all
match up so this audit with comments and fixes seems to have plugged
that now.

@fix
2019-08-21 20:02:24 +01:00
Carsten Haitzler 14e355692b edje - handle errors and eina file handles and vpath properly
@fix
2019-08-21 20:02:23 +01:00
Carsten Haitzler d436971958 edje calc - merge 2 switch statements that are doing 2 phases
we have nigh identical switch logic, so merge these to avoid multiple
switches and type matches. it localises per-type logic too which is
nicer.
2019-08-21 20:02:23 +01:00
Carsten Haitzler cfa8224140 edje recalc - move rare recalc code out of hot path
we rarely use tables in edje, so move it out of the hot path for
intruction prefetch/cache. also for calc single - move things to sub
funcs so things like mesh, light and so on code is always out of the
hot path as much as possible. we probably can merge our 2 switch
statements as well. this really just restructures the code to move
stuff into sub functions which also does make the calc funcs look
simpler and easier to read.
2019-08-21 20:02:23 +01:00
Carsten Haitzler fa28f5a5f8 edje signal matches/patterns - handle re/alloc errors and missing ptrs
also a general cleanup of the code to make it easier to follow/read as
this seems to have problems but i cant reproduce them enough to find
them. i noted a realloc would have invalidated pre-stored pattern
ptrs that would cause segv's for sure. also code paths where reallocs may
fail and not handling those cases at all etc.

@fix
2019-08-21 20:02:23 +01:00
subhransu mohanty 10501b170f edje/optimization: keep a style hash for fast retrival of styles
As edje mostly deals with style string. to get the style data each time
it linearly search through list to find out the style which is not very
cache friendly so keep a hash to do first lookup with less impact on cache.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9547
2019-08-20 10:40:22 -07:00
subhransu mohanty 676835458f edje/style: optimize updation of styles for a given text_style
Currently we do 2 pass updation. first we scan through all the styles
and check if they have text_style which matches the test_style we need to update
then we mark them dirty. then we call style_all_update() to go through the list
again and update those styles.
By combining them both in a single function we avoid scanning through the whole
list again.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9639
2019-08-20 10:40:19 -07:00
subhransu mohanty 6f0730cef3 edje/style: refactor style parsing to remove temporary dynamic string creation.
Summary:
pass a buffer to reparse() function for reuse.
create fontsource once and reuse.

Reviewers: ali.alzyod, Hermet, cedric, raster

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9636
2019-08-20 14:36:22 +09:00
subhransu mohanty dafd3dc7b8 edje/style: refactor to avoid creating temporary strings.
Summary: param_parse() was creating unnecessary 2 temporary string and destroying it.

Reviewers: ali.alzyod, cedric, Hermet, raster

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9610
2019-08-19 19:38:35 +09:00
subhransu mohanty a880a756cd edje/styles: avoid redundant style tag addition by providing extra checks.
Summary:
we should only add font_size tag if the new size is different.
we should only add font tag if there is a new font.

Reviewers: ali.alzyod, Hermet, cedric, raster

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9613
2019-08-19 19:33:56 +09:00
subhransu mohanty 1d930427a3 edje/styles: keep an escaped string of font_set. As eina_ecaped_string() creates a new string just make it once and use when needed.
Reviewers: Hermet, ali.alzyod

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9615
2019-08-19 19:21:47 +09:00
Hermet Park f10a3c9ee3 edje: fix compatibility issue.
Obviously previous edje object file set would try reload file
even though the file is already loaded.

This brings different result if the file data has been modified or changed.
2019-08-19 18:07:04 +09:00
subhransu mohanty d672d55107 edje/optimization: keep a readonly flag on edje_style.
Just to check if the edje style has text_class tag we do
lot of pointer hopping by linearly scan through the tags in the
style which is not very cache efficient.

by keeping a readonly flag we can avoid those acess if the style dosen't
have any text_class tags. and if we have those tags then we can start
updating the style straight away.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9546
2019-08-14 12:08:17 -07:00
Mike Blumenkrantz e1fda2cbdb efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints

@feature

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
2019-08-14 12:08:13 -07:00
Mike Blumenkrantz 304f4ce9bb efl: remove Efl.Ui.I18n from canvas object inheritance
Summary:
canvas objects do not need localization because they are not directly user-facing

this should only be inherited by objects which need to be localized
Depends on D9559

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9560
2019-08-14 19:25:09 +02:00
Mike Blumenkrantz 0ca5cd82a9 efl: mark a couple internal eo files as @beta
Summary: these are not distributed apis so they should always remain beta

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9559
2019-08-14 19:24:19 +02:00
subhransu mohanty 7ab04abf27 edje/style: Remove redundant style tags from style text.
Summary:
Both font and font_size are already added into the style text
in _edje_format_reparse() function and there we update the tag->font_size
as well as tag->font member. so I think it is unnecessary to
add again which has memory as well as parsing performance impact.

Note :
   someone please update this cryptic comment
   /* Add font name last to save evas from multiple loads */
   how this is going to help saving multiple load.

Reviewers: ali.alzyod, Hermet, raster, cedric

Reviewed By: Hermet

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9543
2019-08-13 11:18:01 +09:00
subhransu mohanty 384765b088 edje/textblock: Don't add text_class style tag to the final style string
Evas_TextBlock_Style has no idea about the text_class tag its a garbage value to it.
So keep the text_class tag in the edje level and update the text style property in the
final style string when necessary.

Because text_class id tends to be unique by removing from the final style string
enable it to be shared (string shared string).

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9544
2019-08-12 10:13:28 -07:00
Carsten Haitzler d9bdf12019 edje - fix conversion of edje var from int to float to use tmp var
fix CID 1402624
2019-08-11 12:47:38 +01:00
Carsten Haitzler 4b8a422a6d edje - fix conversion of edje var from float to int to use tmp var
this should disambiguate the conversion intended.

fix CID 1402675
2019-08-11 12:47:38 +01:00
Cedric BAIL 7248812a51 edje: fix warning for returning wrong type.
Reviewers: zmike

Reviewed By: zmike

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9530
2019-08-09 08:48:15 -04:00
subhransu mohanty 1b94d90d53 edje: optimize color_class_recursive_find_helper() function
Summary:
If the  color_class is not overridden by the object level the
hash will be empty but still we do the expensive call to _edje_hash_find_helper()
find the color_class in an empty hash. by checking if the hash is empty
and returning early we save lot of unnecessary hash computaion and lookup.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9532
2019-08-09 14:02:24 +09:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
do it once and remember the result from the first one. drops overhead
for sure by a chunk i actually could see in perf reports like about 1-2%
of cpu...
2019-08-08 23:57:02 +01:00
Carsten Haitzler 8dbdcff3cb Revert "edje/calc: clamp part calc size to 0"
This reverts commit 895ffd93cc.

This commit broke E's widget toolbars that only had text - so many
config dialogs broke. too simple to fix - it's a wrong premise to
begin with it would seem.
2019-07-31 10:17:06 +01:00
Mike Blumenkrantz 895ffd93cc edje/calc: clamp part calc size to 0
this could previously have been negative

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9431
2019-07-29 11:17:51 -07:00
Mike Blumenkrantz 734637c42c edje: add some null checks for nonexistent objects
minor cleanup to fix EVAS_DEBUG_ABORT usage

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9361
2019-07-19 15:04:52 -07:00
Cedric BAIL e0ee318fe1 eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9296
2019-07-17 21:57:57 +02:00
Subodh Kumar 2854702f8e edje: Add support for map zoom to use other part center.
Summary:
Current:
In edc, zoom is supposed to happen from object center, there is no way to
change the center of the zoom.

Changes:
Adding support to change the center of zooming just like map rotation by using
other part's center.

@feature

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9115
2019-07-12 12:04:06 -04:00
Mike Blumenkrantz 9c07cd1b1a edje: check for user_defined hash existence before removing members
Differential Revision: https://phab.enlightenment.org/D9267
2019-07-10 21:19:07 +02:00
Mike Blumenkrantz be37c47fff edje: fix some small leaks when failing to reapply user-defined data
Summary:
this only occurs when the same text parts don't exist in the new layout,
which is an extremely unlikely scenario

Depends on D9210

Reviewers: cedric, bu5hm4n

Reviewed By: cedric, bu5hm4n

Subscribers: bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9211
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz f5d3f575c6 edje: improve user-defined data caching to handle data before file is set
Summary:
this adds explicit handling for things like:

efl_add(SOMECLASS, parent,
  efl_text_set(efl_added, "my text")
);

on edje-inheriting objects.

note that it's still impossible to do something like
efl_add(SOMECLASS, parent,
  efl_text_set(efl_part(efl_added, "somepart"), "my text")
);

also add a unit test to verify common behaviors

@feature

Depends on D9209

Reviewers: cedric

Reviewed By: cedric

Subscribers: bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9210
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz 66213df2f5 edje: fix reapplying markup text on file/group change
Summary:
this was being stored as regular text when it was actually markup

@fix

Depends on D9208

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9209
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz aa921c553b edje: change 'user_defined' member of Edje struct to be a hash
Summary:
this is where all user-added data (e.g., swallowed objects, table/box packs,
text strings) are stored. with this patch, it is now a hash by part name,
storing a list of user-defined data for that part

this simplifies a bit of code by deconstructing some list walks, and
should end up being slightly faster for large edje objects with lots of
user-defined data

ideally no functional changes

Depends on D9206

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9208
2019-07-10 14:40:42 -04:00
Mike Blumenkrantz d82a14c3b0 edje: remove _edje_user_definition_fetch()
Summary: this is an internal function which is never used

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9205
2019-07-10 14:40:42 -04:00
Carsten Haitzler f850cf6a00 edje - double make sure edje messages are zero'd due to a segv i saw
i saw a segv on freeing em->msg as it was a junk ptr... i dont know
for sure it msg was properly initted but as em is recycled from trash
be sure and zero it when digging out of trash because em->msg was not
a valid ptr (and i wasnt using valgrind at the time to know for sure
and cant find this with valgrind now).

@fix
2019-07-09 16:04:22 +01:00
Xavi Artigas 10acaa67d9 docs: Fill last missing docs from EO files
Some docs have been filled with placeholder text ("TBD") or with preliminary
text (marked with //TODO).
Having 0 doc warning we can now enable Warnings as Errors in mono, and in Eolian later on.
2019-07-08 17:48:57 +02:00
Carsten Haitzler 1c02b7740d fix segv when adding optimizations to edje message handling
613e1715be (and friends) added a bit a
biug where messages in the queue were not skipped as they were before
causing a segv witha null lookup. this fixes that. eclipse about
dialog showed this bug up. no longer happens now.
2019-06-21 09:29:52 +01:00
Carsten Haitzler 7c081c691b edje messages - use trash to keep message structs around for a short time
more optimizations for edje messages to avoid excess alloc and frees
if we have some trash around... since messages already have list
nodes, re-use the main list node for storing trash and not eina trash
as this avoids extra allocs for trash nodes.
2019-06-15 08:43:51 +01:00
Carsten Haitzler c2d1aaaed6 edje messages - on del use the per edje message list not global
this massively cuts the walk to remove messages to only what's needed
on teardown ... so yay! speedup.
2019-06-15 08:43:51 +01:00
Carsten Haitzler 613e1715be edje messages - avoid nasty On2 walk of message lists with skipping
so to process a single obj we added a lot of mesgs to the message
queueue only then to wak most and SKIP most msgs again and again -
when this adds up to 1000's of messages and 10k+ then literally moving
a window in e hangs for multiple seconds and we walk such lists in On2
like complexity. this gets it down to O(1) along with some other minor
optimizations of not adding to tmp list only then to add them to the
nex queue/list.

there is more i can optimize here as well now we track messages for an
edje in th edje. that's next.
2019-06-15 08:43:44 +01:00
Carsten Haitzler bda708d38f edje messages - track all messages for an edge obj in the edje
this is the basis for some future speedups to avoid full message queue
walks - get this right first.
2019-06-15 08:43:33 +01:00
Carsten Haitzler e667dd8b2c edje messages - make it use inlist to fragment ram less
using regular lists means we double our indirect ptr jumps and
fragment ram more - this is step one in improving performance of
message handling in some nasty corner cases i have found. first this
so it can be identified as an issue on its own if it is one. i've
tested it and it seems ok. so this si stage 1.
2019-06-15 08:43:18 +01:00
Mike Blumenkrantz 0f5cec8d51 efl_canvas_layout: permit part_type_get on invalid parts
Summary:
this is the only way to determine whether a part is invalid, so it should
be usable without triggering errors

@fix
Depends on D8948

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8949
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz a8fda441be edje/load: (more) correctly handle part updates after changing edje group
Summary:
if a part changes its type, verify that the new type is compatible AND
exists before attempting to re-set the previous state, otherwise take
action and print warning

@fix
Depends on D8947

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8948
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz 738241c0bd edje/calc: correctly handle swallow/group objects as clippers for state clips
Summary:
in the case where the clipper being set was an indirect object, it's necessary
to resolve the lookup for that part and use the actual part object to avoid
setting a placeholder rect as the clipper

@fix
Depends on D8850

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8851
2019-05-29 12:29:03 -04:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Xavi Artigas 38d7d33354 Rename Efl.Ui.Direction -> Efl.Ui.Layout_Orientation
Summary:
This clarifies a bit the whole Orientation vs. Direction confusion, at the
expense of longer names (Image_Orientation vs. Layout_Orientation).
Also, the interfaces are now adjectives (Orientable) and the enums have long
names (*_Orientation).

Pretty big patch, but no functional changes.

Relates to T7863

Test Plan:
Everything builds and passes tests.
Elementary_tests show same behavior, including the "inverted" widgets, which
are the only parts which received a bit of code changes.
Proof:
https://travis-ci.org/Enlightenment/efl/builds/536277282

Reviewers: zmike, bu5hm4n, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8946
2019-05-24 12:30:32 -04:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Daniel Kolesa 49209553f6 edje_types: (re)move legacy types to header
These are not used anywhere in eo files, so no point in keeping
them around in their legacy form.
2019-05-09 15:19:13 +02:00
Hermet Park 53455d8352 edje doc: fix corrupted grouping.
there were some corrupted pair of group scopes,
Edje class size, text were under the both Edje Object and Edje Part
Edje Communication Interface Message, Edje Perspective were wrongly same.
Swallow, Box, Tabe were under the Edje Text Part.

This fixes all of them.
2019-05-02 18:37:38 +09:00
Yeongjong Lee 0921e4770e edje_calc: replace eina_stringshare_ref with eina_stringshare_add
Summary:
When there is circular dependency in edc, a bunch of CRI log is printed.
This patch fixes it.
```
ERR<10159>:edje lib/edje/edje_calc.c:3919 _edje_part_recalc() Circular dependency in the group 'test' : longpartname -> longpartname -> longpartname2
ERR<10159>:edje lib/edje/edje_calc.c:3896 _edje_part_recalc() Circular dependency when calculating part "longpartname". Already calculating XY [03] axes. Need to calculate Y [02] axes
CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ebf60 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 2f736e6f - (unknown)

CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ec5d1 !!!
    Input handle is wrong type.
    Expected: 98761254 - Eina Stringshare Node
    Supplied: 5f747261 - (unknown)
```
If string is already stored, `eina_stringshare_add` increase its reference count.

Test Plan:
test.c
```
//edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags elementary`
#include <Elementary.h>

int main(int argc, char **argv)
{
   elm_init(argc, argv);

   Evas_Object *win = elm_win_util_standard_add("test", "test");

   Evas_Object *layout = elm_layout_add(win);
   elm_layout_file_set(layout, "./test.edj", "test");
   elm_win_resize_object_add(win, layout);
   evas_object_show(layout);
   evas_object_resize(win, 200, 200);
   evas_object_show(win);

   elm_run();

   elm_shutdown();

   return 0;
}
```

test.edc
```
collections {
   group { name: "test";
      parts {
         rect { name: "longpartname";
            desc { "default";
                rel1.to: "longpartname2";
            }
         }
         rect { name: "longpartname2";
            type: RECT;
            desc { "default";
                rel2.to: "longpartname";
            }
         }
      }
   }
}
```

Reviewers: SanghyeonLee, zmike

Reviewed By: SanghyeonLee

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8717
2019-04-26 15:33:33 +09:00
Shinwoo Kim e9b2e3c6c3 Revert "edje_calc: make INTP use TO_INT_ROUND"
Summary:
This reverts commit be00af9bc3 which has
incorrect calculation. For more information please refer to:

https://phab.enlightenment.org/D8665

Reviewers: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8666
2019-04-19 17:25:13 +09:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Xavi Artigas 57da0bee3d docs: Fix common misspellings in EO files
Fixed all appearances of words from this list in EO files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 11:32:05 +02:00
Xavi Artigas 205193f1ab docs: Add @since 1.22 to all stable classes' EO docs
Summary: Previous @since tags have already been removed from eo files.

Test Plan: Everything builds, but stable classes now have Since tags in the docs.

Reviewers: zmike, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8446
2019-03-22 16:57:36 +01:00
Xavi Artigas bbd4b6e514 docs: Remove obsolete @since tags from EO files
Summary:
All legacy @since tags have already moved to the *.legacy.h files.
EO files are now devoid of @since tags (except some eldbus still
needed for legacy).
Upcoming patches will add @since 1.22 to those APIs which come out
of beta in this release.
APIs marked @beta do not need @since tags.

Test Plan: Everything builds, EO docs (like DocFX) have no Since tags.

Reviewers: zmike, bu5hm4n, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8430
2019-03-20 20:16:05 +01:00
Daniel Kolesa 58b8a3d163 efl: remove EFL_EO_API_SUPPORT macro
Summary:
Since we're now going to be shipping some eo classes as stable,
there is no point in keeping the eo api behind a macro, and it
should be enabled by default. Another case is beta classes, but
those are behind the EFL_BETA_API_SUPPORT guard.

This also changes includes around the place where things are
clearly broken (such as an included header needing something
from another header but that other header being guarded, notably
efl_ui_widget.h needing focus manager but focus manager being
behind beta in Elementary.h)

Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8322
2019-03-18 12:13:59 +01:00
Marcel Hollerbach 30bb8395c3 build: add a option to disable eo file installation
Summary:
this is done because .eo files are not stable, and in order to stop
people depending on it, its better for now to disable the installation
of them for now.

ref T7676

Reviewers: stefan_schmidt, cedric, zmike, devilhorns

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7676

Differential Revision: https://phab.enlightenment.org/D7897
2019-03-14 12:44:00 -04:00
Mike Blumenkrantz 26f46f88c9 edje.types: mark Efl.Canvas.Layout_Part_Type beta again
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8289
2019-03-11 16:34:05 +01:00
Marcel Hollerbach 1c62ed5349 efl: ensure legacy is only relying on stable types
Summary:
This commit changes the beta ness of a few types, those types are
looking quite stable. Edje types will likely not change. The
Efl.Gfx.Join types are actaully already stable since the last release,
since evas_vg was stable back then and those enums have been in there.

The elementary stuff looks a bit unthought, and we have the chance to
change the API in the backend, so maybe we want to not declare it
stable, but rather reintroduce the legacy types.

With this we can enable eolian generation of beta tags for types.

ref T7726

Depends on D8276

Reviewers: cedric, segfaultxavi, zmike, stefan_schmidt, q66

Reviewed By: segfaultxavi, q66

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7726

Differential Revision: https://phab.enlightenment.org/D8277
2019-03-09 16:39:06 +01:00
Marcel Hollerbach 954cdb3656 efl: apply the stabilzed column of the efl api board
Summary:
The project https://phab.enlightenment.org/tag/efl_api/ has been used in
the last few weeks to figure out which classes can be stablized and
which cannot. This commit moves those dedicated classes outside beta.
And makes them stable.

ref T7601
ref T7600
ref T7599
ref T7598
ref T7597
ref T7596
ref T7594
ref T7593
ref T7591
ref T7590
ref T7589
ref T7588
ref T7583
ref T7582
ref T7581
ref T7576
ref T7570
ref T7567
ref T7564
ref T7563
ref T7560
ref T7559
ref T7672
ref T7584
ref T7577
ref T7571
ref T7558
ref T7555
ref T7554
ref T7553
ref T7512
ref T7511

Depends on D8272

Reviewers: cedric, stefan_schmidt, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7672, T7601, T7600, T7599, T7598, T7597, T7596, T7594, T7593, T7591, T7590, T7589, T7588, T7584, T7583, T7582, T7581, T7577, T7576, T7571, T7570, T7567, T7564, T7563, T7560, T7559, T7558, T7555, T7554, T7553, T7512, T7511

Differential Revision: https://phab.enlightenment.org/D8273
2019-03-09 13:49:36 +01:00
Mike Blumenkrantz 0616c31fda edje: restore edje legacy type that was defined to eo type
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8247
2019-03-08 12:06:26 -08:00
Mike Blumenkrantz 91b84fa2a8 evas: restore legacy types which were defined to eo types
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8245
2019-03-08 12:06:24 -08:00
Mike Blumenkrantz a4ad866bc1 eo files: mark a bunch of types with @beta
Summary:
these are all types that we do not currently want to release

Depends on D8102

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8241
2019-03-08 16:40:40 +01:00
Marcel Hollerbach a007badbed efl_canvas_scene: rename event from focus,* to scene_focus,*
Summary:
This event can just be renamed, no need to handle legacy. The reason for
this, that this event is used to map to EVAS_CALLBACK_ enum fields,
which means, the legacy names of the event does not matter.

ref T7476

Reviewers: cedric, segfaultxavi, zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7476

Differential Revision: https://phab.enlightenment.org/D8242
2019-03-08 09:02:30 -05:00
Shinwoo Kim be00af9bc3 edje_calc: make INTP use TO_INT_ROUND
Summary:
The edje_part_recalc calculates next postion(p3).
Please refer to following line.

   p3->final.y = INTP(p1->final.y, p2->final.y, pos);

If the condition is as blow, then p3->final.y becomes -50 only if pos is 1.0.
Because INP uses TO_INT not TO_INT_ROUND.

   p1->final.y == -32
   p2->final.y == -50

So we had nonsmooth ending of transition.

Test Plan:
Sample application to check this issue. Please look carefully when the rect moves from bottom to top.

{F3627740}

{F3627739}

Reviewers: cedric, Hermet, jypark

Reviewed By: Hermet

Subscribers: zmike, akanad, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7842
2019-03-08 13:28:22 +09:00
Mike Blumenkrantz 87614044cd edje_edit: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8130
2019-03-06 13:03:00 -08:00
Mike Blumenkrantz 1b8487bc99 efl_canvas_layout: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8129
2019-03-06 13:02:58 -08:00
Mike Blumenkrantz dd0890a0d7 efl_layout_group: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8128
2019-03-06 13:02:56 -08:00
Mike Blumenkrantz b532721b1d build: generate edje_global.eo.c with meson build
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8127
2019-03-06 13:02:53 -08:00
Mike Blumenkrantz ef5853b6d5 efl_text_cursor: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8119
2019-03-06 13:02:36 -08:00
Shinwoo Kim 1f7d7d0606 edje_calc: add ERR message to find out incorrect size problem
When I amended https://phab.enlightenment.org/D7842 I removed line to handle
negative value size of params final in _edje_part_pixel_adjust.
Because It was not related to the what the commit wants to fix, and I could not find
the case making param final size value negative , although I got the negative value
when I tested on a specific case. Now it seems that the negative value is telling me
"Witness Me!".

So I would like to add this change, and never let me forget the issue.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8105
2019-03-06 11:34:49 -08:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8107
2019-03-06 19:05:48 +01:00
Mike Blumenkrantz 12467afd40 efl.layout.calc: remove list<> usage in FIXME for event
Summary:
make this an array since there is no need to use a list here anyway

ref T7581

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7581

Differential Revision: https://phab.enlightenment.org/D8058
2019-03-04 13:42:05 -05:00
Mike Blumenkrantz 6b046ec845 efl.gfx: remove Efl.Gfx.Image_Load_Error
Summary:
this is now implemented through Eina.Error

ref T7718

Depends on D8066

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8067
2019-03-04 13:36:57 -05:00
Yeongjong Lee 4628021fe5 efl_container: remove content_remove
Most of classes implements Efl.Container.content_remove are just calling "unpack"
except of "Efl.Canvas.Layout" and "Efl.Ui.Layout".
This patch remove the asymmetrical API and add content_remove API of
"Efl.Canvas.Layout" and "Efl.Ui.Layout" that child can be remove without efl_part
APIs.

ref T7576

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7913
2019-02-27 21:20:33 +01:00
Marcel Hollerbach 120e247fa0 efl_canvas_layout_part_external: implement missing functions
Summary:
this just prints a error, manipulating the content here is not
permitted. As it is created by edje externals, which are owned by edje.

ref T5719
Depends on D7757

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: q66, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T5719

Differential Revision: https://phab.enlightenment.org/D7759
2019-02-27 14:57:03 -05:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz 1cce37f6f5 edje: free more data descriptors on shutdown
Summary: fix some leaks

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8022
2019-02-26 14:49:53 -05:00
Mike Blumenkrantz f8c4011458 efl.content: add event for when content is changed containing content as data
Summary: ref T7588

Reviewers: cedric, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7588

Differential Revision: https://phab.enlightenment.org/D7907
2019-02-25 07:58:44 -05:00
Mike Blumenkrantz af7d1ef7ed interfaces: move animator,tick to efl.canvas.object and remove efl.animator
Summary:
this interface only contains a single event which is implemented only by the
canvas object

ref T7561

Reviewers: cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7561

Differential Revision: https://phab.enlightenment.org/D7905
2019-02-21 22:04:30 +01:00
Wonki Kim 56a91961ce meson: add a option for selecting lua interpreter
this patch is for selecting lua interpreter such as luajit, lua51
and in addition, little more changes to unify lua dependency over efl

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7564
2019-02-21 20:49:00 +01:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Xavi Artigas 333330a6e5 Mark BETA classes individually
Summary:
Instead of surrounding all the #include "*.eo.h" lines in Efl.h
with #ifdef EFL_BETA_API_SUPPORT, include these files unconditionally, but mark
all classes as @beta in the eo files.
This will allow taking them out of beta one by one as we deem them stable enough.
Otherwise, the current procedure involves moving the #include line out of the
ifdef block, which is cumbersome and messes include order.

Depends on D7950
Fixes T7692

Test Plan: Nothing changes

Reviewers: zmike, bu5hm4n, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7692

Differential Revision: https://phab.enlightenment.org/D7951
2019-02-14 17:46:50 +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
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
Jaeun Choi bad145f313 edje: add missing NULL checks 2019-02-13 19:41:29 +09:00
Jaeun Choi ce7914c67e edje: add missing NULL check 2019-02-13 19:02:46 +09:00
Mike Blumenkrantz 56dbd2bf86 edje: apply maps to textblock cursors and backgrounds
when a map is applied to an edje part, it is expected that all components of
the part respect the map attributes. this requires that, in the case of
textblock parts, all the sub-parts which are internal to the textblock
(entry) object also go through the map populate and apply codepaths

fix T4977
@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7648
2019-02-11 15:10:45 -08:00
Mike Blumenkrantz 1b568327c4 efl_gfx_color_class: make this a mixin and move color_class_code here
Summary:
color_class_code seems to only have been added to efl_gfx_color in order to
share the hex conversion code, but this is trivial to do when it's in another
class and makes the api more sensible

ref T7559

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7559

Differential Revision: https://phab.enlightenment.org/D7898
2019-02-11 12:34:12 +01:00
Cedric BAIL f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -05:00
Cedric BAIL 917e0aa0fe edje: make legacy edje call rely directly on edje internal.
Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7869
2019-02-06 13:08:19 -05:00
Mike Blumenkrantz 9aca866fd1 efl.text_markup: move cursor-related methods to efl.text_markup_interactive
many users of the markup property are not interactive text cases, so splitting
off the interactive methods resolves a number of unimplemented method issues

ref T5719

Differential Revision: https://phab.enlightenment.org/D7787
2019-01-30 13:32:04 +01:00
Xavi Artigas c55299ca51 docs: Fix assorted typos in legacy documentation
Samsung reported a long list of typos in our legacy docs, this fixes them.
2019-01-28 13:14:20 +01:00
Marcel Hollerbach 68d1579faa efl: introduce efl_ui_direction_readonly
the readonly mixin implement the efl_ui_direction interface and prints a
error in case it is written.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7755
2019-01-26 11:42:04 +01:00
Marcel Hollerbach 1763afb391 edje: implement container api
the container api returns the number of added swallows.
the content iterator returns a iterator over all swallowed objects.

The reason this is only for swallows is that the interface explicitly
mentions UI elements at the count. Since i am believing the the result
of the count operation should mirror to the amount of elements in the
iterator, the iterator only returns swallowed objects.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7748
2019-01-26 11:41:58 +01:00
Derek Foreman a9d9ccefe4 edje: convert var timer list to inlist
Since these are only ever on one list, inlist is better.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7697
2019-01-18 14:11:05 -06:00
Derek Foreman 529abe2de5 edje: Use EINA_LIST_FREE instead of hand coded variant
Minor simplification, should be no functional change.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7696
2019-01-18 14:11:03 -06:00
Marcel Hollerbach 34efdfb1b1 efl: convert all classes to the new eolian syntax
ref T7459

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7684
2019-01-18 16:31:26 +01:00
Derek Foreman 1933580efb edje: Remove _edje_animators list
I guess this used to do something...

Now it's a list that we never add anything to but frequently try to remove
things from.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7621
2019-01-15 13:47:20 -06:00
Carsten Haitzler afb779bda5 edje - stop trying to access ready deleted exrt/group swallow objects
_edje_real_part_swallow_clear() would try and manipulate already
deleted group/external objects (not manually swallowed ones) thus
causing safety noise.

@fix.
2019-01-09 18:57:22 +00:00
Cedric BAIL 038612736c efl: rename Efl.Ui.Base -> Efl.Ui.I18n as that is really what it does.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7506
2019-01-02 11:03:51 -08:00
Jérémy Zurcher 8a617fda97 silence most left over compiler warnings
Summary: silence -Wshadow -Wunused-variable -Wunused-parameter

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7473
2018-12-18 13:08:01 +01:00
Marcel Hollerbach c1dd57d210 meson: use eolian_gen with -S
this ensures that eolian does not parse installed .eo files

Differential Revision: https://phab.enlightenment.org/D7405
2018-12-03 19:00:26 +01:00
Yeongjong Lee c7ee93eebb Remove duplicated interface inheritance in eo
Summary:
Delete unnecessary interface inheritance

Efl.Ui.Base ==> Efl.Ui.Widget - Efl.Canvas.Group - Efl.Canvas.Object - Efl.Ui.Base
Efl.Text_Cursor ==> Efl.Text_Markup - Efl.Text_Cursor
Efl.Pack_Layout ==> Efl.Ui.Box - Efl.Pack_Layout
Efl.Ui.Translatable ==> Efl.Ui.Layout - Efl.Ui.Widget - Efl.Ui.Translatable
Efl.Part ==> Efl.Ui.Widget - Efl.Part
Efl.Ui.View ==> Efl.Ui.Layout.Object - Efl.Ui.View
Efl.Access.Value ==> Efl.Ui.Spin - Efl.Access.Value
Efl.Gfx.Buffer ==> Efl.Canvas.Image_Internal - Efl.Gfx.Buffer
Efl.Canvas.Pointer ==>  Efl.Ui.Widget - Efl.Canvas.Group - Efl.Canvas.Object - Efl.Canvas.Pointer
Efl.Gfx.Size_Hint ==> Efl.Ui.Widget - Efl.Canvas.Group - Efl.Canvas.Object - Efl.Gfx.Size_Hint

Test Plan: make check

Reviewers: Jaehyun_Cho, Hermet, woohyun, segfaultxavi

Reviewed By: Jaehyun_Cho, segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7241
2018-11-22 17:22:04 +09:00
Youngbok Shin b89b221b97 edje: fix an overflow issue for state values
Summary:
Whenever _edje_recalc_do() is called, a state value of
Edje structure is increased. This increased value will be stored
in Edje_Real_Part and Edje_Real_Part_State for calculation optimazation.
But, once the state value is overflowed, it ruins calculation logic.
@fix

Test Plan:
Run an Edje file which has infinite animation for over an hour.
I'll attach an example to phab.

Reviewers: raster, cedric, woohyun, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7264
2018-11-14 16:43:13 +09:00
Carsten Haitzler ff2765c4af edje util - handle missing case in switch 2018-11-09 12:22:58 +00:00
Carsten Haitzler 5641910ed2 edje entry - be clearer and more efficient on string appending
using strncpy with strlen of the string you append is pointless.
again... strcpy will do - but use memcpy to be exact and pre-compute
sizing etc. only once. fixes warnings.
2018-11-09 12:18:59 +00:00
Carsten Haitzler 7847af7f57 edje calc - wanr - move fallthrough tag to just before next case
fixes warning for it not being there... no bug here though
2018-11-09 11:44:00 +00:00
Carsten Haitzler 921d3b4979 edje calc - warn - fix warn about initting all fields of calc params 2018-11-09 11:44:00 +00:00
Carsten Haitzler 8fc3942713 edje load - warn - fix buffer trucn warning 2018-11-09 11:44:00 +00:00
Carsten Haitzler 71ee265130 edje edit - warn - use bigger buffer to avoid buf trunc warnings 2018-11-09 11:44:00 +00:00
Carsten Haitzler 003323f244 edje modules - warn - use proper hash free func prototype 2018-11-09 11:44:00 +00:00
Carsten Haitzler 0bf371856c edje program - warn - handle theoretical null seat string 2018-11-09 11:44:00 +00:00
Daniel Hirt face90632e Canvas layout: support more Efl.Text.* with efl_part
This adds many Efl.Text.* that are useful for manipulating the
underlying TEXTBLOCK object's propeties using efl_part.

This has been implemented as part of the "user-defined" properties of
the layout part, so that the changes on the part persist across load of
different groups.

Note that text styles have precedence over the TEXTBLOCK (Canvas.Text)
object's properties. if an edc provides a style, the properties it
manipulates as part of the "base:" string would not be affected by this
API.

In general, this helps reducing the amount of styles for objects (or
modes of the same objects) that share the same setup, but are different
in some properties (e.g.  ellipsis, wrap etc).

@feature

Canvas layout: add text part "expand" property

This adds "expansion modes", which are essentially the same as min/max
hints in the edje part's 'description.text' fields.

The user can then customize his widget to different modes without being
forced to create a new edje group in the theme.

Note that there is an added check in case one of the min/max text flags
are provided from the theme. In such case, all flags from this new API
will be ignored.
This fortifies misuse where the flags are set both in theme and the API.

@feature
2018-11-06 18:33:56 +02:00