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

Side by Side Diff: ui/events/platform/platform_event_utils.h

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 months 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
OLDNEW
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_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_
6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_ 6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "ui/events/event_constants.h" 12 #include "ui/events/event_constants.h"
13 #include "ui/events/events_export.h" 13 #include "ui/events/events_export.h"
14 #include "ui/events/keycodes/keyboard_codes.h" 14 #include "ui/events/keycodes/keyboard_codes.h"
15 #include "ui/gfx/display.h" 15 #include "ui/gfx/display.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 #if defined(OS_WIN)
19 #include <windows.h>
20 #endif
21
22 namespace gfx { 18 namespace gfx {
23 class Point; 19 class Point;
24 class Vector2d; 20 class Vector2d;
25 } 21 }
26 22
27 namespace base { 23 namespace base {
28 class TimeDelta; 24 class TimeDelta;
29 } 25 }
30 26
31 namespace ui { 27 namespace ui {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 121
126 // Returns whether this is a scroll event and optionally gets the amount to be 122 // Returns whether this is a scroll event and optionally gets the amount to be
127 // scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL. 123 // scrolled. |x_offset|, |y_offset| and |finger_count| can be NULL.
128 EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event, 124 EVENTS_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
129 float* x_offset, 125 float* x_offset,
130 float* y_offset, 126 float* y_offset,
131 float* x_offset_ordinal, 127 float* x_offset_ordinal,
132 float* y_offset_ordinal, 128 float* y_offset_ordinal,
133 int* finger_count); 129 int* finger_count);
134 130
135 #if defined(OS_WIN)
136 // Returns true if |message| identifies a mouse event that was generated as the
137 // result of a touch event.
138 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message);
139
140 // Converts scan code and lParam each other. The scan code
141 // representing an extended key contains 0xE000 bits.
142 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
143 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
144
145 #endif
146
147 } // namespace ui 131 } // namespace ui
148 132
149 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_ 133 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/platform/platform_event_builder_x_unittest.cc ('k') | ui/events/test/cocoa_test_event_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698