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

Side by Side Diff: ui/base/win/events_win.cc

Issue 23769011: Move a bunch of windows stuff from ui/base/win to ui/gfx/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bustage. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/ui_base_switches.cc ('k') | ui/base/win/foreground_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <windowsx.h> 5 #include <windowsx.h>
6 6
7 #include "ui/base/events/event_constants.h" 7 #include "ui/base/events/event_constants.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "base/win/win_util.h" 11 #include "base/win/win_util.h"
12 #include "ui/base/events/event_utils.h" 12 #include "ui/base/events/event_utils.h"
13 #include "ui/base/keycodes/keyboard_code_conversion_win.h" 13 #include "ui/base/keycodes/keyboard_code_conversion_win.h"
14 #include "ui/gfx/dpi_win.h"
15 #include "ui/gfx/point.h" 14 #include "ui/gfx/point.h"
15 #include "ui/gfx/win/dpi.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 namespace { 19 namespace {
20 20
21 // From MSDN: "Mouse" events are flagged with 0xFF515700 if they come 21 // From MSDN: "Mouse" events are flagged with 0xFF515700 if they come
22 // from a touch or stylus device. In Vista or later, they are also flagged 22 // from a touch or stylus device. In Vista or later, they are also flagged
23 // with 0x80 if they come from touch. 23 // with 0x80 if they come from touch.
24 #define MOUSEEVENTF_FROMTOUCH (0xFF515700 | 0x80) 24 #define MOUSEEVENTF_FROMTOUCH (0xFF515700 | 0x80)
25 25
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 // Windows emulates mouse messages for touch events. 365 // Windows emulates mouse messages for touch events.
366 bool IsMouseEventFromTouch(UINT message) { 366 bool IsMouseEventFromTouch(UINT message) {
367 return (message >= WM_MOUSEFIRST) && (message <= WM_MOUSELAST) && 367 return (message >= WM_MOUSEFIRST) && (message <= WM_MOUSELAST) &&
368 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) == 368 (GetMessageExtraInfo() & MOUSEEVENTF_FROMTOUCH) ==
369 MOUSEEVENTF_FROMTOUCH; 369 MOUSEEVENTF_FROMTOUCH;
370 } 370 }
371 371
372 } // namespace ui 372 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ui_base_switches.cc ('k') | ui/base/win/foreground_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698