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

Unified Diff: third_party/wayland-protocols/protocol/stylus-protocol-v2.c

Issue 2560493003: wayland-protocols: Add zcr_stylus_v2 protocol for touch based stylus (Closed)
Patch Set: apply v1 update to v2. Created 4 years 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/protocol/stylus-protocol-v2.c
diff --git a/third_party/wayland-protocols/protocol/stylus-protocol.c b/third_party/wayland-protocols/protocol/stylus-protocol-v2.c
similarity index 63%
rename from third_party/wayland-protocols/protocol/stylus-protocol.c
rename to third_party/wayland-protocols/protocol/stylus-protocol-v2.c
index e84e4bbbd0a218aba2ad09e241cf1baa75e8e3da..b3f143faeea5854dc85c846a1561a6cfd2f1830b 100644
--- a/third_party/wayland-protocols/protocol/stylus-protocol.c
+++ b/third_party/wayland-protocols/protocol/stylus-protocol-v2.c
@@ -27,40 +27,41 @@
#include <stdint.h>
#include "wayland-util.h"
-extern const struct wl_interface wl_pointer_interface;
-extern const struct wl_interface zcr_pointer_stylus_v1_interface;
+extern const struct wl_interface wl_touch_interface;
+extern const struct wl_interface zcr_touch_stylus_v2_interface;
static const struct wl_interface *types[] = {
NULL,
NULL,
NULL,
- &zcr_pointer_stylus_v1_interface,
- &wl_pointer_interface,
+ NULL,
+ &zcr_touch_stylus_v2_interface,
+ &wl_touch_interface,
};
-static const struct wl_message zcr_stylus_v1_requests[] = {
- { "get_pointer_stylus", "no", types + 3 },
+static const struct wl_message zcr_stylus_v2_requests[] = {
+ { "get_touch_stylus", "no", types + 4 },
};
-WL_EXPORT const struct wl_interface zcr_stylus_v1_interface = {
- "zcr_stylus_v1", 2,
- 1, zcr_stylus_v1_requests,
+WL_EXPORT const struct wl_interface zcr_stylus_v2_interface = {
+ "zcr_stylus_v2", 1,
+ 1, zcr_stylus_v2_requests,
0, NULL,
};
-static const struct wl_message zcr_pointer_stylus_v1_requests[] = {
+static const struct wl_message zcr_touch_stylus_v2_requests[] = {
{ "destroy", "", types + 0 },
};
-static const struct wl_message zcr_pointer_stylus_v1_events[] = {
- { "tool_change", "u", types + 0 },
- { "force", "uf", types + 0 },
- { "tilt", "uff", types + 0 },
+static const struct wl_message zcr_touch_stylus_v2_events[] = {
+ { "tool", "uu", types + 0 },
+ { "force", "uuf", types + 0 },
+ { "tilt", "uuff", types + 0 },
};
-WL_EXPORT const struct wl_interface zcr_pointer_stylus_v1_interface = {
- "zcr_pointer_stylus_v1", 1,
- 1, zcr_pointer_stylus_v1_requests,
- 3, zcr_pointer_stylus_v1_events,
+WL_EXPORT const struct wl_interface zcr_touch_stylus_v2_interface = {
+ "zcr_touch_stylus_v2", 1,
+ 1, zcr_touch_stylus_v2_requests,
+ 3, zcr_touch_stylus_v2_events,
};

Powered by Google App Engine
This is Rietveld 408576698