| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_BASE_EVENTS_EVENT_H_ | 5 #ifndef UI_BASE_EVENTS_EVENT_H_ |
| 6 #define UI_BASE_EVENTS_EVENT_H_ | 6 #define UI_BASE_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 // Set the click count for a mousedown message. Can be 1, 2 or 3. | 335 // Set the click count for a mousedown message. Can be 1, 2 or 3. |
| 336 void SetClickCount(int click_count); | 336 void SetClickCount(int click_count); |
| 337 | 337 |
| 338 // Identifies the button that changed. During a press this corresponds to the | 338 // Identifies the button that changed. During a press this corresponds to the |
| 339 // button that was pressed and during a release this corresponds to the button | 339 // button that was pressed and during a release this corresponds to the button |
| 340 // that was released. | 340 // that was released. |
| 341 // NOTE: during a press and release flags() contains the complete set of | 341 // NOTE: during a press and release flags() contains the complete set of |
| 342 // flags. Use this to determine the button that was pressed or released. | 342 // flags. Use this to determine the button that was pressed or released. |
| 343 int changed_button_flags() const { return changed_button_flags_; } | 343 int changed_button_flags() const { return changed_button_flags_; } |
| 344 | 344 |
| 345 void set_changed_button_flags(int flags) { changed_button_flags_ = flags; } |
| 346 |
| 345 private: | 347 private: |
| 346 // Returns the repeat count based on the previous mouse click, if it is | 348 // Returns the repeat count based on the previous mouse click, if it is |
| 347 // recent enough and within a small enough distance. | 349 // recent enough and within a small enough distance. |
| 348 static int GetRepeatCount(const MouseEvent& click_event); | 350 static int GetRepeatCount(const MouseEvent& click_event); |
| 349 | 351 |
| 350 gfx::Point root_location_; | 352 gfx::Point root_location_; |
| 351 | 353 |
| 352 // See description above getter for details. | 354 // See description above getter for details. |
| 353 int changed_button_flags_; | 355 int changed_button_flags_; |
| 354 | 356 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 // This value is stored as a bitfield because the number of touch ids varies, | 635 // This value is stored as a bitfield because the number of touch ids varies, |
| 634 // but we currently don't need more than 32 touches at a time. | 636 // but we currently don't need more than 32 touches at a time. |
| 635 const unsigned int touch_ids_bitfield_; | 637 const unsigned int touch_ids_bitfield_; |
| 636 | 638 |
| 637 DISALLOW_COPY_AND_ASSIGN(GestureEvent); | 639 DISALLOW_COPY_AND_ASSIGN(GestureEvent); |
| 638 }; | 640 }; |
| 639 | 641 |
| 640 } // namespace ui | 642 } // namespace ui |
| 641 | 643 |
| 642 #endif // UI_BASE_EVENTS_EVENT_H_ | 644 #endif // UI_BASE_EVENTS_EVENT_H_ |
| OLD | NEW |