Commit 1bb3d17c authored by Sean O'Brien's avatar Sean O'Brien Committed by Commit Bot

Add and implement wayland protocol for pinch gestures

Extends the wl_pointer protocol using the wayland upstream
zwp_pointer_gestures protocol to pass information about pinch gestures.

BUG=b:25668308

Change-Id: I9f90ebebec3f8476181e0426401827a3cf1064e4
Reviewed-on: https://chromium-review.googlesource.com/699017
Commit-Queue: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506828}
parent bbb84a0f
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
#include "components/exo/pointer_delegate.h" #include "components/exo/pointer_delegate.h"
#include "components/exo/pointer_stylus_delegate.h" #include "components/exo/pointer_gesture_pinch_delegate.h"
#include "components/exo/surface.h" #include "components/exo/surface.h"
#include "components/exo/wm_helper.h" #include "components/exo/wm_helper.h"
#include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/frame_sinks/copy_output_request.h"
...@@ -96,6 +96,8 @@ Pointer::~Pointer() { ...@@ -96,6 +96,8 @@ Pointer::~Pointer() {
focus_surface_->RemoveSurfaceObserver(this); focus_surface_->RemoveSurfaceObserver(this);
focus_surface_->UnregisterCursorProvider(this); focus_surface_->UnregisterCursorProvider(this);
} }
if (pinch_delegate_)
pinch_delegate_->OnPointerDestroying(this);
auto* helper = WMHelper::GetInstance(); auto* helper = WMHelper::GetInstance();
helper->RemoveDisplayConfigurationObserver(this); helper->RemoveDisplayConfigurationObserver(this);
helper->RemoveCursorObserver(this); helper->RemoveCursorObserver(this);
...@@ -151,6 +153,10 @@ gfx::NativeCursor Pointer::GetCursor() { ...@@ -151,6 +153,10 @@ gfx::NativeCursor Pointer::GetCursor() {
return cursor_; return cursor_;
} }
void Pointer::SetGesturePinchDelegate(PointerGesturePinchDelegate* delegate) {
pinch_delegate_ = delegate;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// SurfaceDelegate overrides: // SurfaceDelegate overrides:
...@@ -293,6 +299,36 @@ void Pointer::OnScrollEvent(ui::ScrollEvent* event) { ...@@ -293,6 +299,36 @@ void Pointer::OnScrollEvent(ui::ScrollEvent* event) {
OnMouseEvent(event); OnMouseEvent(event);
} }
void Pointer::OnGestureEvent(ui::GestureEvent* event) {
// We don't want to handle gestures generated from touchscreen events,
// we handle touch events in touch.cc
if (event->details().device_type() != ui::GestureDeviceType::DEVICE_TOUCHPAD)
return;
if (!focus_surface_ || !pinch_delegate_)
return;
switch (event->type()) {
case ui::ET_GESTURE_PINCH_BEGIN:
pinch_delegate_->OnPointerPinchBegin(event->unique_touch_event_id(),
event->time_stamp(), focus_surface_);
delegate_->OnPointerFrame();
break;
case ui::ET_GESTURE_PINCH_UPDATE:
pinch_delegate_->OnPointerPinchUpdate(event->time_stamp(),
event->details().scale());
delegate_->OnPointerFrame();
break;
case ui::ET_GESTURE_PINCH_END:
pinch_delegate_->OnPointerPinchEnd(event->unique_touch_event_id(),
event->time_stamp());
delegate_->OnPointerFrame();
break;
default:
break;
}
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// WMHelper::CursorObserver overrides: // WMHelper::CursorObserver overrides:
......
...@@ -32,6 +32,7 @@ class MouseEvent; ...@@ -32,6 +32,7 @@ class MouseEvent;
namespace exo { namespace exo {
class PointerDelegate; class PointerDelegate;
class PointerGesturePinchDelegate;
class Surface; class Surface;
class SurfaceTreeHost; class SurfaceTreeHost;
...@@ -53,6 +54,9 @@ class Pointer : public SurfaceTreeHost, ...@@ -53,6 +54,9 @@ class Pointer : public SurfaceTreeHost,
// pointer location, in surface local coordinates. // pointer location, in surface local coordinates.
void SetCursor(Surface* surface, const gfx::Point& hotspot); void SetCursor(Surface* surface, const gfx::Point& hotspot);
// Set delegate for pinch events.
void SetGesturePinchDelegate(PointerGesturePinchDelegate* delegate);
// Returns the current cursor for the pointer. // Returns the current cursor for the pointer.
gfx::NativeCursor GetCursor(); gfx::NativeCursor GetCursor();
...@@ -65,6 +69,7 @@ class Pointer : public SurfaceTreeHost, ...@@ -65,6 +69,7 @@ class Pointer : public SurfaceTreeHost,
// Overridden from ui::EventHandler: // Overridden from ui::EventHandler:
void OnMouseEvent(ui::MouseEvent* event) override; void OnMouseEvent(ui::MouseEvent* event) override;
void OnScrollEvent(ui::ScrollEvent* event) override; void OnScrollEvent(ui::ScrollEvent* event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
// Overridden from WMHelper::CursorObserver: // Overridden from WMHelper::CursorObserver:
void OnCursorSizeChanged(ui::CursorSize cursor_size) override; void OnCursorSizeChanged(ui::CursorSize cursor_size) override;
...@@ -95,6 +100,9 @@ class Pointer : public SurfaceTreeHost, ...@@ -95,6 +100,9 @@ class Pointer : public SurfaceTreeHost,
// The delegate instance that all events are dispatched to. // The delegate instance that all events are dispatched to.
PointerDelegate* const delegate_; PointerDelegate* const delegate_;
// The delegate instance that all pinch related events are dispatched to.
PointerGesturePinchDelegate* pinch_delegate_ = nullptr;
// The current focus surface for the pointer. // The current focus surface for the pointer.
Surface* focus_surface_ = nullptr; Surface* focus_surface_ = nullptr;
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
#define COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
#include "base/time/time.h"
namespace exo {
class Pointer;
// Handles pinch event details on pointers. Used as an extension to the
// PointerDelegate.
class PointerGesturePinchDelegate {
public:
// Called at the top of the pointer's destructor, to give observers a
// chance to remove themselves.
virtual void OnPointerDestroying(Pointer* pointer) = 0;
virtual void OnPointerPinchBegin(uint32_t unique_touch_event_id,
base::TimeTicks time_stamp,
Surface* surface) = 0;
virtual void OnPointerPinchUpdate(base::TimeTicks time_stamp,
float scale) = 0;
virtual void OnPointerPinchEnd(uint32_t unique_touch_event_id,
base::TimeTicks time_stamp) = 0;
protected:
virtual ~PointerGesturePinchDelegate() {}
};
} // namespace exo
#endif // COMPONENTS_EXO_POINTER_GESTURE_PINCH_DELEGATE_H_
...@@ -64,6 +64,7 @@ source_set("wayland") { ...@@ -64,6 +64,7 @@ source_set("wayland") {
"//third_party/wayland-protocols:gaming_input_protocol", "//third_party/wayland-protocols:gaming_input_protocol",
"//third_party/wayland-protocols:keyboard_configuration_protocol", "//third_party/wayland-protocols:keyboard_configuration_protocol",
"//third_party/wayland-protocols:keyboard_extension_protocol", "//third_party/wayland-protocols:keyboard_extension_protocol",
"//third_party/wayland-protocols:pointer_gestures_protocol",
"//third_party/wayland-protocols:presentation_time_protocol", "//third_party/wayland-protocols:presentation_time_protocol",
"//third_party/wayland-protocols:remote_shell_protocol", "//third_party/wayland-protocols:remote_shell_protocol",
"//third_party/wayland-protocols:secure_output_protocol", "//third_party/wayland-protocols:secure_output_protocol",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <keyboard-configuration-unstable-v1-server-protocol.h> #include <keyboard-configuration-unstable-v1-server-protocol.h>
#include <keyboard-extension-unstable-v1-server-protocol.h> #include <keyboard-extension-unstable-v1-server-protocol.h>
#include <linux/input.h> #include <linux/input.h>
#include <pointer-gestures-unstable-v1-server-protocol.h>
#include <presentation-time-server-protocol.h> #include <presentation-time-server-protocol.h>
#include <remote-shell-unstable-v1-server-protocol.h> #include <remote-shell-unstable-v1-server-protocol.h>
#include <secure-output-unstable-v1-server-protocol.h> #include <secure-output-unstable-v1-server-protocol.h>
...@@ -71,6 +72,7 @@ ...@@ -71,6 +72,7 @@
#include "components/exo/notification_surface_manager.h" #include "components/exo/notification_surface_manager.h"
#include "components/exo/pointer.h" #include "components/exo/pointer.h"
#include "components/exo/pointer_delegate.h" #include "components/exo/pointer_delegate.h"
#include "components/exo/pointer_gesture_pinch_delegate.h"
#include "components/exo/shared_memory.h" #include "components/exo/shared_memory.h"
#include "components/exo/shell_surface.h" #include "components/exo/shell_surface.h"
#include "components/exo/sub_surface.h" #include "components/exo/sub_surface.h"
...@@ -4093,6 +4095,95 @@ void bind_stylus_v2(wl_client* client, ...@@ -4093,6 +4095,95 @@ void bind_stylus_v2(wl_client* client,
nullptr); nullptr);
} }
////////////////////////////////////////////////////////////////////////////////
// pointer_gesture_swipe_v1 interface:
void pointer_gestures_get_swipe_gesture(wl_client* client,
wl_resource* resource,
uint32_t id,
wl_resource* pointer_resource) {
NOTIMPLEMENTED();
}
////////////////////////////////////////////////////////////////////////////////
// pointer_gesture_pinch_v1 interface:
class WaylandPointerGesturePinchDelegate : public PointerGesturePinchDelegate {
public:
WaylandPointerGesturePinchDelegate(wl_resource* resource, Pointer* pointer)
: resource_(resource), pointer_(pointer) {
pointer_->SetGesturePinchDelegate(this);
}
~WaylandPointerGesturePinchDelegate() override {
if (pointer_)
pointer_->SetGesturePinchDelegate(nullptr);
}
void OnPointerDestroying(Pointer* pointer) override { pointer_ = nullptr; }
void OnPointerPinchBegin(uint32_t unique_touch_event_id,
base::TimeTicks time_stamp,
Surface* surface) override {
wl_resource* surface_resource = GetSurfaceResource(surface);
DCHECK(surface_resource);
zwp_pointer_gesture_pinch_v1_send_begin(resource_, unique_touch_event_id,
TimeTicksToMilliseconds(time_stamp),
surface_resource, 2);
}
void OnPointerPinchUpdate(base::TimeTicks time_stamp, float scale) override {
zwp_pointer_gesture_pinch_v1_send_update(
resource_, TimeTicksToMilliseconds(time_stamp), 0, 0,
wl_fixed_from_double(scale), 0);
}
void OnPointerPinchEnd(uint32_t unique_touch_event_id,
base::TimeTicks time_stamp) override {
zwp_pointer_gesture_pinch_v1_send_end(resource_, unique_touch_event_id,
TimeTicksToMilliseconds(time_stamp),
0);
}
private:
wl_resource* const resource_;
Pointer* pointer_;
DISALLOW_COPY_AND_ASSIGN(WaylandPointerGesturePinchDelegate);
};
void pointer_gesture_pinch_destroy(wl_client* client, wl_resource* resource) {
wl_resource_destroy(resource);
}
const struct zwp_pointer_gesture_pinch_v1_interface
pointer_gesture_pinch_implementation = {pointer_gesture_pinch_destroy};
void pointer_gestures_get_pinch_gesture(wl_client* client,
wl_resource* resource,
uint32_t id,
wl_resource* pointer_resource) {
Pointer* pointer = GetUserDataAs<Pointer>(pointer_resource);
wl_resource* pointer_gesture_pinch_resource = wl_resource_create(
client, &zwp_pointer_gesture_pinch_v1_interface, 1, id);
SetImplementation(pointer_gesture_pinch_resource,
&pointer_gesture_pinch_implementation,
base::MakeUnique<WaylandPointerGesturePinchDelegate>(
pointer_gesture_pinch_resource, pointer));
}
////////////////////////////////////////////////////////////////////////////////
// pointer_gestures_v1 interface:
const struct zwp_pointer_gestures_v1_interface pointer_gestures_implementation =
{pointer_gestures_get_swipe_gesture, pointer_gestures_get_pinch_gesture};
void bind_pointer_gestures(wl_client* client,
void* data,
uint32_t version,
uint32_t id) {
wl_resource* resource = wl_resource_create(
client, &zwp_pointer_gestures_v1_interface, version, id);
wl_resource_set_implementation(resource, &pointer_gestures_implementation,
data, nullptr);
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// pointer_stylus interface (deprecated) // pointer_stylus interface (deprecated)
// TODO(denniskempin): Remove once client no longer depends on this interface. // TODO(denniskempin): Remove once client no longer depends on this interface.
...@@ -4440,6 +4531,8 @@ Server::Server(Display* display) ...@@ -4440,6 +4531,8 @@ Server::Server(Display* display)
bind_stylus_v1_DEPRECATED); bind_stylus_v1_DEPRECATED);
wl_global_create(wl_display_.get(), &zcr_stylus_v2_interface, 1, display_, wl_global_create(wl_display_.get(), &zcr_stylus_v2_interface, 1, display_,
bind_stylus_v2); bind_stylus_v2);
wl_global_create(wl_display_.get(), &zwp_pointer_gestures_v1_interface, 1,
display_, bind_pointer_gestures);
wl_global_create(wl_display_.get(), &zcr_keyboard_configuration_v1_interface, wl_global_create(wl_display_.get(), &zcr_keyboard_configuration_v1_interface,
2, display_, bind_keyboard_configuration); 2, display_, bind_keyboard_configuration);
wl_global_create(wl_display_.get(), &zcr_stylus_tools_v1_interface, 1, wl_global_create(wl_display_.get(), &zcr_stylus_tools_v1_interface, 1,
......
...@@ -221,6 +221,27 @@ source_set("stylus_protocol") { ...@@ -221,6 +221,27 @@ source_set("stylus_protocol") {
public_configs = [ ":stylus_protocol_config" ] public_configs = [ ":stylus_protocol_config" ]
} }
config("pointer_gestures_protocol_config") {
include_dirs = [ "include/protocol" ]
}
source_set("pointer_gestures_protocol") {
sources = [
"include/protocol/pointer-gestures-unstable-v1-client-protocol.h",
"include/protocol/pointer-gestures-unstable-v1-server-protocol.h",
"protocol/pointer-gestures-v1-protocol.c",
]
deps = [
"//third_party/wayland:wayland_util",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":pointer_gestures_protocol_config" ]
}
config("keyboard_configuration_protocol_config") { config("keyboard_configuration_protocol_config") {
include_dirs = [ "include/protocol" ] include_dirs = [ "include/protocol" ]
} }
......
...@@ -64,4 +64,6 @@ To import a new snapshot of wayland-protocols: ...@@ -64,4 +64,6 @@ To import a new snapshot of wayland-protocols:
wayland-scanner code < unstable/keyboard/keyboard-extension-unstable-v1.xml > protocol/keyboard-extension-protocol.c wayland-scanner code < unstable/keyboard/keyboard-extension-unstable-v1.xml > protocol/keyboard-extension-protocol.c
wayland-scanner server-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-server-protocol.h wayland-scanner server-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-server-protocol.h
wayland-scanner client-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-client-protocol.h wayland-scanner client-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-client-protocol.h
wayland-scanner client-header < src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml > include/protocol/pointer-gestures-unstable-v1-client-protocol.h
wayland-scanner server-header < src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml > include/protocol/pointer-gestures-unstable-v1-server-protocol.h
- Update this README to reflect the new version number. - Update this README to reflect the new version number.
#ifndef POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H
#define POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stddef.h>
#include "wayland-util.h"
struct wl_client;
struct wl_resource;
struct zwp_pointer_gestures_v1;
struct zwp_pointer_gesture_swipe_v1;
struct zwp_pointer_gesture_pinch_v1;
extern const struct wl_interface zwp_pointer_gestures_v1_interface;
extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface;
extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface;
/**
* zwp_pointer_gestures_v1 - touchpad gestures
* @get_swipe_gesture: get swipe gesture
* @get_pinch_gesture: get pinch gesture
*
* A global interface to provide semantic touchpad gestures for a given
* pointer.
*
* Two gestures are currently supported: swipe and zoom/rotate. All
* gestures follow a three-stage cycle: begin, update, end and are
* identified by a unique id.
*
* 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 interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface 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.
*/
struct zwp_pointer_gestures_v1_interface {
/**
* get_swipe_gesture - get swipe gesture
* @id: (none)
* @pointer: (none)
*
* Create a swipe gesture object. See the
* wl_pointer_gesture_swipe interface for details.
*/
void (*get_swipe_gesture)(struct wl_client *client,
struct wl_resource *resource,
uint32_t id,
struct wl_resource *pointer);
/**
* get_pinch_gesture - get pinch gesture
* @id: (none)
* @pointer: (none)
*
* Create a pinch gesture object. See the
* wl_pointer_gesture_pinch interface for details.
*/
void (*get_pinch_gesture)(struct wl_client *client,
struct wl_resource *resource,
uint32_t id,
struct wl_resource *pointer);
};
/**
* zwp_pointer_gesture_swipe_v1 - a swipe gesture object
* @destroy: destroy the pointer swipe gesture object
*
* A swipe gesture object notifies a client about a multi-finger swipe
* gesture detected on an indirect input device such as a touchpad. The
* gesture is usually initiated by multiple fingers moving in the same
* direction but once initiated the direction may change. 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 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.
*/
struct zwp_pointer_gesture_swipe_v1_interface {
/**
* destroy - destroy the pointer swipe gesture object
*
*
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
};
#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN 0
#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE 1
#define ZWP_POINTER_GESTURE_SWIPE_V1_END 2
static inline void
zwp_pointer_gesture_swipe_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN, serial, time, surface, fingers);
}
static inline void
zwp_pointer_gesture_swipe_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE, time, dx, dy);
}
static inline void
zwp_pointer_gesture_swipe_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_END, serial, time, cancelled);
}
/**
* zwp_pointer_gesture_pinch_v1 - a pinch gesture object
* @destroy: destroy the 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 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.
*/
struct zwp_pointer_gesture_pinch_v1_interface {
/**
* destroy - destroy the pinch gesture object
*
*
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
};
#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN 0
#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE 1
#define ZWP_POINTER_GESTURE_PINCH_V1_END 2
static inline void
zwp_pointer_gesture_pinch_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_BEGIN, serial, time, surface, fingers);
}
static inline void
zwp_pointer_gesture_pinch_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, wl_fixed_t rotation)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_UPDATE, time, dx, dy, scale, rotation);
}
static inline void
zwp_pointer_gesture_pinch_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled)
{
wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_END, serial, time, cancelled);
}
#ifdef __cplusplus
}
#endif
#endif
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface;
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface;
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wl_surface_interface;
static const struct wl_interface *types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
&zwp_pointer_gesture_swipe_v1_interface,
&wl_pointer_interface,
&zwp_pointer_gesture_pinch_v1_interface,
&wl_pointer_interface,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_surface_interface,
NULL,
};
static const struct wl_message zwp_pointer_gestures_v1_requests[] = {
{ "get_swipe_gesture", "no", types + 5 },
{ "get_pinch_gesture", "no", types + 7 },
};
WL_EXPORT const struct wl_interface zwp_pointer_gestures_v1_interface = {
"zwp_pointer_gestures_v1", 1,
2, zwp_pointer_gestures_v1_requests,
0, NULL,
};
static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = {
{ "destroy", "", types + 0 },
};
static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = {
{ "begin", "uuou", types + 9 },
{ "update", "uff", types + 0 },
{ "end", "uui", types + 0 },
};
WL_EXPORT const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = {
"zwp_pointer_gesture_swipe_v1", 1,
1, zwp_pointer_gesture_swipe_v1_requests,
3, zwp_pointer_gesture_swipe_v1_events,
};
static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = {
{ "destroy", "", types + 0 },
};
static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = {
{ "begin", "uuou", types + 13 },
{ "update", "uffff", types + 0 },
{ "end", "uui", types + 0 },
};
WL_EXPORT const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = {
"zwp_pointer_gesture_pinch_v1", 1,
1, zwp_pointer_gesture_pinch_v1_requests,
3, zwp_pointer_gesture_pinch_v1_events,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment