Commit Graph

20955 Commits

Author SHA1 Message Date
Marcel Hollerbach 06b7933512 ecore_cocoa: change clipboard API
the new API works with mimetypes, so we can remove the cnp types from
Ecore_Cocoa.h and just forward the types from ecore_evas directly

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11350
2020-03-08 10:59:43 +01:00
Marcel Hollerbach 165f6f0ae2 rewrite efl cnp and dnd handling
the previous commits introduced a abstraction for drag in drop which can
be now used for this here. With this commit all the direct protocol
handling in efl.ui is removed, and only the ecore evas API is used.

Additionally, this lead to a giant refactor of how APIs do work. All
Efl.Ui. interfaces have been removed except Efl.Ui.Selection and
Efl.Ui.Dnd, these two have been restructored.
A small list of what is new:
- In general no function pointers are used anymore. They feel very
  uncompftable in bindings and in C. For us its a lot easier to just
listen to a event when a drop enters or leaves, there is no need to
register custom functions for that.
- Asynchronous data transphere is handled via futures, which proved to
  be more error safe.
- Formats and actions are handled as mime types / strings.
- 0 is the default seat if you do not know what else to take.
- Content is in general passes as a content container from eina, this
  also allows applications to pass custom types

The legacy dnd and cnp API is implemented based on that.
All cnp related things are in elm_cnp.c the dnd parts are in elm_dnd.c

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11190
2020-03-08 10:59:40 +01:00
Marcel Hollerbach 6189c2112c ecore_x_selection: do not skip any any atoms
i dont know why we skipped the first two atoms, but right now, if a
application is only providing one single target, we would crash.
With this we might copy a few atoms more. However, these atoms do not
matter, as we skip those, that we cannot understand

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11194
2020-03-08 10:59:31 +01:00
Marcel Hollerbach 293b2fe719 ecore_x: add API to request selection changed events for diff. wins
we need that in order to get seleciton per window events, which is
required to get a nice mapping onto the ecore_evas object.

Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11193
2020-03-08 10:59:28 +01:00
Marcel Hollerbach 39f3ce42dc ecore_evas: Introduce cnp / dnd API for ecore evas
The idea of copy and paste here is:
- The user specifies the content he wants to have in the selection
  buffer with a Eina_Content, these content pointer ownerships are
  passed to the called. Internally ecore_evas code will memorieze the
  pointer, and pass on function callbacks to the modules, which then do
  not have to deal with the ownership.

- In case the module does not specify these APIs, the callback
  implementation will be called, which only works for cnp *not* dnd.

- Action and mime types are handled as strings, which allows way better
  custom organisations.

(The docs needs improvement)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11192
2020-03-08 10:59:25 +01:00
Marcel Hollerbach 40a62ddf94 eina: introduce Eina_Abstract_Content
A little abstraction to have abstract data content bound to a type.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11018
2020-03-08 10:59:22 +01:00
Daniel Kolesa f6464b0deb evas_pbject_intercept: add missing parenthesis
Broken in 7c99e0a444.

*spanks*
2020-03-06 23:30:50 +01:00
Christopher Michael 8be14b2e6e efl_ui_win: Fix dereference before NULL check
This patch fixes an issue detected by Coverity in that 'sdp' is
already being dereferenced before we check it. ELM_WIN_DATA_GET can
return NULL, so we should check it's return Before trying to use the
variable.

Fixes CID1419871
2020-03-06 16:12:15 -05:00
Christopher Michael 7c99e0a444 evas_object_intercept: Add check for NULL 'obj' variable inside macros
This patch adds a small check for a valid 'obj' variable inside the
object_intercept macros, which fixes several Coverity reported issues
of NULL pointer dereference.

Fixes CID1420239 through CID1420258
2020-03-06 13:08:47 -05:00
Mike Blumenkrantz dceb056a66 efl-wl: properly send surface enter event in smart show
Summary:
confusing...
Depends on D11452

Reviewers: segfaultxavi, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11453
2020-03-06 12:16:50 -05:00
Mike Blumenkrantz 94d3ab1d2a elm: undef EAPI_WEAK in header before defining
Summary: avoid double define warnings

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11452
2020-03-06 12:16:50 -05:00
Hermet Park 7664aa97c0 canvas grid: fix inifinite loop dead.
Here parent smart del() call occurs inifinite loop for member deletion,

Maybe we need a better clean and neat solution here.
2020-03-06 23:51:20 +09:00
Marcel Hollerbach c47b78c80a efl_canvas_layout_part: remove debugging content set / get impl
this is now handled when eo is erroring.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11464
2020-03-06 15:11:26 +01:00
Marcel Hollerbach f41c497fa7 efl_canvas_layout_part: add part name, type and group name to debug info
this is usefull, as we now know which type of part we have, if a API
call does not succeed.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11463
2020-03-06 15:11:23 +01:00
Marcel Hollerbach f7e0a55d52 eo: print debug information when a call cannot be resolved
that is usefull esp. on parts.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11462
2020-03-06 15:11:20 +01:00
Mike Blumenkrantz bab8fcc442 evas/image: implement efl.file loading and mmap getters to correctly handle skip_head
when this property is set, the mixin implementation of efl_file_load() is
never called, which means the internal loaded flag (and related data) is
not set, and so the values for these properties must instead be returned
directly from the image data

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11423
2020-03-06 13:30:49 +01:00
Mike Blumenkrantz 576229bf6a evas: set mmap data to image data after preload with skip_head enabled
this is a bit ugly, but in the case where skip_head is used it's important
to propagate the resulting Eina_File back up to the image object's data
for use in other api functions

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11422
2020-03-06 13:30:46 +01:00
Mike Blumenkrantz 92a03628c8 efl_ui/widget: add inheritance for efl.gfx.entity to widget part
most of these are empty

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11448
2020-03-06 13:30:43 +01:00
Christopher Michael 2f4d209181 evas_object_intercept: Use efl_data_scope_safe_get
As per mailing list discussion, This macro is apparently a forward
facing API so we should be using efl_data_scope_safe_get in the event
that the API receives an object of the wrong type (which would have
caused a crash previously).

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11450
2020-03-06 13:30:40 +01:00
Christopher Michael 5e23d3983a evas_object_intercept: Reduce calls to efl_data_scope_get
Small patch to reduce the number of calls to efl_data_scope_get as per
mailing list discussion. Since the
EVAS_OBJECT_INTERCEPT_CALLBACK_DEFINE macro already retrieves the
protected data via efl_data_scope_get, we can just pass that
protected data directly to evas_object_intercept_init/deinit functions
without the need to refetch it.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11449
2020-03-06 13:30:37 +01:00
Marcel Hollerbach b9f185cc58 elm_label: add EFL_ACCESS_WIDGET_ACTION_MIXIN
we implement the API from it, so we should have that as a type here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11447
2020-03-06 13:30:34 +01:00
Alastair Poole b8326b6096 elm_code_syntax: Add c-sharp syntax highlighting. 2020-03-06 11:04:08 +00:00
Jaehyun Cho 2f9b4a7080 elc_naviframe: fix to delete item once by elm_object_item_del in pop_cb
If elm_object_item_del is called in pop_cb and pop_cb returns
EINA_FALSE, then the given item is destructed by _item_noref when
efl_unref is called after pop_cb.

After the above destruction, efl_del is called after the above efl_unref
and it deletes the item again.

Not to delete item after the item is destructed, efl_del after pop_cb is
removed.
2020-03-06 14:33:07 +09:00
Alastair Poole bd6608dd90 elm_code: Avoid moving to non-existent line.
Check for line existence before moving cursor.
2020-03-06 01:23:35 +00:00
Christopher Michael 7a89b7711f evas: Fix dereferenceing null pointer
Coverity reports a forward null here. If we do not get obj from
efl_data_scope_get then we should return. Also fixes some formatting

Fixes CID1420216
2020-03-04 14:20:47 -05:00
Hosang Kim 9ea61428db evas: Fix mouse event info for legacy events.
Summary:
Legacy event info have canvas and output coordinates.
Output coordinates have information of original position.
Canvas coordinates have information of transformed position.
So keep backward compatibility, fix filling legacy information.

This reverts commit 7f724f6c5d

Reviewers: Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11445
2020-03-04 09:35:58 -05:00
Alastair Poole b847348699 elm_code: Improve efficiency of the widget.
For now, only create textgrids when needed. Also improve other
regions of the widget. This will improve large file support and
also some rendering of the widget.

This improves performance 1-2 times. However, there must be a
reasonable redesign regarding the current use of textgrids.
2020-03-04 01:41:43 +00:00
Mike Blumenkrantz d9560ffcd9 efl-wl: add toplevel_added event for adding a new toplevel surface
Summary: Depends on D11443

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11444
2020-03-03 13:42:47 -05:00
Mike Blumenkrantz 0fb7acabc2 efl-wl: ensure that child_added event is called only when a parent is set
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11443
2020-03-03 13:42:43 -05:00
Xavi Artigas 43f98b2d46 doxygen docs: Fix several group problems
@ingroup before @addgroup, circular group dependencies...
2020-03-03 18:49:20 +01:00
Xavi Artigas c5b1694985 doxygen docs: fix insufficiently namespaced group names
These led to clashes, since group names must be globally unique.
2020-03-03 18:49:20 +01:00
Xavi Artigas 9aecf76824 doxygen docs: fix multiple defined @section's
Section names must be globally unique.
We rarely reference sections so we don't actually need to use @section
and a simple header suffices.
2020-03-03 18:49:20 +01:00
Mike Blumenkrantz f6f4c1fcc8 efl-wl: add function to get pid of a surface
Summary: this is useful for tracking surfaces of specific clients

Reviewers: bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11438
2020-03-03 12:27:43 -05:00
Hermet Park 146cf9da7e evas: ++safety by prevent invalid accesses. 2020-03-03 19:18:00 +09:00
Mike Blumenkrantz 710c05ed5a efl/gesture: deduplicate some code
also remove a misleading comment

no functional changes

Differential Revision: https://phab.enlightenment.org/D11395
2020-03-03 10:54:39 +01:00
Mike Blumenkrantz 613cd9f812 efl/gesture: fix flick internal touch id tracking
need to always make sure we set this when a gesture is being tracked so
we know which touch point we're watching

Differential Revision: https://phab.enlightenment.org/D11387
2020-03-03 10:54:33 +01:00
Mike Blumenkrantz 322fdba5f0 efl/gesture: fix momentum gesture recognizer to properly continue its gestures
it's not enough to just check the value for this in the recognizer; we need to
always modify the recognizer property here to correctly manage object lifetimes
and generate the correct events (e.g., not emitting momentum gestures while
multiple fingers are moving simultaneously)

also update a couple existing unit test checks which were wrong

Differential Revision: https://phab.enlightenment.org/D11386
2020-03-03 10:54:32 +01:00
Mike Blumenkrantz e1b7020633 efl/gesture: correctly filter tap events based on the processing touch point
if the recognizer is processing using a touch point other than the first finger,
e.g., in the case where multiple fingers are pressed simultaneously, then
the recognizer needs to also detect distance based on that finger

more fixes for triggering tap events while fingers are moving

Differential Revision: https://phab.enlightenment.org/D11385
2020-03-03 10:54:31 +01:00
Mike Blumenkrantz 3603884e51 efl/gesture: fix internal gesture object management
when a gesture ends and is not set to continue, the gesture object must
be preserved until the entire touch sequence ends in order to ensure that
all the touch point states are accurately detected and updated and so
additional instances of that gesture are not accidentally triggered

this fixes weird corner cases where you could tap with two fingers and
then get a long press event while dragging the second finger around as
long as you did it quickly enough

Differential Revision: https://phab.enlightenment.org/D11384
2020-03-03 10:54:29 +01:00
Mike Blumenkrantz d300e90d39 efl/gesture: port 'rotate' gesture from elm to new gesture framework
this is a 1:1 port with minimal changes other than what's necessary to
integrate into the new framework

Differential Revision: https://phab.enlightenment.org/D11383
2020-03-03 10:54:28 +01:00
Mike Blumenkrantz 830cdcf7ea efl/gesture: move some internal recognizer functions to be reusable
no functional changes

Differential Revision: https://phab.enlightenment.org/D11382
2020-03-03 10:54:27 +01:00
Mike Blumenkrantz 641c9427ef efl/gesture: rename long_tap -> long_press
this is consistent with the rest of efl naming

ref T8503

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11376
2020-03-03 10:54:26 +01:00
Mike Blumenkrantz e54454b986 efl/gesture: remove empty efl.object implementations from gesture objects
these are no longer needed

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11354
2020-03-03 10:54:23 +01:00
Mike Blumenkrantz 25d96317c0 efl/gesture: remove 'type' member from Efl_Canvas_Gesture_Data
this is no longer used

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11353
2020-03-03 10:54:20 +01:00
Marcel Hollerbach 76cc9488dd efl_ui_spotlight_scroll: improve scroll behaviour
when the mouse motion was used, we need to mark this event as processed.
Otherwise a click event will be emitted which is wrong.

Additionally, we should only scroll when we are definitly not clicking.
Right now, the scrolling animation would dance arround on a real TS.

Additionally², this commit introduces a little macro which calculates
the distance of a position.
2020-03-02 17:24:33 +01:00
Stefan Schmidt 7499bf9ba2 Revert "elm_label: sizing eval is called _on_label_resize to ensure label size."
This reverts commit 3d57fc0c92.

The change broke elementary tests on my local machine as well as on CI.
Please redo the change and bring it back after testing with the test
suites we have.
2020-03-02 16:54:04 +01:00
Wonki Kim 34477e1cbe ecore_wl: removes unreachable statements
Summary: this patch removes unreachable statements

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11437
2020-03-02 18:26:39 +09:00
Hermet Park f6de7c244a evas event: fix typo at map coord transform. 2020-03-02 16:55:40 +09:00
Bowon Ryu 3d57fc0c92 elm_label: sizing eval is called _on_label_resize to ensure label size.
Summary:
EFL should guarantee size of label in various situations that the label is resized.
elm_layout_sizing_eval called on on_label_resize.

Test Plan: N/A

Reviewers: YOhoho, zmike, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, Hermet, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11435
2020-03-02 16:53:10 +09:00
Carsten Haitzler 559bbd8ce3 freeq - up numbers for fq blocks and other limits to defer big batches
this should improve some perf by upping the max a free queu can baloon
up to 256k items and 32m of data (whichever is hit first).
2020-02-28 20:03:05 +00:00