efl/src/examples/evas
Jason Gerecke 26c943bac0 Expose device (e.g. pen) axis information to applications
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.

Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).

This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.

**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist

//Define and implement new Ecore_Event_Axis_Update events//
 * Harcode axis labels instead of including xserver-properties.h
 * Use C89-style comments
 * Use doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
 * Reference typedef'd instead of raw types
 * Adjust how we count through valuators to support tilt/az
 * Add support for tilt and azimuth
 * Tweak memory management in case number of valuators differ
 * Expand TWIST axis normalization to declared range
 * Only normalize TWIST axis if resolution == 1 (wacom bug)
 * Cache label atoms on first use to minimize round-trips

//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
 * Update to doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Typedef 'Evas_Axis_Label', 'Evas_Axis'
 * Move typedef for 'Evas_Event_Axis_Update'
 * Reference typedef'd instead of raw types

//Wire the Ecore and Evas implementations of axis update events together//
 * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
 * Move ecore_event_evas_axis_update to more logical position

//DEBUG: Add axis update logging to evas-multi-touch.c//
 * Removed from patch set

//Make evas-multi-touch demo use new axis functionality//
 * Have pressure adjust rectangle brightness instead of size
 * Use more available axis data when rendering rectangle (azimuth, tilt, twist)

Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.

Reviewers: cedric, raster

Subscribers: cedric

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

Conflicts:
	src/lib/ecore_input/Ecore_Input.h

Carsten Haitzler -

** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
2014-11-25 12:43:15 +09:00
..
filters Evas doc: Add example for padding_set (filters) 2014-05-09 16:57:39 +09:00
ply_files evas: Evas_3D - add .ply export/import. 2014-11-14 07:11:15 +01:00
shooter examples/evas-3d-shooter: Rename varibales to avopid shadowing 2014-11-17 16:47:15 +01:00
.gitignore examples/evas: Ignore evas_3d_ply example binary 2014-11-21 11:48:59 +01:00
EarthDiffuse.png Evas: 3D: Add missing image file for example evas-3d-proxy 2014-04-25 16:47:12 +09:00
Makefile.am evas: Evas_3D - add .ply export/import. 2014-11-14 07:11:15 +01:00
Makefile.examples evas: Evas_3D - add fog effect. add two API function for enable and disable fog effect for given mesh. 2014-07-07 19:26:48 +02:00
aspect.edc merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
bg_space.jpg examples: add new example for Evas_3D. 2014-06-06 19:11:21 +02:00
cube1.png merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
eagle.md2 evas: Evas_3D - Revision frustum culling. 2014-06-04 19:55:34 +02:00
eagle.png evas: Evas_3D - Revision frustum culling. 2014-06-04 19:55:34 +02:00
enlightenment.png merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
evas-3d-aabb.c Evas examples: Fix 3d aabb example. 2014-10-08 09:14:48 +01:00
evas-3d-cube-rotate.c 3D Warnings-- 2014-10-21 08:46:23 +03:00
evas-3d-cube.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-cube2.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-eet.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-fog.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-frustum.c Eo: Get rid of eo_add_custom. 2014-09-25 10:30:56 +01:00
evas-3d-md2.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-moon-space.c Eo: Get rid of eo_add_custom. 2014-09-25 10:30:56 +01:00
evas-3d-obj.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-pick.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-ply.c evas: Evas_3D - add .ply export/import. 2014-11-14 07:11:15 +01:00
evas-3d-proxy.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-3d-shadows.c evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
evas-aspect-hints.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-box.c examples: Removed compilation warnings. 2014-07-18 18:55:56 -03:00
evas-buffer-simple.c merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
evas-events.c [example][evas] add error message, you cannot use this example without the image. 2014-10-21 02:12:25 +09:00
evas-gl.c examples: Removed compilation warnings. 2014-07-18 18:55:56 -03:00
evas-hints.c examples: do not do void* arithmetics in evas examples. 2014-01-10 16:36:12 +09:00
evas-images.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-images2.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-images3.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-init-shutdown.c efl: add and fix some gcc lines and fix some examples. Its not possible to build from outside the directory with eina_prefix, the build still depends on PACKAGE_DATA_DIR 2013-02-08 17:35:17 +00:00
evas-map-utils.c efl: remove some warnings. 2014-05-24 02:27:15 +02:00
evas-multi-touch.c Expose device (e.g. pen) axis information to applications 2014-11-25 12:43:15 +09:00
evas-object-manipulation-eo.c evas: fix examples with latest eo change. 2014-08-21 17:52:54 +02:00
evas-object-manipulation.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-smart-interface.c 3D Warnings-- 2014-10-21 08:46:23 +03:00
evas-smart-object.c 3D Warnings-- 2014-10-21 08:46:23 +03:00
evas-stacking.c Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
evas-table.c efl: add and fix some gcc lines and fix some examples. Its not possible to build from outside the directory with eina_prefix, the build still depends on PACKAGE_DATA_DIR 2013-02-08 17:35:17 +00:00
evas-text.c examples: do not do void* arithmetics in evas examples. 2014-01-10 16:36:12 +09:00
evas-transparent.c evas: add example to test transparent background 2014-08-21 12:04:53 +02:00
evas_cxx_rectangle.cc eolian-cxx: Make proper handling of namespaces. 2014-07-01 10:55:45 +01:00
im1.png merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
indian_DIFF3.png evas: Evas_3D - add .obj export/import. 2014-06-05 20:49:26 +02:00
man_mesh.mtl evas: Evas_3D - add .obj export/import. 2014-06-05 20:49:26 +02:00
man_mesh.obj evas: Evas_3D - add .obj export/import. 2014-06-05 20:49:26 +02:00
moon.png examples: add new example for Evas_3D. 2014-06-06 19:11:21 +02:00
normal_lego.png Evas: 3D: Example: Rotating Cube 2 2014-04-25 16:18:50 +09:00
red.png merge: add evas tests and examples 2012-11-14 20:12:53 +00:00
sonic.md2 Evas: 3D: Example: MD2 mesh file example 2014-04-25 16:19:10 +09:00
sonic.png Evas: 3D: Example: MD2 mesh file example 2014-04-25 16:19:10 +09:00