Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: third_party/wayland-protocols/unstable/stylus/stylus-unstable-v1.xml

Issue 2144283003: wayland-protocols: Add protocol for stylus support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git checkout stylus Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/wayland-protocols/unstable/stylus/stylus-unstable-v1.xml
diff --git a/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v1.xml b/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4d6227aaf24aeaab3d63d01d2ab1b9f48604faec
--- /dev/null
+++ b/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v1.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="stylus_unstable_v1">
+
+ <copyright>
+ Copyright 2016 The Chromium Authors.
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ </copyright>
+
+ <interface name="zwp_stylus_v1" version="1">
+ <description summary="extends wl_pointer with events for on-screen stylus">
+ Allows a wl_pointer to represent an on-screen stylus. The client can
+ interpret the on-screen stylus like any other mouse device, and use
+ this protocol to obtain detail information about the type of stylus,
+ as well as the force and tilt of the tool.
+
+ These events are to be fired by the server within the same frame as other
+ wl_pointer events.
+
+ Warning! The protocol described in this file is experimental and
+ backward incompatible changes may be made. Backward compatible changes
+ may be added together with the corresponding uinterface version bump.
+ Backward incompatible changes are done by bumping the version number in
+ the protocol and uinterface names and resetting the interface version.
+ Once the protocol is to be declared stable, the 'z' prefix and the
+ version number in the protocol and interface names are removed and the
+ interface version number is reset.
+ </description>
+
+ <request name="get_pointer_stylus">
+ <description summary="get stylus interface for pointer">
+ Create pointer_stylus object. See zwp_pointer_stylus_v1 interface for
+ details.
+ </description>
+ <arg name="id" type="new_id" interface="zwp_pointer_stylus_v1"/>
+ <arg name="pointer" type="object" interface="wl_pointer"/>
+ </request>
+ </interface>
+
+ <interface name="zwp_pointer_stylus_v1" version="1">
+ <description summary="stylus extension for pointer">
+ The zwp_pointer_stylus_v1 interface extends the wl_pointer interface with
+ events to describe details about a stylus acting as a pointer.
+ </description>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy stylus object"/>
+ </request>
+
+ <enum name="tool_type">
+ <description summary="tool type of device."/>
+ <entry name="mouse" value="0" summary="Mouse or touchpad, not a stylus."/>
+ <entry name="pen" value="1" summary="Pen"/>
+ <entry name="touch" value="2" summary="Touch"/>
+ <entry name="eraser" value="3" summary="Eraser"/>
+ </enum>
+
+ <event name="tool_change">
+ <description summary="pointing device tool type changed">
+ Notification that the user is using a new tool type. There can only be
+ one tool in use at a time. If the pointer enters a client surface, with
+ a tool type other than mouse, this event will also be generated.
+
+ If this event is not received, the client has to assume a mouse is in
+ use. The remaining events of this protocol are only being generated
+ after this event has been fired with a tool type other than mouse.
+ </description>
+ <arg name="type" type="uint" enum="type" summary="new device type"/>
+ </event>
+
+ <event name="force">
+ <description summary="force change event">
+ Notification of a change in physical force on the surface of the screen.
+
+ If the pointer enters a client surface, with a tool type other than
+ mouse, this event will also be generated.
+
+ The force is calibrated and normalized to the 0 to 1 range.
+ </description>
+ <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
+ <arg name="force" type="fixed" summary="new value of force"/>
+ </event>
+
+ <event name="tilt">
+ <description summary="force change event">
+ Notification of a change in tilt of the pointing tool.
+
+ If the pointer enters a client surface, with a tool type other than
+ mouse, this event will also be generated.
+
+ Measured from surface normal as plane angle in degrees, values lie in
+ [-90,90]. A positive x is to the right and a positive y is towards the
+ user.
+ </description>
+ <arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
+ <arg name="tilt_x" type="fixed" summary="tilt in x direction"/>
+ <arg name="tilt_y" type="fixed" summary="tilt in y direction"/>
+ </event>
+ </interface>
+</protocol>
« no previous file with comments | « third_party/wayland-protocols/unstable/stylus/README ('k') | third_party/wayland-protocols/wayland-protocols.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698