blob: 4abe2167f31a603d4db2b22e11755814aed11a71 [file] [log] [blame]
{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_Instance Struct Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="PPB_Instance" --><h2>
Data Fields</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___instance__1__0.html#ae5b0da2fc0975c82213f687d96434625">BindGraphics</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> device)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___instance__1__0.html#a1a7dc39b5aa46596c91299047c6ab8b2">IsFullFrame</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The PPB_Instance interface contains pointers to functions related to the module instance on a web page. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="ae5b0da2fc0975c82213f687d96434625"></a><!-- doxytag: member="PPB_Instance::BindGraphics" ref="ae5b0da2fc0975c82213f687d96434625" args=")(PP_Instance instance, PP_Resource device)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___instance__1__0.html#ae5b0da2fc0975c82213f687d96434625">PPB_Instance::BindGraphics</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> device)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___instance__1__0.html#ae5b0da2fc0975c82213f687d96434625" title="BindGraphics() binds the given graphics as the current display surface.">BindGraphics()</a> binds the given graphics as the current display surface. </p>
<p>The contents of this device is what will be displayed in the instance's area on the web page. The device must be a 2D or a 3D device.</p>
<p>You can pass a <code>NULL</code> resource as the device parameter to unbind all devices from the given instance. The instance will then appear transparent. Re-binding the same device will return <code>PP_TRUE</code> and will do nothing.</p>
<p>Any previously-bound device will be released. It is an error to bind a device when it is already bound to another instance. If you want to move a device between instances, first unbind it from the old one, and then rebind it to the new one.</p>
<p>Binding a device will invalidate that portion of the web page to flush the contents of the new device to the screen.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A PP_Instance identifying one instance of a module. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>A PP_Resource corresponding to a graphics device.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_Bool</code> containing <code>PP_TRUE</code> if bind was successful or <code>PP_FALSE</code> if the device was not the correct type. On success, a reference to the device will be held by the instance, so the caller can release its reference if it chooses. </dd></dl>
</div>
</div>
<a class="anchor" id="a1a7dc39b5aa46596c91299047c6ab8b2"></a><!-- doxytag: member="PPB_Instance::IsFullFrame" ref="a1a7dc39b5aa46596c91299047c6ab8b2" args=")(PP_Instance instance)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___instance__1__0.html#a1a7dc39b5aa46596c91299047c6ab8b2">PPB_Instance::IsFullFrame</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="struct_p_p_b___instance__1__0.html#a1a7dc39b5aa46596c91299047c6ab8b2" title="IsFullFrame() determines if the instance is full-frame.">IsFullFrame()</a> determines if the instance is full-frame. </p>
<p>Such an instance represents the entire document in a frame rather than an embedded resource. This can happen if the user does a top-level navigation or the page specifies an iframe to a resource with a MIME type registered by the module.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> containing <code>PP_TRUE</code> if the instance is full-frame. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__instance_8h.html">ppb_instance.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}