Commit Graph

52152 Commits

Author SHA1 Message Date
Daniel Kolesa 5f8172a589 eolian: add syntax for overridding docs in implements 2017-01-18 15:33:44 +01:00
Chris Michael 2e0dc2a1f9 ecore-wl2: Add function to get touch device
When we are sending input events, if we have no pointer device then we
should be setting ev->dev to a touch device (as touch events are
treated as pointer events inside EFL).

NB: This allows EFL clients to get touch events in Enlightenment.
There are still some small hiccups here (can't close terminology by
pressing the 'x' in the corner, cannot scroll elm_test srollbar, etc).

Likely EFL needs to change wrt all this...perhaps adding events for
touch that are separate from pointer ?...

ref T5094

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 12:31:01 -05:00
Chris Michael 2af4858e2a elput: Return touch coordinates when we have no pointer
If a user calls elput_input_pointer_xy_get (as is done via
ecore_evas_drm) and a pointer does not exist, we never return any
coordinates for this function.

Enlightenment is using ecore_evas_pointer_xy_get (which when using the
drm ee, ends up calling elput_input_pointer_xy_get). If we have no
pointer device, then no coordinates are ever returned and touch
clicking does not function properly.

To fix that we will check if a touch device exists and supply the
coordinates from that (in the case where there is no pointer device).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 11:36:50 -05:00
Vitalii Vorobiov bbdfe393e4 Edje_Edit: add forgotten API for map.zoom.x/y 2017-01-17 16:30:45 +02:00
Vyacheslav Reutskiy ba4370f8df evil: include "sys/types.h" where is define off_t 2017-01-17 14:54:09 +02:00
Andrii Kroitor b909f913ed edje_edit: add Efl.File.mmap.set implementation for edje_edit
This fixes edje_edit_program_source_get for mmaped edje_edit object
@fix
2017-01-17 13:42:36 +02:00
Jean-Philippe Andre caf3b95a6d elm_test: Make the animated filter a bit prettier
This is a basic example of fire text.

The gif was generated with a GIMP script from
http://fence-post.deviantart.com/art/GIMP-Animated-Fire-Script-84921148
2017-01-17 14:35:31 +09:00
Daniel Hirt 099c1f2d83 Ui text: fix size evaluation for default setup
Now the size evaluation will query for the native size of the
canvas.text object, and continue with calculations to set the min size
of itself.
This fixes a bug in containers where the widget's size wasn't picked up.

Also, the canvas.text object wasn't reporting 'changed' on text changes.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 1b881704db evas: Fix classic text styles with filters in textblock
Textblock filters support RGBA input which means legacy styles
can be used in conjunction with filtering. Not recommended, but
it works. Note: We may decide to drop this behaviour and use
alpha-only inputs for simplicity.

Still missing: support for filtering strikethrough, underline, or
embedded items
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 277ca9c0fc elm_test: Add a filter to the code entry
Just because I can. It's the filter code editor after all, deserves
a filter of its own. Plus, it tests that we can embed a filter
in the default style, and edit text with a filter and everything
works as expected. Yay!
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre f616b3ee15 evas: Fix crash with invalid input in textblock 2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 28fafbb1f4 evas: Redraw tb filters if source changed
Filters can have sources like image proxy, and should trigger
a redraw in case the source has changed. Since we cache the
filter's output, we need to first check whether the sources
have changed before reusing a previous output buffer.
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre f6caf73eaa elm_test: Search bar enter key activates test on exact match
Just type "entry" and hit the enter key.
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 6b07c2554a evas: Fix textblock filters with large items
If the line height is different from the text item height (eg.
because there are large embedded items) then we need to add
an extra offset to the draw commands.

Note: items themselves are not filtered (yet, at least).
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 3a98d0ea88 evas: Drop unused buffer from textblock filters
This is a first step before implementing some form of caching of
those output buffers. At the moment, it very aggressively deletes
any buffer that falls outside the clip of the textblock object.
Note that this is better in terms of memory usage but way worse
in terms of render performance (eg. scrolling). If a textblock
is a proxy source then we keep all the buffers (the entire object
is to be rendered).

+ fix a crash
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 59bda411b9 evas: Fix unsafe code in previous patches (tb filters)
This also reduces the overhead required per text item when there
is no filter.
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 13c62c10e1 evas: Introduce event style_insets,changed for tb
This will be triggered in the rare case when a textblock's
insets are changed (ie. the padding due to filters or style).

This fixes invalid sizing in the test case in elm (due to a
lack of event after program_set).

@feature
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 40f4acae75 evas: Implement buffer caching for textblock filters
This is the most basic optimization that needs to be done for
filters to be useful: cache the output rgba buffers for each
filtered element. Hopefully this doesn't leak. I'm not making
any promises about that though :)
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 93965db815 evas: Implement filter sources support for textblock 2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 1512741b48 evas: Implement filter_data_set for textblock
This is a function that allows passing variables from C or EDC
to the filter's Lua code. Useful in particular for color classes
from EDC.

This data would be the global data but we could eventually add
a markup tag to specify a data value per filter instance. For now
a single data value per tb object should be more than enough though.
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 4453044d84 elm_test: Improve gfx filter test case for tb & text
Now we can test both of those widgets with filters. We
could also add an image. This test case still needs some
improvement anyway.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 421df2eec6 evas: Adjust tb padding from gfx filters padding
This makes gfx filters padding work just like the standard style
padding, which means the tb user must offset the object position
by -l, -t and increase the object size by l+r,t+b.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 26221aac1f evas: Remove unused 'inset' field from tb items 2017-01-17 14:35:28 +09:00
Jean-Philippe Andre de47187dde evas: Fix tb filters spanning over multiple items
If a gfx filter was applied to a block of text spanning over
multiple text items, then it would improperly render as the
filter context was stored in the format, rather than the text
item. This is fixed by using a list of contexts in the format
node rather than a single context.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 5f1c993d17 evas: Set gfx filters by name on textblock
This allows for much simpler markup, and easier tracking of
which filters are in use, etc... Next: data and sources.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre cb294320dc evas: Experimental textblock support for gfx filters
This is only for testing purposes for now. Eventually we need
to fix the following things:
- terrible performance (cache buffers)
- force redraws based on filter padding
- expand textblock padding based on max filter padding
- add sources, data and a filter name/code hash
- test! :)
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 301e80a10a evas: Remove most extra data from filter mixin
This should save a bit of memory for all image & text
objects. This exploits the previous patch for the post-render
job queue added to evas, and simplifies this bit of code.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre c2ba0939d8 evas: Add a very simple post-render job list
This will be used by the filters
2017-01-17 14:35:27 +09:00
Jean-Philippe Andre b2a4039bda evas: Refactor evas filters a bit
This is a preparation step for (experimental) textblock support.
Textblock objects won't have a single filter, and the buffer's
geometry wouldn't be that of of the object itself. Thus a few
internal APIs need to be reworked first.
2017-01-17 14:35:27 +09:00
Jean-Philippe Andre ffbc0645e5 eina: Remove EAPI eina_freeq_main_set()
I believe this function is not required and should not be
used by applications. If there is a very good use case to
use your own main freeq, then the API could be added again.

For now, removing the set() is probably the safer option.

Note: the API was introduced in the upcoming 1.19
2017-01-17 14:21:17 +09:00
Jean-Philippe Andre 3f24b6ea2f evas: Use eina_slstr to simplify render debug
Only enabled if REND_DBG is manually enabled inside evas_render.c
2017-01-17 14:21:13 +09:00
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