Roll Syzygy deps to 0.8.6.4.
[chromium-blink-merge.git] / ppapi / c / dev / ppb_view_dev.h
blob19951936317b76996e3cf6a59ce45a656d57c29f
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
3 * found in the LICENSE file.
4 */
6 /* From dev/ppb_view_dev.idl modified Mon Jun 18 14:55:58 2012. */
8 #ifndef PPAPI_C_DEV_PPB_VIEW_DEV_H_
9 #define PPAPI_C_DEV_PPB_VIEW_DEV_H_
11 #include "ppapi/c/pp_macros.h"
12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/pp_stdint.h"
15 #define PPB_VIEW_DEV_INTERFACE_0_1 "PPB_View(Dev);0.1"
16 #define PPB_VIEW_DEV_INTERFACE PPB_VIEW_DEV_INTERFACE_0_1
18 /**
19 * @file
20 * This file contains the <code>PPB_View_Dev</code> interface. */
23 /**
24 * @addtogroup Interfaces
25 * @{
27 /* PPB_View_Dev interface */
28 struct PPB_View_Dev_0_1 {
29 /**
30 * GetDeviceScale returns the scale factor between device pixels and DIPs
31 * (also known as logical pixels or UI pixels on some platforms). This allows
32 * the developer to render their contents at device resolution, even as
33 * coordinates / sizes are given in DIPs through the API.
35 * Note that the coordinate system for Pepper APIs is DIPs. Also note that
36 * one DIP might not equal one CSS pixel - when page scale/zoom is in effect.
38 * @param[in] resource A <code>PP_Resource</code> corresponding to a
39 * <code>PPB_View</code> resource.
41 * @return A <code>float</code> value representing the number of device pixels
42 * per DIP. If the resource is invalid, the value will be 0.0.
44 float (*GetDeviceScale)(PP_Resource resource);
45 /**
46 * GetCSSScale returns the scale factor between DIPs and CSS pixels. This
47 * allows proper scaling between DIPs - as sent via the Pepper API - and CSS
48 * pixel coordinates used for Web content.
50 * @param[in] resource A <code>PP_Resource</code> corresponding to a
51 * <code>PPB_View</code> resource.
53 * @return css_scale A <code>float</code> value representing the number of
54 * DIPs per CSS pixel. If the resource is invalid, the value will be 0.0.
56 float (*GetCSSScale)(PP_Resource resource);
59 typedef struct PPB_View_Dev_0_1 PPB_View_Dev;
60 /**
61 * @}
64 #endif /* PPAPI_C_DEV_PPB_VIEW_DEV_H_ */