Commit Graph

11545 Commits

Author SHA1 Message Date
Mike Blumenkrantz 16d28c6bc8 eina: add macros for determining whether floats are nonzero
this is a commonly-used functionality, so make it faster to write

@feature
2017-01-06 12:57:08 -05:00
Mike Blumenkrantz 1b4c26be8e eina: add functions for warningless exact comparisons of floats
in some cases a user does want to check exact values, so these functions
should be used to indicate this intent

needs windows support

@feature
2017-01-06 12:57:08 -05:00
Marcel Hollerbach 04c0e5609c eina: fix up last commit
i am sorry. I missed that i just freed the string and not the complete
buf. This now really frees the buf.
2017-01-06 13:02:37 +01:00
Marcel Hollerbach 4d6d177ff7 eina_buf: replace eina_strbuf_free_return with eina_xXxbuf_release
The api name free_return wasnt a good choice so it is changed to
release. This also moves the implementation to binbuf template so it is
available in all buf types.
2017-01-06 12:45:27 +01:00
Carsten Haitzler c7d23534d9 eina - fix redefinition of word size if already defined 2017-01-06 19:25:50 +09:00
YeongJong Lee 13730d7a75 elm_code: Add 2 spaces auto indent after keywords
Summary:
When insert newline, check the previous line has keyword.
If so, insert 2 spaces indent more.

Test Plan:
1. run elementry_test - Code Editor or Edi.
2. Type some code with keywords.
3. Type <Return>.
4. Check that the indentation of newline is correct.

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4543
2017-01-06 10:16:41 +00:00
Carsten Haitzler 0690d47880 evas image preload - fix race condition that stops preloads
so if you queue a preload while a cancel is still pending the new
preload never happens. this fixes that. now it does but checking for
leftover tasks in the cancel cb and rescheduling a preload thread.

@fix
2017-01-06 17:46:13 +09:00
Mykyta Biliavskyi a3426a38ac edje_edit: fix set the images set as image.normal value.
Added ability to set the images set by name into image
part image.normal attribute.
Add search the images set id for case when the image id doesn't find in
image entries list.

@fix
2017-01-06 10:36:57 +02:00
Jiyoun Park 8ee0c30eb0 evas_image_main: fix memory leak of camera app -PLM[P161206-03545]
In gl engine, image objects try to unload image's pixel data after creating or updating the texture.
but image entry's reference is still 1, it is added to the pending_unloads list,
and it is cleaned when evas render function.

If elm image use preload feature, preload_done flag is true, so this image data cannot be removed from
pending_unloads list, it cause memory leak.

I think it is better to free image's pixel data in evas_cache_image_unload_data,
(not add to the pending_unloads list)
but it it complicated to modify.

so I'll remove the code to check preload_done flag in  evas_common_rgba_pending_unloads_cleanup function.
this flag check was added because of gl preloading, but now gl preloading feature is disabled.
this flag is related with https://phab.enlightenment.org/D2823

I tested photocam, but crash doesn't occur anymore, even though removing flag check.
2017-01-06 15:40:09 +09:00
Carsten Haitzler 3842e87d3a evas image skip header - more fixes for when images fail to load
this fixes some more issues i have found in using skip header like if
the file doesn't exist etc. recent feature add so not a fix.
2017-01-06 09:38:44 +09:00
Cedric BAIL 273238d725 eina: try to provide __WORDSIZE to system that don't have it aka OpenBSD. 2017-01-05 16:33:59 -08:00
Derek Foreman bc000f3ad2 ecore_wl2: Fix accidental re-use of tmp var
Oops, same tmp var for a nested inlist traverse.  That won't end well.
2017-01-05 13:40:31 -06:00
Derek Foreman df72ddf43c ecore_wl2: Don't request shell surfaces for all window types
Now that cursors are "windows", this results in a mess.  So skip at least
NONE and DND for now.
2017-01-05 13:40:31 -06:00
Derek Foreman 120063ad76 ecore_wl2: Prevent use after free on input deletion
Window structs keep inputs around, so we should sweep through them
and NULL out any stale ones on a delete.
2017-01-05 13:40:31 -06:00
Derek Foreman 8328d4db89 ecore_wl2: Remove the rest of the cursor frame callback
Oops, I made a clean spot, now I need to clean up the rest of this.

ref 641dfab516
2017-01-05 13:40:31 -06:00
Daniel Kolesa 5355699859 eolian: stricter implement/constructor verification
The system now verifies whether the class of an implement or
constructor exists within the inheritance hierarchy. It also
properly checks duplicates everywhere and prints better error
messages.
2017-01-05 16:00:14 +01:00
Marcel Hollerbach 2f1d0fb189 eina_strbuf: add eina_strbuf_free_return
Summary:
For a function which just composes a string with strbuf its quite
usefull to return the string while its freed.

This makes a function like:

{
   Eina_Strbuf *buf;
   char *path;

   buf = eina_strbuf_new();
   eina_strbuf_append(buf, "test");
   eina_strbuf_append_printf(buf, "%s-%d.edj", "test", 0);
   path = eina_strbuf_string_steal(buf);
   eina_strbuf_free(buf);
   return path;
}

To:

{
   Eina_Strbuf *buf;

   buf = eina_strbuf_new();
   eina_strbuf_append(buf, "test");
   eina_strbuf_append_printf(buf, "%s-%d.edj", "test", 0);
   return eina_strbuf_free_return(buf);
}

Which is a bit more handy.

Test Plan: just run make check

Reviewers: raster, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4545
2017-01-05 14:08:23 +01:00
JEONGHYUN YUN e998529f2e elm_panel: Add _scrollable_layout_resize internal funcion for refactoring
Summary:
Remove duplicated code in _elm_panel_efl_gfx_size_set
and _elm_panel_scrollable_content_size_set.

Reviewers: jpeg, woohyun, eunue, jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4553
2017-01-05 17:26:32 +09:00
Jean-Philippe Andre b11f371703 colorselector: Switch to Efl.Ui.Box internally
This doesn't change anything (in theory) but was to test the
box implementation. Conclusion: it's not much better than
elm_box. Also, homogenous mode isn't set because the layout
is completely broken (+ sets a min size equal to the object
size, thus can not resize down ever). The palette's objects
have the same size anyway.
2017-01-05 17:26:15 +09:00
Jean-Philippe Andre a6e54c6109 evas: Slightly optimize size hints
Object size hints are stored in a specially allocated struct
(from a mempool) and even a call to size_hint_set(default_values)
will allocate this struct. This patch avoids unnecessary allocations.

Originally I was trying to fix an infinite recalc loop but it
magically vanished...
2017-01-05 17:26:14 +09:00
Jean-Philippe Andre b5b78c0232 button: Add support for efl_text_set
For now a very quick and dirty solution, relying on elm_layout
legacy APIs.
2017-01-05 10:37:20 +09:00
Jean-Philippe Andre 1ce8c1c3d1 Revert "elm_layout: Implement Efl.Text"
This reverts commit 584e17ae84.

After talking to @herdsman (before xmas) we concluded that we
didn't necessarily want a generic version of efl_text_set/get
for elm_layout. Instead, each widget that should have a default
text part should implement text_set/get themselves (very simple).

Note that Efl.Ui.Text somehow does not "implement" efl_text when
looking at the eolian files. It works by composition.
2017-01-05 10:37:19 +09:00
JEONGHYUN YUN 401488cea7 elm_panel: Add get function in scrollable_content_size property
Summary:
Added get function for getting the size of the scrollable panel.
Additionally, added some exception handling code in scrollable_content_size_set

Reviewers: woohyun, eunue

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4549
2017-01-05 10:26:29 +09:00
Chris Michael 459a23244f elementary: Support xdg_shell version 6 show_window_menu function
As we now support xdg_shell version 6 on the client-side, we need to
use the zxdg_toplevel_v6 function call to show window menus.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:24 -05:00
Chris Michael d86b296813 ecore-wl2: Add support for xdg shell version 6
This patch adds support (client-side) for xdg_shell version 6.
Enlightenment is currently using this version as it's desktop shell,
so we need to support it client-side also.

fixes T4998

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 14:25:18 -05:00
Chris Michael 4ba4efb8fc ecore-wl2: Fix formatting
NB: No functional changes, just cleaning up formatting before the
serious work begins.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 11:08:49 -05:00
Carsten Haitzler 309e490bc0 efl header skip with preload - fix seg on invalid file
for invalid files we didn't handle this case, so fix it - recent
commit/feature add.
2017-01-04 20:18:42 +09:00
Carsten Haitzler 2842165415 openssl 1.1 build break fixes
this fixes building against openssl 1.1 since it broke api in various
ways by hiding structs and deprecating api's (this causes warnings not
breaks unlike the struct hiding). this adapts to these changes and
makes efl build again.

@fix
2017-01-04 17:47:38 +09:00
Haegeun Park 0ac95c40bc [Evas GL Thread 1] evas: Fixed indentation of evas_thread_render.c
Summary:
@fix

Change-Id: I411fe6d75dc7b15c0d7f19f165ea4b0cc3b28c12

Reviewers: sung, jpeg, cedric, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4525
2017-01-04 15:30:21 +09:00
Guilherme Iscaro 194d6b2f9b Evas Canvas: Remove focused_objects property.
Summary:
This property is not needed and it will only increase the API size.
One can simple achieve the same behaviour by simple doing:

//C code...

Eina_List *l;
Evas_Device *dev;

devices = evas_device_list(evas, NULL);

EINA_LIST_FOREACH(devices, l, dev)
{
   Evas_Object *obj;

   if (evas_device_class_get(dev) != EVAS_DEVICE_CLASS_SEAT)
      continue;
   obj = evas_canvas_seat_focus_get(dev);
   //Do something with the focused object.....
}
//More C code...

Reviewers: bdilly, barbieri, conr2d, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4547
2017-01-04 15:30:21 +09:00
SangHyeon Lee 5284912511 gengrid: adding sizing eval when gengrid min size is changed
Adding sizing eval when gengrid min width and height is changed,
so need to re-evaluate properly.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:46:50 +09:00
SangHyeon Lee 7b6cd2862d genlist : fixing wrong item realize bug when block is changed
Summary :
If current realized item is changed to another block which
was unrealized, item still stay in realized states because
new block is unrealized.
so when adding item to new block, adding realized state check
to change block realized state correctly.

Test Plan :
The issue is happen in eflete edc group list view.
when you expand and contract the tree view, if child is
bigger then block size, items under the current tree still
floating on the child items.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:32:14 +09:00
SangHyeon Lee 3d13678450 genlist : initialize disabled content for reusing
initialize disabled content for reusing again.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-04 14:26:22 +09:00
Derek Foreman 641dfab516 wayland: Fix cursor surface frame calls
The common code was skipping frame callback when no shell surface was
present - cursors aren't shell surfaces.

Add the frame callback to the common path and remove the bespoke callback
from the cursor code.
2017-01-03 16:40:21 -06:00
Gustavo Sverzut Barbieri 5e006baacf ecore_fb: allow ecore_fb to not setup VT.
Some systems won't allow VT to be setup due permissions to KDSETMODE
to KD_GRAPHICS.

Introduce $ECORE_FB_NO_VT envvar to allow skip that setup.
2017-01-03 12:44:54 -02:00
Gustavo Sverzut Barbieri 806be7adc0 ecore_fb_init(): use 'name' parameter similar to ecore_evas_fb_new().
Instead of assuming /dev/fb/0 or /dev/fb0, use the given 'name'
parameter in a similar way to ecore_evas_fb_new(): a number to be
parsed with 'strtoul()'.

Without this calling ecore_evas_fb_new() or ecore_evas_new() with
'display=1' will produce incorrect results.

@fix
2017-01-03 12:44:54 -02:00
Jaeyong Hwang 3f84aac424 evas: Add code to change the object's chage flag in evas_object_image_data_set
Summary:
When using evas_object_image_data_set(obj, data), if you give the value of data to NULL, the image data is free.
However, Since you have not set a flag in the image object to be modified, it will not be processed in the next render loop.
Eventually, the image data is erased, but you see the image before it was erased.
If evas_object_image_data_update_add() is used to solve this problem, the operation of the function is skipped because the values of w and h in image are 0.
So, If data is NULL, I modified it to call evas_object_change() in evas_object_image_data_set().

Test Plan:
Sample code

{F61599}
{F61601}

Reviewers: Hermet, jiin.moon, eunue, jpeg

Reviewed By: jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4520
2017-01-03 17:42:12 +09:00
SangHyeon Lee e1b6e9b18a gengrid : enable layout sizing eval and content min limit feature in gengrid
Summary :
As the child of layout and scroll interface user,
gengrid need to support content min limit feature to set min size
by layout sizing eval.

Test Plan :
Set elm_scroller_content_min_limit to gengrid and get min size off
gengrid object.

Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
2017-01-03 17:35:39 +09:00
Jiwon Kim 090ee28ca4 evas: fix adjustment logic about image border
Summary:
If border left+right >= image width, center area does not rendered.
Although adjusement logic, _draw_image()'s src_w can be a 0.
This commit try to secure center area at least 1 pixel.

This should fix T5057

@fix

Reviewers: raster, jypark, jpeg

Subscribers: cedric

Maniphest Tasks: T5057

Differential Revision: https://phab.enlightenment.org/D4538
2017-01-03 10:59:49 +09:00
Jee-Yong Um 6d0a2398ad Elm.Widget: rename "event.*" methods to solve name conflict
Summary:
Elm.Widget.event_callback_add conflicts with Efl.Object.event_callback_add.
To solve this problem, "widget_" prefix is added to methods starting with
"event".

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4521
2017-01-03 10:59:49 +09:00
Daniel Kolesa 4fddc11e64 eolian: correctly set the empty/auto flags in implements 2017-01-02 16:25:26 +01:00
Daniel Kolesa 45e6a3e86a eolian: disallow duplicate implements 2017-01-02 16:09:04 +01:00
Daniel Kolesa 3dc9d28279 eolian: fill ctor class early on 2017-01-02 15:28:45 +01:00
Daniel Kolesa bd21080c82 eolian: no need to fill func in eolian_implement_function_get
All implements are now filled in the previous stage.
2017-01-02 15:28:45 +01:00
Daniel Kolesa 0b2c070b06 eolian: partially clean up implement filling logic 2017-01-02 15:28:45 +01:00
Daniel Kolesa 692d445dcf eolian: require specification of either get or set in property impls 2017-01-02 15:28:45 +01:00
Carsten Haitzler 2cb621fe4a evas loader - don't stat NULL file paths
something i found valgrinding my recent async improvments. statting
null path. fix it.
2017-01-02 22:58:24 +09:00
Carsten Haitzler 9e01cf2698 evas image async preload - add option to also make header load async
to date if you use async preload we still load the header
synchronously and this can be horrible especially with generic
loaders. there is no way to farm this off to the preload thread. now
there is. youhave to set it as a skip head load option before doing a
file_set AND you need to issue a preload ... but now it's possible.

@feature
2017-01-02 18:53:56 +09:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
i found evas_common_draw_context_apply_cutouts() was procsessing 300+
cutouts and as it's O(n^2)/2 to try and merge adjacent rects for
cutouts this really performs like complete junk. we apply cutout rects
a LOT. this is not the best solution, but it's quick and much faster
than doing the clipouts which drop framerate to like 1-2fps or so in the
nasty case i say (tyls -m of photos in a dir with a 2160 high
terminal).

this figures out the target area to limit the count of rects
significantly so O(n^2) is far far better when n is now < 10 most of
the time. and for the few operations where it's a high value this now
uses qsort to speed up merges etc. etc.

@optimize
2017-01-02 18:53:56 +09:00
Sungtaek Hong 5a9c6d393a elm_naviframe: resize previous view before item pop transition.
Summary:
 - In commit rEFL9f5e9ec7ca120242a92ac97fb20016263c152d8e
   previous view is raised after item pop transition
   so that current view's pop animation can be shown.
 - But, previous view has to be in it's proper size
   during transition because some of animation might
   show previous view.

Reviewers: Jaehyun_Cho

Subscribers: cedric, conr2d, jpeg

Differential Revision: https://phab.enlightenment.org/D4535
2017-01-02 15:41:21 +09:00