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

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

Issue 659883002: Enable hidpi on Linux, refactor a bit on Windows to share Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: constants Created 6 years, 1 month 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 #include <windowsx.h> 5 #include <windowsx.h>
6 6
7 #include "ui/events/event_constants.h" 7 #include "ui/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/events/event_utils.h" 12 #include "ui/events/event_utils.h"
13 #include "ui/events/keycodes/keyboard_code_conversion_win.h" 13 #include "ui/events/keycodes/keyboard_code_conversion_win.h"
14 #include "ui/gfx/point.h" 14 #include "ui/gfx/point.h"
15 #include "ui/gfx/win/dpi.h"
16 15
17 namespace ui { 16 namespace ui {
18 17
19 namespace { 18 namespace {
20 19
21 // From MSDN: "Mouse" events are flagged with 0xFF515700 if they come 20 // 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 21 // from a touch or stylus device. In Vista or later, they are also flagged
23 // with 0x80 if they come from touch. 22 // with 0x80 if they come from touch.
24 #define MOUSEEVENTF_FROMTOUCH (0xFF515700 | 0x80) 23 #define MOUSEEVENTF_FROMTOUCH (0xFF515700 | 0x80)
25 24
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 404 }
406 405
407 LPARAM GetLParamFromScanCode(uint16 scan_code) { 406 LPARAM GetLParamFromScanCode(uint16 scan_code) {
408 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16; 407 LPARAM l_param = static_cast<LPARAM>(scan_code & 0x00FF) << 16;
409 if ((scan_code & 0xE000) == 0xE000) 408 if ((scan_code & 0xE000) == 0xE000)
410 l_param |= (1 << 24); 409 l_param |= (1 << 24);
411 return l_param; 410 return l_param;
412 } 411 }
413 412
414 } // namespace ui 413 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_suite.cc ('k') | ui/gfx/BUILD.gn » ('j') | ui/gfx/dpi.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698