Commit Graph

64972 Commits

Author SHA1 Message Date
Mike Blumenkrantz 9d03062ce4 efl/gesture: remove 'gesture' member from recognizer data struct
Summary:
this was never used

ref T8503

Depends on D11177

Reviewers: CHAN, bu5hm4n, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8503

Differential Revision: https://phab.enlightenment.org/D11178
2020-01-27 11:22:33 +01:00
Mike Blumenkrantz bf36c03a7a efl/gesture: remove 'manager' member from recognizer data struct
this can be fetched using efl_provider_find from the recognizer

ref T8503

Differential Revision: https://phab.enlightenment.org/D11177
2020-01-24 14:22:29 -05:00
Mike Blumenkrantz 37d48f4870 efl/gesture: remove 'config' property from recognizers
this is a manager functionality, and recognizers are always child objects of
managers

ref T8503

Differential Revision: https://phab.enlightenment.org/D11176
2020-01-24 14:22:21 -05:00
Mike Blumenkrantz 30668b44a2 efl/gesture: expose 'continues' as a public property for recognizers
we still access this using private data in the in-tree recognizers, but
now it's also accessible normally to custom recognizers

ref T8503

Differential Revision: https://phab.enlightenment.org/D11175
2020-01-24 14:22:14 -05:00
Mike Blumenkrantz ed228d2495 efl/gesture: add an event to notify when a config value has been changed
recognizers should be storing config values internally to avoid overhead
of multiple eo/hash lookups on every event

Differential Revision: https://phab.enlightenment.org/D11174
2020-01-24 14:22:08 -05:00
Mike Blumenkrantz cf7c1b22f9 efl/gesture: move finger_size into private structs of recognizers
we must write these recognizers using publicly available apis to ensure
that we don't accidentally start using private struct data

this requires a lot of changes to properly manage the config value for finger
size and update the recognizer data when changed (which external recognizers
will need to monitor an event to achieve) and then also to change some
recognizers so they don't use memset and unset the finger_size value

ref TT8503

Differential Revision: https://phab.enlightenment.org/D11173
2020-01-24 14:17:53 -05:00
Mike Blumenkrantz 08fad93ffe tests/gesture: add zoom and pinch tests
basic tests verifying completion of the gestures

Differential Revision: https://phab.enlightenment.org/D11170
2020-01-23 15:26:34 -05:00
Mike Blumenkrantz a77b635327 efl/gesture: discard non-press events for all touch points if unseen previously
not sure why this was restricted to first touch point previously, but the logic
applies to all points as we don't want to be tracking input for a touch we
haven't gotten a down for

Differential Revision: https://phab.enlightenment.org/D11169
2020-01-23 15:26:25 -05:00
Mike Blumenkrantz 0ac5244176 efl/gesture: add 'pressed' state info for touch data
since we retain touch info for the duration of a touch sequence, including
after a touch point has been unpressed, it's necessary to track the current
state of each point and then use that to accurately determine the number of
touches active

Differential Revision: https://phab.enlightenment.org/D11168
2020-01-23 15:26:17 -05:00
Mike Blumenkrantz 941a12487c efl/gesture: correctly reset zoom gesture recognizer data on >2 finger touch
canceling without a proper reset breaks the recognizer for successive events

Differential Revision: https://phab.enlightenment.org/D11167
2020-01-23 15:26:10 -05:00
Mike Blumenkrantz 2aa110a191 tests/elm: add util function for doing pinch motions
simple function which takes start points and vectors for 2 touches

Differential Revision: https://phab.enlightenment.org/D11166
2020-01-23 15:26:01 -05:00
Mike Blumenkrantz 981c3fbad0 efl/gesture: more accurately handle flick/momentum recognition with multi-touch
if we have one of these gestures where we are flicking/momentuming with multiple
touch points, we want to permit this so long as the touch points are moving vaguely
in the same direction, e.g., press -> swipe with 2 fingers

with this, we now cancel these gestures with multi-touch active if we detect motion
with subsequent touch events that doesn't match the vector of the "active" press
for which we are monitoring events

Differential Revision: https://phab.enlightenment.org/D11165
2020-01-23 15:25:53 -05:00
Mike Blumenkrantz 9915b34c46 efl/gesture: break out _direction_get() into helper function
this is useful in multiple places, no functional changes

Differential Revision: https://phab.enlightenment.org/D11164
2020-01-23 15:25:45 -05:00
Mike Blumenkrantz 6efbd83536 evas/events: fix multi-touch object targeting on touch down events
a touch press is both a touch and a move event, which means the canvas must
update its list of target objects on the first touch press to avoid using the
wrong objects when processing events

@fix

Differential Revision: https://phab.enlightenment.org/D11163
2020-01-23 15:25:36 -05:00
Mike Blumenkrantz 1671b4573d efl/gesture: correct config value name for glayer_double_tap_timeout
typo--

Differential Revision: https://phab.enlightenment.org/D11155
2020-01-23 15:25:27 -05:00
Mike Blumenkrantz dd62a0d0d1 tests/gesture: add extra event callback to verify event multiplication is fixed
Differential Revision: https://phab.enlightenment.org/D11145
2020-01-23 15:25:20 -05:00
Mike Blumenkrantz fefeeaf227 efl/gesture: redo (and make stupider) hash usage in gesture manager
this rewrites the gesture event dispatcher to use a hash of hashes for
tracking which events are being watched on a given object to avoid:
* dispatching n gesture events per object to each callback, where n is the
  number of gesture callbacks for any given type
* removing all gesture callbacks when only one callback is removed

this is not smart code. it should be improved at some time, but that time
is not now.

Differential Revision: https://phab.enlightenment.org/D11144
2020-01-23 15:25:14 -05:00
Mike Blumenkrantz b884e76c7f efl/gesture: add touch_count property for gesture event info
this allows us to provide the number of touch points active in any gesture
so we can detect e.g., double-tap with two fingers

Differential Revision: https://phab.enlightenment.org/D11126
2020-01-23 15:25:08 -05:00
Mike Blumenkrantz 41b4373755 tests/gesture: add gesture tests for basic multi-touch tap events
Differential Revision: https://phab.enlightenment.org/D11090
2020-01-23 15:25:01 -05:00
Mike Blumenkrantz 50379c00ff tests/elm: add util functions for doing multi-touch events
Differential Revision: https://phab.enlightenment.org/D11089
2020-01-23 15:24:54 -05:00
Mike Blumenkrantz 59f4944df5 efl/gesture: fix zoom to ignore single press events and not crash
zoom requires two fingers for a pinch, so skip the first press

Differential Revision: https://phab.enlightenment.org/D11088
2020-01-23 15:24:48 -05:00
Mike Blumenkrantz 8870ca45e2 efl/gesture: restrict flick and momentum gestures to original touch point
if multiple fingers are pressed down, filter and use only the first finger
to make gesture recognizing more accurate

this may change later once tests develop

Differential Revision: https://phab.enlightenment.org/D11087
2020-01-23 15:24:42 -05:00
Mike Blumenkrantz 5741ed6d0a efl/gesture: handle multi-touch press for tap gestures
any time multiple fingers are pressed down at the same time, we should
treat this as a single gesture like if only one finger was pressed

Differential Revision: https://phab.enlightenment.org/D11086
2020-01-23 15:24:36 -05:00
Mike Blumenkrantz 07b1e4c201 efl/gesture: move Point_Data to eo and add methods to fetch it for recognizers
this lets gesture framework track two touch points in order to distinguish between
successive presses and e.g., treat a simultaneous two finger tap as a single tap
gesture rather than two

it also simplifies some internal code and removes most hash lookups

Differential Revision: https://phab.enlightenment.org/D11085
2020-01-23 15:24:30 -05:00
Mike Blumenkrantz be3a0f0364 tests/gesture: add longpress tests
Differential Revision: https://phab.enlightenment.org/D11084
2020-01-23 15:24:24 -05:00
Mike Blumenkrantz c00b1b9dcc tests/elm: add util functions for pressing mouse button without releasing
Differential Revision: https://phab.enlightenment.org/D11083
2020-01-23 15:24:18 -05:00
Mike Blumenkrantz 590e392976 tests/elm: add util function to automatically delay loop by given time
Differential Revision: https://phab.enlightenment.org/D11082
2020-01-23 15:24:12 -05:00
Mike Blumenkrantz 35ca4e0988 efl/gesture: unset timer pointers for tap recognizers
avoid having stale timer pointers around once timers have triggered

Differential Revision: https://phab.enlightenment.org/D11081
2020-01-23 15:24:06 -05:00
Mike Blumenkrantz 19156e9a5c tests/gesture: beef up gesture flick/momentum tests significantly
this adds test cases for flicks in different directions, flicks which
leave the canvas, and gestures which are momentums but not flicks

Differential Revision: https://phab.enlightenment.org/D11055
2020-01-23 15:23:59 -05:00
Mike Blumenkrantz 2bc5e87af2 tests/elm: add util function for dragging the pointer in an arc
useful for throwing in non-linear drags

Differential Revision: https://phab.enlightenment.org/D11054
2020-01-23 15:23:53 -05:00
Mike Blumenkrantz c357bcc6dd efl/gesture: formatting
some parts of this were entirely unreadable due to mixed tabs/spaces and other
bizarre formatting issues which somehow made it into the tree

Differential Revision: https://phab.enlightenment.org/D11053
2020-01-23 15:23:47 -05:00
Mike Blumenkrantz f849c9637e tests/efl_ui: begin some gesture unit tests
adds basic testing for taps and flick

Differential Revision: https://phab.enlightenment.org/D11029
2020-01-23 15:23:41 -05:00
Mike Blumenkrantz 01f33eac6f tests/elm: add basic timestamping for event helpers
this enables various internal components which use timestamps to have timestamps
that can be used

Differential Revision: https://phab.enlightenment.org/D11028
2020-01-23 15:23:35 -05:00
Mike Blumenkrantz 892b843d35 efl/gesture: do not emit events for canceled gestures with no state
for non-continuing gestures which have been canceled at this point, we must
not emit events in order to avoid sending useless events which serve no
purpose other than to waste cpu cycles

Differential Revision: https://phab.enlightenment.org/D11027
2020-01-23 15:23:28 -05:00
Hosang Kim 0e2778f0ca efl_ui_layout: send theme signal when style is already updated.
Summary:
If you run below code, text is invisible.

```
efl_add(EFL_UI_BUTTON_CLASS, box,
        efl_ui_widget_style_set(efl_added, "anchor"),
        efl_text_set(efl_added, "anchor style"),
        efl_pack_end(box, efl_added));
```

But below code is working well.
```
efl_add(EFL_UI_BUTTON_CLASS, box,
        efl_text_set(efl_added, "anchor style"),
        efl_ui_widget_style_set(efl_added, "anchor"),
        efl_pack_end(box, efl_added));
```

Test Plan: run  efl_ui_theme_example_01

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11118
2020-01-23 09:34:37 -05:00
Ali Alzyod 932ea7a70e efl.canvas.textblock: annotate obstacle methods as beta
Summary:
We decided to annotate these methods as beta

**obstacle_add**
**obstacle_del**
**obstacles_update**

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8460

Differential Revision: https://phab.enlightenment.org/D11136
2020-01-23 12:34:39 +01:00
Marcel Hollerbach a8e45ab62f ecore_wl2: fix compilation 2020-01-23 11:16:31 +01:00
Xavi Artigas f6eed506d0 docs: Slight improvements to eina_types.eot Matrix docs
Reference D11158
2020-01-23 10:34:29 +01:00
junsu choi e7de16dc49 Eolian eina_types: Add Eina.Matrix4 type
Summary: for using in eolian

Test Plan: N/A

Reviewers: Hermet, bu5hm4n, segfaultxavi

Reviewed By: bu5hm4n, segfaultxavi

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11158
2020-01-23 10:34:12 +01:00
Ali Alzyod 279f2eca06 efl.ui.textbox: move file implementation in to internal class
We want to keep implementation for file interface in a safe place and remove it from our side world (eo).

This is a simple copy-paste, from efl.ui.textbox into efl_ui_internal_text_interactive

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11153
2020-01-23 10:04:08 +01:00
junsu choi 6c6ac71f56 Revert "efl_ui_image: Call unload file when calling file_set"
Summary:
This reverts commit 93bd970259.
efl.ui.image using prev and current inner image object.
Unloading the efl.ui.image class can be unloaded up to the prev image.
And because efl.ui.image is using the image caching feature together,
it may get unexpected errors. Therefore, revert this patch.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11157
2020-01-23 17:36:41 +09:00
Ali Alzyod 4cdd5505e9 efl_text_interactive: selection enhancment
1- Implement setting selection range programmatically by modifying selection cursors from **efl_text_interactive_selection_cursors_get**
2- Add setter with **efl_text_interactive_selection_cursors_set** to set the range at once (modify start and end)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: WooHyun Jung <wh0705.jung@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10968
2020-01-23 09:05:12 +01:00
Ali Alzyod 8143b81dd6 evas_object_textblock: treat variation sequence as single run
Summary:
Variation sequence treated as a single run, if we found one, we keep looking adding to the same  run, but if it is not, then we need to start a new one.

Before:
{F3826735}

After:
{F3826736}

Test Plan:
```
#include <stdio.h>
#include <Elementary.h>
/*
gcc -o example test.c `pkg-config --cflags --libs elementary`
*/

EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
   Evas_Object *win, *en;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("emoji-example", "emoji-example");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_object_text_set(en, "<font_size=25>&#x262a;&#x262a;&#xfe0f;&#x262a;가</font_size>");

   evas_object_show(en);

   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);
   evas_object_show(win);

   elm_run();

   return 0;
}
ELM_MAIN()
```

Reviewers: woohyun, bowonryu

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8542

Differential Revision: https://phab.enlightenment.org/D11096
2020-01-23 16:21:22 +09:00
Ali Alzyod 3d2f99af9e efl.text.interactive: use Eina_Int_Range for selection range event
Summary:
1- add new Eina type  (Eina_Int_Range). which represents int range (start, Len).
2- Use this type instead of  Efl.Text_Range  with selection events.

Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8570

Differential Revision: https://phab.enlightenment.org/D11128
2020-01-23 16:07:42 +09:00
Jaehyun Cho 09e3972d14 efl_ui_spotlight: rename Stack_Manager to Fade_Manager
Summary:
Since Stack_Manager displays fade in/out transition effects, the class
name is renamed from Stack_Manager to Fade_Manager.

Depends on D11142

Reviewers: segfaultxavi, bu5hm4n, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11143
2020-01-23 12:55:16 +09:00
Jaehyun Cho 3e21d34349 efl_ui_spotlight: rename Manager_XXX and Indicator_XXX
Summary:
In spotlight classes, "Manager" and "Indicator" are used as prefix in
the class names.
e.g. Efl.Ui.Spotlight.Manager_Plain, Efl.Ui.Spotlight.Indicator_Icon

However, those classes are basically manager and indicator classes with
different features. Therefore, "Manager" and "Indicator" should be used
as postfix in the class names.
e.g. Efl.Ui.Spotlight.Plain_Manager, Efl.Ui.Spotlight.Icon_Indicator

However, for the easier usage of C APIs, c_prefix of those classes are
remained to be "efl_ui_spotlight_manager_xxx" and
"efl_ui_spotlight_indicator_xxx".

Reviewers: segfaultxavi, bu5hm4n, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11142
2020-01-23 12:55:12 +09:00
Carsten Haitzler 68d7f584cb edje - store original size in edje struct and dont exceed max size
evas can tell us max texture size. in edje when we have image sets
(multiple images that make up mipmaps effectively for a logical
image), we now can avoid choosing an image that exceeds max texture
size. this actually fixes bugs i have seen on the rpi3 which has a max
texture size of 2048 which makes it easy to exceed it with wallpapers
or even terminology's default theme.

so combo of new feature and fix... but requires a rebuild of the edj
files...

@feat + @fix
2020-01-22 23:34:05 +00:00
Yeongjong Lee 97098dcc50 csharp: cleanup concrete class
Summary:
Concrete class is only used to call static member of NativeMethod. they don't
need any inheritance and implementation of c functions.

Depends on D9893

Test Plan: ninja test

Reviewers: lauromoura, felipealmeida

Subscribers: Jaehyun_Cho, woohyun, segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9894
2020-01-23 07:30:14 +09:00
Ali Alzyod 5137f6d143 eina: add new range Data type
Summary:
Introduce new data type (Eina.Range)  which represent range (part of series)

**eina_range_max_get**
**eina_range_intersect**
**eina_range_union**
**eina_range_contains**
**eina_range_equal**

Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike

Reviewed By: woohyun

Subscribers: vtorri, cedric, #committers, #reviewers

Tags: #efl

Maniphest Tasks: T8570

Differential Revision: https://phab.enlightenment.org/D11133
2020-01-23 06:54:44 +09:00
junsu choi 93bd970259 efl_ui_image: Call unload file when calling file_set
Summary:
We have checked that unload is not called even if different files
call again elm_image_file_set on the same object.
If file_set is called repeatedly, I think a potential error can occur.
So, modify to call unload when doing file_set by referring to efl_ui_zoomable.

Test Plan: N/A

Reviewers: Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11148
2020-01-22 11:57:26 -05:00