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 #ifndef VIEWS_EVENTS_EVENT_H_ | 5 #ifndef VIEWS_EVENTS_EVENT_H_ |
6 #define VIEWS_EVENTS_EVENT_H_ | 6 #define VIEWS_EVENTS_EVENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 bool IsTouchEvent() const { | 83 bool IsTouchEvent() const { |
84 return type_ == ui::ET_TOUCH_RELEASED || | 84 return type_ == ui::ET_TOUCH_RELEASED || |
85 type_ == ui::ET_TOUCH_PRESSED || | 85 type_ == ui::ET_TOUCH_PRESSED || |
86 type_ == ui::ET_TOUCH_MOVED || | 86 type_ == ui::ET_TOUCH_MOVED || |
87 type_ == ui::ET_TOUCH_STATIONARY || | 87 type_ == ui::ET_TOUCH_STATIONARY || |
88 type_ == ui::ET_TOUCH_CANCELLED; | 88 type_ == ui::ET_TOUCH_CANCELLED; |
89 } | 89 } |
90 | 90 |
91 #if defined(OS_WIN) | 91 #if defined(OS_WIN) && !defined(USE_AURA) |
92 // Returns the EventFlags in terms of windows flags. | 92 // Returns the EventFlags in terms of windows flags. |
93 int GetWindowsFlags() const; | 93 int GetWindowsFlags() const; |
94 #elif defined(OS_LINUX) | 94 #elif defined(OS_LINUX) |
95 // Get the views::Event flags from a native GdkEvent. | 95 // Get the views::Event flags from a native GdkEvent. |
96 static int GetFlagsFromGdkEvent(NativeEvent native_event); | 96 static int GetFlagsFromGdkEvent(NativeEvent native_event); |
97 #endif | 97 #endif |
98 | 98 |
99 protected: | 99 protected: |
100 Event(ui::EventType type, int flags); | 100 Event(ui::EventType type, int flags); |
101 Event(NativeEvent native_event, ui::EventType type, int flags); | 101 Event(NativeEvent native_event, ui::EventType type, int flags); |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 430 |
431 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. | 431 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
432 int source_operations_; | 432 int source_operations_; |
433 | 433 |
434 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 434 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
435 }; | 435 }; |
436 | 436 |
437 } // namespace views | 437 } // namespace views |
438 | 438 |
439 #endif // VIEWS_EVENTS_EVENT_H_ | 439 #endif // VIEWS_EVENTS_EVENT_H_ |
OLD | NEW |