OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/events/event.h" | 5 #include "ui/views/events/event.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "ui/base/events.h" | 14 #include "ui/base/events.h" |
15 #include "ui/base/keycodes/keyboard_code_conversion.h" | 15 #include "ui/base/keycodes/keyboard_code_conversion.h" |
16 #include "ui/base/keycodes/keyboard_code_conversion_x.h" | 16 #include "ui/base/keycodes/keyboard_code_conversion_x.h" |
17 #include "ui/base/touch/touch_factory.h" | 17 #include "ui/base/touch/touch_factory.h" |
18 #include "views/widget/root_view.h" | 18 #include "ui/views/widget/root_view.h" |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // The following two functions are copied from event_gtk.cc. These will be | 24 // The following two functions are copied from event_gtk.cc. These will be |
25 // removed when GTK dependency is removed. | 25 // removed when GTK dependency is removed. |
26 #if defined(TOOLKIT_USES_GTK) | 26 #if defined(TOOLKIT_USES_GTK) |
27 uint16 GetCharacterFromGdkKeyval(guint keyval) { | 27 uint16 GetCharacterFromGdkKeyval(guint keyval) { |
28 guint32 ch = gdk_keyval_to_unicode(keyval); | 28 guint32 ch = gdk_keyval_to_unicode(keyval); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 float slot; | 143 float slot; |
144 if (factory->ExtractTouchParam(*native_event, | 144 if (factory->ExtractTouchParam(*native_event, |
145 ui::TouchFactory::TP_SLOT_ID, &slot)) { | 145 ui::TouchFactory::TP_SLOT_ID, &slot)) { |
146 factory->SetSlotUsed(slot, type() == ui::ET_TOUCH_PRESSED); | 146 factory->SetSlotUsed(slot, type() == ui::ET_TOUCH_PRESSED); |
147 } | 147 } |
148 } | 148 } |
149 #endif | 149 #endif |
150 } | 150 } |
151 | 151 |
152 } // namespace views | 152 } // namespace views |
OLD | NEW |