Copyright © 2008-2011 Kristian Høgsberg Copyright © 2010-2011 Intel Corporation Copyright © 2012-2013 Collabora, Ltd. Copyright © 2024 Fl0w All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This protocol allows clients to create borders, for which after crossing, mouse events will be forwarded to the client Useful for implementing the input capture portal. This interface allows a client to capture inputs and receive events Start the capturing of inputs. End the capturing of inputs. This event is triggered by the compositor to tell that he has released the capture of inputs Notification of pointer location change. It contains the absolute position of x and y and also the relative motion of the pointer. Note that the dx and dy vectors can be accelerated, please use the relative motion protocol for unaccelerated inputs. This specifies the format of the keymap provided to the client with the keymap event. This event provides a file descriptor to the client which can be memory-mapped in read-only mode to provide a keyboard mapping description. Describes the physical state of a key that produced the key event. A key was pressed or released. The key is a platform-specific key code that can be interpreted by feeding it to the keyboard mapping (see the keymap event). Describes the physical state of a button that produced the button event. Mouse button click and release notifications. The location of the click is given by the last motion or enter event. The button is a button code as defined in the Linux kernel's linux/input-event-codes.h header file, e.g. BTN_LEFT. Describes the axis types of scroll events. Scroll and other axis notifications. For scroll events (vertical and horizontal scroll axes), the value parameter is the length of a vector along the specified axis in a coordinate space identical to those of motion events, representing a relative movement along the specified axis. For devices that support movements non-parallel to axes multiple axis events will be emitted. When applicable, for example for touch pads, the server can choose to emit scroll events where the motion vector is equivalent to a motion event vector. When applicable, a client can transform its content relative to the scroll distance. Discrete high-resolution scroll information. This event carries high-resolution wheel scroll information, with each multiple of 120 representing one logical scroll step (a wheel detent). For example, an axis_value120 of 30 is one quarter of a logical scroll step in the positive direction, a value120 of -240 are two logical scroll steps in the negative direction within the same hardware event. Clients that rely on discrete scrolling should accumulate the value120 to multiples of 120 before processing the event. The value120 must not be zero. Stop notification for scroll and other axes. A axis_stop event can be sent to notify a client that the axis sequence has terminated. This enables the client to implement kinetic scrolling. The timestamp is to be interpreted identical to the timestamp in the axis event. The timestamp value may be the same as a preceding axis event. Indicates the end of a set of events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding. All pointer events before a frame event belong logically together. For example, in a diagonal scroll motion the compositor will two axis events (horizontal and vertical) and a frame event. The client may use this information to calculate a diagonal vector for scrolling. When multiple axis events occur within the same frame, the motion vector is the combined motion of all events. When a axis and a axis_stop event occur within the same frame, this indicates that axis movement in one axis has stopped but continues in the other axis. When multiple axis_stop events occur within the same frame, this indicates that these axes stopped in the same instance. A frame event is sent for every logical event group, even if the group only contains a single pointer event. Specifically, a client may get a sequence: motion, frame, button, frame, axis, frame, axis_stop, frame.