Home | History | Annotate | Download | only in c
      1 {{+bindTo:partials.standard_nacl_api}}
      2 <h1>Typedefs</h1>
      3 <div id="doxygen-ref">
      4 {{- dummy div to appease doxygen -}}
      5   <div>
      6 <!-- Generated by Doxygen 1.7.6.1 -->
      7 
      8 </div>
      9 <!--header-->
     10 <div class="contents">
     11 <h2>
     12 Typedefs</h2><table class="memberdecls">
     13 
     14 <tr><td class="memItemLeft" align="right" valign="top">typedef void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#gaa363de651fad7342a37ec58375276af7">PP_ArrayOutput_GetDataBuffer</a> )(void *user_data, uint32_t element_count, uint32_t element_size)</td></tr>
     15 <tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga6fe12e1a41df5e10103a811036d4d8d2">PP_CompletionCallback_Func</a> )(void *user_data, int32_t result)</td></tr>
     16 <tr><td class="memItemLeft" align="right" valign="top">typedef int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a></td></tr>
     17 <tr><td class="memItemLeft" align="right" valign="top">typedef int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#gab780dd451cd7f51284cb752edd88f9a0">PP_Module</a></td></tr>
     18 <tr><td class="memItemLeft" align="right" valign="top">typedef int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a></td></tr>
     19 <tr><td class="memItemLeft" align="right" valign="top">typedef double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a></td></tr>
     20 <tr><td class="memItemLeft" align="right" valign="top">typedef double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a></td></tr>
     21 <tr><td class="memItemLeft" align="right" valign="top">typedef double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a></td></tr>
     22 <tr><td class="memItemLeft" align="right" valign="top">typedef const void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga68ad7c927b86e0c29d890603edd33154">PPB_GetInterface</a> )(const char *interface_name)</td></tr>
     23 <tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga2ec91970f3cb75769ce631b3b732803e">PPB_Audio_Callback</a> )(void *sample_buffer, uint32_t buffer_size_in_bytes, <a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a> latency, void *user_data)</td></tr>
     24 <tr><td class="memItemLeft" align="right" valign="top">typedef int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#gae33224cdac15cf8596127fe7b5f08325">PP_InitializeModule_Func</a> )(<a class="el" href="group___typedefs.html#gab780dd451cd7f51284cb752edd88f9a0">PP_Module</a> module, <a class="el" href="group___typedefs.html#ga68ad7c927b86e0c29d890603edd33154">PPB_GetInterface</a> get_browser_interface)</td></tr>
     25 <tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#gad2b49167bcbf6c2c895ffb1a61bc720c">PP_ShutdownModule_Func</a> )(void)</td></tr>
     26 <tr><td class="memItemLeft" align="right" valign="top">typedef const void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___typedefs.html#ga893cfdc559fdf7ae3004816357c3d7e9">PP_GetInterface_Func</a> )(const char *interface_name)</td></tr>
     27 </table>
     28 <hr /><h2>Typedef Documentation</h2>
     29 <a class="anchor" id="gaa363de651fad7342a37ec58375276af7"></a><!-- doxytag: member="pp_array_output.h::PP_ArrayOutput_GetDataBuffer" ref="gaa363de651fad7342a37ec58375276af7" args=")(void *user_data, uint32_t element_count, uint32_t element_size)" -->
     30 <div class="memitem">
     31 <div class="memproto">
     32 <table class="memname">
     33 <tr>
     34 <td class="memname">typedef void*(* <a class="el" href="group___typedefs.html#gaa363de651fad7342a37ec58375276af7">PP_ArrayOutput_GetDataBuffer</a>)(void *user_data, uint32_t element_count, uint32_t element_size)</td>
     35 </tr>
     36 </table>
     37 </div>
     38 <div class="memdoc">
     39 </div>
     40 </div>
     41 <a class="anchor" id="ga6fe12e1a41df5e10103a811036d4d8d2"></a><!-- doxytag: member="pp_completion_callback.h::PP_CompletionCallback_Func" ref="ga6fe12e1a41df5e10103a811036d4d8d2" args=")(void *user_data, int32_t result)" -->
     42 <div class="memitem">
     43 <div class="memproto">
     44 <table class="memname">
     45 <tr>
     46 <td class="memname">typedef void(* <a class="el" href="group___typedefs.html#ga6fe12e1a41df5e10103a811036d4d8d2">PP_CompletionCallback_Func</a>)(void *user_data, int32_t result)</td>
     47 </tr>
     48 </table>
     49 </div>
     50 <div class="memdoc">
     51 <p>This typedef defines the signature that you implement to receive callbacks on asynchronous completion of an operation. </p>
     52 <dl class="params"><dt><b>Parameters:</b></dt><dd>
     53 <table class="params">
     54 <tr><td class="paramdir">[in]</td><td class="paramname">user_data</td><td>A pointer to user data passed to a callback function. </td></tr>
     55 <tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>If result is 0 (PP_OK), the operation succeeded. Negative values (other than -1 or PP_OK_COMPLETE) indicate error and are specified in <a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a>. Positive values for result usually indicate success and have some operation-dependent meaning (such as bytes read). </td></tr>
     56 </table>
     57 </dd>
     58 </dl>
     59 </div>
     60 </div>
     61 <a class="anchor" id="ga893cfdc559fdf7ae3004816357c3d7e9"></a><!-- doxytag: member="ppp.h::PP_GetInterface_Func" ref="ga893cfdc559fdf7ae3004816357c3d7e9" args=")(const char *interface_name)" -->
     62 <div class="memitem">
     63 <div class="memproto">
     64 <table class="memname">
     65 <tr>
     66 <td class="memname">typedef const void*(* <a class="el" href="group___typedefs.html#ga893cfdc559fdf7ae3004816357c3d7e9">PP_GetInterface_Func</a>)(const char *interface_name)</td>
     67 </tr>
     68 </table>
     69 </div>
     70 <div class="memdoc">
     71 <p>Defines the type of the <code>PPP_ShutdownModule</code> function. </p>
     72 </div>
     73 </div>
     74 <a class="anchor" id="gae33224cdac15cf8596127fe7b5f08325"></a><!-- doxytag: member="ppp.h::PP_InitializeModule_Func" ref="gae33224cdac15cf8596127fe7b5f08325" args=")(PP_Module module, PPB_GetInterface get_browser_interface)" -->
     75 <div class="memitem">
     76 <div class="memproto">
     77 <table class="memname">
     78 <tr>
     79 <td class="memname">typedef int32_t(* <a class="el" href="group___typedefs.html#gae33224cdac15cf8596127fe7b5f08325">PP_InitializeModule_Func</a>)(<a class="el" href="group___typedefs.html#gab780dd451cd7f51284cb752edd88f9a0">PP_Module</a> module, <a class="el" href="group___typedefs.html#ga68ad7c927b86e0c29d890603edd33154">PPB_GetInterface</a> get_browser_interface)</td>
     80 </tr>
     81 </table>
     82 </div>
     83 <div class="memdoc">
     84 <p>Defines the type of the <code>PPP_InitializeModule</code> function. </p>
     85 </div>
     86 </div>
     87 <a class="anchor" id="ga89b662403e6a687bb914b80114c0d19d"></a><!-- doxytag: member="pp_instance.h::PP_Instance" ref="ga89b662403e6a687bb914b80114c0d19d" args="" -->
     88 <div class="memitem">
     89 <div class="memproto">
     90 <table class="memname">
     91 <tr>
     92 <td class="memname"><a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a></td>
     93 </tr>
     94 </table>
     95 </div>
     96 <div class="memdoc">
     97 <p>The <code>PP_Instance</code> value uniquely identifies one instance of a module (.nexe/PP_Module). </p>
     98 <p>There will be one module instance for every &lt;embed&gt; tag on a page.</p>
     99 <p>This identifier is an opaque handle assigned by the browser to the module. It is guaranteed never to be 0, so a module can initialize it to 0 to indicate a "NULL handle." </p>
    100 </div>
    101 </div>
    102 <a class="anchor" id="gab780dd451cd7f51284cb752edd88f9a0"></a><!-- doxytag: member="pp_module.h::PP_Module" ref="gab780dd451cd7f51284cb752edd88f9a0" args="" -->
    103 <div class="memitem">
    104 <div class="memproto">
    105 <table class="memname">
    106 <tr>
    107 <td class="memname"><a class="el" href="group___typedefs.html#gab780dd451cd7f51284cb752edd88f9a0">PP_Module</a></td>
    108 </tr>
    109 </table>
    110 </div>
    111 <div class="memdoc">
    112 <p>The PP_Module value uniquely identifies the module or .nexe. </p>
    113 <p>This identifier is an opaque handle assigned by the browser to the module. It is guaranteed never to be 0, so a module can initialize it to 0 to indicate a "NULL handle." </p>
    114 </div>
    115 </div>
    116 <a class="anchor" id="gafdc3895ee80f4750d0d95ae1b677e9b7"></a><!-- doxytag: member="pp_resource.h::PP_Resource" ref="gafdc3895ee80f4750d0d95ae1b677e9b7" args="" -->
    117 <div class="memitem">
    118 <div class="memproto">
    119 <table class="memname">
    120 <tr>
    121 <td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a></td>
    122 </tr>
    123 </table>
    124 </div>
    125 <div class="memdoc">
    126 <p>This typedef represents an opaque handle assigned by the browser to the resource. </p>
    127 <p>The handle is guaranteed never to be 0 for a valid resource, so a module can initialize it to 0 to indicate a "NULL handle." Some interfaces may return a NULL resource to indicate failure.</p>
    128 <p>While a Var represents something callable to JS or from the module to the DOM, a resource has no meaning or visibility outside of the module interface.</p>
    129 <p>Resources are reference counted. Use <code>AddRefResource()</code> and <code>ReleaseResource()</code> in <code><a class="el" href="ppb__core_8h.html" title="This file defines the PPB_Core interface defined by the browser and containing pointers to functions ...">ppb_core.h</a></code> to manage the reference count of a resource. The data will be automatically destroyed when the internal reference count reaches 0. </p>
    130 </div>
    131 </div>
    132 <a class="anchor" id="gad2b49167bcbf6c2c895ffb1a61bc720c"></a><!-- doxytag: member="ppp.h::PP_ShutdownModule_Func" ref="gad2b49167bcbf6c2c895ffb1a61bc720c" args=")(void)" -->
    133 <div class="memitem">
    134 <div class="memproto">
    135 <table class="memname">
    136 <tr>
    137 <td class="memname">typedef void(* <a class="el" href="group___typedefs.html#gad2b49167bcbf6c2c895ffb1a61bc720c">PP_ShutdownModule_Func</a>)(void)</td>
    138 </tr>
    139 </table>
    140 </div>
    141 <div class="memdoc">
    142 <p>Defines the type of the <code>PPP_ShutdownModule</code> function. </p>
    143 </div>
    144 </div>
    145 <a class="anchor" id="ga537b277d2116e42b6acfe9323d40e1a0"></a><!-- doxytag: member="pp_time.h::PP_Time" ref="ga537b277d2116e42b6acfe9323d40e1a0" args="" -->
    146 <div class="memitem">
    147 <div class="memproto">
    148 <table class="memname">
    149 <tr>
    150 <td class="memname"><a class="el" href="group___typedefs.html#ga537b277d2116e42b6acfe9323d40e1a0">PP_Time</a></td>
    151 </tr>
    152 </table>
    153 </div>
    154 <div class="memdoc">
    155 <p>The <code>PP_Time</code> type represents the "wall clock time" according to the browser and is defined as the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). </p>
    156 </div>
    157 </div>
    158 <a class="anchor" id="ga3962a5355895925a757f613567e422fa"></a><!-- doxytag: member="pp_time.h::PP_TimeDelta" ref="ga3962a5355895925a757f613567e422fa" args="" -->
    159 <div class="memitem">
    160 <div class="memproto">
    161 <table class="memname">
    162 <tr>
    163 <td class="memname"><a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a></td>
    164 </tr>
    165 </table>
    166 </div>
    167 <div class="memdoc">
    168 <p>A <code>PP_TimeDelta</code> value represents a duration of time which is measured in seconds. </p>
    169 </div>
    170 </div>
    171 <a class="anchor" id="ga71cb1042cdeb38d7881b121f3b09ce94"></a><!-- doxytag: member="pp_time.h::PP_TimeTicks" ref="ga71cb1042cdeb38d7881b121f3b09ce94" args="" -->
    172 <div class="memitem">
    173 <div class="memproto">
    174 <table class="memname">
    175 <tr>
    176 <td class="memname"><a class="el" href="group___typedefs.html#ga71cb1042cdeb38d7881b121f3b09ce94">PP_TimeTicks</a></td>
    177 </tr>
    178 </table>
    179 </div>
    180 <div class="memdoc">
    181 <p>A <code>PP_TimeTicks</code> value represents time ticks which are measured in seconds and are used for indicating the time that certain messages were received. </p>
    182 <p>In contrast to <code>PP_Time</code>, <code>PP_TimeTicks</code> does not correspond to any actual wall clock time and will not change discontinuously if the user changes their computer clock.</p>
    183 <p>The units are in seconds, but are not measured relative to any particular epoch, so the most you can do is compare two values. </p>
    184 </div>
    185 </div>
    186 <a class="anchor" id="ga2ec91970f3cb75769ce631b3b732803e"></a><!-- doxytag: member="ppb_audio.h::PPB_Audio_Callback" ref="ga2ec91970f3cb75769ce631b3b732803e" args=")(void *sample_buffer, uint32_t buffer_size_in_bytes, PP_TimeDelta latency, void *user_data)" -->
    187 <div class="memitem">
    188 <div class="memproto">
    189 <table class="memname">
    190 <tr>
    191 <td class="memname">typedef void(* <a class="el" href="group___typedefs.html#ga2ec91970f3cb75769ce631b3b732803e">PPB_Audio_Callback</a>)(void *sample_buffer, uint32_t buffer_size_in_bytes, <a class="el" href="group___typedefs.html#ga3962a5355895925a757f613567e422fa">PP_TimeDelta</a> latency, void *user_data)</td>
    192 </tr>
    193 </table>
    194 </div>
    195 <div class="memdoc">
    196 <p><code>PPB_Audio_Callback</code> defines the type of an audio callback function used to fill the audio buffer with data. </p>
    197 <p>Please see the Create() function in the <code>PPB_Audio</code> interface for more details on this callback.</p>
    198 <dl class="params"><dt><b>Parameters:</b></dt><dd>
    199 <table class="params">
    200 <tr><td class="paramdir">[in]</td><td class="paramname">sample_buffer</td><td>A buffer to fill with audio data. </td></tr>
    201 <tr><td class="paramdir">[in]</td><td class="paramname">buffer_size_in_bytes</td><td>The size of the buffer in bytes. </td></tr>
    202 <tr><td class="paramdir">[in]</td><td class="paramname">latency</td><td>How long before the audio data is to be presented. </td></tr>
    203 <tr><td class="paramdir"></td><td class="paramname">inout]</td><td>user_data An opaque pointer that was passed into <code><a class="el" href="struct_p_p_b___audio__1__1.html#a9714ecad5eeefae9d5d98c5ea29ac5ce" title="Create() creates an audio resource.">PPB_Audio.Create()</a></code>. </td></tr>
    204 </table>
    205 </dd>
    206 </dl>
    207 </div>
    208 </div>
    209 <a class="anchor" id="ga68ad7c927b86e0c29d890603edd33154"></a><!-- doxytag: member="ppb.h::PPB_GetInterface" ref="ga68ad7c927b86e0c29d890603edd33154" args=")(const char *interface_name)" -->
    210 <div class="memitem">
    211 <div class="memproto">
    212 <table class="memname">
    213 <tr>
    214 <td class="memname">typedef const void*(* <a class="el" href="group___typedefs.html#ga68ad7c927b86e0c29d890603edd33154">PPB_GetInterface</a>)(const char *interface_name)</td>
    215 </tr>
    216 </table>
    217 </div>
    218 <div class="memdoc">
    219 <p>This function pointer type defines the signature for the <code>PPB_GetInterface</code> function. </p>
    220 <p>A generic <code>PPB_GetInterface</code> pointer is passed to <code>PPP_InitializedModule</code> when your module is loaded. You can use this pointer to request a pointer to a specific browser interface. Browser interface names are ASCII strings and are generally defined in the header file for the interface, such as <code>PPB_AUDIO_INTERFACE</code> found in <code>ppb.audio.h</code> or <code>PPB_GRAPHICS_2D_INTERFACE</code> in <code><a class="el" href="ppb__graphics__2d_8h.html" title="Defines the PPB_Graphics2D struct representing a 2D graphics context within the browser.">ppb_graphics_2d.h</a></code>. Click <a href="globals_defs.html" title="macros">here</a> for a complete list of interface names.</p>
    221 <p>This value will be NULL if the interface is not supported on the browser. </p>
    222 </div>
    223 </div>
    224 </div><!-- contents -->
    225 </div>
    226 {{/partials.standard_nacl_api}}
    227