NPAPI:Pepper: Difference between revisions

Line 319: Line 319:
} NPDeviceContext3D;</pre>
} NPDeviceContext3D;</pre>


The 3D device API specifies a number of state types that can be set or queried:
The 3D device API specifies a number of errors that could be returned.


<pre>typedef enum {
<pre>
   /* The offset the command buffer service has read to. */
typedef enum _NPDeviceContext3DError {
   NPDeviceContext3DState_GetOffset,
   /* No error has ocurred. */
   NPDeviceContext3DError_NoError,


   /* The offset the plugin instance has written to. */
   /* The size of a command was invalid. */
   NPDeviceContext3DState_PutOffset,
   NPDeviceContext3DError_InvalidSize,


   /* The last token processed by the command buffer service. */
   /* An offset was out of bounds. */
   NPDeviceContext3DState_Token,
   NPDeviceContext3DError_OutOfBounds,


   /* The most recent parse error. Getting this value resets the parse error
   /* A command was not recognized. */
    if it recoverable. */
   NPDeviceContext3DError_UnknownCommand,
   NPDeviceContext3DState_ParseError,


   /* Wether the command buffer has encountered an unrecoverable error. */
   /* The arguments to a command were invalid. */
   NPDeviceContext3DState_ErrorStatus
  NPDeviceContext3DError_InvalidArguments,
} NPDeviceContext3DState;</pre>
 
  /* The 3D context was lost, for example due to a power management event. The
  * context must be destroyed and a new one created.
  */
  NPDeviceContext3DError_LostContext,
 
  /* Any other error. */
   NPDeviceContext3DError_GenericError
} NPDeviceContext3DError;
 
</pre>


== NPP_SetWindow and Windowless Plugins ==
== NPP_SetWindow and Windowless Plugins ==
89

edits