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 "views/events/event.h" | 5 #include "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> |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 // used by X11 internally. | 162 // used by X11 internally. |
163 key.state &= ~kIgnoredModifiers; | 163 key.state &= ~kIgnoredModifiers; |
164 uint16 ch = GetCharacterFromXKeyEvent(&key); | 164 uint16 ch = GetCharacterFromXKeyEvent(&key); |
165 return ch ? ch : | 165 return ch ? ch : |
166 GetCharacterFromKeyCode(key_code_, flags() & ui::EF_SHIFT_DOWN); | 166 GetCharacterFromKeyCode(key_code_, flags() & ui::EF_SHIFT_DOWN); |
167 } | 167 } |
168 | 168 |
169 //////////////////////////////////////////////////////////////////////////////// | 169 //////////////////////////////////////////////////////////////////////////////// |
170 // TouchEvent, public: | 170 // TouchEvent, public: |
171 | 171 |
172 TouchEvent::TouchEvent(const ui::NativeEvent& native_event) | 172 TouchEvent::TouchEvent(const base::NativeEvent& native_event) |
msw
2011/10/04 18:10:37
I *think* you can omit the base namespace here and
oshima
2011/10/04 19:42:48
This is created in accelerator_handler_touch.cc us
msw
2011/10/04 20:45:41
Okay, either way the base:: qualifier should eithe
| |
173 : LocatedEvent(native_event), | 173 : LocatedEvent(native_event), |
174 touch_id_(GetTouchIDFromXEvent(native_event)), | 174 touch_id_(GetTouchIDFromXEvent(native_event)), |
175 radius_x_(GetTouchParamFromXEvent(native_event, | 175 radius_x_(GetTouchParamFromXEvent(native_event, |
176 ui::TouchFactory::TP_TOUCH_MAJOR, | 176 ui::TouchFactory::TP_TOUCH_MAJOR, |
177 2.0) / 2.0), | 177 2.0) / 2.0), |
178 radius_y_(GetTouchParamFromXEvent(native_event, | 178 radius_y_(GetTouchParamFromXEvent(native_event, |
179 ui::TouchFactory::TP_TOUCH_MINOR, | 179 ui::TouchFactory::TP_TOUCH_MINOR, |
180 2.0) / 2.0), | 180 2.0) / 2.0), |
181 rotation_angle_(GetTouchParamFromXEvent(native_event, | 181 rotation_angle_(GetTouchParamFromXEvent(native_event, |
182 ui::TouchFactory::TP_ORIENTATION, | 182 ui::TouchFactory::TP_ORIENTATION, |
(...skipping 18 matching lines...) Expand all Loading... | |
201 float slot; | 201 float slot; |
202 if (factory->ExtractTouchParam(*native_event, | 202 if (factory->ExtractTouchParam(*native_event, |
203 ui::TouchFactory::TP_SLOT_ID, &slot)) { | 203 ui::TouchFactory::TP_SLOT_ID, &slot)) { |
204 factory->SetSlotUsed(slot, type() == ui::ET_TOUCH_PRESSED); | 204 factory->SetSlotUsed(slot, type() == ui::ET_TOUCH_PRESSED); |
205 } | 205 } |
206 } | 206 } |
207 #endif | 207 #endif |
208 } | 208 } |
209 | 209 |
210 } // namespace views | 210 } // namespace views |
OLD | NEW |