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

Side by Side Diff: views/event_x.cc

Issue 5857002: no native implementation of Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/event_gtk.cc ('k') | views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/event.h" 5 #include "views/event.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #if defined(HAVE_XINPUT2) 8 #if defined(HAVE_XINPUT2)
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #endif 10 #endif
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 } // namespace 200 } // namespace
201 201
202 KeyEvent::KeyEvent(XEvent* xev) 202 KeyEvent::KeyEvent(XEvent* xev)
203 : Event(xev->type == KeyPress ? 203 : Event(xev->type == KeyPress ?
204 Event::ET_KEY_PRESSED : Event::ET_KEY_RELEASED, 204 Event::ET_KEY_PRESSED : Event::ET_KEY_RELEASED,
205 GetEventFlagsFromXState(xev->xkey.state)), 205 GetEventFlagsFromXState(xev->xkey.state)),
206 key_code_(app::KeyboardCodeFromXKeyEvent(xev)), 206 key_code_(app::KeyboardCodeFromXKeyEvent(xev)),
207 repeat_count_(0), 207 repeat_count_(0),
208 message_flags_(0) { 208 message_flags_(0),
209 native_event_(NULL) {
209 } 210 }
210 211
211 MouseEvent::MouseEvent(XEvent* xev) 212 MouseEvent::MouseEvent(XEvent* xev)
212 : LocatedEvent(GetMouseEventType(xev), 213 : LocatedEvent(GetMouseEventType(xev),
213 GetMouseEventLocation(xev), 214 GetMouseEventLocation(xev),
214 GetMouseEventFlags(xev)) { 215 GetMouseEventFlags(xev)) {
215 } 216 }
216 217
217 MouseWheelEvent::MouseWheelEvent(XEvent* xev) 218 MouseWheelEvent::MouseWheelEvent(XEvent* xev)
218 : LocatedEvent(Event::ET_MOUSEWHEEL, 219 : LocatedEvent(Event::ET_MOUSEWHEEL,
219 GetMouseEventLocation(xev), 220 GetMouseEventLocation(xev),
220 GetEventFlagsFromXState(xev->xbutton.state)), 221 GetEventFlagsFromXState(xev->xbutton.state)),
221 offset_(xev->xbutton.button == 4 ? 53 : -53) { // '53' is also the value 222 offset_(xev->xbutton.button == 4 ? 53 : -53) { // '53' is also the value
222 // used for GTK+. 223 // used for GTK+.
223 } 224 }
224 225
225 #if defined(HAVE_XINPUT2) 226 #if defined(HAVE_XINPUT2)
226 TouchEvent::TouchEvent(XEvent* xev) 227 TouchEvent::TouchEvent(XEvent* xev)
227 : LocatedEvent(GetTouchEventType(xev), 228 : LocatedEvent(GetTouchEventType(xev),
228 GetTouchEventLocation(xev), 229 GetTouchEventLocation(xev),
229 GetTouchEventFlags(xev)), 230 GetTouchEventFlags(xev)),
230 touch_id_(GetTouchIDFromXEvent(xev)) { 231 touch_id_(GetTouchIDFromXEvent(xev)) {
231 } 232 }
232 #endif 233 #endif
233 234
234 } // namespace views 235 } // namespace views
OLDNEW
« no previous file with comments | « views/event_gtk.cc ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698