---
name: "wayland_server_zwp_pointer_gesture_pinch_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_pointer_gesture_pinch_v1_t"
---

# wayland\_server\_zwp\_pointer\_gesture\_pinch\_v1\_t(3)

a pinch gesture object

## NAME

wayland::server::zwp\_pointer\_gesture\_pinch\_v1\_t - a pinch gesture object

## SYNOPSIS

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

Inherits wayland::server::resource\_t.

### Public Member Functions

std::function\< void()\> & **on\_destroy** ()\
 destroy the pinch gesture object  void **begin** (uint32\_t serial, uint32\_t time, **surface\_t** const &surface, uint32\_t fingers, bool post=true)\
 multi-finger pinch begin  void **update** (uint32\_t time, double dx, double dy, double scale, double rotation, bool post=true)\
 multi-finger pinch motion  void **end** (uint32\_t serial, uint32\_t time, int32\_t cancelled, bool post=true)\
 multi-finger pinch end  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 **begin\_since\_version** = 1\
 Minimum protocol version required for the **begin** function.  static constexpr std::uint32\_t **update\_since\_version** = 1\
 Minimum protocol version required for the **update** function.  static constexpr std::uint32\_t **end\_since\_version** = 1\
 Minimum protocol version required for the **end** function.

## Detailed Description

a pinch gesture object

A pinch gesture object notifies a client about a multi-finger pinch gesture detected on an indirect input device such as a touchpad. The gesture is usually initiated by multiple fingers moving towards each other or away from each other, or by two or more fingers rotating around a logical center of gravity. The precise conditions of when such a gesture is detected are implementation-dependent.

A gesture consists of three stages: begin, update (optional) and end. There cannot be multiple simultaneous hold, pinch or swipe gestures on a same pointer/seat, how compositors prevent these situations is implementation-dependent.

A gesture may be cancelled by the compositor or the hardware. Clients should not consider performing permanent or irreversible actions until the end of a gesture has been received.

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

## Member Function Documentation

### void zwp\_pointer\_gesture\_pinch\_v1\_t::begin (uint32\_t serial, uint32\_t time, surface\_t const & surface, uint32\_t fingers, bool post = `true`)

multi-finger pinch begin

**Parameters**

*serial* \
 *time* timestamp with millisecond granularity \
 *surface* \
 *fingers* number of fingers

This event is sent when a multi-finger pinch gesture is detected on the device.

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

### void zwp\_pointer\_gesture\_pinch\_v1\_t::end (uint32\_t serial, uint32\_t time, int32\_t cancelled, bool post = `true`)

multi-finger pinch end

**Parameters**

*serial* \
 *time* timestamp with millisecond granularity \
 *cancelled* 1 if the gesture was cancelled, 0 otherwise

This event is sent when a multi-finger pinch gesture ceases to be valid. This may happen when one or more fingers are lifted or the gesture is cancelled.

When a gesture is cancelled, the client should undo state changes caused by this gesture. What causes a gesture to be cancelled is implementation-dependent.

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

### 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\_pointer\_gesture\_pinch\_v1\_t::on\_destroy ()

destroy the pinch gesture object

Definition at line **5669** 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\_pointer\_gesture\_pinch\_v1\_t::update (uint32\_t time, double dx, double dy, double scale, double rotation, bool post = `true`)

multi-finger pinch motion

**Parameters**

*time* timestamp with millisecond granularity \
 *dx* delta x coordinate in surface coordinate space \
 *dy* delta y coordinate in surface coordinate space \
 *scale* scale relative to the initial finger position \
 *rotation* angle in degrees cw relative to the previous event

This event is sent when a multi-finger pinch gesture changes the position of the logical center, the rotation or the relative scale.

The dx and dy coordinates are relative coordinates in the surface coordinate space of the logical center of the gesture.

The scale factor is an absolute scale compared to the pointer\_gesture\_pinch.begin event, e.g. a scale of 2 means the fingers are now twice as far apart as on pointer\_gesture\_pinch.begin.

The rotation is the relative angle in degrees clockwise compared to the previous pointer\_gesture\_pinch.begin or pointer\_gesture\_pinch.update event.

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

## Member Data Documentation

### constexpr std::uint32\_t wayland::server::zwp\_pointer\_gesture\_pinch\_v1\_t::begin\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **begin** function.

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

### constexpr std::uint32\_t wayland::server::zwp\_pointer\_gesture\_pinch\_v1\_t::end\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **end** function.

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

### constexpr std::uint32\_t wayland::server::zwp\_pointer\_gesture\_pinch\_v1\_t::update\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **update** function.

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

## Author

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