OLD | NEW |
---|---|
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 typedef int32_t (* NP_LOADDS NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream); | 58 typedef int32_t (* NP_LOADDS NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream); |
59 typedef int32_t (* NP_LOADDS NPP_WriteProcPtr)(NPP instance, NPStream* stre am, int32_t offset, int32_t len, void* buffer); | 59 typedef int32_t (* NP_LOADDS NPP_WriteProcPtr)(NPP instance, NPStream* stre am, int32_t offset, int32_t len, void* buffer); |
60 typedef void (* NP_LOADDS NPP_StreamAsFileProcPtr)(NPP instance, NPStrea m* stream, const char* fname); | 60 typedef void (* NP_LOADDS NPP_StreamAsFileProcPtr)(NPP instance, NPStrea m* stream, const char* fname); |
61 typedef void (* NP_LOADDS NPP_PrintProcPtr)(NPP instance, NPPrint* platf ormPrint); | 61 typedef void (* NP_LOADDS NPP_PrintProcPtr)(NPP instance, NPPrint* platf ormPrint); |
62 typedef int16_t (* NP_LOADDS NPP_HandleEventProcPtr)(NPP instance, void* ev ent); | 62 typedef int16_t (* NP_LOADDS NPP_HandleEventProcPtr)(NPP instance, void* ev ent); |
63 typedef void (* NP_LOADDS NPP_URLNotifyProcPtr)(NPP instance, const char * url, NPReason reason, void* notifyData); | 63 typedef void (* NP_LOADDS NPP_URLNotifyProcPtr)(NPP instance, const char * url, NPReason reason, void* notifyData); |
64 /* Any NPObjects returned to the browser via NPP_GetValue should be retained | 64 /* Any NPObjects returned to the browser via NPP_GetValue should be retained |
65 by the plugin on the way out. The browser is responsible for releasing. */ | 65 by the plugin on the way out. The browser is responsible for releasing. */ |
66 typedef NPError (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value); | 66 typedef NPError (* NP_LOADDS NPP_GetValueProcPtr)(NPP instance, NPPVariable variable, void *ret_value); |
67 typedef NPError (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value); | 67 typedef NPError (* NP_LOADDS NPP_SetValueProcPtr)(NPP instance, NPNVariable variable, void *value); |
68 typedef NPBool (* NP_LOADDS NPP_GotFocusPtr)(NPP instance, NPFocusDirectio n direction); | |
69 typedef void (* NP_LOADDS NPP_LostFocusPtr)(NPP instance); | |
70 typedef NPError (* NP_LOADDS NPP_ClearSiteDataProcPtr)(NPP instance, uint64 flags, const char* domain, uint64 max_age); | |
68 | 71 |
69 typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value); | 72 typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable, void *ret_value); |
70 typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value); | 73 typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable, void *value); |
71 typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, c onst char* window, void* notifyData); | 74 typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* url, c onst char* window, void* notifyData); |
72 typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData ); | 75 typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData ); |
73 typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* url, const c har* window); | 76 typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* url, const c har* window); |
74 typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); | 77 typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file); |
75 typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* ra ngeList); | 78 typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange* ra ngeList); |
76 typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, cons t char* window, NPStream** stream); | 79 typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, cons t char* window, NPStream** stream); |
77 typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer); | 80 typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 typedef bool (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifie r **identifier, uint32_t *count); | 116 typedef bool (*NPN_EnumerateProcPtr)(NPP npp, NPObject *obj, NPIdentifie r **identifier, uint32_t *count); |
114 typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*fu nc)(void *), void *userData); | 117 typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP instance, void (*fu nc)(void *), void *userData); |
115 typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVar iant *args, uint32_t argCount, NPVariant *result); | 118 typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVar iant *args, uint32_t argCount, NPVariant *result); |
116 typedef NPError (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len); | 119 typedef NPError (*NPN_GetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, char **value, uint32_t *len); |
117 typedef NPError (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len); | 120 typedef NPError (*NPN_SetValueForURLPtr)(NPP npp, NPNURLVariable variable, const char *url, const char *value, uint32_t len); |
118 typedef NPError (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protoc ol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); | 121 typedef NPError (*NPN_GetAuthenticationInfoPtr)(NPP npp, const char *protoc ol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); |
119 typedef uint32_t (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NP Bool repeat, void (*timerFunc)(NPP npp, uint32_t timerID)); | 122 typedef uint32_t (*NPN_ScheduleTimerPtr)(NPP instance, uint32_t interval, NP Bool repeat, void (*timerFunc)(NPP npp, uint32_t timerID)); |
120 typedef void (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID); | 123 typedef void (*NPN_UnscheduleTimerPtr)(NPP instance, uint32_t timerID); |
121 typedef NPError (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu); | 124 typedef NPError (*NPN_PopUpContextMenuPtr)(NPP instance, NPMenu* menu); |
122 typedef NPBool (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordin ateSpace destSpace); | 125 typedef NPBool (*NPN_ConvertPointPtr)(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordin ateSpace destSpace); |
126 typedef NPBool (*NPN_HandleEventPtr)(NPP instance, void *event, NPBool han dled); | |
127 typedef NPBool (*NPN_UnfocusInstancePtr)(NPP instance, NPFocusDirection di rection); | |
123 | 128 |
124 typedef struct _NPPluginFuncs { | 129 typedef struct _NPPluginFuncs { |
125 uint16_t size; | 130 uint16_t size; |
126 uint16_t version; | 131 uint16_t version; |
127 NPP_NewProcPtr newp; | 132 NPP_NewProcPtr newp; |
128 NPP_DestroyProcPtr destroy; | 133 NPP_DestroyProcPtr destroy; |
129 NPP_SetWindowProcPtr setwindow; | 134 NPP_SetWindowProcPtr setwindow; |
130 NPP_NewStreamProcPtr newstream; | 135 NPP_NewStreamProcPtr newstream; |
131 NPP_DestroyStreamProcPtr destroystream; | 136 NPP_DestroyStreamProcPtr destroystream; |
132 NPP_StreamAsFileProcPtr asfile; | 137 NPP_StreamAsFileProcPtr asfile; |
133 NPP_WriteReadyProcPtr writeready; | 138 NPP_WriteReadyProcPtr writeready; |
134 NPP_WriteProcPtr write; | 139 NPP_WriteProcPtr write; |
135 NPP_PrintProcPtr print; | 140 NPP_PrintProcPtr print; |
136 NPP_HandleEventProcPtr event; | 141 NPP_HandleEventProcPtr event; |
137 NPP_URLNotifyProcPtr urlnotify; | 142 NPP_URLNotifyProcPtr urlnotify; |
138 void* javaClass; | 143 void* javaClass; |
139 NPP_GetValueProcPtr getvalue; | 144 NPP_GetValueProcPtr getvalue; |
140 NPP_SetValueProcPtr setvalue; | 145 NPP_SetValueProcPtr setvalue; |
146 NPP_GotFocusPtr gotfocus; | |
147 NPP_LostFocusPtr lostfocus; | |
148 NPP_ClearSiteDataProcPtr clearsitedata; | |
stuartmorgan
2010/11/12 18:43:56
This is a serious problem; it collides with an acc
| |
141 } NPPluginFuncs; | 149 } NPPluginFuncs; |
142 | 150 |
143 typedef struct _NPNetscapeFuncs { | 151 typedef struct _NPNetscapeFuncs { |
144 uint16_t size; | 152 uint16_t size; |
145 uint16_t version; | 153 uint16_t version; |
146 NPN_GetURLProcPtr geturl; | 154 NPN_GetURLProcPtr geturl; |
147 NPN_PostURLProcPtr posturl; | 155 NPN_PostURLProcPtr posturl; |
148 NPN_RequestReadProcPtr requestread; | 156 NPN_RequestReadProcPtr requestread; |
149 NPN_NewStreamProcPtr newstream; | 157 NPN_NewStreamProcPtr newstream; |
150 NPN_WriteProcPtr write; | 158 NPN_WriteProcPtr write; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 NPN_EnumerateProcPtr enumerate; | 196 NPN_EnumerateProcPtr enumerate; |
189 NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall; | 197 NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall; |
190 NPN_ConstructProcPtr construct; | 198 NPN_ConstructProcPtr construct; |
191 NPN_GetValueForURLPtr getvalueforurl; | 199 NPN_GetValueForURLPtr getvalueforurl; |
192 NPN_SetValueForURLPtr setvalueforurl; | 200 NPN_SetValueForURLPtr setvalueforurl; |
193 NPN_GetAuthenticationInfoPtr getauthenticationinfo; | 201 NPN_GetAuthenticationInfoPtr getauthenticationinfo; |
194 NPN_ScheduleTimerPtr scheduletimer; | 202 NPN_ScheduleTimerPtr scheduletimer; |
195 NPN_UnscheduleTimerPtr unscheduletimer; | 203 NPN_UnscheduleTimerPtr unscheduletimer; |
196 NPN_PopUpContextMenuPtr popupcontextmenu; | 204 NPN_PopUpContextMenuPtr popupcontextmenu; |
197 NPN_ConvertPointPtr convertpoint; | 205 NPN_ConvertPointPtr convertpoint; |
206 NPN_HandleEventPtr handleevent; | |
207 NPN_UnfocusInstancePtr unfocusinstance; | |
198 } NPNetscapeFuncs; | 208 } NPNetscapeFuncs; |
199 | 209 |
200 #ifdef XP_MACOSX | 210 #ifdef XP_MACOSX |
201 /* | 211 /* |
202 * Mac OS X version(s) of NP_GetMIMEDescription(const char *) | 212 * Mac OS X version(s) of NP_GetMIMEDescription(const char *) |
203 * These can be called to retreive MIME information from the plugin dynamically | 213 * These can be called to retreive MIME information from the plugin dynamically |
204 * | 214 * |
205 * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way | 215 * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way |
206 * to get mime info from the plugin only on OSX and may not be supported | 216 * to get mime info from the plugin only on OSX and may not be supported |
207 * in furture version -- use NP_GetMIMEDescription instead | 217 * in furture version -- use NP_GetMIMEDescription instead |
208 */ | 218 */ |
209 enum | 219 enum |
210 { | 220 { |
211 kBPSupportedMIMETypesStructVers_1 = 1 | 221 kBPSupportedMIMETypesStructVers_1 = 1 |
212 }; | 222 }; |
213 typedef struct _BPSupportedMIMETypes | 223 typedef struct _BPSupportedMIMETypes |
214 { | 224 { |
215 SInt32 structVersion; /* struct version */ | 225 SInt32 structVersion; /* struct version */ |
216 Handle typeStrings; /* STR# formated handle, allocated by plug-in */ | 226 Handle typeStrings; /* STR# formated handle, allocated by plug-in */ |
217 Handle infoStrings; /* STR# formated handle, allocated by plug-in */ | 227 Handle infoStrings; /* STR# formated handle, allocated by plug-in */ |
218 } BPSupportedMIMETypes; | 228 } BPSupportedMIMETypes; |
219 OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); | 229 OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); |
220 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" | 230 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" |
221 typedef const char* (*NP_GetMIMEDescriptionProcPtr)(); | 231 typedef const char* (*NP_GetMIMEDescriptionProcPtr)(); |
222 typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); | 232 typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); |
223 #endif | 233 #endif |
224 | 234 |
225 #endif /* npfunctions_h_ */ | 235 #endif /* npfunctions_h_ */ |
OLD | NEW |