-rw-r--r-- | src/plugin/README_plugin.txt | 37 | ||||
-rw-r--r-- | src/plugin/install.rdf | 19 | ||||
-rwxr-xr-x | src/plugin/make_xpi.sh | 22 | ||||
-rw-r--r-- | src/plugin/plugin.c | 199 | ||||
-rw-r--r-- | src/plugin/plugin.h | 29 | ||||
-rw-r--r-- | src/plugin/test.html | 17 |
6 files changed, 323 insertions, 0 deletions
diff --git a/src/plugin/plugin.h b/src/plugin/plugin.h new file mode 100644 index 0000000..2f1d505 --- a/dev/null +++ b/src/plugin/plugin.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef PLUGIN_H | ||
2 | #define PLUGIN_H | ||
3 | |||
4 | /* | ||
5 | * Based on Basic Plugin exmaple from Mozilla on-line at | ||
6 | * http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/BasicPlugin.h | ||
7 | */ | ||
8 | |||
9 | #include <npapi.h> | ||
10 | #include <npupp.h> | ||
11 | |||
12 | NPError NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs); | ||
13 | NPError NP_Shutdown(); | ||
14 | |||
15 | NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved); | ||
16 | NPError NPP_Destroy(NPP instance, NPSavedData** save); | ||
17 | NPError NPP_SetWindow(NPP instance, NPWindow* window); | ||
18 | NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); | ||
19 | NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); | ||
20 | int32_t NPP_WriteReady(NPP instance, NPStream* stream); | ||
21 | int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer); | ||
22 | void NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); | ||
23 | void NPP_Print(NPP instance, NPPrint* platformPrint); | ||
24 | int16_t NPP_HandleEvent(NPP instance, void* event); | ||
25 | void NPP_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData); | ||
26 | NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value); | ||
27 | NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value); | ||
28 | |||
29 | #endif // PLUGIN_H | ||