Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef VIEWS_EVENT_H_ | 5 #ifndef VIEWS_EVENT_H_ |
| 6 #define VIEWS_EVENT_H_ | 6 #define VIEWS_EVENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "app/keyboard_codes.h" | 9 #include "app/keyboard_codes.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 // | 324 // |
| 325 //////////////////////////////////////////////////////////////////////////////// | 325 //////////////////////////////////////////////////////////////////////////////// |
| 326 class KeyEvent : public Event { | 326 class KeyEvent : public Event { |
| 327 public: | 327 public: |
| 328 // Create a new key event | 328 // Create a new key event |
| 329 KeyEvent(EventType type, | 329 KeyEvent(EventType type, |
| 330 app::KeyboardCode key_code, | 330 app::KeyboardCode key_code, |
| 331 int event_flags, | 331 int event_flags, |
| 332 int repeat_count, | 332 int repeat_count, |
| 333 int message_flags); | 333 int message_flags); |
| 334 #if defined(OS_LINUX) | 334 #if defined(OS_LINUX) |
|
rjkroege
2010/12/15 21:23:31
and !touchui
oshima
2010/12/16 01:15:19
touch still need this to compile
| |
| 335 explicit KeyEvent(GdkEventKey* event); | 335 explicit KeyEvent(const GdkEventKey* event); |
| 336 const GdkEventKey* native_event() const { return native_event_; } | |
| 336 #endif | 337 #endif |
| 337 | 338 |
| 338 #if defined(TOUCH_UI) | 339 #if defined(TOUCH_UI) |
| 339 // Create a key event from an X key event. | 340 // Create a key event from an X key event. |
| 340 explicit KeyEvent(XEvent* xevent); | 341 explicit KeyEvent(XEvent* xevent); |
| 341 #endif | 342 #endif |
| 342 | 343 |
| 343 // This returns a VKEY_ value as defined in app/keyboard_codes.h which is | 344 // This returns a VKEY_ value as defined in app/keyboard_codes.h which is |
| 344 // the Windows value. | 345 // the Windows value. |
| 345 // On GTK, you can use the methods in keyboard_code_conversion_gtk.cc to | 346 // On GTK, you can use the methods in keyboard_code_conversion_gtk.cc to |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 359 #if defined(OS_WIN) | 360 #if defined(OS_WIN) |
| 360 // Returns the current state of the KeyState. | 361 // Returns the current state of the KeyState. |
| 361 static int GetKeyStateFlags(); | 362 static int GetKeyStateFlags(); |
| 362 #endif | 363 #endif |
| 363 | 364 |
| 364 private: | 365 private: |
| 365 | 366 |
| 366 app::KeyboardCode key_code_; | 367 app::KeyboardCode key_code_; |
| 367 int repeat_count_; | 368 int repeat_count_; |
| 368 int message_flags_; | 369 int message_flags_; |
| 369 | 370 #if defined(OS_LINUX) |
|
rjkroege
2010/12/15 21:23:31
and !touchui
| |
| 371 const GdkEventKey* native_event_; | |
| 372 #endif | |
| 370 DISALLOW_COPY_AND_ASSIGN(KeyEvent); | 373 DISALLOW_COPY_AND_ASSIGN(KeyEvent); |
| 371 }; | 374 }; |
| 372 | 375 |
| 373 //////////////////////////////////////////////////////////////////////////////// | 376 //////////////////////////////////////////////////////////////////////////////// |
| 374 // | 377 // |
| 375 // MouseWheelEvent class | 378 // MouseWheelEvent class |
| 376 // | 379 // |
| 377 // A MouseWheelEvent is used to propagate mouse wheel user events | 380 // A MouseWheelEvent is used to propagate mouse wheel user events |
| 378 // | 381 // |
| 379 //////////////////////////////////////////////////////////////////////////////// | 382 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 private: | 430 private: |
| 428 const OSExchangeData& data_; | 431 const OSExchangeData& data_; |
| 429 int source_operations_; | 432 int source_operations_; |
| 430 | 433 |
| 431 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 434 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
| 432 }; | 435 }; |
| 433 | 436 |
| 434 } // namespace views | 437 } // namespace views |
| 435 | 438 |
| 436 #endif // VIEWS_EVENT_H_ | 439 #endif // VIEWS_EVENT_H_ |
| OLD | NEW |