15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* ***** BEGIN LICENSE BLOCK *****
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Version: MPL 1.1/GPL 2.0/LGPL 2.1
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * The contents of this file are subject to the Mozilla Public License Version
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * 1.1 (the "License"); you may not use this file except in compliance with
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * the License. You may obtain a copy of the License at
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * http://www.mozilla.org/MPL/
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Software distributed under the License is distributed on an "AS IS" basis,
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * for the specific language governing rights and limitations under the
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * License.
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * The Original Code is mozilla.org code.
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * The Initial Developer of the Original Code is
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Netscape Communications Corporation.
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Portions created by the Initial Developer are Copyright (C) 1998
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * the Initial Developer. All Rights Reserved.
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Contributor(s):
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Alternatively, the contents of this file may be used under the terms of
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * either the GNU General Public License Version 2 or later (the "GPL"), or
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * in which case the provisions of the GPL or the LGPL are applicable instead
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * of those above. If you wish to allow use of your version of this file only
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * under the terms of either the GPL or the LGPL, and not to allow others to
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * use your version of this file under the terms of the MPL, indicate your
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * decision by deleting the provisions above and replace them with the notice
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * and other provisions required by the GPL or the LGPL. If you do not delete
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * the provisions above, a recipient may use your version of this file under
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * the terms of any one of the MPL, the GPL or the LGPL.
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * ***** END LICENSE BLOCK ***** */
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef npfunctions_h_
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define npfunctions_h_
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef __OS2__
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#pragma pack(1)
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define NP_LOADDS _System
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define NP_LOADDS
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "npapi.h"
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "npruntime.h"
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_DestroyProcPtr)(NPP instance, NPSavedData** save);
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int32_t      (* NP_LOADDS NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int32_t      (* NP_LOADDS NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (* NP_LOADDS NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname);
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (* NP_LOADDS NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint);
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int16_t      (* NP_LOADDS NPP_HandleEventProcPtr)(NPP instance, void* event);
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (* NP_LOADDS NPP_URLNotifyProcPtr)(NPP instance, const char* url, NPReason reason, void* notifyData);
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* Any NPObjects returned to the browser via NPP_GetValue should be retained
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   by the plugin on the way out. The browser is responsible for releasing. */
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value);
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value);
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPBool       (* NP_LOADDS NPP_GotFocusPtr)(NPP instance, NPFocusDirection direction);
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (* NP_LOADDS NPP_LostFocusPtr)(NPP instance);
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData);
695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (* NP_LOADDS NPP_ClearSiteDataPtr)(const char* site, uint64_t flags, uint64_t maxAge);
705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef char**       (* NP_LOADDS NPP_GetSitesWithDataPtr)(void);
715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value);
735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value);
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, const char* window, void* notifyData);
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData);
765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_GetURLProcPtr)(NPP instance, const char* url, const char* window);
775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file);
785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* rangeList);
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const char* window, NPStream** stream);
805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int32_t      (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer);
815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_StatusProcPtr)(NPP instance, const char* message);
835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't
845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)   depend on it sticking around and don't free it. */
855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef const char*  (*NPN_UserAgentProcPtr)(NPP instance);
865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void*        (*NPN_MemAllocProcPtr)(uint32_t size);
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_MemFreeProcPtr)(void* ptr);
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef uint32_t     (*NPN_MemFlushProcPtr)(uint32_t size);
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void*        (*NPN_GetJavaEnvProcPtr)(void);
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void*        (*NPN_GetJavaPeerProcPtr)(NPP instance);
925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect);
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_ForceRedrawProcPtr)(NPP instance);
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name);
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers);
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPUTF8*      (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier);
1005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef int32_t      (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier);
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPObject*    (*NPN_CreateObjectProcPtr)(NPP npp, NPClass *aClass);
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPObject*    (*NPN_RetainObjectProcPtr)(NPObject *obj);
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_ReleaseObjectProcPtr)(NPObject *obj);
1045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_InvokeProcPtr)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result);
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_InvokeDefaultProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_EvaluateProcPtr)(NPP npp, NPObject *obj, NPString *script, NPVariant *result);
1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_GetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result);
1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_SetPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value);
1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_RemovePropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_HasPropertyProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_HasMethodProcPtr)(NPP npp, NPObject *obj, NPIdentifier propertyName);
1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_ReleaseVariantValueProcPtr)(NPVariant *variant);
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_SetExceptionProcPtr)(NPObject *obj, const NPUTF8 *message);
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_PushPopupsEnabledStateProcPtr)(NPP npp, NPBool enabled);
1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_PopPopupsEnabledStateProcPtr)(NPP npp);
1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count);
1175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*func)(void *), void *userData);
1185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef bool         (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result);
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len);
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len);
1215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen);
1225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef uint32_t     (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
1235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID);
1245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPError      (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu);
1255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPBool       (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
1265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPBool       (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool handled);
1275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef NPBool       (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection direction);
1285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef void         (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyData, NPBool allow);
1295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef struct _NPPluginFuncs {
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t size;
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t version;
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_NewProcPtr newp;
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_DestroyProcPtr destroy;
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_SetWindowProcPtr setwindow;
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_NewStreamProcPtr newstream;
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_DestroyStreamProcPtr destroystream;
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_StreamAsFileProcPtr asfile;
1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_WriteReadyProcPtr writeready;
1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_WriteProcPtr write;
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_PrintProcPtr print;
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_HandleEventProcPtr event;
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_URLNotifyProcPtr urlnotify;
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  void* javaClass;
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_GetValueProcPtr getvalue;
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_SetValueProcPtr setvalue;
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_GotFocusPtr gotfocus;
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_LostFocusPtr lostfocus;
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_URLRedirectNotifyPtr urlredirectnotify;
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_ClearSiteDataPtr clearsitedata;
1515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPP_GetSitesWithDataPtr getsiteswithdata;
1525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} NPPluginFuncs;
1535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef struct _NPNetscapeFuncs {
1555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t size;
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t version;
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetURLProcPtr geturl;
1585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PostURLProcPtr posturl;
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_RequestReadProcPtr requestread;
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_NewStreamProcPtr newstream;
1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_WriteProcPtr write;
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_DestroyStreamProcPtr destroystream;
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_StatusProcPtr status;
1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_UserAgentProcPtr uagent;
1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_MemAllocProcPtr memalloc;
1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_MemFreeProcPtr memfree;
1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_MemFlushProcPtr memflush;
1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ReloadPluginsProcPtr reloadplugins;
1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetJavaEnvProcPtr getJavaEnv;
1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetJavaPeerProcPtr getJavaPeer;
1715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetURLNotifyProcPtr geturlnotify;
1725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PostURLNotifyProcPtr posturlnotify;
1735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetValueProcPtr getvalue;
1745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_SetValueProcPtr setvalue;
1755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_InvalidateRectProcPtr invalidaterect;
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_InvalidateRegionProcPtr invalidateregion;
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ForceRedrawProcPtr forceredraw;
1785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetStringIdentifierProcPtr getstringidentifier;
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetStringIdentifiersProcPtr getstringidentifiers;
1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetIntIdentifierProcPtr getintidentifier;
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_IdentifierIsStringProcPtr identifierisstring;
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_UTF8FromIdentifierProcPtr utf8fromidentifier;
1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_IntFromIdentifierProcPtr intfromidentifier;
1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_CreateObjectProcPtr createobject;
1855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_RetainObjectProcPtr retainobject;
1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ReleaseObjectProcPtr releaseobject;
1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_InvokeProcPtr invoke;
1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_InvokeDefaultProcPtr invokeDefault;
1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_EvaluateProcPtr evaluate;
1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetPropertyProcPtr getproperty;
1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_SetPropertyProcPtr setproperty;
1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_RemovePropertyProcPtr removeproperty;
1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_HasPropertyProcPtr hasproperty;
1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_HasMethodProcPtr hasmethod;
1955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ReleaseVariantValueProcPtr releasevariantvalue;
1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_SetExceptionProcPtr setexception;
1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PushPopupsEnabledStateProcPtr pushpopupsenabledstate;
1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PopPopupsEnabledStateProcPtr poppopupsenabledstate;
1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_EnumerateProcPtr enumerate;
2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ConstructProcPtr construct;
2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetValueForURLPtr getvalueforurl;
2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_SetValueForURLPtr setvalueforurl;
2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_GetAuthenticationInfoPtr getauthenticationinfo;
2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ScheduleTimerPtr scheduletimer;
2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_UnscheduleTimerPtr unscheduletimer;
2075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_PopUpContextMenuPtr popupcontextmenu;
2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_ConvertPointPtr convertpoint;
2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_HandleEventPtr handleevent;
2105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_UnfocusInstancePtr unfocusinstance;
2115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  NPN_URLRedirectResponsePtr urlredirectresponse;
2125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} NPNetscapeFuncs;
2135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef XP_MACOSX
2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)/*
2165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Mac OS X version(s) of NP_GetMIMEDescription(const char *)
2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * These can be called to retreive MIME information from the plugin dynamically
2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *
2195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way
2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *       to get mime info from the plugin only on OSX and may not be supported
2215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) *       in furture version -- use NP_GetMIMEDescription instead
2225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) */
2235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)enum
2245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles){
2255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) kBPSupportedMIMETypesStructVers_1    = 1
2265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
2275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef struct _BPSupportedMIMETypes
2285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles){
2295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) SInt32    structVersion;      /* struct version */
2305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Handle    typeStrings;        /* STR# formated handle, allocated by plug-in */
2315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) Handle    infoStrings;        /* STR# formated handle, allocated by plug-in */
2325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} BPSupportedMIMETypes;
2335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags);
2345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
2355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef const char* (*NP_GetMIMEDescriptionProcPtr)(void);
2365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32);
2375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
2385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif /* npfunctions_h_ */
240