Commit Graph

52271 Commits

Author SHA1 Message Date
Jean-Philippe Andre 4550b4cf83 eina: Introduce Eina_Slstr for short-lived strings
Built on top of the new 'postponed' free queue, the short-lived
strings API allows users to return new strings without caring
about freeing them. EFL main loop will do this automatically for
them you at a later point in time (at the end of an iteration).

The APIs provided will either duplicate (copy) or more generally
steal an existing string (char *, stringshare, tmpstr, strbuf),
taking ownership of it and controling its lifetime. Those strings
can then be safely returned by an API. From a user point of view,
those strings must be considered like simple const char *, ie.
no need to free() them and their validity is limited to the
local scope.

There is no function to remove such a string from the freeq.

The short lived strings API is not thread-safe: do not send a
short-lived object from one thread to another.

@feature
2017-01-17 14:20:55 +09:00
Jean-Philippe Andre 4f5e64fdea eina_freeq: Add mode for postponed deletion
While this reuses the existing (but new) infrastructure of
eina_freeq, the mode of operation and objective is very different
from the default freeq.

By default, any object added to the freeq is basically already
freed from the user point of view, and the freeq itself only adds
a tiny layer of memory safety by deferring the actual call to free
and optionally filling the memory blob with a pattern ('wwwww...').
This is mostly thread-safe (requires thread-safe free functions).

This new type I called postponed is intended to store objects that
will be short lived. This is not thread safe as the life of the
objects added to this queue depends on the thread that adds to
the queue. The main intent is to introduce a new API for short-lived
strings.

@feature
2017-01-17 14:05:16 +09:00
Daniel Kolesa b1105da1da eolian: merge internal funcs in database fill 2017-01-16 16:00:45 +01:00
Daniel Kolesa 35c5e89269 eolian: remove/add APIs and clean up implements system
As there is no need to have separate is_auto, is_empty and
is_pure_virtual for functions and implements (each function has
its own base implement by default) I removed the function ones.
Instead, I added a way to retrieve a function's base implement
so that you can instead do the checks on the implement even when
you only have the function.

I also moved base implement build directly into the parser instead
of the database filler. That allows for significant cleanup. I
also removed distinction of implement pointers in Eolian_Function
for get and set as implements now always contain an entire thing
so the pointer was always the same anyway.

Things should still behave more or less the same, but ordering
of generated functions has changed because ordering of implements
has changed.
2017-01-16 15:55:06 +01:00
Wonki Kim fbad285eca interface_scrollable: Unify basis of calculation of page_get logic
Summary:
If rtl mode is set, current_page_get api should return reversed page number.
To do that, make x position x-axis reversed before page calculating.

Also bring_in and page_show should show the reversed page in rtl mode.
This patch modify the functions to support that.

Lastly, scroller should be scrolling based on the right edge of the page.

This patch is a combination of the patches(D4559,D4560)

Test Plan:
1. Run scroller test on elementary_test
2. Turn ui mirrored mode on
3. Manipulate scroller in various ways
    - It should scroll proper position when you click next or prev btn.

Reviewers: woohyun, taxi2se, z-wony, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4558
2017-01-16 14:20:04 +09:00
Woochan Lee 746ac26425 elm_multibuttonentry: Fix MBE got a wrong state.
Summary:
Even User set a MBE state as "shrink" when MBE created.
MBE has been changed the state as "none" during added items.

This patch will be fixed that bug state.

@fix

Test Plan:
Add below line after create mbe.

'elm_multibuttonentry_expanded_set(mbe, EINA_FALSE)'

Then Add items using item_append API.

See the result. mbe is not on shrink mode.

Reviewers: Hermet, jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4548
2017-01-16 11:48:49 +09:00
Andy Williams de92b55e32 elm_code: Add some safety 2017-01-15 23:50:37 +00:00
Andy Williams d86143212a elm_code: Fix selection when moving around with cursor keys
Also fix the handling of newlines in our selections
@fix
2017-01-15 22:41:48 +00:00
Davide Andreoli 262f8dae34 net gadget: try to improve the theme
* make the 2 monitors fill based on tx/rx percentage vals
* try a more bluish version (still need a bit of love)

Note that this is not working atm (okra need to fix in E)
2017-01-15 16:05:21 +01:00
Andy Williams 051013f4e1 Luncher: Fix engage theme to scale more smoothly.
There is still a layering issue and the algorithm could be improved
2017-01-13 22:51:01 +00:00
Mike Blumenkrantz de1a6d6f42 ecore-wl2: make session recovery listener global
global proxies have a single instance and do not work with
multiple listeners

@fix
2017-01-13 11:33:59 -05:00
Mike Blumenkrantz 0ea378802d elm_box: allow aspects 1 <= x < 0.0
this was a typo in my initial implementation

@fix
2017-01-13 11:33:59 -05:00
Chris Michael 83defff028 ecore-wl2: Use input serial for move and resize functions
This is a partial revert of 2bd880c6c7 which changed to use
wl_display_get_serial function. When can do that for most things,
however things like window move/resize need to use the input serial
which started the move/resize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-13 09:53:52 -05:00
Daniel Kolesa 8146db3b77 docs: generate correct eolian function signatures
Now signatures don't contain full class name, just func name.
2017-01-13 15:46:18 +01:00
Daniel Kolesa cb3f8304e0 eolian: change eo file syntax @virtual_pure -> @pure_virtual 2017-01-13 15:44:09 +01:00
Daniel Kolesa 692ae7adb6 eolian: use consistent pure_virtual naming in API
Previously one API used just virtual (incorrect) and one used
virtual_pure (which just sounds weird). So unify with a single
name, pure_virtual, similar as in other lanugages.

This does not change eo file syntax yet.
2017-01-13 15:40:29 +01:00
Daniel Kolesa a70645e154 eolian: consistent and cleaner error values from APIs
Now all error/unknown/etc values returned from APIs are zero,
previously it was a mix of zeroes and minus ones. Also, some
enums that had no error/invalid value before have one now, which
allows for better distinction between what is an error and what
is an intended result.
2017-01-13 15:26:05 +01:00
Jaeun Choi 70ad68bfc7 elm_bg: rotate image according to the orientation info
rotate image into the standard orientation according to the EXIF data
(think about taking a picture from camera and setting it as bg)
2017-01-13 20:34:02 +09:00
Carsten Haitzler 4fe9144c9d efl_ui_win - switch to the element being used for border type 2017-01-13 18:04:17 +09:00
Woochan Lee 14a98506d5 elm_gesture_layer: update doc.
Summary:
Add description about gesture APIs.

Some of the developers told me that they really have no idea what is this for when first see the API doc...

Reviewers: Hermet, raster, jpeg, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4541

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 16:36:23 -08:00
Jee-Yong Um 3f6e8871e2 elm.hoversel: revert unnecessary item expansion & get proper size
Summary:
The changes of previous patch (4ea7effe70)
are reverted, and item calculation is fixed correctly.
The main reason why hoversel item has wrong size in screen rotation is
that hover doesn't update geometry when the size of target object is changed.

Test Plan: elementary_test -to hoversel

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4556

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 16:32:05 -08:00
Jee-Yong Um bd241f6a38 elm_hoversel: reset alignment before calculation
Summary:
When screen is rotated, _resizing_eval() will be called twice by hover_parent
resize and hoversel movement.
If the alignment is changed to the right in the first call because of the geometry
of edje part is not updated yet (hoversel uses edje part geometry in calculation),
hoversel keeps being right-aligned in the second call,
even though there is enough space to show with default alignment.

Test Plan: elementary_test -to hoversel

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4557

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 16:30:30 -08:00
Ivan Furs 12ee780653 ecore_file: add case to properly rename a file in Windows
Summary:
If the file with a new path was created and 'rename' wants to replace the old path to the new path. 'rename' will return:
   Windows 7: -1 (errno=EEXIST) (EEXIST == 17)
   Ubuntu: 0

**EEXIST**
**Ubuntu**: The link named by new is a directory that is not an empty directory. (https://linux.die.net/man/3/rename)
**Windows 7**: Files exist. An attempt has been made to create a file that already exists. For example, the _O_CREAT and _O_EXCL flags are specified in an _open call, but the named file already exists.(https://msdn.microsoft.com/en-us/library/5814770t.aspx)

Test Plan:
**Sample code to rename in Linux and Windows if the file with the new name already exists:**

int main()
{
	const char *_old = "old";
	const char *_new = "new";

	int fd1 = open(_old, O_CREAT);
	close(fd1);
	int fd2 = open(_new, O_CREAT);
	close(fd2);
	printf("rename:\t%s -> %s\n", _old, _new);
	int r = rename(_old, _new);
	if (r == 0)
	{
		printf("GOOD\n");
	}
	else
	{
		printf("CODE ERROR:\n"                  );
		printf(" -rename...: %d\n", r    );
		printf(" -errno....: %d\n", errno);
	}
	return 0;
}

Reviewers: raster, vtorri, jpeg, NikaWhite, reutskiy.v.v, an.kroitor, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric, jpeg

Tags: #efl, #windows

Differential Revision: https://phab.enlightenment.org/D4561

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 16:24:34 -08:00
Al Poole 1f9e915b5a emotion: add support for obtaining embedded artwork from media files with gstreamer1 backend.
Reviewers: raster, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4550

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-01-12 14:37:19 -08:00
Daniel Hirt 50c9d1aeaa Ui text: fix deletion of the swallowed text object
The Efl.Canvas.Text object loses its parent due to a specific behavior
of Edje when swallowing objects.
The mentioned object then loses sync with the Ui.Text object, thus not
getting deleted upon destruction - that's actually because Edje
reparents to the canvas upon its own deletion.
Adding this fix until we figure out if there is a better alternative.
2017-01-12 18:15:10 +02:00
Chris Michael 251f52006f elput: Send touch motion before sending touch button events
This patch sends a touch motion event before sending of touch up/down
events. This allows some compositors (enlightenment) to update their
internal representation of where the mouse pointer is before handling
button events (as touch down/up is treated as a mouse button down/up).

Fixes T5094 for the old man ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 11:11:50 -05:00
Chris Michael 343a272328 elput: Store touch timestamp and slot
This patch adds a timestamp field to the touch structure so that we
can store it and do not have to refetch the timestamp when sending
touch events.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-12 11:11:50 -05:00
Daniel Kolesa 078a4eef71 eolian: strict function type input checks in APIs
Strictness of various Eolian APIs has been enhanced, for example
eolian_class_function_get_by_name now won't return anything if
you request an EOLIAN_PROPERTY and the found func is just an
EOLIAN_PROP_GET, and various APIs won't accept arbitrary inputs
like EOLIAN_UNRESOLVED or EOLIAN_PROPERTY now, instead you will
need to provide EOLIAN_PROP_GET, EOLIAN_PROP_SET or EOLIAN_METHOD
explicitly.

The purpose of this is to reduce potential bugs and fix ambiguous
behavior. Thanks to use of EINA_SAFETY, appropriate errors should
be printed into terminal when an API is used incorrectly.
2017-01-12 16:56:49 +01:00
Daniel Kolesa deb1e58e06 eolian gen: do not use EOLIAN_UNRESOLVED/PROPERTY for lookups 2017-01-12 15:13:30 +01:00
Carsten Haitzler 11432d42a7 elm theme/test - add start of nviframe window style and test it 2017-01-12 20:21:04 +09:00
Carsten Haitzler 4d8b6d54bc elm_win - fix getting of stack id string if win id changes
new feature. win id changed with csd pus alpha so reget stack id
string then
2017-01-12 18:01:15 +09:00
Carsten Haitzler ccc68f0719 eo - remove the spare eo domain for now for future expansion 2017-01-12 13:08:57 +09:00
Daniel Kolesa baaa482ebf eolian: fine-grained is_auto/is_empty for implements 2017-01-11 19:26:21 +01:00
Daniel Kolesa 289287f497 eolian: remove function_is_implemented
Its design does not match current Eolian and will be replaced later.
There isn't any generator using it right now, so it's safe to remove.
2017-01-11 19:26:21 +01:00
Chris Michael 6d51e0b1f3 ecore-evas-wayland: Add handler for window_configure_complete event
Small patch to add a handler so we can listen for when the surface
configure event is complete and can then go ahead and attach buffers
to the surface. This allows rage <filename> to work again in Weston :)

NB: This does allow rage <filename> to work under Weston now, but
still fails under Enlightenment for some reason :(

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:48 -05:00
Chris Michael 755c50a84e ecore-wl2: Add event to raise when window configure is completed.
Small patch to create and raise a new event letting ecore_evas know
when the window has been configured. With the addition of xdg_shell v6
support, we cannot commit a surface with an existing buffer until the
surface has been configured. This patch allows us to raise an event to
ecore_evas when the surface has been configured, so we can then attach
a buffer to it.

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:33 -05:00
Chris Michael 6c9dc2a5ba evas-wayland-shm: Compare hidden flag during reconfigure
Small patch to compare if the hidden flag being passed in is the same
as the one stored in Outbuf. With the addition of xdg_shell v6
support, we cannot commit a surface with an existing buffer until the
surface has been configured. In order to facilitate this, we will use
the 'hidden' flag so that any surface_post does not actually attach a
buffer unless configure has already been handled on the surface.

ref T5090

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:33 -05:00
Chris Michael 4bb9038b67 ecore-wl2: Minor formatting fixes
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:27 -05:00
Chris Michael bc1bbe8829 ecore-evas-wayland: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:16 -05:00
Chris Michael d1216ba7dd evas-wayland-shm: Minor formatting fix
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-11 12:36:16 -05:00
Daniel Kolesa 6a46b08c3b eolian: improve implement error messages
By retrieving by EOLIAN_UNDEFINED, we can provide more concrete error messages
thanks to the logic later.
2017-01-11 16:45:53 +01:00
Daniel Kolesa 85fbc333dd eolian: enforce specification of both get and set in prop impls
Now you can't use the same syntax as you would for a method to
implement a property as whole, instead you need to specify the
getter and/or setter explicitly. This is to allow parent classes
to expand their properties without altering behavior of the child
classes.
2017-01-11 16:38:41 +01:00
Vitalii Vorobiov b23289a2a0 Edje_Edit: first part of vector API implementation
edje_edit_vector_del
edje_edit_vector_usage_list_get
edje_edit_vector_id_get
edje_edit_vectors_list_get

edje_edit_state_vector_get
edje_edit_state_vector_set
2017-01-11 17:25:05 +02:00
Jaehyun Cho e23a4521ea Revert "edje_cc_parse: Fix to insert missing double quotation marks"
This reverts commit 5ae6e1db2f.

On Windows, system() does not execute file if the argument of system()
begins with double quotation marks.
(e.g. system("\"C:\efl\lib/edje/utils/v-1.18/epp.exe\" ...");)

To resolve this issue on Windows, it has been fixed to have the argument
of system() not begin with double quotation marks.
(i.e. Do not use double quotation marks for epp.exe path in system().)
2017-01-11 15:22:52 +09:00
Jaehyun Cho 8cf38539a1 edje_cc_parse: Fix not to convert macros to a single string
Double quotation marks convert macros to a single macro string and only
the first macro becomes valid.

So double quotation marks are not used for macros.
2017-01-11 10:29:46 +09:00
Chris Michael 41ff3c9d94 ecore-wl2: Mark window as pending configure when showing popup
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 12:00:39 -05:00
Chris Michael 07433065aa ecore-wl2: Remove incorrect EINA_UNUSED
These parameters are actually used inside this function so remove the
EINA_UNUSED

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:49:10 -05:00
Chris Michael 2bd880c6c7 ecore-wl2: Use 'serial' directly from wayland call
As we cannot rely on window->display->serial to be accurate (it is
only set when there is input going on), we should be getting the
'serial' values here directly from a wayland function call.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:48:18 -05:00
Chris Michael debc7ee8c3 ecore-evas-wayland: Ensure pending configure is handled before rendering
With the change to xdg_shell v6, we need to wait for any pending
configure to be handled before we can render. This patch addresses
that issue and makes Elementary_Test work again under Weston :)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:28:40 -05:00
Chris Michael 101c772412 ecore-wl2: Add flag to indicate pending configure
With the change to xdg_shell v6 we need to indicate that a window has
a pending configure event, and not show the window if a configure is
pending. In order to handle this, we add a flag to the window
structure and can check it inside ecore_evas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-10 11:27:10 -05:00