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

Side by Side Diff: ppapi/c/private/ppb_view_private.h

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
OLDNEW
(Empty)
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 */
5
6 /* From private/ppb_view_private.idl modified Thu Jun 14 16:33:34 2012. */
7
8 #ifndef PPAPI_C_PRIVATE_PPB_VIEW_PRIVATE_H_
9 #define PPAPI_C_PRIVATE_PPB_VIEW_PRIVATE_H_
10
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_stdint.h"
15
16 #define PPB_VIEW_PRIVATE_INTERFACE_0_1 "PPB_View_Private;0.1"
17 #define PPB_VIEW_PRIVATE_INTERFACE PPB_VIEW_PRIVATE_INTERFACE_0_1
18
19 /**
20 * @file
21 * This file contains the <code>PPB_View_Private</code> interface. */
22
23
24 /**
25 * @addtogroup Interfaces
26 * @{
27 */
28 /* PPB_View_Private interface */
29 struct PPB_View_Private_0_1 {
30 /**
31 * GetDeviceScale returns the scale factor between device pixels and DIPs
32 * (also known as logical pixels or UI pixels on some platforms). This allows
33 * the developer to render their contents at device resolution, even as
34 * coordinates / sizes are given in DIPs through the API.
35 *
36 * Note that the coordinate system for Pepper APIs is DIPs. Also note that
37 * one DIP might not equal one CSS pixel - when page scale/zoom is in effect.
38 *
39 * @param[in] resource A <code>PP_Resource</code> corresponding to a
40 * <code>PPB_View</code> resource.
41 *
42 * @param[out] device_scale A <code>float</code> value representing the number
43 * of device pixels per DIP.
44 *
45 * @return Returns <code>PP_TRUE</code> if the resource was valid and the
46 * scale was filled in, <code>PP_FALSE</code> if not.
47 */
48 PP_Bool (*GetDeviceScale)(PP_Resource resource, float* device_scale);
49 /**
50 * GetCSSScale returns the scale factor between DIPs and CSS pixels. This
51 * allows proper scaling between DIPs - as sent via the Pepper API - and CSS
52 * pixel coordinates used for Web content.
53 *
54 * @param[in] resource A <code>PP_Resource</code> corresponding to a
55 * <code>PPB_View</code> resource.
56 *
57 * @param[out] css_scale A <code>float</code> value representing the number of
58 * DIPs per CSS pixel.
59 *
60 * @return Returns <code>PP_TRUE</code> if the resource was valid and the
61 * scale was filled in, <code>PP_FALSE</code> if not.
62 */
63 PP_Bool (*GetCSSScale)(PP_Resource resource, float* css_scale);
64 };
65
66 typedef struct PPB_View_Private_0_1 PPB_View_Private;
67 /**
68 * @}
69 */
70
71 #endif /* PPAPI_C_PRIVATE_PPB_VIEW_PRIVATE_H_ */
72
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698