---
name: "wayland_server_zwp_relative_pointer_v1_t"
section: "3"
platform: "linux"
package: "waylandpp-dev"
version: "1.0.0-6+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/wayland_server_zwp_relative_pointer_v1_t"
---

# wayland\_server\_zwp\_relative\_pointer\_v1\_t(3)

relative pointer object

## NAME

wayland::server::zwp\_relative\_pointer\_v1\_t - relative pointer object

## SYNOPSIS

`#include <wayland-server-protocol-unstable.hpp>`

Inherits wayland::server::resource\_t.

### Public Member Functions

std::function\< void()\> & **on\_destroy** ()\
 release the relative pointer object  void **relative\_motion** (uint32\_t utime\_hi, uint32\_t utime\_lo, double dx, double dy, double dx\_unaccel, double dy\_unaccel, bool post=true)\
 relative pointer motion  bool **proxy\_has\_object** () const\
 Check whether this wrapper actually wraps an object.  void **post\_no\_memory** () const\
 uint32\_t **get\_id** () const\
 client\_t **get\_client** () const\
 unsigned int **get\_version** () const\
 std::string **get\_class** ()\

### Static Public Attributes

static constexpr std::uint32\_t **relative\_motion\_since\_version** = 1\
 Minimum protocol version required for the **relative\_motion** function.

## Detailed Description

relative pointer object

A wp\_relative\_pointer object is an extension to the wl\_pointer interface used for emitting relative pointer events. It shares the same focus as wl\_pointer objects of the same seat and will only emit events when it has focus.

Definition at line **3895** of file **wayland-server-protocol-unstable.hpp**.

## Member Function Documentation

### std::string wayland::server::resource\_t::get\_class ()` [inherited]`

Retrieve the interface name (class) of a resource object.

**Returns**

Interface name of the resource object.

### client\_t wayland::server::resource\_t::get\_client () const` [inherited]`

Get the associated client

**Returns**

the client that owns the resource.

### uint32\_t wayland::server::resource\_t::get\_id () const` [inherited]`

Get the internal ID of the resource

**Returns**

the internal ID of the resource

### unsigned int wayland::server::resource\_t::get\_version () const` [inherited]`

Get interface version

**Returns**

Interface version this resource has been constructed with.

### std::function\< void()\> & zwp\_relative\_pointer\_v1\_t::on\_destroy ()

release the relative pointer object

Definition at line **6042** of file **wayland-server-protocol-unstable.cpp**.

### void wayland::server::resource\_t::post\_no\_memory () const` [inherited]`

Post 'not enough memory' error to the client

If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.

### bool wayland::server::resource\_t::proxy\_has\_object () const` [inherited]`

Check whether this wrapper actually wraps an object.

**Returns**

true if there is an underlying object, false if this wrapper is empty

### void zwp\_relative\_pointer\_v1\_t::relative\_motion (uint32\_t utime\_hi, uint32\_t utime\_lo, double dx, double dy, double dx\_unaccel, double dy\_unaccel, bool post = `true`)

relative pointer motion

**Parameters**

*utime\_hi* high 32 bits of a 64 bit timestamp with microsecond granularity \
 *utime\_lo* low 32 bits of a 64 bit timestamp with microsecond granularity \
 *dx* the x component of the motion vector \
 *dy* the y component of the motion vector \
 *dx\_unaccel* the x component of the unaccelerated motion vector \
 *dy\_unaccel* the y component of the unaccelerated motion vector

Relative x/y pointer motion from the pointer of the seat associated with this object.

A relative motion is in the same dimension as regular wl\_pointer motion events, except they do not represent an absolute position. For example, moving a pointer from (x, y) to (x', y') would have the equivalent relative motion (x' - x, y' - y). If a pointer motion caused the absolute pointer position to be clipped by for example the edge of the monitor, the relative motion is unaffected by the clipping and will represent the unclipped motion.

This event also contains non-accelerated motion deltas. The non-accelerated delta is, when applicable, the regular pointer motion delta as it was before having applied motion acceleration and other transformations such as normalization.

Note that the non-accelerated delta does not represent 'raw' events as they were read from some device. Pointer motion acceleration is device- and configuration-specific and non-accelerated deltas and accelerated deltas may have the same value on some devices.

Relative motions are not coupled to wl\_pointer.motion events, and can be sent in combination with such events, but also independently. There may also be scenarios where wl\_pointer.motion is sent, but there is no relative motion. The order of an absolute and relative motion event originating from the same physical motion is not guaranteed.

If the client needs button events or focus state, it can receive them from a wl\_pointer object of the same seat that the wp\_relative\_pointer object is associated with.

Definition at line **6048** of file **wayland-server-protocol-unstable.cpp**.

## Member Data Documentation

### constexpr std::uint32\_t wayland::server::zwp\_relative\_pointer\_v1\_t::relative\_motion\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **relative\_motion** function.

Definition at line **3970** of file **wayland-server-protocol-unstable.hpp**.

## Author

Generated automatically by Doxygen for Wayland++ from the source code.
