williamr@2
|
1 |
/* ***** BEGIN LICENSE BLOCK *****
|
williamr@2
|
2 |
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
williamr@2
|
3 |
*
|
williamr@2
|
4 |
* The contents of this file are subject to the Netscape Public License
|
williamr@2
|
5 |
* Version 1.1 (the "License"); you may not use this file except in
|
williamr@2
|
6 |
* compliance with the License. You may obtain a copy of the License at
|
williamr@2
|
7 |
* http://www.mozilla.org/NPL/
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Software distributed under the License is distributed on an "AS IS" basis,
|
williamr@2
|
10 |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
williamr@2
|
11 |
* for the specific language governing rights and limitations under the
|
williamr@2
|
12 |
* License.
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* The Original Code is mozilla.org code.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
* The Initial Developer of the Original Code is
|
williamr@2
|
17 |
* Netscape Communications Corporation.
|
williamr@2
|
18 |
* Portions created by the Initial Developer are Copyright (C) 1998
|
williamr@2
|
19 |
* the Initial Developer. All Rights Reserved.
|
williamr@2
|
20 |
*
|
williamr@2
|
21 |
* Contributor(s):
|
williamr@2
|
22 |
* Portions Copyright (c) 2004-2006, Nokia Corporation
|
williamr@2
|
23 |
*
|
williamr@2
|
24 |
*
|
williamr@2
|
25 |
* Alternatively, the contents of this file may be used under the terms of
|
williamr@2
|
26 |
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
williamr@2
|
27 |
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
williamr@2
|
28 |
* in which case the provisions of the GPL or the LGPL are applicable instead
|
williamr@2
|
29 |
* of those above. If you wish to allow use of your version of this file only
|
williamr@2
|
30 |
* under the terms of either the GPL or the LGPL, and not to allow others to
|
williamr@2
|
31 |
* use your version of this file under the terms of the NPL, indicate your
|
williamr@2
|
32 |
* decision by deleting the provisions above and replace them with the notice
|
williamr@2
|
33 |
* and other provisions required by the GPL or the LGPL. If you do not delete
|
williamr@2
|
34 |
* the provisions above, a recipient may use your version of this file under
|
williamr@2
|
35 |
* the terms of any one of the NPL, the GPL or the LGPL.
|
williamr@2
|
36 |
*
|
williamr@2
|
37 |
* ***** END LICENSE BLOCK ***** */
|
williamr@2
|
38 |
|
williamr@2
|
39 |
/* NOTES:
|
williamr@2
|
40 |
* Nokia modified this file, by changing certain variables for the purpose of
|
williamr@2
|
41 |
* porting the file to the Symbian platform on May 1st, 2004.
|
williamr@2
|
42 |
*/
|
williamr@2
|
43 |
|
williamr@2
|
44 |
/*
|
williamr@2
|
45 |
* Netscape client plug-in API spec
|
williamr@2
|
46 |
*/
|
williamr@2
|
47 |
|
williamr@2
|
48 |
#ifndef _NPAPI_H_
|
williamr@2
|
49 |
#define _NPAPI_H_
|
williamr@2
|
50 |
|
williamr@4
|
51 |
#define GENERIC_CONTEXTS
|
williamr@4
|
52 |
|
williamr@2
|
53 |
#ifdef INCLUDE_JAVA
|
williamr@2
|
54 |
#include "jri.h" /* Java Runtime Interface */
|
williamr@2
|
55 |
#else
|
williamr@2
|
56 |
#ifndef __SYMBIAN32__
|
williamr@2
|
57 |
#define jref void *
|
williamr@2
|
58 |
#define JRIEnv void
|
williamr@2
|
59 |
#endif
|
williamr@2
|
60 |
#endif
|
williamr@2
|
61 |
|
williamr@2
|
62 |
#ifdef _WIN32
|
williamr@2
|
63 |
# ifndef XP_WIN
|
williamr@2
|
64 |
# define XP_WIN 1
|
williamr@2
|
65 |
# endif /* XP_WIN */
|
williamr@2
|
66 |
#endif /* _WIN32 */
|
williamr@2
|
67 |
|
williamr@2
|
68 |
#ifdef __MWERKS__
|
williamr@2
|
69 |
# define _declspec __declspec
|
williamr@2
|
70 |
# ifdef macintosh
|
williamr@2
|
71 |
# ifndef XP_MAC
|
williamr@2
|
72 |
# define XP_MAC 1
|
williamr@2
|
73 |
# endif /* XP_MAC */
|
williamr@2
|
74 |
# endif /* macintosh */
|
williamr@2
|
75 |
# ifdef __INTEL__
|
williamr@2
|
76 |
# undef NULL
|
williamr@2
|
77 |
# ifndef XP_WIN
|
williamr@2
|
78 |
# define XP_WIN 1
|
williamr@2
|
79 |
# endif /* __INTEL__ */
|
williamr@2
|
80 |
# endif /* XP_PC */
|
williamr@2
|
81 |
#endif /* __MWERKS__ */
|
williamr@2
|
82 |
|
williamr@2
|
83 |
#ifdef __SYMBIAN32__
|
williamr@2
|
84 |
#undef XP_WIN
|
williamr@2
|
85 |
#endif
|
williamr@2
|
86 |
|
williamr@2
|
87 |
#if defined(__APPLE_CC__) && !defined(__MACOS_CLASSIC__)
|
williamr@2
|
88 |
# define XP_MACOSX
|
williamr@2
|
89 |
#endif
|
williamr@2
|
90 |
|
williamr@2
|
91 |
#ifdef XP_MAC
|
williamr@2
|
92 |
#include <Quickdraw.h>
|
williamr@2
|
93 |
#include <Events.h>
|
williamr@2
|
94 |
#endif
|
williamr@2
|
95 |
|
williamr@2
|
96 |
#ifdef XP_MACOSX
|
williamr@2
|
97 |
#include <Carbon/Carbon.h>
|
williamr@2
|
98 |
#include <ApplicationServices/ApplicationServices.h>
|
williamr@2
|
99 |
#include <OpenGL/OpenGL.h>
|
williamr@2
|
100 |
#endif
|
williamr@2
|
101 |
|
williamr@2
|
102 |
#ifdef XP_UNIX
|
williamr@2
|
103 |
#include <X11/Xlib.h>
|
williamr@2
|
104 |
#include <X11/Xutil.h>
|
williamr@2
|
105 |
#endif
|
williamr@2
|
106 |
|
williamr@2
|
107 |
#ifdef XP_WIN
|
williamr@2
|
108 |
#include <windows.h>
|
williamr@2
|
109 |
#endif
|
williamr@2
|
110 |
|
williamr@2
|
111 |
#ifdef __SYMBIAN32__
|
williamr@2
|
112 |
#include <np_defines.h>
|
williamr@2
|
113 |
#endif
|
williamr@2
|
114 |
#if defined(XP_MACOSX) && defined(__LP64__)
|
williamr@2
|
115 |
#error 64-bit Netscape plug-ins are not supported on Mac OS X
|
williamr@2
|
116 |
#endif
|
williamr@2
|
117 |
|
williamr@2
|
118 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
119 |
/* Plugin Version Constants */
|
williamr@2
|
120 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
121 |
|
williamr@2
|
122 |
#define NP_VERSION_MAJOR 0
|
williamr@2
|
123 |
#define NP_VERSION_MINOR 18
|
williamr@2
|
124 |
|
williamr@2
|
125 |
|
williamr@2
|
126 |
|
williamr@2
|
127 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
128 |
/* Definition of Basic Types */
|
williamr@2
|
129 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
130 |
|
williamr@2
|
131 |
#ifndef _UINT16
|
williamr@2
|
132 |
#define _UINT16
|
williamr@2
|
133 |
typedef unsigned short uint16;
|
williamr@2
|
134 |
#endif
|
williamr@2
|
135 |
|
williamr@2
|
136 |
#ifndef _UINT32
|
williamr@2
|
137 |
#define _UINT32
|
williamr@2
|
138 |
#ifdef __LP64__
|
williamr@2
|
139 |
typedef unsigned int uint32;
|
williamr@2
|
140 |
#else /* __LP64__ */
|
williamr@2
|
141 |
typedef unsigned long uint32;
|
williamr@2
|
142 |
#endif /* __LP64__ */
|
williamr@2
|
143 |
#endif
|
williamr@2
|
144 |
|
williamr@2
|
145 |
#ifndef _INT16
|
williamr@2
|
146 |
#define _INT16
|
williamr@2
|
147 |
typedef short int16;
|
williamr@2
|
148 |
#endif
|
williamr@2
|
149 |
|
williamr@2
|
150 |
#ifndef _INT32
|
williamr@2
|
151 |
#define _INT32
|
williamr@2
|
152 |
#ifdef __LP64__
|
williamr@2
|
153 |
typedef int int32;
|
williamr@2
|
154 |
#else /* __LP64__ */
|
williamr@2
|
155 |
typedef long int32;
|
williamr@2
|
156 |
#endif /* __LP64__ */
|
williamr@2
|
157 |
#endif
|
williamr@2
|
158 |
|
williamr@2
|
159 |
#ifndef FALSE
|
williamr@2
|
160 |
#define FALSE (0)
|
williamr@2
|
161 |
#endif
|
williamr@2
|
162 |
#ifndef TRUE
|
williamr@2
|
163 |
#define TRUE (1)
|
williamr@2
|
164 |
#endif
|
williamr@2
|
165 |
#ifndef NULL
|
williamr@2
|
166 |
#define NULL (0L)
|
williamr@2
|
167 |
#endif
|
williamr@2
|
168 |
|
williamr@2
|
169 |
typedef unsigned char NPBool;
|
williamr@2
|
170 |
typedef int16 NPError;
|
williamr@2
|
171 |
typedef int16 NPReason;
|
williamr@2
|
172 |
#ifndef __SYMBIAN32__
|
williamr@2
|
173 |
typedef char* NPMIMEType;
|
williamr@2
|
174 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
175 |
typedef const TDesC8& NPMIMEType;
|
williamr@2
|
176 |
#endif
|
williamr@2
|
177 |
|
williamr@2
|
178 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
179 |
/* Structures and definitions */
|
williamr@2
|
180 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
181 |
|
williamr@2
|
182 |
#if !defined(__LP64__)
|
williamr@2
|
183 |
#if defined(XP_MAC) || defined(XP_MACOSX)
|
williamr@2
|
184 |
#pragma options align=mac68k
|
williamr@2
|
185 |
#endif
|
williamr@2
|
186 |
#endif /* __LP64__ */
|
williamr@2
|
187 |
|
williamr@2
|
188 |
/*
|
williamr@2
|
189 |
* NPP is a plug-in's opaque instance handle
|
williamr@2
|
190 |
*/
|
williamr@2
|
191 |
#ifdef __SYMBIAN32__
|
williamr@2
|
192 |
#ifndef _NP_RUNTIME_H_NPP
|
williamr@2
|
193 |
#define _NP_RUNTIME_H_NPP
|
williamr@2
|
194 |
typedef struct _NPP
|
williamr@2
|
195 |
{
|
williamr@2
|
196 |
void* pdata; /* plug-in private data */
|
williamr@2
|
197 |
void* ndata; /* netscape private data */
|
williamr@2
|
198 |
} NPP_t;
|
williamr@2
|
199 |
|
williamr@2
|
200 |
typedef NPP_t* NPP;
|
williamr@2
|
201 |
#endif // _NP_RUNTIME_H_NPP
|
williamr@2
|
202 |
#else
|
williamr@2
|
203 |
typedef struct _NPP
|
williamr@2
|
204 |
{
|
williamr@2
|
205 |
void* pdata; /* plug-in private data */
|
williamr@2
|
206 |
void* ndata; /* netscape private data */
|
williamr@2
|
207 |
} NPP_t;
|
williamr@2
|
208 |
|
williamr@2
|
209 |
typedef NPP_t* NPP;
|
williamr@2
|
210 |
#endif //
|
williamr@2
|
211 |
|
williamr@2
|
212 |
typedef struct _NPStream
|
williamr@2
|
213 |
{
|
williamr@2
|
214 |
void* pdata; /* plug-in private data */
|
williamr@2
|
215 |
void* ndata; /* netscape private data */
|
williamr@2
|
216 |
#ifndef __SYMBIAN32__
|
williamr@2
|
217 |
const char* url;
|
williamr@2
|
218 |
#else /*__SYMBIAN32__*/
|
williamr@2
|
219 |
HBufC* url;
|
williamr@2
|
220 |
#endif
|
williamr@2
|
221 |
uint32 end;
|
williamr@2
|
222 |
uint32 lastmodified;
|
williamr@2
|
223 |
void* notifyData;
|
williamr@2
|
224 |
const char* headers; /* Response headers from host.
|
williamr@2
|
225 |
* Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
|
williamr@2
|
226 |
* Used for HTTP only; NULL for non-HTTP.
|
williamr@2
|
227 |
* Available from NPP_NewStream onwards.
|
williamr@2
|
228 |
* Plugin should copy this data before storing it.
|
williamr@2
|
229 |
* Includes HTTP status line and all headers,
|
williamr@2
|
230 |
* preferably verbatim as received from server,
|
williamr@2
|
231 |
* headers formatted as in HTTP ("Header: Value"),
|
williamr@2
|
232 |
* and newlines (\n, NOT \r\n) separating lines.
|
williamr@2
|
233 |
* Terminated by \n\0 (NOT \n\n\0). */
|
williamr@2
|
234 |
} NPStream;
|
williamr@2
|
235 |
|
williamr@2
|
236 |
|
williamr@2
|
237 |
typedef struct _NPByteRange
|
williamr@2
|
238 |
{
|
williamr@2
|
239 |
int32 offset; /* negative offset means from the end */
|
williamr@2
|
240 |
uint32 length;
|
williamr@2
|
241 |
struct _NPByteRange* next;
|
williamr@2
|
242 |
} NPByteRange;
|
williamr@2
|
243 |
|
williamr@2
|
244 |
|
williamr@2
|
245 |
typedef struct _NPSavedData
|
williamr@2
|
246 |
{
|
williamr@2
|
247 |
int32 len;
|
williamr@2
|
248 |
void* buf;
|
williamr@2
|
249 |
} NPSavedData;
|
williamr@2
|
250 |
|
williamr@2
|
251 |
|
williamr@2
|
252 |
typedef struct _NPRect
|
williamr@2
|
253 |
{
|
williamr@2
|
254 |
uint16 top;
|
williamr@2
|
255 |
uint16 left;
|
williamr@2
|
256 |
uint16 bottom;
|
williamr@2
|
257 |
uint16 right;
|
williamr@2
|
258 |
} NPRect;
|
williamr@2
|
259 |
|
williamr@2
|
260 |
|
williamr@2
|
261 |
#ifdef XP_UNIX
|
williamr@2
|
262 |
/*
|
williamr@2
|
263 |
* Unix specific structures and definitions
|
williamr@2
|
264 |
*/
|
williamr@2
|
265 |
|
williamr@2
|
266 |
/*
|
williamr@2
|
267 |
* Callback Structures.
|
williamr@2
|
268 |
*
|
williamr@2
|
269 |
* These are used to pass additional platform specific information.
|
williamr@2
|
270 |
*/
|
williamr@2
|
271 |
enum {
|
williamr@2
|
272 |
NP_SETWINDOW = 1,
|
williamr@2
|
273 |
NP_PRINT
|
williamr@2
|
274 |
};
|
williamr@2
|
275 |
|
williamr@2
|
276 |
typedef struct
|
williamr@2
|
277 |
{
|
williamr@2
|
278 |
int32 type;
|
williamr@2
|
279 |
} NPAnyCallbackStruct;
|
williamr@2
|
280 |
|
williamr@2
|
281 |
typedef struct
|
williamr@2
|
282 |
{
|
williamr@2
|
283 |
int32 type;
|
williamr@2
|
284 |
Display* display;
|
williamr@2
|
285 |
Visual* visual;
|
williamr@2
|
286 |
Colormap colormap;
|
williamr@2
|
287 |
unsigned int depth;
|
williamr@2
|
288 |
} NPSetWindowCallbackStruct;
|
williamr@2
|
289 |
|
williamr@2
|
290 |
typedef struct
|
williamr@2
|
291 |
{
|
williamr@2
|
292 |
int32 type;
|
williamr@2
|
293 |
FILE* fp;
|
williamr@2
|
294 |
} NPPrintCallbackStruct;
|
williamr@2
|
295 |
|
williamr@2
|
296 |
#endif /* XP_UNIX */
|
williamr@2
|
297 |
|
williamr@2
|
298 |
/*
|
williamr@2
|
299 |
* The following masks are applied on certain platforms to NPNV and
|
williamr@2
|
300 |
* NPPV selectors that pass around pointers to COM interfaces. Newer
|
williamr@2
|
301 |
* compilers on some platforms may generate vtables that are not
|
williamr@2
|
302 |
* compatible with older compilers. To prevent older plugins from
|
williamr@2
|
303 |
* not understanding a new browser's ABI, these masks change the
|
williamr@2
|
304 |
* values of those selectors on those platforms. To remain backwards
|
williamr@2
|
305 |
* compatible with differenet versions of the browser, plugins can
|
williamr@2
|
306 |
* use these masks to dynamically determine and use the correct C++
|
williamr@2
|
307 |
* ABI that the browser is expecting. This does not apply to Windows
|
williamr@2
|
308 |
* as Microsoft's COM ABI will likely not change.
|
williamr@2
|
309 |
*/
|
williamr@2
|
310 |
|
williamr@2
|
311 |
#define NP_ABI_GCC3_MASK 0x10000000
|
williamr@2
|
312 |
/*
|
williamr@2
|
313 |
* gcc 3.x generated vtables on UNIX and OSX are incompatible with
|
williamr@2
|
314 |
* previous compilers.
|
williamr@2
|
315 |
*/
|
williamr@2
|
316 |
#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
|
williamr@2
|
317 |
#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
|
williamr@2
|
318 |
#else
|
williamr@2
|
319 |
#define _NP_ABI_MIXIN_FOR_GCC3 0
|
williamr@2
|
320 |
#endif
|
williamr@2
|
321 |
|
williamr@2
|
322 |
#define NP_ABI_MACHO_MASK 0x01000000
|
williamr@2
|
323 |
/*
|
williamr@2
|
324 |
* On OSX, the Mach-O executable format is significantly
|
williamr@2
|
325 |
* different than CFM. In addition to having a different
|
williamr@2
|
326 |
* C++ ABI, it also has has different C calling convention.
|
williamr@2
|
327 |
* You must use glue code when calling between CFM and
|
williamr@2
|
328 |
* Mach-O C functions.
|
williamr@2
|
329 |
*/
|
williamr@2
|
330 |
#if (defined(TARGET_RT_MAC_MACHO))
|
williamr@2
|
331 |
#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
|
williamr@2
|
332 |
#else
|
williamr@2
|
333 |
#define _NP_ABI_MIXIN_FOR_MACHO 0
|
williamr@2
|
334 |
#endif
|
williamr@2
|
335 |
|
williamr@2
|
336 |
|
williamr@2
|
337 |
#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
|
williamr@2
|
338 |
|
williamr@2
|
339 |
/*
|
williamr@2
|
340 |
* List of variable names for which NPP_GetValue shall be implemented
|
williamr@2
|
341 |
*/
|
williamr@2
|
342 |
typedef enum {
|
williamr@2
|
343 |
NPPVpluginNameString = 1,
|
williamr@2
|
344 |
NPPVpluginDescriptionString,
|
williamr@2
|
345 |
NPPVpluginWindowBool,
|
williamr@2
|
346 |
NPPVpluginTransparentBool,
|
williamr@2
|
347 |
|
williamr@2
|
348 |
NPPVjavaClass, /* Not implemented in WebKit */
|
williamr@2
|
349 |
NPPVpluginWindowSize, /* Not implemented in WebKit */
|
williamr@2
|
350 |
NPPVpluginTimerInterval, /* Not implemented in WebKit */
|
williamr@2
|
351 |
|
williamr@2
|
352 |
NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
|
williamr@2
|
353 |
NPPVpluginScriptableIID = 11, /* Not implemented in WebKit */
|
williamr@2
|
354 |
|
williamr@2
|
355 |
/* 12 and over are available on Mozilla builds starting with 0.9.9 */
|
williamr@2
|
356 |
NPPVjavascriptPushCallerBool = 12, /* Not implemented in WebKit */
|
williamr@2
|
357 |
NPPVpluginKeepLibraryInMemory = 13, /* Not implemented in WebKit */
|
williamr@2
|
358 |
NPPVpluginNeedsXEmbed = 14, /* Not implemented in WebKit */
|
williamr@2
|
359 |
|
williamr@2
|
360 |
/* Get the NPObject for scripting the plugin. */
|
williamr@2
|
361 |
NPPVpluginScriptableNPObject = 15,
|
williamr@2
|
362 |
|
williamr@2
|
363 |
#ifdef __SYMBIAN32__
|
williamr@2
|
364 |
// Custom NPP variables, starting from 100 till 1000
|
williamr@2
|
365 |
NPPVPluginFocusPosition = 100,
|
williamr@2
|
366 |
NPPVPluginDeactivate = 101,
|
williamr@2
|
367 |
NPPVPluginZoom = 102,
|
williamr@2
|
368 |
NPPVPluginPointerEvent = 103,
|
williamr@2
|
369 |
NPPVpluginInteractiveBool = 1000,
|
williamr@2
|
370 |
#endif
|
williamr@2
|
371 |
|
williamr@2
|
372 |
/* Get the plugin value (as \0-terminated UTF-8 string data) for
|
williamr@2
|
373 |
* form submission if the plugin is part of a form. Use
|
williamr@2
|
374 |
* NPN_MemAlloc() to allocate memory for the string data.
|
williamr@2
|
375 |
*/
|
williamr@2
|
376 |
NPPVformValue = 16, /* Not implemented in WebKit */
|
williamr@2
|
377 |
NPPVpluginFullScreenBool = 17 /* Not implemented in WebKit */
|
williamr@2
|
378 |
} NPPVariable;
|
williamr@2
|
379 |
|
williamr@2
|
380 |
/*
|
williamr@2
|
381 |
* List of variable names for which NPN_GetValue is implemented by Mozilla
|
williamr@2
|
382 |
*/
|
williamr@2
|
383 |
typedef enum {
|
williamr@2
|
384 |
NPNVxDisplay = 1,
|
williamr@2
|
385 |
NPNVxtAppContext,
|
williamr@2
|
386 |
NPNVnetscapeWindow,
|
williamr@2
|
387 |
NPNVjavascriptEnabledBool,
|
williamr@2
|
388 |
NPNVasdEnabledBool,
|
williamr@2
|
389 |
NPNVisOfflineBool,
|
williamr@2
|
390 |
|
williamr@2
|
391 |
/* 10 and over are available on Mozilla builds starting with 0.9.4 */
|
williamr@2
|
392 |
NPNVserviceManager = (10 | NP_ABI_MASK), /* Not implemented in WebKit */
|
williamr@2
|
393 |
NPNVDOMElement = (11 | NP_ABI_MASK), /* Not implemented in WebKit */
|
williamr@2
|
394 |
NPNVDOMWindow = (12 | NP_ABI_MASK), /* Not implemented in WebKit */
|
williamr@2
|
395 |
NPNVToolkit = (13 | NP_ABI_MASK), /* Not implemented in WebKit */
|
williamr@2
|
396 |
NPNVSupportsXEmbedBool = 14, /* Not implemented in WebKit */
|
williamr@2
|
397 |
|
williamr@2
|
398 |
/* Get the NPObject wrapper for the browser window. */
|
williamr@2
|
399 |
NPNVWindowNPObject = 15,
|
williamr@2
|
400 |
|
williamr@2
|
401 |
/* Get the NPObject wrapper for the plugins DOM element. */
|
williamr@2
|
402 |
NPNVPluginElementNPObject,
|
williamr@2
|
403 |
|
williamr@2
|
404 |
#ifdef XP_MACOSX
|
williamr@2
|
405 |
, NPNVpluginDrawingModel = 1000 /* The NPDrawingModel specified by the plugin */
|
williamr@2
|
406 |
|
williamr@2
|
407 |
#ifndef NP_NO_QUICKDRAW
|
williamr@2
|
408 |
, NPNVsupportsQuickDrawBool = 2000 /* TRUE if the browser supports the QuickDraw drawing model */
|
williamr@2
|
409 |
#endif
|
williamr@2
|
410 |
, NPNVsupportsCoreGraphicsBool = 2001 /* TRUE if the browser supports the CoreGraphics drawing model */
|
williamr@2
|
411 |
, NPNVsupportsOpenGLBool = 2002 /* TRUE if the browser supports the OpenGL drawing model (CGL on Mac) */
|
williamr@2
|
412 |
#endif /* XP_MACOSX */
|
williamr@2
|
413 |
|
williamr@2
|
414 |
/* Get the id of the currently connected access point */
|
williamr@4
|
415 |
NPNNetworkAccess,
|
williamr@4
|
416 |
NPNVGenericParameter,
|
williamr@4
|
417 |
NPNVSupportsWindowless
|
williamr@2
|
418 |
} NPNVariable;
|
williamr@2
|
419 |
|
williamr@4
|
420 |
#ifdef GENERIC_CONTEXTS
|
williamr@4
|
421 |
|
williamr@4
|
422 |
union NPN_GenericParam {
|
williamr@4
|
423 |
|
williamr@4
|
424 |
NPN_GenericParam(int aIntValue)
|
williamr@4
|
425 |
:intValue(aIntValue)
|
williamr@4
|
426 |
{
|
williamr@4
|
427 |
|
williamr@4
|
428 |
}
|
williamr@4
|
429 |
|
williamr@4
|
430 |
NPN_GenericParam(bool aBoolValue)
|
williamr@4
|
431 |
:boolValue(aBoolValue)
|
williamr@4
|
432 |
{
|
williamr@4
|
433 |
|
williamr@4
|
434 |
}
|
williamr@4
|
435 |
|
williamr@4
|
436 |
NPN_GenericParam(const TDesC& aStrValue)
|
williamr@4
|
437 |
:strValue(aStrValue)
|
williamr@4
|
438 |
{
|
williamr@4
|
439 |
|
williamr@4
|
440 |
}
|
williamr@4
|
441 |
|
williamr@4
|
442 |
NPN_GenericParam(void* aVoidValue)
|
williamr@4
|
443 |
:voidValue(aVoidValue)
|
williamr@4
|
444 |
{
|
williamr@4
|
445 |
|
williamr@4
|
446 |
}
|
williamr@4
|
447 |
int intValue;
|
williamr@4
|
448 |
bool boolValue;
|
williamr@4
|
449 |
const TDesC& strValue;
|
williamr@4
|
450 |
void* voidValue;
|
williamr@4
|
451 |
};
|
williamr@4
|
452 |
|
williamr@4
|
453 |
|
williamr@4
|
454 |
typedef struct NPN_GenericElement{
|
williamr@4
|
455 |
|
williamr@4
|
456 |
NPN_GenericElement(const TDesC& aElementId, int aElementValue)
|
williamr@4
|
457 |
:genericElementId(aElementId), genericElementValue(aElementValue)
|
williamr@4
|
458 |
{
|
williamr@4
|
459 |
|
williamr@4
|
460 |
}
|
williamr@4
|
461 |
|
williamr@4
|
462 |
NPN_GenericElement(const TDesC& aElementId, bool aElementValue)
|
williamr@4
|
463 |
:genericElementId(aElementId), genericElementValue(aElementValue)
|
williamr@4
|
464 |
{
|
williamr@4
|
465 |
|
williamr@4
|
466 |
}
|
williamr@4
|
467 |
|
williamr@4
|
468 |
NPN_GenericElement(const TDesC& aElementId, void* aElementValue)
|
williamr@4
|
469 |
:genericElementId(aElementId), genericElementValue(aElementValue)
|
williamr@4
|
470 |
{
|
williamr@4
|
471 |
|
williamr@4
|
472 |
}
|
williamr@4
|
473 |
|
williamr@4
|
474 |
NPN_GenericElement(const TDesC& aElementId, const TDesC& aElementValue)
|
williamr@4
|
475 |
:genericElementId(aElementId), genericElementValue(aElementValue)
|
williamr@4
|
476 |
{
|
williamr@4
|
477 |
|
williamr@4
|
478 |
}
|
williamr@4
|
479 |
const TDesC& genericElementId;
|
williamr@4
|
480 |
NPN_GenericParam genericElementValue;
|
williamr@4
|
481 |
} GenericEntry;
|
williamr@4
|
482 |
#endif
|
williamr@2
|
483 |
/*
|
williamr@2
|
484 |
* The type of a NPWindow - it specifies the type of the data structure
|
williamr@2
|
485 |
* returned in the window field.
|
williamr@2
|
486 |
*/
|
williamr@2
|
487 |
typedef enum {
|
williamr@2
|
488 |
NPWindowTypeWindow = 1,
|
williamr@2
|
489 |
NPWindowTypeDrawable
|
williamr@2
|
490 |
} NPWindowType;
|
williamr@2
|
491 |
|
williamr@2
|
492 |
#ifdef XP_MACOSX
|
williamr@2
|
493 |
|
williamr@2
|
494 |
/*
|
williamr@2
|
495 |
* The drawing model for a Mac OS X plugin. These are the possible values for the NPNVpluginDrawingModel variable.
|
williamr@2
|
496 |
*/
|
williamr@2
|
497 |
|
williamr@2
|
498 |
typedef enum {
|
williamr@2
|
499 |
#ifndef NP_NO_QUICKDRAW
|
williamr@2
|
500 |
NPDrawingModelQuickDraw = 0,
|
williamr@2
|
501 |
#endif
|
williamr@2
|
502 |
NPDrawingModelCoreGraphics = 1,
|
williamr@2
|
503 |
NPDrawingModelOpenGL = 2
|
williamr@2
|
504 |
} NPDrawingModel;
|
williamr@2
|
505 |
|
williamr@2
|
506 |
#endif
|
williamr@2
|
507 |
|
williamr@2
|
508 |
typedef struct _NPWindow
|
williamr@2
|
509 |
{
|
williamr@2
|
510 |
void* window; /* Platform specific window handle */
|
williamr@2
|
511 |
int32 x; /* Position of top left corner relative */
|
williamr@2
|
512 |
int32 y; /* to a netscape page. */
|
williamr@2
|
513 |
uint32 width; /* Maximum window size */
|
williamr@2
|
514 |
uint32 height;
|
williamr@2
|
515 |
NPRect clipRect; /* Clipping rectangle in port coordinates */
|
williamr@2
|
516 |
/* Used by MAC only. */
|
williamr@2
|
517 |
#ifdef XP_UNIX
|
williamr@2
|
518 |
void * ws_info; /* Platform-dependent additonal data */
|
williamr@2
|
519 |
#endif /* XP_UNIX */
|
williamr@2
|
520 |
NPWindowType type; /* Is this a window or a drawable? */
|
williamr@2
|
521 |
} NPWindow;
|
williamr@2
|
522 |
|
williamr@2
|
523 |
|
williamr@2
|
524 |
typedef struct _NPFullPrint
|
williamr@2
|
525 |
{
|
williamr@2
|
526 |
NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */
|
williamr@2
|
527 |
/* printing */
|
williamr@2
|
528 |
NPBool printOne; /* TRUE if plugin should print one copy */
|
williamr@2
|
529 |
/* to default printer */
|
williamr@2
|
530 |
void* platformPrint; /* Platform-specific printing info */
|
williamr@2
|
531 |
} NPFullPrint;
|
williamr@2
|
532 |
|
williamr@2
|
533 |
typedef struct _NPEmbedPrint
|
williamr@2
|
534 |
{
|
williamr@2
|
535 |
NPWindow window;
|
williamr@2
|
536 |
void* platformPrint; /* Platform-specific printing info */
|
williamr@2
|
537 |
} NPEmbedPrint;
|
williamr@2
|
538 |
|
williamr@2
|
539 |
typedef struct _NPPrint
|
williamr@2
|
540 |
{
|
williamr@2
|
541 |
uint16 mode; /* NP_FULL or NP_EMBED */
|
williamr@2
|
542 |
union
|
williamr@2
|
543 |
{
|
williamr@2
|
544 |
NPFullPrint fullPrint; /* if mode is NP_FULL */
|
williamr@2
|
545 |
NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
|
williamr@2
|
546 |
} print;
|
williamr@2
|
547 |
} NPPrint;
|
williamr@2
|
548 |
|
williamr@2
|
549 |
#if defined(XP_MAC) || defined(XP_MACOSX)
|
williamr@2
|
550 |
typedef EventRecord NPEvent;
|
williamr@2
|
551 |
#elif defined(XP_WIN)
|
williamr@2
|
552 |
typedef struct _NPEvent
|
williamr@2
|
553 |
{
|
williamr@2
|
554 |
uint16 event;
|
williamr@2
|
555 |
uint32 wParam;
|
williamr@2
|
556 |
uint32 lParam;
|
williamr@2
|
557 |
} NPEvent;
|
williamr@2
|
558 |
#elif defined (XP_UNIX)
|
williamr@2
|
559 |
typedef XEvent NPEvent;
|
williamr@2
|
560 |
#elif defined (__SYMBIAN32__)
|
williamr@2
|
561 |
typedef struct _NPEvent
|
williamr@2
|
562 |
{
|
williamr@2
|
563 |
uint32 event;
|
williamr@2
|
564 |
void* param;
|
williamr@2
|
565 |
} NPEvent;
|
williamr@2
|
566 |
#else
|
williamr@2
|
567 |
typedef void* NPEvent;
|
williamr@2
|
568 |
#endif /* XP_MAC */
|
williamr@2
|
569 |
|
williamr@2
|
570 |
#if defined(XP_MAC)
|
williamr@2
|
571 |
typedef RgnHandle NPRegion;
|
williamr@2
|
572 |
#elif defined(XP_MACOSX)
|
williamr@2
|
573 |
/*
|
williamr@2
|
574 |
* NPRegion's type depends on the drawing model specified by the plugin (see NPNVpluginDrawingModel).
|
williamr@2
|
575 |
* NPQDRegion represents a QuickDraw RgnHandle and is used with the QuickDraw drawing model.
|
williamr@2
|
576 |
* NPCGRegion repesents a graphical region when using any other drawing model.
|
williamr@2
|
577 |
*/
|
williamr@2
|
578 |
typedef void *NPRegion;
|
williamr@2
|
579 |
#ifndef NP_NO_QUICKDRAW
|
williamr@2
|
580 |
typedef RgnHandle NPQDRegion;
|
williamr@2
|
581 |
#endif
|
williamr@2
|
582 |
typedef CGPathRef NPCGRegion;
|
williamr@2
|
583 |
#elif defined(XP_WIN)
|
williamr@2
|
584 |
typedef HRGN NPRegion;
|
williamr@2
|
585 |
#elif defined(XP_UNIX)
|
williamr@2
|
586 |
typedef Region NPRegion;
|
williamr@2
|
587 |
#else
|
williamr@2
|
588 |
typedef void *NPRegion;
|
williamr@2
|
589 |
#endif /* XP_MAC */
|
williamr@2
|
590 |
|
williamr@2
|
591 |
#ifdef XP_MACOSX
|
williamr@2
|
592 |
|
williamr@2
|
593 |
/*
|
williamr@2
|
594 |
* NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics
|
williamr@2
|
595 |
* as its drawing model.
|
williamr@2
|
596 |
*/
|
williamr@2
|
597 |
|
williamr@2
|
598 |
typedef struct NP_CGContext
|
williamr@2
|
599 |
{
|
williamr@2
|
600 |
CGContextRef context;
|
williamr@2
|
601 |
WindowRef window;
|
williamr@2
|
602 |
} NP_CGContext;
|
williamr@2
|
603 |
|
williamr@2
|
604 |
/*
|
williamr@2
|
605 |
* NP_GLContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelOpenGL as its
|
williamr@2
|
606 |
* drawing model.
|
williamr@2
|
607 |
*/
|
williamr@2
|
608 |
|
williamr@2
|
609 |
typedef struct NP_GLContext
|
williamr@2
|
610 |
{
|
williamr@2
|
611 |
CGLContextObj context;
|
williamr@2
|
612 |
WindowRef window;
|
williamr@2
|
613 |
} NP_GLContext;
|
williamr@2
|
614 |
|
williamr@2
|
615 |
#endif /* XP_MACOSX */
|
williamr@2
|
616 |
|
williamr@2
|
617 |
#if defined(XP_MAC) || defined(XP_MACOSX)
|
williamr@2
|
618 |
|
williamr@2
|
619 |
/*
|
williamr@2
|
620 |
* Mac-specific structures and definitions.
|
williamr@2
|
621 |
*/
|
williamr@2
|
622 |
|
williamr@2
|
623 |
#ifndef NP_NO_QUICKDRAW
|
williamr@2
|
624 |
|
williamr@2
|
625 |
/*
|
williamr@2
|
626 |
* NP_Port is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelQuickDraw as its
|
williamr@2
|
627 |
* drawing model, or the plugin does not specify a drawing model.
|
williamr@2
|
628 |
*
|
williamr@2
|
629 |
* It is not recommended that new plugins use NPDrawingModelQuickDraw or NP_Port, as QuickDraw has been
|
williamr@2
|
630 |
* deprecated in Mac OS X 10.5. CoreGraphics is the preferred drawing API.
|
williamr@2
|
631 |
*
|
williamr@2
|
632 |
* NP_Port is not available in 64-bit.
|
williamr@2
|
633 |
*/
|
williamr@2
|
634 |
|
williamr@2
|
635 |
typedef struct NP_Port
|
williamr@2
|
636 |
{
|
williamr@2
|
637 |
CGrafPtr port; /* Grafport */
|
williamr@2
|
638 |
int32 portx; /* position inside the topmost window */
|
williamr@2
|
639 |
int32 porty;
|
williamr@2
|
640 |
} NP_Port;
|
williamr@2
|
641 |
|
williamr@2
|
642 |
#endif /* NP_NO_QUICKDRAW */
|
williamr@2
|
643 |
|
williamr@2
|
644 |
/*
|
williamr@2
|
645 |
* Non-standard event types that can be passed to HandleEvent
|
williamr@2
|
646 |
*/
|
williamr@2
|
647 |
#define getFocusEvent (osEvt + 16)
|
williamr@2
|
648 |
#define loseFocusEvent (osEvt + 17)
|
williamr@2
|
649 |
#define adjustCursorEvent (osEvt + 18)
|
williamr@2
|
650 |
|
williamr@2
|
651 |
#endif /* XP_MAC */
|
williamr@2
|
652 |
|
williamr@2
|
653 |
|
williamr@2
|
654 |
/*
|
williamr@2
|
655 |
* Values for mode passed to NPP_New:
|
williamr@2
|
656 |
*/
|
williamr@2
|
657 |
#define NP_EMBED 1
|
williamr@2
|
658 |
#define NP_FULL 2
|
williamr@2
|
659 |
|
williamr@2
|
660 |
/*
|
williamr@2
|
661 |
* Values for stream type passed to NPP_NewStream:
|
williamr@2
|
662 |
*/
|
williamr@2
|
663 |
#define NP_NORMAL 1
|
williamr@2
|
664 |
#define NP_SEEK 2
|
williamr@2
|
665 |
#define NP_ASFILE 3
|
williamr@2
|
666 |
#define NP_ASFILEONLY 4
|
williamr@2
|
667 |
|
williamr@2
|
668 |
#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
|
williamr@2
|
669 |
|
williamr@2
|
670 |
#if !defined(__LP64__)
|
williamr@2
|
671 |
#if defined(XP_MAC) || defined(XP_MACOSX)
|
williamr@2
|
672 |
#pragma options align=reset
|
williamr@2
|
673 |
#endif
|
williamr@2
|
674 |
#endif /* __LP64__ */
|
williamr@2
|
675 |
|
williamr@2
|
676 |
|
williamr@2
|
677 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
678 |
/* Error and Reason Code definitions */
|
williamr@2
|
679 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
680 |
|
williamr@2
|
681 |
/*
|
williamr@2
|
682 |
* Values of type NPError:
|
williamr@2
|
683 |
*/
|
williamr@2
|
684 |
#define NPERR_BASE 0
|
williamr@2
|
685 |
#define NPERR_NO_ERROR (NPERR_BASE + 0)
|
williamr@2
|
686 |
#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
|
williamr@2
|
687 |
#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
|
williamr@2
|
688 |
#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
|
williamr@2
|
689 |
#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
|
williamr@2
|
690 |
#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
|
williamr@2
|
691 |
#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
|
williamr@2
|
692 |
#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
|
williamr@2
|
693 |
#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
|
williamr@2
|
694 |
#define NPERR_INVALID_PARAM (NPERR_BASE + 9)
|
williamr@2
|
695 |
#define NPERR_INVALID_URL (NPERR_BASE + 10)
|
williamr@2
|
696 |
#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
|
williamr@2
|
697 |
#define NPERR_NO_DATA (NPERR_BASE + 12)
|
williamr@2
|
698 |
#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
|
williamr@2
|
699 |
|
williamr@2
|
700 |
/*
|
williamr@2
|
701 |
* Values of type NPReason:
|
williamr@2
|
702 |
*/
|
williamr@2
|
703 |
#define NPRES_BASE 0
|
williamr@2
|
704 |
#define NPRES_DONE (NPRES_BASE + 0)
|
williamr@2
|
705 |
#define NPRES_NETWORK_ERR (NPRES_BASE + 1)
|
williamr@2
|
706 |
#define NPRES_USER_BREAK (NPRES_BASE + 2)
|
williamr@2
|
707 |
|
williamr@2
|
708 |
/*
|
williamr@2
|
709 |
* Don't use these obsolete error codes any more.
|
williamr@2
|
710 |
*/
|
williamr@2
|
711 |
#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
|
williamr@2
|
712 |
#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
|
williamr@2
|
713 |
#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
|
williamr@2
|
714 |
|
williamr@2
|
715 |
/*
|
williamr@2
|
716 |
* Version feature information
|
williamr@2
|
717 |
*/
|
williamr@2
|
718 |
#define NPVERS_HAS_STREAMOUTPUT 8
|
williamr@2
|
719 |
#define NPVERS_HAS_NOTIFICATION 9
|
williamr@2
|
720 |
#define NPVERS_HAS_LIVECONNECT 9
|
williamr@2
|
721 |
#define NPVERS_WIN16_HAS_LIVECONNECT 9
|
williamr@2
|
722 |
#define NPVERS_68K_HAS_LIVECONNECT 11
|
williamr@2
|
723 |
#define NPVERS_HAS_WINDOWLESS 11
|
williamr@2
|
724 |
#define NPVERS_HAS_XPCONNECT_SCRIPTING 13 /* Not implemented in WebKit */
|
williamr@2
|
725 |
#define NPVERS_HAS_NPRUNTIME_SCRIPTING 14
|
williamr@2
|
726 |
#define NPVERS_HAS_FORM_VALUES 15 /* Not implemented in WebKit; see bug 13061 */
|
williamr@2
|
727 |
#define NPVERS_HAS_POPUPS_ENABLED_STATE 16 /* Not implemented in WebKit */
|
williamr@2
|
728 |
#define NPVERS_HAS_RESPONSE_HEADERS 17
|
williamr@2
|
729 |
#define NPVERS_HAS_NPOBJECT_ENUM 18
|
williamr@2
|
730 |
|
williamr@2
|
731 |
|
williamr@2
|
732 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
733 |
/* Function Prototypes */
|
williamr@2
|
734 |
/*----------------------------------------------------------------------*/
|
williamr@2
|
735 |
|
williamr@2
|
736 |
#if defined(_WINDOWS) && !defined(WIN32)
|
williamr@2
|
737 |
#define NP_LOADDS _loadds
|
williamr@2
|
738 |
#else
|
williamr@2
|
739 |
#define NP_LOADDS
|
williamr@2
|
740 |
#endif
|
williamr@2
|
741 |
|
williamr@2
|
742 |
#ifndef __SYMBIAN32__
|
williamr@2
|
743 |
#ifdef __cplusplus
|
williamr@2
|
744 |
extern "C" {
|
williamr@2
|
745 |
#endif
|
williamr@2
|
746 |
#endif
|
williamr@2
|
747 |
|
williamr@2
|
748 |
/*
|
williamr@2
|
749 |
* NPP_* functions are provided by the plugin and called by the navigator.
|
williamr@2
|
750 |
*/
|
williamr@2
|
751 |
|
williamr@2
|
752 |
#ifdef XP_UNIX
|
williamr@2
|
753 |
char* NPP_GetMIMEDescription(void);
|
williamr@2
|
754 |
#endif /* XP_UNIX */
|
williamr@2
|
755 |
|
williamr@2
|
756 |
#ifdef __SYMBIAN32__
|
williamr@2
|
757 |
#include <badesca.h>
|
williamr@2
|
758 |
IMPORT_C const TDesC* NPP_GetMIMEDescription(void);
|
williamr@2
|
759 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
760 |
|
williamr@2
|
761 |
NPError NPP_Initialize(void);
|
williamr@2
|
762 |
#ifdef __SYMBIAN32__
|
williamr@2
|
763 |
IMPORT_C
|
williamr@2
|
764 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
765 |
void NPP_Shutdown(void);
|
williamr@2
|
766 |
|
williamr@2
|
767 |
#ifndef __SYMBIAN32__
|
williamr@2
|
768 |
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
|
williamr@2
|
769 |
uint16 mode, int16 argc, char* argn[],
|
williamr@2
|
770 |
char* argv[], NPSavedData* saved);
|
williamr@2
|
771 |
#else
|
williamr@2
|
772 |
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
|
williamr@2
|
773 |
uint16 mode, CDesCArray* argn,
|
williamr@2
|
774 |
CDesCArray* argv, NPSavedData* saved);
|
williamr@2
|
775 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
776 |
|
williamr@2
|
777 |
NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
|
williamr@2
|
778 |
NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
|
williamr@2
|
779 |
NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
|
williamr@2
|
780 |
NPStream* stream, NPBool seekable,
|
williamr@2
|
781 |
uint16* stype);
|
williamr@2
|
782 |
NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
|
williamr@2
|
783 |
NPReason reason);
|
williamr@2
|
784 |
int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
|
williamr@2
|
785 |
int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
|
williamr@2
|
786 |
int32 len, void* buffer);
|
williamr@2
|
787 |
|
williamr@2
|
788 |
#ifndef __SYMBIAN32__
|
williamr@2
|
789 |
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
|
williamr@2
|
790 |
const char* fname);
|
williamr@2
|
791 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
792 |
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
|
williamr@2
|
793 |
const TDesC& fname);
|
williamr@2
|
794 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
795 |
|
williamr@2
|
796 |
void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
|
williamr@2
|
797 |
int16 NPP_HandleEvent(NPP instance, void* event);
|
williamr@2
|
798 |
|
williamr@2
|
799 |
#ifndef __SYMBIAN32__
|
williamr@2
|
800 |
void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
|
williamr@2
|
801 |
NPReason reason, void* notifyData);
|
williamr@2
|
802 |
jref NP_LOADDS NPP_GetJavaClass(void);
|
williamr@2
|
803 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
804 |
void NP_LOADDS NPP_URLNotify(NPP instance, const TDesC& url,
|
williamr@2
|
805 |
NPReason reason, void* notifyData);
|
williamr@2
|
806 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
807 |
|
williamr@2
|
808 |
|
williamr@2
|
809 |
#ifdef __SYMBIAN32__
|
williamr@2
|
810 |
IMPORT_C
|
williamr@2
|
811 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
812 |
NPError NPP_GetValue(NPP instance, NPPVariable variable,
|
williamr@2
|
813 |
void *value);
|
williamr@2
|
814 |
NPError NPP_SetValue(NPP instance, NPNVariable variable,
|
williamr@2
|
815 |
void *value);
|
williamr@2
|
816 |
|
williamr@2
|
817 |
/*
|
williamr@2
|
818 |
* NPN_* functions are provided by the navigator and called by the plugin.
|
williamr@2
|
819 |
*/
|
williamr@2
|
820 |
|
williamr@2
|
821 |
void NPN_Version(int* plugin_major, int* plugin_minor,
|
williamr@2
|
822 |
int* netscape_major, int* netscape_minor);
|
williamr@2
|
823 |
|
williamr@2
|
824 |
#ifndef __SYMBIAN32__
|
williamr@2
|
825 |
NPError NPN_GetURLNotify(NPP instance, const char* url,
|
williamr@2
|
826 |
const char* target, void* notifyData);
|
williamr@2
|
827 |
NPError NPN_GetURL(NPP instance, const char* url,
|
williamr@2
|
828 |
const char* target);
|
williamr@2
|
829 |
NPError NPN_PostURLNotify(NPP instance, const char* url,
|
williamr@2
|
830 |
const char* target, uint32 len,
|
williamr@2
|
831 |
const char* buf, NPBool file,
|
williamr@2
|
832 |
void* notifyData);
|
williamr@2
|
833 |
NPError NPN_PostURL(NPP instance, const char* url,
|
williamr@2
|
834 |
const char* target, uint32 len,
|
williamr@2
|
835 |
const char* buf, NPBool file);
|
williamr@2
|
836 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
837 |
NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const TDesC& url,
|
williamr@2
|
838 |
const TDesC* target, void* notifyData);
|
williamr@2
|
839 |
NPError NP_LOADDS NPN_GetURL(NPP instance, const TDesC& url,
|
williamr@2
|
840 |
const TDesC* target);
|
williamr@2
|
841 |
NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const TDesC& url,
|
williamr@2
|
842 |
const TDesC* target,
|
williamr@2
|
843 |
const TDesC& buf, NPBool file,
|
williamr@2
|
844 |
void* notifyData);
|
williamr@2
|
845 |
NPError NP_LOADDS NPN_PostURL(NPP instance, const TDesC& url,
|
williamr@2
|
846 |
const TDesC* target,
|
williamr@2
|
847 |
const TDesC& buf, NPBool file);
|
williamr@2
|
848 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
849 |
|
williamr@2
|
850 |
NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
|
williamr@2
|
851 |
|
williamr@2
|
852 |
#ifndef __SYMBIAN32__
|
williamr@2
|
853 |
NPError NPN_NewStream(NPP instance, NPMIMEType type,
|
williamr@2
|
854 |
const char* target, NPStream** stream);
|
williamr@2
|
855 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
856 |
NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
|
williamr@2
|
857 |
const TDesC* target, NPStream** stream);
|
williamr@2
|
858 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
859 |
|
williamr@2
|
860 |
int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer);
|
williamr@2
|
861 |
NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
|
williamr@2
|
862 |
|
williamr@2
|
863 |
#ifndef __SYMBIAN32__
|
williamr@2
|
864 |
void NPN_Status(NPP instance, const char* message);
|
williamr@2
|
865 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
866 |
void NP_LOADDS NPN_Status(NPP instance, const TDesC& message);
|
williamr@2
|
867 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
868 |
|
williamr@2
|
869 |
#ifndef __SYMBIAN32__
|
williamr@2
|
870 |
const char* NPN_UserAgent(NPP instance);
|
williamr@2
|
871 |
#else/* __SYMBIAN32__ */
|
williamr@2
|
872 |
const TDesC* NP_LOADDS NPN_UserAgent(NPP instance);
|
williamr@2
|
873 |
#endif /* __SYMBIAN32__ */
|
williamr@2
|
874 |
|
williamr@2
|
875 |
|
williamr@2
|
876 |
void* NPN_MemAlloc(uint32 size);
|
williamr@2
|
877 |
void NPN_MemFree(void* ptr);
|
williamr@2
|
878 |
uint32 NPN_MemFlush(uint32 size);
|
williamr@2
|
879 |
void NPN_ReloadPlugins(NPBool reloadPages);
|
williamr@2
|
880 |
#ifndef __SYMBIAN32__
|
williamr@2
|
881 |
JRIEnv* NPN_GetJavaEnv(void);
|
williamr@2
|
882 |
jref NPN_GetJavaPeer(NPP instance);
|
williamr@2
|
883 |
#endif
|
williamr@2
|
884 |
NPError NPN_GetValue(NPP instance, NPNVariable variable,
|
williamr@2
|
885 |
void *value);
|
williamr@2
|
886 |
NPError NPN_SetValue(NPP instance, NPPVariable variable,
|
williamr@2
|
887 |
void *value);
|
williamr@2
|
888 |
void NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
|
williamr@2
|
889 |
void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);
|
williamr@2
|
890 |
void NPN_ForceRedraw(NPP instance);
|
williamr@2
|
891 |
void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
|
williamr@2
|
892 |
void NPN_PopPopupsEnabledState(NPP instance);
|
williamr@2
|
893 |
|
williamr@2
|
894 |
#ifndef __SYMBIAN32__
|
williamr@2
|
895 |
#ifdef __cplusplus
|
williamr@2
|
896 |
} /* end extern "C" */
|
williamr@2
|
897 |
#endif
|
williamr@2
|
898 |
#endif
|
williamr@2
|
899 |
|
williamr@2
|
900 |
#endif /* _NPAPI_H_ */
|