Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: third_party/npapi/bindings/npfunctions.h

Issue 4930001: Sync to r31 of npapi-headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/npapi/bindings/npapi.h ('k') | webkit/glue/plugins/plugin_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 #ifdef __OS2__ 41 #ifdef __OS2__
42 #pragma pack(1) 42 #pragma pack(1)
43 #define NP_LOADDS _System 43 #define NP_LOADDS _System
44 #else 44 #else
45 #define NP_LOADDS 45 #define NP_LOADDS
46 #endif 46 #endif
47 47
48 #include "npapi.h" 48 #include "npapi.h"
49 #include "npruntime.h" 49 #include "npruntime.h"
50 50
51 typedef void (* NP_LOADDS NPP_InitializeProcPtr)(); 51 typedef void (* NP_LOADDS NPP_InitializeProcPtr)(void);
52 typedef void (* NP_LOADDS NPP_ShutdownProcPtr)(); 52 typedef void (* NP_LOADDS NPP_ShutdownProcPtr)(void);
53 typedef NPError (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType, NPP ins tance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* sav ed); 53 typedef NPError (* NP_LOADDS NPP_NewProcPtr)(NPMIMEType pluginType, NPP ins tance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* sav ed);
54 typedef NPError (* NP_LOADDS NPP_DestroyProcPtr)(NPP instance, NPSavedData* * save); 54 typedef NPError (* NP_LOADDS NPP_DestroyProcPtr)(NPP instance, NPSavedData* * save);
55 typedef NPError (* NP_LOADDS NPP_SetWindowProcPtr)(NPP instance, NPWindow* window); 55 typedef NPError (* NP_LOADDS NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
56 typedef NPError (* NP_LOADDS NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype); 56 typedef NPError (* NP_LOADDS NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
57 typedef NPError (* NP_LOADDS NPP_DestroyStreamProcPtr)(NPP instance, NPStre am* stream, NPReason reason); 57 typedef NPError (* NP_LOADDS NPP_DestroyStreamProcPtr)(NPP instance, NPStre am* stream, NPReason reason);
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 void (* NP_LOADDS NPP_URLRedirectNotifyPtr)(NPP instance, const char* url, int32_t status, void* notifyData);
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);
78 typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason); 81 typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
79 typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message); 82 typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message);
80 /* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't 83 /* Browser manages the lifetime of the buffer returned by NPN_UserAgent, don't
81 depend on it sticking around and don't free it. */ 84 depend on it sticking around and don't free it. */
82 typedef const char* (*NPN_UserAgentProcPtr)(NPP instance); 85 typedef const char* (*NPN_UserAgentProcPtr)(NPP instance);
83 typedef void* (*NPN_MemAllocProcPtr)(uint32_t size); 86 typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
84 typedef void (*NPN_MemFreeProcPtr)(void* ptr); 87 typedef void (*NPN_MemFreeProcPtr)(void* ptr);
85 typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size); 88 typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
86 typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages); 89 typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
87 typedef void* (*NPN_GetJavaEnvProcPtr)(); 90 typedef void* (*NPN_GetJavaEnvProcPtr)(void);
88 typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance); 91 typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
89 typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect); 92 typedef void (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect);
90 typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion regio n); 93 typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion regio n);
91 typedef void (*NPN_ForceRedrawProcPtr)(NPP instance); 94 typedef void (*NPN_ForceRedrawProcPtr)(NPP instance);
92 typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name); 95 typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name);
93 typedef void (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, in t32_t nameCount, NPIdentifier* identifiers); 96 typedef void (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, in t32_t nameCount, NPIdentifier* identifiers);
94 typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid); 97 typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
95 typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier); 98 typedef bool (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
96 typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier); 99 typedef NPUTF8* (*NPN_UTF8FromIdentifierProcPtr)(NPIdentifier identifier);
97 typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier); 100 typedef int32_t (*NPN_IntFromIdentifierProcPtr)(NPIdentifier identifier);
(...skipping 15 matching lines...) Expand all
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);
128 typedef void (*NPN_URLRedirectResponsePtr)(NPP instance, void* notifyDat a, NPBool allow);
123 129
124 typedef struct _NPPluginFuncs { 130 typedef struct _NPPluginFuncs {
125 uint16_t size; 131 uint16_t size;
126 uint16_t version; 132 uint16_t version;
127 NPP_NewProcPtr newp; 133 NPP_NewProcPtr newp;
128 NPP_DestroyProcPtr destroy; 134 NPP_DestroyProcPtr destroy;
129 NPP_SetWindowProcPtr setwindow; 135 NPP_SetWindowProcPtr setwindow;
130 NPP_NewStreamProcPtr newstream; 136 NPP_NewStreamProcPtr newstream;
131 NPP_DestroyStreamProcPtr destroystream; 137 NPP_DestroyStreamProcPtr destroystream;
132 NPP_StreamAsFileProcPtr asfile; 138 NPP_StreamAsFileProcPtr asfile;
133 NPP_WriteReadyProcPtr writeready; 139 NPP_WriteReadyProcPtr writeready;
134 NPP_WriteProcPtr write; 140 NPP_WriteProcPtr write;
135 NPP_PrintProcPtr print; 141 NPP_PrintProcPtr print;
136 NPP_HandleEventProcPtr event; 142 NPP_HandleEventProcPtr event;
137 NPP_URLNotifyProcPtr urlnotify; 143 NPP_URLNotifyProcPtr urlnotify;
138 void* javaClass; 144 void* javaClass;
139 NPP_GetValueProcPtr getvalue; 145 NPP_GetValueProcPtr getvalue;
140 NPP_SetValueProcPtr setvalue; 146 NPP_SetValueProcPtr setvalue;
147 NPP_GotFocusPtr gotfocus;
148 NPP_LostFocusPtr lostfocus;
149 NPP_URLRedirectNotifyPtr urlredirectnotify;
141 } NPPluginFuncs; 150 } NPPluginFuncs;
142 151
143 typedef struct _NPNetscapeFuncs { 152 typedef struct _NPNetscapeFuncs {
144 uint16_t size; 153 uint16_t size;
145 uint16_t version; 154 uint16_t version;
146 NPN_GetURLProcPtr geturl; 155 NPN_GetURLProcPtr geturl;
147 NPN_PostURLProcPtr posturl; 156 NPN_PostURLProcPtr posturl;
148 NPN_RequestReadProcPtr requestread; 157 NPN_RequestReadProcPtr requestread;
149 NPN_NewStreamProcPtr newstream; 158 NPN_NewStreamProcPtr newstream;
150 NPN_WriteProcPtr write; 159 NPN_WriteProcPtr write;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 NPN_EnumerateProcPtr enumerate; 197 NPN_EnumerateProcPtr enumerate;
189 NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall; 198 NPN_PluginThreadAsyncCallProcPtr pluginthreadasynccall;
190 NPN_ConstructProcPtr construct; 199 NPN_ConstructProcPtr construct;
191 NPN_GetValueForURLPtr getvalueforurl; 200 NPN_GetValueForURLPtr getvalueforurl;
192 NPN_SetValueForURLPtr setvalueforurl; 201 NPN_SetValueForURLPtr setvalueforurl;
193 NPN_GetAuthenticationInfoPtr getauthenticationinfo; 202 NPN_GetAuthenticationInfoPtr getauthenticationinfo;
194 NPN_ScheduleTimerPtr scheduletimer; 203 NPN_ScheduleTimerPtr scheduletimer;
195 NPN_UnscheduleTimerPtr unscheduletimer; 204 NPN_UnscheduleTimerPtr unscheduletimer;
196 NPN_PopUpContextMenuPtr popupcontextmenu; 205 NPN_PopUpContextMenuPtr popupcontextmenu;
197 NPN_ConvertPointPtr convertpoint; 206 NPN_ConvertPointPtr convertpoint;
207 NPN_HandleEventPtr handleevent;
208 NPN_UnfocusInstancePtr unfocusinstance;
209 NPN_URLRedirectResponsePtr urlredirectresponse;
198 } NPNetscapeFuncs; 210 } NPNetscapeFuncs;
199 211
200 #ifdef XP_MACOSX 212 #ifdef XP_MACOSX
201 /* 213 /*
202 * Mac OS X version(s) of NP_GetMIMEDescription(const char *) 214 * Mac OS X version(s) of NP_GetMIMEDescription(const char *)
203 * These can be called to retreive MIME information from the plugin dynamically 215 * These can be called to retreive MIME information from the plugin dynamically
204 * 216 *
205 * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way 217 * 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 218 * to get mime info from the plugin only on OSX and may not be supported
207 * in furture version -- use NP_GetMIMEDescription instead 219 * in furture version -- use NP_GetMIMEDescription instead
208 */ 220 */
209 enum 221 enum
210 { 222 {
211 kBPSupportedMIMETypesStructVers_1 = 1 223 kBPSupportedMIMETypesStructVers_1 = 1
212 }; 224 };
213 typedef struct _BPSupportedMIMETypes 225 typedef struct _BPSupportedMIMETypes
214 { 226 {
215 SInt32 structVersion; /* struct version */ 227 SInt32 structVersion; /* struct version */
216 Handle typeStrings; /* STR# formated handle, allocated by plug-in */ 228 Handle typeStrings; /* STR# formated handle, allocated by plug-in */
217 Handle infoStrings; /* STR# formated handle, allocated by plug-in */ 229 Handle infoStrings; /* STR# formated handle, allocated by plug-in */
218 } BPSupportedMIMETypes; 230 } BPSupportedMIMETypes;
219 OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); 231 OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags);
220 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" 232 #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription"
221 typedef const char* (*NP_GetMIMEDescriptionProcPtr)(); 233 typedef const char* (*NP_GetMIMEDescriptionProcPtr)(void);
222 typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32); 234 typedef OSErr (*BP_GetSupportedMIMETypesProcPtr)(BPSupportedMIMETypes*, UInt32);
223 #endif 235 #endif
224 236
225 #endif /* npfunctions_h_ */ 237 #endif /* npfunctions_h_ */
OLDNEW
« no previous file with comments | « third_party/npapi/bindings/npapi.h ('k') | webkit/glue/plugins/plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698