• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  // Copyright (c) 2015 The Chromium Embedded Framework Authors. All rights
2  // reserved. Use of this source code is governed by a BSD-style license that
3  // can be found in the LICENSE file.
4  
5  #ifndef CEF_TESTS_SHARED_BROWSER_GEOMETRY_UTIL_H_
6  #define CEF_TESTS_SHARED_BROWSER_GEOMETRY_UTIL_H_
7  #pragma once
8  
9  #include "include/internal/cef_types_wrappers.h"
10  
11  namespace client {
12  
13  // Convert |value| from logical coordinates to device coordinates.
14  int LogicalToDevice(int value, float device_scale_factor);
15  CefRect LogicalToDevice(const CefRect& value, float device_scale_factor);
16  
17  // Convert |value| from device coordinates to logical coordinates.
18  int DeviceToLogical(int value, float device_scale_factor);
19  void DeviceToLogical(CefMouseEvent& value, float device_scale_factor);
20  void DeviceToLogical(CefTouchEvent& value, float device_scale_factor);
21  
22  }  // namespace client
23  
24  #endif  // CEF_TESTS_SHARED_BROWSER_GEOMETRY_UTIL_H_
25