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

Side by Side Diff: ppapi/c/ppb_view.h

Issue 9342005: Fix some random comment problems that people have noticed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « ppapi/api/ppp_instance.idl ('k') | ppapi/c/ppp_instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5
6 /* From ppb_view.idl modified Wed Jan 4 04:40:12 2012. */ 6 /* From ppb_view.idl modified Mon Feb 6 14:05:16 2012. */
7 7
8 #ifndef PPAPI_C_PPB_VIEW_H_ 8 #ifndef PPAPI_C_PPB_VIEW_H_
9 #define PPAPI_C_PPB_VIEW_H_ 9 #define PPAPI_C_PPB_VIEW_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h" 12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_point.h" 13 #include "ppapi/c/pp_point.h"
14 #include "ppapi/c/pp_rect.h" 14 #include "ppapi/c/pp_rect.h"
15 #include "ppapi/c/pp_resource.h" 15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_size.h" 16 #include "ppapi/c/pp_size.h"
17 #include "ppapi/c/pp_stdint.h" 17 #include "ppapi/c/pp_stdint.h"
18 18
19 #define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0" 19 #define PPB_VIEW_INTERFACE_1_0 "PPB_View;1.0"
20 #define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_0 20 #define PPB_VIEW_INTERFACE PPB_VIEW_INTERFACE_1_0
21 21
22 /** 22 /**
23 * @file 23 * @file
24 * Defines the <code>PPB_View</code> struct representing the state of the 24 * Defines the <code>PPB_View</code> struct representing the state of the
25 * view of an instance. 25 * view of an instance.
26 */ 26 */
27 27
28 28
29 /** 29 /**
30 * @addtogroup Interfaces 30 * @addtogroup Interfaces
31 * @{ 31 * @{
32 */ 32 */
33 /** 33 /**
34 * <code>PPB_View</code> represents the state of the view of an instance. 34 * <code>PPB_View</code> represents the state of the view of an instance.
35 * You can get a View object with the <code>PPB_Instance.GetView()</code> 35 * You will receive new view information via
36 * function. Additionally, all </code>PPB_ViewChanged</code> objects are also
37 * <code>PPB_View</code> objects so you will receive new view information via
38 * <code>PPP_Instance.DidChangeView</code>. 36 * <code>PPP_Instance.DidChangeView</code>.
39 */ 37 */
40 struct PPB_View_1_0 { 38 struct PPB_View_1_0 {
41 /** 39 /**
42 * <code>IsView()</code> determines if the given resource is a valid 40 * <code>IsView()</code> determines if the given resource is a valid
43 * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code> 41 * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
44 * resources derive from <code>PPB_View</code> and will return true here 42 * resources derive from <code>PPB_View</code> and will return true here
45 * as well. 43 * as well.
46 * 44 *
47 * @return <code>PP_TRUE</code> if the given resource supports 45 * @return <code>PP_TRUE</code> if the given resource supports
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 * @return <code>PP_TRUE</code> if the instance is plausibly visible to the 102 * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
105 * user, <code>PP_FALSE</code> if it is definitely not visible. 103 * user, <code>PP_FALSE</code> if it is definitely not visible.
106 */ 104 */
107 PP_Bool (*IsPageVisible)(PP_Resource resource); 105 PP_Bool (*IsPageVisible)(PP_Resource resource);
108 /** 106 /**
109 * <code>GetClipRect()</code> returns the clip rectangle relative to the 107 * <code>GetClipRect()</code> returns the clip rectangle relative to the
110 * upper left corner of the instance. This rectangle indicates which parts of 108 * upper left corner of the instance. This rectangle indicates which parts of
111 * the instance are scrolled into view. 109 * the instance are scrolled into view.
112 * 110 *
113 * If the instance is scrolled off the view, the return value will be 111 * If the instance is scrolled off the view, the return value will be
114 * (0, 0, 0, 0). this state. This clip rect does <i>not</i> take into account 112 * (0, 0, 0, 0). This clip rect does <i>not</i> take into account page
115 * page visibility. This means if the instance is scrolled into view but the 113 * visibility. This means if the instance is scrolled into view but the page
116 * page itself is in an invisible tab, the return rect will contain the 114 * itself is in an invisible tab, the return rect will contain the visible
117 * visible rect assuming the page was visible. See 115 * rect assuming the page was visible. See <code>IsPageVisible()</code> and
118 * <code>IsPageVisible()</code> and <code>IsVisible()</code> if you want to 116 * <code>IsVisible()</code> if you want to handle this case.
119 * handle this case.
120 * 117 *
121 * Most applications will not need to worry about the clip. The recommended 118 * Most applications will not need to worry about the clip. The recommended
122 * behavior is to do full updates if the instance is visible as determined by 119 * behavior is to do full updates if the instance is visible as determined by
123 * <code>IsVisible()</code> and do no updates if not. 120 * <code>IsVisible()</code> and do no updates if not.
124 * 121 *
125 * However, if the cost for computing pixels is very high for your 122 * However, if the cost for computing pixels is very high for your
126 * application or the pages you're targeting frequently have very large 123 * application or the pages you're targeting frequently have very large
127 * instances with small visible portions, you may wish to optimize further. 124 * instances with small visible portions, you may wish to optimize further.
128 * In this case, the clip rect will tell you which parts of the plugin to 125 * In this case, the clip rect will tell you which parts of the plugin to
129 * update. 126 * update.
(...skipping 17 matching lines...) Expand all
147 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip); 144 PP_Bool (*GetClipRect)(PP_Resource resource, struct PP_Rect* clip);
148 }; 145 };
149 146
150 typedef struct PPB_View_1_0 PPB_View; 147 typedef struct PPB_View_1_0 PPB_View;
151 /** 148 /**
152 * @} 149 * @}
153 */ 150 */
154 151
155 #endif /* PPAPI_C_PPB_VIEW_H_ */ 152 #endif /* PPAPI_C_PPB_VIEW_H_ */
156 153
OLDNEW
« no previous file with comments | « ppapi/api/ppp_instance.idl ('k') | ppapi/c/ppp_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698