Invalidate scans when the host volume is unmounted.
[chromium-blink-merge.git] / ppapi / c / ppb_instance.h
blob70872561f9ad6eef8910087093ee34e1710d3b89
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 /* From ppb_instance.idl modified Fri Dec 07 12:57:46 2012. */
8 #ifndef PPAPI_C_PPB_INSTANCE_H_
9 #define PPAPI_C_PPB_INSTANCE_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h"
17 #define PPB_INSTANCE_INTERFACE_1_0 "PPB_Instance;1.0"
18 #define PPB_INSTANCE_INTERFACE PPB_INSTANCE_INTERFACE_1_0
20 /**
21 * @file
22 * This file defines the <code>PPB_Instance</code> interface implemented by the
23 * browser and containing pointers to functions related to
24 * the module instance on a web page.
28 /**
29 * @addtogroup Interfaces
30 * @{
32 /**
33 * The PPB_Instance interface contains pointers to functions
34 * related to the module instance on a web page.
36 struct PPB_Instance_1_0 {
37 /**
38 * BindGraphics() binds the given graphics as the current display surface.
39 * The contents of this device is what will be displayed in the instance's
40 * area on the web page. The device must be a 2D or a 3D device.
42 * You can pass a <code>NULL</code> resource as the device parameter to
43 * unbind all devices from the given instance. The instance will then appear
44 * transparent. Re-binding the same device will return <code>PP_TRUE</code>
45 * and will do nothing.
47 * Any previously-bound device will be released. It is an error to bind
48 * a device when it is already bound to another instance. If you want
49 * to move a device between instances, first unbind it from the old one, and
50 * then rebind it to the new one.
52 * Binding a device will invalidate that portion of the web page to flush the
53 * contents of the new device to the screen.
55 * @param[in] instance A PP_Instance identifying one instance of a module.
56 * @param[in] device A PP_Resource corresponding to a graphics device.
58 * @return <code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was
59 * successful or <code>PP_FALSE</code> if the device was not the correct
60 * type. On success, a reference to the device will be held by the
61 * instance, so the caller can release its reference if it chooses.
63 PP_Bool (*BindGraphics)(PP_Instance instance, PP_Resource device);
64 /**
65 * IsFullFrame() determines if the instance is full-frame. Such an instance
66 * represents the entire document in a frame rather than an embedded
67 * resource. This can happen if the user does a top-level navigation or the
68 * page specifies an iframe to a resource with a MIME type registered by the
69 * module.
71 * @param[in] instance A <code>PP_Instance</code> identifying one instance
72 * of a module.
74 * @return A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the
75 * instance is full-frame.
77 PP_Bool (*IsFullFrame)(PP_Instance instance);
80 typedef struct PPB_Instance_1_0 PPB_Instance;
81 /**
82 * @}
85 #endif /* PPAPI_C_PPB_INSTANCE_H_ */