15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/**
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * This file defines the <code>PPB_View</code> struct representing the state
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * of the view of an instance.
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)[generate_thunk]
122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)label Chrome {
14c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  M18 = 1.0,
156d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)  M28 = 1.1,
161320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci  M37 = 1.2
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/**
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * <code>PPB_View</code> represents the state of the view of an instance.
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * You will receive new view information using
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * <code>PPP_Instance.DidChangeView</code>.
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)[macro="PPB_VIEW_INTERFACE"]
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)interface PPB_View {
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * IsView() determines if the given resource is a valid
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * <code>PPB_View</code> resource. Note that <code>PPB_ViewChanged</code>
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * resources derive from <code>PPB_View</code> and will return true here
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * as well.
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * <code>PPB_View</code> resource.
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return <code>PP_TRUE</code> if the given resource supports
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * <code>PPB_View</code> or <code>PP_FALSE</code> if it is an invalid
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * resource or is a resource of another type.
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool IsView([in] PP_Resource resource);
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * GetRect() retrieves the rectangle of the module instance associated
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * with a view changed notification relative to the upper-left of the browser
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * viewport. This position changes when the page is scrolled.
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * The returned rectangle may not be inside the visible portion of the
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * viewport if the module instance is scrolled off the page. Therefore, the
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * position may be negative or larger than the size of the page. The size will
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * always reflect the size of the module were it to be scrolled entirely into
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * view.
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * In general, most modules will not need to worry about the position of the
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * module instance in the viewport, and only need to use the size.
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * <code>PPB_View</code> resource.
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param rect A <code>PP_Rect</code> receiving the rectangle on success.
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return Returns <code>PP_TRUE</code> if the resource was valid and the
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * viewport rectangle was filled in, <code>PP_FALSE</code> if not.
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool GetRect([in] PP_Resource resource,
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                  [out] PP_Rect rect);
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * IsFullscreen() returns whether the instance is currently
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * displaying in fullscreen mode.
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * <code>PPB_View</code> resource.
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return <code>PP_TRUE</code> if the instance is in full screen mode,
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * or <code>PP_FALSE</code> if it's not or the resource is invalid.
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool IsFullscreen([in] PP_Resource resource);
775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * IsVisible() determines whether the module instance might be visible to
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the user. For example, the Chrome window could be minimized or another
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * window could be over it. In both of these cases, the module instance
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * would not be visible to the user, but IsVisible() will return true.
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * Use the result to speed up or stop updates for invisible module
855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * instances.
865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * This function performs the duties of GetRect() (determining whether the
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * module instance is scrolled into view and the clip rectangle is nonempty)
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * and IsPageVisible() (whether the page is visible to the user).
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
926d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * <code>PPB_View</code> resource.
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return <code>PP_TRUE</code> if the instance might be visible to the
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * user, <code>PP_FALSE</code> if it is definitely not visible.
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool IsVisible([in] PP_Resource resource);
985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * IsPageVisible() determines if the page that contains the module instance
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * is visible. The most common cause of invisible pages is that
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the page is in a background tab in the browser.
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * Most applications should use IsVisible() instead of this function since
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the module instance could be scrolled off of a visible page, and this
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * function will still return true. However, depending on how your module
1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * interacts with the page, there may be certain updates that you may want to
1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * perform when the page is visible even if your specific module instance is
1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * not visible.
1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
1126d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * <code>PPB_View</code> resource.
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return <code>PP_TRUE</code> if the instance is plausibly visible to the
1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * user, <code>PP_FALSE</code> if it is definitely not visible.
1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool IsPageVisible([in] PP_Resource resource);
1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  /**
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * GetClipRect() returns the clip rectangle relative to the upper-left corner
1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * of the module instance. This rectangle indicates the portions of the module
1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * instance that are scrolled into view.
1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * If the module instance is scrolled off the view, the return value will be
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * (0, 0, 0, 0). This clip rectangle does <i>not</i> take into account page
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * visibility. Therefore, if the module instance is scrolled into view, but
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the page itself is on a tab that is not visible, the return rectangle will
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * contain the visible rectangle as though the page were visible. Refer to
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * IsPageVisible() and IsVisible() if you want to account for page
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * visibility.
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * Most applications will not need to worry about the clip rectangle. The
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * recommended behavior is to do full updates if the module instance is
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * visible, as determined by IsVisible(), and do no updates if it is not
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * visible.
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * However, if the cost for computing pixels is very high for your
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * application, or the pages you're targeting frequently have very large
1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * module instances with small visible portions, you may wish to optimize
1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * further. In this case, the clip rectangle will tell you which parts of
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the module to update.
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * Note that painting of the page and sending of view changed updates
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * happens asynchronously. This means when the user scrolls, for example,
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * it is likely that the previous backing store of the module instance will
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * be used for the first paint, and will be updated later when your
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * application generates new content with the new clip. This may cause
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * flickering at the boundaries when scrolling. If you do choose to do
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * partial updates, you may want to think about what color the invisible
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * portions of your backing store contain (be it transparent or some
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * background color) or to paint a certain region outside the clip to reduce
1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * the visual distraction when this happens.
1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param resource A <code>PP_Resource</code> corresponding to a
1556d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * <code>PPB_View</code> resource.
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @param clip Output argument receiving the clip rect on success.
1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   *
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * @return Returns <code>PP_TRUE</code> if the resource was valid and the
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   * clip rect was filled in, <code>PP_FALSE</code> if not.
1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   */
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PP_Bool GetClipRect([in] PP_Resource resource,
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                      [out] PP_Rect clip);
164c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
165c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  /**
166c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * GetDeviceScale returns the scale factor between device pixels and Density
167c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * Independent Pixels (DIPs, also known as logical pixels or UI pixels on
168c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * some platforms). This allows the developer to render their contents at
169c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * device resolution, even as coordinates / sizes are given in DIPs through
170c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * the API.
171c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   *
172c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * Note that the coordinate system for Pepper APIs is DIPs. Also note that
173c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * one DIP might not equal one CSS pixel - when page scale/zoom is in effect.
174c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   *
175c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * @param[in] resource A <code>PP_Resource</code> corresponding to a
176c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * <code>PPB_View</code> resource.
177c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   *
178c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * @return A <code>float</code> value representing the number of device pixels
179c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * per DIP. If the resource is invalid, the value will be 0.0.
180c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   */
181c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  [version=1.1]
182c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  float_t GetDeviceScale([in] PP_Resource resource);
183c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
184c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  /**
185c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * GetCSSScale returns the scale factor between DIPs and CSS pixels. This
186c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * allows proper scaling between DIPs - as sent via the Pepper API - and CSS
187c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * pixel coordinates used for Web content.
188c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   *
189c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * @param[in] resource A <code>PP_Resource</code> corresponding to a
190c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * <code>PPB_View</code> resource.
191c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   *
192c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * @return css_scale A <code>float</code> value representing the number of
193c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   * DIPs per CSS pixel. If the resource is invalid, the value will be 0.0.
194c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)   */
195c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  [version=1.1]
196c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)  float_t GetCSSScale([in] PP_Resource resource);
1976d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)
1986d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)  /**
1996d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * GetScrollOffset returns the scroll offset of the window containing the
2006d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * plugin.
2016d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   *
2026d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * @param[in] resource A <code>PP_Resource</code> corresponding to a
2036d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * <code>PPB_View</code> resource.
2046d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   *
2056d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * @param[out] offset A <code>PP_Point</code> which will be set to the value
2066d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * of the scroll offset in CSS pixels.
2076d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   *
2086d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * @return Returns <code>PP_TRUE</code> if the resource was valid and the
2096d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   * offset was filled in, <code>PP_FALSE</code> if not.
2106d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)   */
2116d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)  [version=1.2]
2126d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)  PP_Bool GetScrollOffset([in] PP_Resource resource,
2136d86b77056ed63eb6871182f42a9fd5f07550f90Torne (Richard Coles)                          [out] PP_Point offset);
2145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
216