cc: Remove tile and scale specific code from raster source
[chromium-blink-merge.git] / ppapi / api / ppb_instance.idl
blob794b4521a76922f0b95ac66f6d35630e862241b1
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 /**
7 * This file defines the <code>PPB_Instance</code> interface implemented by the
8 * browser and containing pointers to functions related to
9 * the module instance on a web page.
12 [generate_thunk]
14 label Chrome {
15 M14 = 1.0
18 /**
19 * The PPB_Instance interface contains pointers to functions
20 * related to the module instance on a web page.
22 interface PPB_Instance {
23 /**
24 * BindGraphics() binds the given graphics as the current display surface.
25 * The contents of this device is what will be displayed in the instance's
26 * area on the web page. The device must be a 2D or a 3D device.
28 * You can pass a <code>NULL</code> resource as the device parameter to
29 * unbind all devices from the given instance. The instance will then appear
30 * transparent. Re-binding the same device will return <code>PP_TRUE</code>
31 * and will do nothing.
33 * Any previously-bound device will be released. It is an error to bind
34 * a device when it is already bound to another instance. If you want
35 * to move a device between instances, first unbind it from the old one, and
36 * then rebind it to the new one.
38 * Binding a device will invalidate that portion of the web page to flush the
39 * contents of the new device to the screen.
41 * @param[in] instance A PP_Instance identifying one instance of a module.
42 * @param[in] device A PP_Resource corresponding to a graphics device.
44 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was
45 * successful or <code>PP_FALSE</code> if the device was not the correct
46 * type. On success, a reference to the device will be held by the
47 * instance, so the caller can release its reference if it chooses.
49 PP_Bool BindGraphics(
50 [in] PP_Instance instance,
51 [in] PP_Resource device);
53 /**
54 * IsFullFrame() determines if the instance is full-frame. Such an instance
55 * represents the entire document in a frame rather than an embedded
56 * resource. This can happen if the user does a top-level navigation or the
57 * page specifies an iframe to a resource with a MIME type registered by the
58 * module.
60 * @param[in] instance A <code>PP_Instance</code> identifying one instance
61 * of a module.
63 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the
64 * instance is full-frame.
66 PP_Bool IsFullFrame(
67 [in] PP_Instance instance);