Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_View</code> struct representing the state | 7 * This file defines the <code>PPB_View</code> struct representing the state |
| 8 * of the view of an instance. | 8 * of the view of an instance. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 [generate_thunk] | 11 [generate_thunk] |
| 12 | 12 |
| 13 label Chrome { | 13 label Chrome { |
| 14 M18 = 1.0 | 14 M18 = 1.0, |
| 15 M27 = 1.1 | |
| 15 }; | 16 }; |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * <code>PPB_View</code> represents the state of the view of an instance. | 19 * <code>PPB_View</code> represents the state of the view of an instance. |
| 19 * You will receive new view information using | 20 * You will receive new view information using |
| 20 * <code>PPP_Instance.DidChangeView</code>. | 21 * <code>PPP_Instance.DidChangeView</code>. |
| 21 */ | 22 */ |
| 22 [macro="PPB_VIEW_INTERFACE"] | 23 [macro="PPB_VIEW_INTERFACE"] |
| 23 interface PPB_View { | 24 interface PPB_View { |
| 24 /** | 25 /** |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 * @param resource A <code>PP_Resource</code> corresponding to a | 153 * @param resource A <code>PP_Resource</code> corresponding to a |
| 153 * <code>PPB_View</code> resource. | 154 * <code>PPB_View</code> resource. |
| 154 * | 155 * |
| 155 * @param clip Output argument receiving the clip rect on success. | 156 * @param clip Output argument receiving the clip rect on success. |
| 156 * | 157 * |
| 157 * @return Returns <code>PP_TRUE</code> if the resource was valid and the | 158 * @return Returns <code>PP_TRUE</code> if the resource was valid and the |
| 158 * clip rect was filled in, <code>PP_FALSE</code> if not. | 159 * clip rect was filled in, <code>PP_FALSE</code> if not. |
| 159 */ | 160 */ |
| 160 PP_Bool GetClipRect([in] PP_Resource resource, | 161 PP_Bool GetClipRect([in] PP_Resource resource, |
| 161 [out] PP_Rect clip); | 162 [out] PP_Rect clip); |
| 163 | |
| 164 /** | |
| 165 * GetDeviceScale returns the scale factor between device pixels and DIPs | |
|
dmichael (off chromium)
2013/03/28 21:38:29
Would be nice to spell out "Device Independent Pix
Josh Horwich
2013/03/29 20:54:23
Done.
| |
| 166 * (also known as logical pixels or UI pixels on some platforms). This allows | |
| 167 * the developer to render their contents at device resolution, even as | |
| 168 * coordinates / sizes are given in DIPs through the API. | |
| 169 * | |
| 170 * Note that the coordinate system for Pepper APIs is DIPs. Also note that | |
| 171 * one DIP might not equal one CSS pixel - when page scale/zoom is in effect. | |
| 172 * | |
| 173 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 174 * <code>PPB_View</code> resource. | |
| 175 * | |
| 176 * @return A <code>float</code> value representing the number of device pixels | |
| 177 * per DIP. If the resource is invalid, the value will be 0.0. | |
| 178 */ | |
| 179 [version=1.1] | |
| 180 float_t GetDeviceScale([in] PP_Resource resource); | |
| 181 | |
| 182 /** | |
| 183 * GetCSSScale returns the scale factor between DIPs and CSS pixels. This | |
| 184 * allows proper scaling between DIPs - as sent via the Pepper API - and CSS | |
| 185 * pixel coordinates used for Web content. | |
| 186 * | |
| 187 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 188 * <code>PPB_View</code> resource. | |
| 189 * | |
| 190 * @return css_scale A <code>float</code> value representing the number of | |
| 191 * DIPs per CSS pixel. If the resource is invalid, the value will be 0.0. | |
| 192 */ | |
| 193 [version=1.1] | |
| 194 float_t GetCSSScale([in] PP_Resource resource); | |
| 162 }; | 195 }; |
| 163 | 196 |
| OLD | NEW |