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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
7
8 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
9 #include "ui/ozone/platform/wayland/wayland_object.h"
10
11 namespace ui {
12
13 class WaylandKeyboard {
14 public:
15 WaylandKeyboard(wl_keyboard* keyboard, const EventDispatchCallback& callback);
16 virtual ~WaylandKeyboard();
17
18 private:
19 // wl_keyboard_listener
20 static void Keymap(void* data,
21 wl_keyboard* obj,
22 uint32_t format,
23 int32_t fd,
24 uint32_t size);
25 static void Enter(void* data,
26 wl_keyboard* obj,
27 uint32_t serial,
28 wl_surface* surface,
29 wl_array* keys);
30 static void Leave(void* data,
31 wl_keyboard* obj,
32 uint32_t serial,
33 wl_surface* surface);
34 static void Key(void* data,
35 wl_keyboard* obj,
36 uint32_t serial,
37 uint32_t time,
38 uint32_t key,
39 uint32_t state);
40 static void Modifiers(void* data,
41 wl_keyboard* obj,
42 uint32_t serial,
43 uint32_t mods_depressed,
44 uint32_t mods_latched,
45 uint32_t mods_locked,
46 uint32_t group);
47 static void RepeatInfo(void* data,
48 wl_keyboard* obj,
49 int32_t rate,
50 int32_t delay);
51
52 wl::Object<wl_keyboard> obj_;
53 EventDispatchCallback callback_;
54 uint8_t modifiers_ = 0;
55 };
56
57 } // namespace ui
58
59 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_KEYBOARD_H_
OLDNEW
« 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