1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
5 <title>Native Client: NPAPI Support
</title>
6 <link href=
"stylesheet.css" type=
"text/css" rel=
"stylesheet"></link>
12 <a href=
"../README.html">Back to README
</a>
15 <h1>NPAPI Support
</h1>
18 Native Client modules can communicate with the browser
20 <a href=
"srpc.html">simple RPC (SRPC)
</a>.
21 This document lists the NPAPI functions
22 that Native Client modules can and cannot use.
28 <a href=
"https://developer.mozilla.org/en/Plugins">Plugins documentation
</a>
30 <a href=
"https://developer.mozilla.org/en/Gecko_Plugin_API_Reference">Gecko
31 Plugin API Reference
</a>
37 <li> <a href=
"#nacl">Native Client only: nacl_npapi.h
</a> </li>
38 <li> <a href=
"#npapi-h">npapi.h
</a>
40 <li> <a href=
"#npapi-h-implemented">Implemented
</a> </li>
41 <li> <a href=
"#npapi-h-not">Not implemented
</a> </li>
43 <li> <a href=
"#npruntime-h">npruntime.h
</a>
45 <li> <a href=
"#npruntime-h-implemented">Implemented
</a> </li>
46 <li> <a href=
"#npruntime-h-not">Not implemented
</a> </li>
50 <h2><a name=
"nacl"> </a> Native Client only: nacl_npapi.h
</h2>
53 For information on these functions and
54 on other API defined in
<code>nacl/nacl_npapi.h
</code>,
56 <a href=
"../scons-out/doc/html/nacl__npapi_8h.html"><code>nacl_npapi.h
</code>
61 int NaClNP_Init(int* argc, char* argv[]);
62 int NaClNP_MainLoop(unsigned flags);
63 NPObject* NaClNPN_CreateArray(NPP npp);
64 NPError NaClNPN_OpenURL(NPP npp, const char* url, void* notify_data,
65 void (*notify)(const char* url, void* notify_data,
67 NPVARIANT_IS_HANDLE(_v)
68 NPVARIANT_TO_HANDLE(_v)
69 HANDLE_TO_NPVARIANT(_val, _v)
72 <h2><a name=
"npapi-h"> </a> npapi.h
</h2>
75 API defined in the file
<code>nacl/nacl_npapi.h
</code>.
78 <h3><a name=
"npapi-h-implemented"> </a> Implemented
</h3>
81 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value);
82 void* NPN_MemAlloc(uint32_t size);
83 void NPN_MemFree(void* ptr);
84 void NPN_Status(NPP instance, const char* message);
85 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
86 void NPN_ForceRedraw(NPP instance);
89 <h3><a name=
"npapi-h-not"> </a> Not implemented
</h3>
92 void NPN_Version(int* plugin_major, int* plugin_minor,
93 NPError NPN_GetURLNotify(NPP instance, const char* url,
94 NPError NPN_GetURL(NPP instance, const char* url,
95 NPError NPN_PostURLNotify(NPP instance, const char* url,
96 NPError NPN_PostURL(NPP instance, const char* url,
97 NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
98 NPError NPN_NewStream(NPP instance, NPMIMEType type,
99 int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer);
100 NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
101 const char* NPN_UserAgent(NPP instance);
102 uint32_t NPN_MemFlush(uint32_t size);
103 void NPN_ReloadPlugins(NPBool reloadPages);
104 JRIEnv* NPN_GetJavaEnv(void);
105 jref NPN_GetJavaPeer(NPP instance);
106 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value);
107 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);
108 void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
109 void NPN_PopPopupsEnabledState(NPP instance);
110 void NPN_PluginThreadAsyncCall(NPP instance,
113 <h2><a name=
"npruntime-h"> </a> npruntime.h
</h2>
116 API defined in the file
<code>nacl/nacl_npruntime.h
</code>.
119 <h3><a name=
"npruntime-h-implemented"> </a> Implemented
</h3>
121 <pre class=
"listing">
122 NPObject *NPN_CreateObject(NPP npp, NPClass *aClass);
123 NPIdentifier NPN_GetIntIdentifier(int32_t intid);
124 NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name);
125 void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
126 NPObject *NPN_RetainObject(NPObject *npobj);
127 NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier);
128 bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
129 bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);
130 bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
131 bool NPN_IdentifierIsString(NPIdentifier identifier);
132 bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName,
133 int32_t NPN_IntFromIdentifier(NPIdentifier identifier);
134 bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args,
135 void NPN_ReleaseObject(NPObject *npobj);
136 void NPN_ReleaseVariantValue(NPVariant *variant);
137 bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
138 bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
139 void NPN_SetException(NPObject *npobj, const NPUTF8 *message);
142 <h3><a name=
"npruntime-h-not"> </a> Not implemented
</h3>
144 <pre class=
"listing">
145 bool NPN_Construct(NPP npp, NPObject *npobj, const NPVariant *args,
146 bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier,
147 bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, [PENDING:...]
152 <a href=
"http://code.google.com/policies.html#restrictions">noted
</a>,
153 the content of this page is licensed under a
154 <a href=
"http://creativecommons.org/licenses/by/2.5/">Creative Commons
155 Attribution
2.5 license
</a>.