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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 type_ == ui::ET_TOUCH_MOVED || | 77 type_ == ui::ET_TOUCH_MOVED || |
78 type_ == ui::ET_TOUCH_STATIONARY || | 78 type_ == ui::ET_TOUCH_STATIONARY || |
79 type_ == ui::ET_TOUCH_CANCELLED; | 79 type_ == ui::ET_TOUCH_CANCELLED; |
80 } | 80 } |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
84 // Returns the EventFlags in terms of windows flags. | 84 // Returns the EventFlags in terms of windows flags. |
85 int GetWindowsFlags() const; | 85 int GetWindowsFlags() const; |
86 #elif defined(OS_LINUX) | 86 #elif defined(OS_LINUX) |
87 // Convert the state member on a GdkEvent to views::Event flags | 87 // Get the views::Event flags from a native GdkEvent. |
88 static int GetFlagsFromGdkState(unsigned int state); | 88 static int GetFlagsFromGdkEvent(NativeEvent native_event); |
89 #endif | 89 #endif |
90 | 90 |
91 protected: | 91 protected: |
92 Event(ui::EventType type, int flags); | 92 Event(ui::EventType type, int flags); |
93 Event(NativeEvent native_event, ui::EventType type, int flags); | 93 Event(NativeEvent native_event, ui::EventType type, int flags); |
94 // Because the world is complicated, sometimes we have two different kinds of | 94 // Because the world is complicated, sometimes we have two different kinds of |
95 // NativeEvent in play in the same executable. See native_types.h for the tale | 95 // NativeEvent in play in the same executable. See native_types.h for the tale |
96 // of woe. | 96 // of woe. |
97 Event(NativeEvent2 native_event, ui::EventType type, int flags, | 97 Event(NativeEvent2 native_event, ui::EventType type, int flags, |
98 FromNativeEvent2); | 98 FromNativeEvent2); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 394 |
395 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. | 395 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. |
396 int source_operations_; | 396 int source_operations_; |
397 | 397 |
398 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); | 398 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
399 }; | 399 }; |
400 | 400 |
401 } // namespace views | 401 } // namespace views |
402 | 402 |
403 #endif // VIEWS_EVENTS_EVENT_H_ | 403 #endif // VIEWS_EVENTS_EVENT_H_ |
OLD | NEW |