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 /* | 2 /* |
3 * Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation. | 3 * Copyright (c) 2004, Apple Computer, Inc. and The Mozilla Foundation. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
8 * met: | 8 * met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
11 * notice, this list of conditions and the following disclaimer. | 11 * notice, this list of conditions and the following disclaimer. |
12 * 2. Redistributions in binary form must reproduce the above copyright | 12 * 2. Redistributions in binary form must reproduce the above copyright |
13 * notice, this list of conditions and the following disclaimer in the | 13 * notice, this list of conditions and the following disclaimer in the |
14 * documentation and/or other materials provided with the distribution. | 14 * documentation and/or other materials provided with the distribution. |
15 * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla | 15 * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla |
16 * Foundation ("Mozilla") nor the names of their contributors may be used | 16 * Foundation ("Mozilla") nor the names of their contributors may be used |
17 * to endorse or promote products derived from this software without | 17 * to endorse or promote products derived from this software without |
18 * specific prior written permission. | 18 * specific prior written permission. |
19 * | 19 * |
20 * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS | 20 * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS |
21 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
23 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR | 23 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR |
24 * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 24 * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
26 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 26 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | 27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
(...skipping 11 matching lines...) Expand all Loading... |
41 extern "C" { | 41 extern "C" { |
42 #endif | 42 #endif |
43 | 43 |
44 #include "nptypes.h" | 44 #include "nptypes.h" |
45 | 45 |
46 /* | 46 /* |
47 This API is used to facilitate binding code written in C to script | 47 This API is used to facilitate binding code written in C to script |
48 objects. The API in this header does not assume the presence of a | 48 objects. The API in this header does not assume the presence of a |
49 user agent. That is, it can be used to bind C code to scripting | 49 user agent. That is, it can be used to bind C code to scripting |
50 environments outside of the context of a user agent. | 50 environments outside of the context of a user agent. |
51 | 51 |
52 However, the normal use of the this API is in the context of a | 52 However, the normal use of the this API is in the context of a |
53 scripting environment running in a browser or other user agent. | 53 scripting environment running in a browser or other user agent. |
54 In particular it is used to support the extended Netscape | 54 In particular it is used to support the extended Netscape |
55 script-ability API for plugins (NP-SAP). NP-SAP is an extension | 55 script-ability API for plugins (NP-SAP). NP-SAP is an extension |
56 of the Netscape plugin API. As such we have adopted the use of | 56 of the Netscape plugin API. As such we have adopted the use of |
57 the "NP" prefix for this API. | 57 the "NP" prefix for this API. |
58 | 58 |
59 The following NP{N|P}Variables were added to the Netscape plugin | 59 The following NP{N|P}Variables were added to the Netscape plugin |
60 API (in npapi.h): | 60 API (in npapi.h): |
61 | 61 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 */ | 352 */ |
353 void NPN_ReleaseObject(NPObject *npobj); | 353 void NPN_ReleaseObject(NPObject *npobj); |
354 | 354 |
355 /* | 355 /* |
356 Functions to access script objects represented by NPObject. | 356 Functions to access script objects represented by NPObject. |
357 | 357 |
358 Calls to script objects are synchronous. If a function returns a | 358 Calls to script objects are synchronous. If a function returns a |
359 value, it will be supplied via the result NPVariant | 359 value, it will be supplied via the result NPVariant |
360 argument. Successful calls will return true, false will be | 360 argument. Successful calls will return true, false will be |
361 returned in case of an error. | 361 returned in case of an error. |
362 | 362 |
363 Calls made from plugin code to script must be made from the thread | 363 Calls made from plugin code to script must be made from the thread |
364 on which the plugin was initialized. | 364 on which the plugin was initialized. |
365 */ | 365 */ |
366 | 366 |
367 bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, | 367 bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, |
368 const NPVariant *args, uint32_t argCount, NPVariant *result); | 368 const NPVariant *args, uint32_t argCount, NPVariant *result); |
369 bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, | 369 bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, |
370 uint32_t argCount, NPVariant *result); | 370 uint32_t argCount, NPVariant *result); |
371 bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, | 371 bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, |
372 NPVariant *result); | 372 NPVariant *result); |
(...skipping 15 matching lines...) Expand all Loading... |
388 | 388 |
389 NPN_SetException (npobj, message); | 389 NPN_SetException (npobj, message); |
390 */ | 390 */ |
391 void NPN_SetException(NPObject *npobj, const NPUTF8 *message); | 391 void NPN_SetException(NPObject *npobj, const NPUTF8 *message); |
392 | 392 |
393 #ifdef __cplusplus | 393 #ifdef __cplusplus |
394 } | 394 } |
395 #endif | 395 #endif |
396 | 396 |
397 #endif | 397 #endif |
OLD | NEW |