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

Unified Diff: ui/events/ozone/layout/xkb/xkb.h

Issue 778503002: XKB implementation of Ozone key layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@x430194-layout
Patch Set: revise in preparation for VKEY determination Created 6 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: ui/events/ozone/layout/xkb/xkb.h
diff --git a/ui/events/ozone/layout/xkb/xkb.h b/ui/events/ozone/layout/xkb/xkb.h
new file mode 100644
index 0000000000000000000000000000000000000000..b74db80a95ee1a4a90b7a4c931dd42a6f6e1f4a9
--- /dev/null
+++ b/ui/events/ozone/layout/xkb/xkb.h
@@ -0,0 +1,28 @@
+// Copyright 2014 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_EVENTS_OZONE_LAYOUT_XKB_XKB_TYPES_H_
+#define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_TYPES_H_
+
+#if defined(USE_X11)
+#include <X11/XKBlib.h>
+#else
+#include <xkbcommon/xkbcommon.h>
+#endif
+
+namespace ui {
+
+#if defined(USE_X11)
+using XkbKeyCode = decltype(XKeyEvent.keycode);
+using XkbFlags = decltype(XKeyEvent.state);
+using XkbKeySym = KeySym;
+#else
+using XkbKeyCode = xkb_keycode_t;
+using XkbFlags = xkb_mod_mask_t;
+using XkbKeySym = xkb_keysym_t;
+#endif
+
+} // namespace ui
+
+#endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_TYPES_H_

Powered by Google App Engine
This is Rietveld 408576698