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

Unified Diff: ui/ozone/platform/wayland/wayland_keyboard.h

Issue 2639053002: [ozone/wayland] Implement basic keyboard handling support (Closed)
Patch Set: addressed kpschoedel's review Created 3 years, 11 months 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
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection.cc ('k') | ui/ozone/platform/wayland/wayland_keyboard.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/wayland_keyboard.h
diff --git a/ui/ozone/platform/wayland/wayland_keyboard.h b/ui/ozone/platform/wayland/wayland_keyboard.h
new file mode 100644
index 0000000000000000000000000000000000000000..a44cf0edb8f0909487497e8a89e95b259b62ee70
--- /dev/null
+++ b/ui/ozone/platform/wayland/wayland_keyboard.h
@@ -0,0 +1,59 @@
+// Copyright 2016 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 UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
+#define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
+
+#include "ui/events/ozone/evdev/event_dispatch_callback.h"
+#include "ui/ozone/platform/wayland/wayland_object.h"
+
+namespace ui {
+
+class WaylandKeyboard {
+ public:
+ WaylandKeyboard(wl_keyboard* keyboard, const EventDispatchCallback& callback);
+ virtual ~WaylandKeyboard();
+
+ private:
+ // wl_keyboard_listener
+ static void Keymap(void* data,
+ wl_keyboard* obj,
+ uint32_t format,
+ int32_t fd,
+ uint32_t size);
+ static void Enter(void* data,
+ wl_keyboard* obj,
+ uint32_t serial,
+ wl_surface* surface,
+ wl_array* keys);
+ static void Leave(void* data,
+ wl_keyboard* obj,
+ uint32_t serial,
+ wl_surface* surface);
+ static void Key(void* data,
+ wl_keyboard* obj,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t key,
+ uint32_t state);
+ static void Modifiers(void* data,
+ wl_keyboard* obj,
+ uint32_t serial,
+ uint32_t mods_depressed,
+ uint32_t mods_latched,
+ uint32_t mods_locked,
+ uint32_t group);
+ static void RepeatInfo(void* data,
+ wl_keyboard* obj,
+ int32_t rate,
+ int32_t delay);
+
+ wl::Object<wl_keyboard> obj_;
+ EventDispatchCallback callback_;
+ uint8_t modifiers_ = 0;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
« no previous file with comments | « ui/ozone/platform/wayland/wayland_connection.cc ('k') | ui/ozone/platform/wayland/wayland_keyboard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698