front_idill/extern/fajran-npTuioClient/npapi/npapi.h
author bastiena
Fri, 06 Apr 2012 10:44:54 +0200
changeset 21 e4e5f02787a1
permissions -rw-r--r--
Front IDILL : Added Communication extern named fajran-npTuioClient It contains the project generating a dll used as a browser plugin.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     2
/* ***** BEGIN LICENSE BLOCK *****
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     4
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     5
 * The contents of this file are subject to the Mozilla Public License Version
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     6
 * 1.1 (the "License"); you may not use this file except in compliance with
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     7
 * the License. You may obtain a copy of the License at
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     8
 * http://www.mozilla.org/MPL/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     9
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    10
 * Software distributed under the License is distributed on an "AS IS" basis,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    12
 * for the specific language governing rights and limitations under the
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    13
 * License.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    14
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    15
 * The Original Code is mozilla.org code.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    16
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    17
 * The Initial Developer of the Original Code is
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    18
 * Netscape Communications Corporation.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    19
 * Portions created by the Initial Developer are Copyright (C) 1998
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    20
 * the Initial Developer. All Rights Reserved.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    21
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    22
 * Contributor(s):
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    23
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    24
 * Alternatively, the contents of this file may be used under the terms of
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    25
 * either the GNU General Public License Version 2 or later (the "GPL"), or
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    26
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    27
 * in which case the provisions of the GPL or the LGPL are applicable instead
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    28
 * of those above. If you wish to allow use of your version of this file only
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    29
 * under the terms of either the GPL or the LGPL, and not to allow others to
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    30
 * use your version of this file under the terms of the MPL, indicate your
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    31
 * decision by deleting the provisions above and replace them with the notice
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    32
 * and other provisions required by the GPL or the LGPL. If you do not delete
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    33
 * the provisions above, a recipient may use your version of this file under
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    34
 * the terms of any one of the MPL, the GPL or the LGPL.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    35
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    36
 * ***** END LICENSE BLOCK ***** */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    37
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    38
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    39
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    40
 *  npapi.h $Revision: 3.48 $
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    41
 *  Netscape client plug-in API spec
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    42
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    43
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    44
#ifndef _NPAPI_H_
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    45
#define _NPAPI_H_
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    46
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    47
#ifdef __OS2__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    48
#pragma pack(1)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    49
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    50
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    51
#include "prtypes.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    52
/* Copied from xp_core.h */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    53
/* removed #ifdef for hpux defined in /usr/include/model.h */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    54
#ifndef _INT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    55
#define _INT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    56
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    57
#ifndef _INT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    58
#define _INT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    59
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    60
#ifndef _UINT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    61
#define _UINT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    62
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    63
#ifndef _UINT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    64
#define _UINT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    65
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    66
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    67
/* 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    68
 * NO_NSPR_10_SUPPORT disables the inclusion 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    69
 * of obsolete/protypes.h, whose int16, uint16, 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    70
 * int32, and uint32 typedefs conflict with those 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    71
 * in this file. 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    72
 */ 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    73
#ifndef NO_NSPR_10_SUPPORT
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    74
#define NO_NSPR_10_SUPPORT
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    75
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    76
#ifdef OJI
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    77
#include "jri.h"                /* Java Runtime Interface */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    78
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    79
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    80
#if defined (__OS2__ ) || defined (OS2)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    81
#	ifndef XP_OS2
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    82
#		define XP_OS2 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    83
#	endif /* XP_OS2 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    84
#endif /* __OS2__ */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    85
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    86
#ifdef _WINDOWS
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    87
#	include <windef.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    88
#	ifndef XP_WIN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    89
#		define XP_WIN 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    90
#	endif /* XP_WIN */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    91
#endif /* _WINDOWS */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    92
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    93
#ifdef __MWERKS__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    94
#	define _declspec __declspec
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    95
#	ifdef __INTEL__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    96
#		undef NULL
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    97
#		ifndef XP_WIN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    98
#			define XP_WIN 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    99
#		endif /* XP_WIN */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   100
#	endif /* __INTEL__ */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   101
#endif /* __MWERKS__ */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   102
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   103
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   104
#include <Carbon/Carbon.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   105
#ifdef __LP64__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   106
#define NP_NO_QUICKDRAW
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   107
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   108
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   109
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   110
#if defined(XP_UNIX) 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   111
#	include <stdio.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   112
#	if defined(MOZ_X11)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   113
#		include <X11/Xlib.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   114
#		include <X11/Xutil.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   115
#	endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   116
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   117
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   118
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   119
/*                        Plugin Version Constants                      */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   120
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   121
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   122
#define NP_VERSION_MAJOR 0
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   123
#define NP_VERSION_MINOR 19
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   124
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   125
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   126
/* The OS/2 version of Netscape uses RC_DATA to define the
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   127
   mime types, file extensions, etc that are required.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   128
   Use a vertical bar to separate types, end types with \0.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   129
   FileVersion and ProductVersion are 32bit ints, all other
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   130
   entries are strings the MUST be terminated wwith a \0.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   131
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   132
AN EXAMPLE:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   133
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   134
RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   135
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   136
RCDATA NP_INFO_MIMEType    { "video/x-video|",
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   137
                             "video/x-flick\0" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   138
RCDATA NP_INFO_FileExtents { "avi|",
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   139
                             "flc\0" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   140
RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   141
                             "MMOS2 Flc/Fli player(*.flc)\0" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   142
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   143
RCDATA NP_INFO_FileVersion       { 1,0,0,1 }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   144
RCDATA NP_INFO_CompanyName       { "Netscape Communications\0" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   145
RCDATA NP_INFO_FileDescription   { "NPAVI32 Extension DLL\0"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   146
RCDATA NP_INFO_InternalName      { "NPAVI32\0" )
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   147
RCDATA NP_INFO_LegalCopyright    { "Copyright Netscape Communications \251 1996\0"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   148
RCDATA NP_INFO_OriginalFilename  { "NVAPI32.DLL" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   149
RCDATA NP_INFO_ProductName       { "NPAVI32 Dynamic Link Library\0" }
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   150
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   151
*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   152
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   153
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   154
/* RC_DATA types for version info - required */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   155
#define NP_INFO_ProductVersion      1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   156
#define NP_INFO_MIMEType            2
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   157
#define NP_INFO_FileOpenName        3
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   158
#define NP_INFO_FileExtents         4
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   159
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   160
/* RC_DATA types for version info - used if found */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   161
#define NP_INFO_FileDescription     5
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   162
#define NP_INFO_ProductName         6
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   163
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   164
/* RC_DATA types for version info - optional */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   165
#define NP_INFO_CompanyName         7
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   166
#define NP_INFO_FileVersion         8
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   167
#define NP_INFO_InternalName        9
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   168
#define NP_INFO_LegalCopyright      10
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   169
#define NP_INFO_OriginalFilename    11
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   170
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   171
#ifndef RC_INVOKED
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   172
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   173
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   174
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   175
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   176
/*                       Definition of Basic Types                      */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   177
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   178
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   179
#ifndef _UINT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   180
typedef unsigned short uint16;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   181
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   182
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   183
#ifndef _UINT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   184
#    if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   185
typedef unsigned int uint32;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   186
#    else  /* __alpha */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   187
typedef unsigned long uint32;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   188
#    endif /* __alpha */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   189
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   190
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   191
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   192
 * AIX defines these in sys/inttypes.h included from sys/types.h
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   193
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   194
#ifndef AIX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   195
#ifndef _INT16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   196
typedef short int16;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   197
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   198
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   199
#ifndef _INT32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   200
#    if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   201
typedef int int32;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   202
#    else  /* __alpha */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   203
typedef long int32;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   204
#    endif /* __alpha */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   205
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   206
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   207
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   208
#ifndef FALSE
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   209
#define FALSE (0)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   210
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   211
#ifndef TRUE
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   212
#define TRUE (1)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   213
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   214
#ifndef NULL
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   215
#define NULL (0L)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   216
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   217
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   218
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   219
typedef enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   220
#ifndef NP_NO_QUICKDRAW
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   221
  NPDrawingModelQuickDraw = 0,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   222
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   223
  NPDrawingModelCoreGraphics = 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   224
} NPDrawingModel;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   225
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   226
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   227
typedef unsigned char	NPBool;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   228
typedef int16			NPError;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   229
typedef int16			NPReason;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   230
typedef char*			NPMIMEType;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   231
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   232
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   233
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   234
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   235
/*                       Structures and definitions                     */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   236
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   237
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   238
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   239
 *  NPP is a plug-in's opaque instance handle
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   240
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   241
typedef struct _NPP
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   242
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   243
  void*	pdata;      /* plug-in private data */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   244
  void*	ndata;      /* netscape private data */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   245
} NPP_t;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   246
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   247
typedef NPP_t*  NPP;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   248
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   249
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   250
typedef struct _NPStream
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   251
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   252
  void*  pdata; /* plug-in private data */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   253
  void*  ndata; /* netscape private data */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   254
  const  char* url;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   255
  uint32 end;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   256
  uint32 lastmodified;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   257
  void*  notifyData;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   258
  const  char* headers; /* Response headers from host.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   259
                         * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   260
                         * Used for HTTP only; NULL for non-HTTP.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   261
                         * Available from NPP_NewStream onwards.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   262
                         * Plugin should copy this data before storing it.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   263
                         * Includes HTTP status line and all headers,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   264
                         * preferably verbatim as received from server,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   265
                         * headers formatted as in HTTP ("Header: Value"),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   266
                         * and newlines (\n, NOT \r\n) separating lines.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   267
                         * Terminated by \n\0 (NOT \n\n\0). */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   268
} NPStream;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   269
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   270
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   271
typedef struct _NPByteRange
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   272
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   273
  int32  offset; /* negative offset means from the end */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   274
  uint32 length;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   275
  struct _NPByteRange* next;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   276
} NPByteRange;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   277
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   278
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   279
typedef struct _NPSavedData
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   280
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   281
  int32	len;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   282
  void*	buf;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   283
} NPSavedData;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   284
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   285
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   286
typedef struct _NPRect
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   287
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   288
  uint16 top;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   289
  uint16 left;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   290
  uint16 bottom;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   291
  uint16 right;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   292
} NPRect;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   293
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   294
typedef struct _NPSize 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   295
{ 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   296
  int32 width; 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   297
  int32 height; 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   298
} NPSize; 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   299
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   300
#ifdef XP_UNIX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   301
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   302
 * Unix specific structures and definitions
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   303
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   304
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   305
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   306
 * Callback Structures.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   307
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   308
 * These are used to pass additional platform specific information.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   309
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   310
enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   311
  NP_SETWINDOW = 1,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   312
  NP_PRINT
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   313
};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   314
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   315
typedef struct
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   316
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   317
  int32 type;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   318
} NPAnyCallbackStruct;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   319
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   320
typedef struct
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   321
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   322
  int32        type;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   323
#ifdef MOZ_X11
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   324
  Display*     display;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   325
  Visual*      visual;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   326
  Colormap     colormap;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   327
  unsigned int depth;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   328
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   329
} NPSetWindowCallbackStruct;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   330
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   331
typedef struct
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   332
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   333
  int32 type;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   334
  FILE* fp;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   335
} NPPrintCallbackStruct;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   336
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   337
#endif /* XP_UNIX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   338
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   339
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   340
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   341
 *   The following masks are applied on certain platforms to NPNV and 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   342
 *   NPPV selectors that pass around pointers to COM interfaces. Newer 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   343
 *   compilers on some platforms may generate vtables that are not 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   344
 *   compatible with older compilers. To prevent older plugins from 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   345
 *   not understanding a new browser's ABI, these masks change the 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   346
 *   values of those selectors on those platforms. To remain backwards
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   347
 *   compatible with differenet versions of the browser, plugins can 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   348
 *   use these masks to dynamically determine and use the correct C++
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   349
 *   ABI that the browser is expecting. This does not apply to Windows 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   350
 *   as Microsoft's COM ABI will likely not change.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   351
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   352
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   353
#define NP_ABI_GCC3_MASK  0x10000000
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   354
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   355
 *   gcc 3.x generated vtables on UNIX and OSX are incompatible with 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   356
 *   previous compilers.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   357
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   358
#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   359
#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   360
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   361
#define _NP_ABI_MIXIN_FOR_GCC3 0
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   362
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   363
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   364
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   365
#define NP_ABI_MACHO_MASK 0x01000000
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   366
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   367
 *   On OSX, the Mach-O executable format is significantly
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   368
 *   different than CFM. In addition to having a different
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   369
 *   C++ ABI, it also has has different C calling convention.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   370
 *   You must use glue code when calling between CFM and
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   371
 *   Mach-O C functions. 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   372
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   373
#if (defined(TARGET_RT_MAC_MACHO))
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   374
#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   375
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   376
#define _NP_ABI_MIXIN_FOR_MACHO 0
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   377
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   378
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   379
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   380
#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   381
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   382
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   383
 * List of variable names for which NPP_GetValue shall be implemented
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   384
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   385
typedef enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   386
  NPPVpluginNameString = 1,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   387
  NPPVpluginDescriptionString,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   388
  NPPVpluginWindowBool,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   389
  NPPVpluginTransparentBool,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   390
  NPPVjavaClass,                /* Not implemented in Mozilla 1.0 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   391
  NPPVpluginWindowSize,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   392
  NPPVpluginTimerInterval,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   393
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   394
  NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   395
  NPPVpluginScriptableIID = 11,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   396
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   397
  /* Introduced in Mozilla 0.9.9 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   398
  NPPVjavascriptPushCallerBool = 12,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   399
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   400
  /* Introduced in Mozilla 1.0 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   401
  NPPVpluginKeepLibraryInMemory = 13,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   402
  NPPVpluginNeedsXEmbed         = 14,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   403
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   404
  /* Get the NPObject for scripting the plugin. Introduced in Firefox
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   405
   * 1.0 (NPAPI minor version 14).
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   406
   */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   407
  NPPVpluginScriptableNPObject  = 15,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   408
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   409
  /* Get the plugin value (as \0-terminated UTF-8 string data) for
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   410
   * form submission if the plugin is part of a form. Use
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   411
   * NPN_MemAlloc() to allocate memory for the string data. Introduced
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   412
   * in Mozilla 1.8b2 (NPAPI minor version 15).
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   413
   */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   414
  NPPVformValue = 16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   415
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   416
  /* Used for negotiating drawing models */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   417
  , NPPVpluginDrawingModel = 1000
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   418
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   419
} NPPVariable;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   420
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   421
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   422
 * List of variable names for which NPN_GetValue is implemented by Mozilla
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   423
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   424
typedef enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   425
  NPNVxDisplay = 1,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   426
  NPNVxtAppContext,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   427
  NPNVnetscapeWindow,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   428
  NPNVjavascriptEnabledBool,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   429
  NPNVasdEnabledBool,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   430
  NPNVisOfflineBool,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   431
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   432
  /* 10 and over are available on Mozilla builds starting with 0.9.4 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   433
  NPNVserviceManager = (10 | NP_ABI_MASK),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   434
  NPNVDOMElement     = (11 | NP_ABI_MASK),   /* available in Mozilla 1.2 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   435
  NPNVDOMWindow      = (12 | NP_ABI_MASK),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   436
  NPNVToolkit        = (13 | NP_ABI_MASK),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   437
  NPNVSupportsXEmbedBool = 14,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   438
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   439
  /* Get the NPObject wrapper for the browser window. */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   440
  NPNVWindowNPObject = 15,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   441
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   442
  /* Get the NPObject wrapper for the plugins DOM element. */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   443
  NPNVPluginElementNPObject = 16,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   444
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   445
  NPNVSupportsWindowless = 17
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   446
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   447
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   448
  /* Used for negotiating drawing models */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   449
  , NPNVpluginDrawingModel = 1000
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   450
#ifndef NP_NO_QUICKDRAW
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   451
  , NPNVsupportsQuickDrawBool = 2000
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   452
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   453
  , NPNVsupportsCoreGraphicsBool = 2001
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   454
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   455
} NPNVariable;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   456
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   457
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   458
 * The type of Tookkit the widgets use
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   459
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   460
typedef enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   461
  NPNVGtk12 = 1,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   462
  NPNVGtk2
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   463
} NPNToolkitType;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   464
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   465
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   466
 * The type of a NPWindow - it specifies the type of the data structure
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   467
 * returned in the window field.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   468
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   469
typedef enum {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   470
  NPWindowTypeWindow = 1,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   471
  NPWindowTypeDrawable
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   472
} NPWindowType;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   473
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   474
typedef struct _NPWindow
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   475
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   476
  void* window;  /* Platform specific window handle */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   477
                 /* OS/2: x - Position of bottom left corner  */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   478
                 /* OS/2: y - relative to visible netscape window */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   479
  int32 x;       /* Position of top left corner relative */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   480
  int32 y;       /* to a netscape page.					*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   481
  uint32 width;  /* Maximum window size */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   482
  uint32 height;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   483
  NPRect clipRect; /* Clipping rectangle in port coordinates */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   484
                   /* Used by MAC only.			  */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   485
#if defined(XP_UNIX) && !defined(XP_MACOSX)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   486
  void * ws_info; /* Platform-dependent additonal data */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   487
#endif /* XP_UNIX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   488
  NPWindowType type; /* Is this a window or a drawable? */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   489
} NPWindow;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   490
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   491
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   492
typedef struct _NPFullPrint
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   493
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   494
  NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   495
  NPBool printOne;		 /* TRUE if plugin should print one copy to default printer */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   496
  void* platformPrint; /* Platform-specific printing info */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   497
} NPFullPrint;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   498
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   499
typedef struct _NPEmbedPrint
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   500
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   501
  NPWindow window;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   502
  void* platformPrint; /* Platform-specific printing info */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   503
} NPEmbedPrint;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   504
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   505
typedef struct _NPPrint
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   506
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   507
  uint16 mode;               /* NP_FULL or NP_EMBED */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   508
  union
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   509
  {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   510
    NPFullPrint fullPrint;   /* if mode is NP_FULL */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   511
    NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   512
  } print;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   513
} NPPrint;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   514
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   515
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   516
typedef EventRecord	NPEvent;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   517
#elif defined(XP_WIN)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   518
typedef struct _NPEvent
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   519
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   520
  uint16 event;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   521
  uint32 wParam;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   522
  uint32 lParam;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   523
} NPEvent;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   524
#elif defined(XP_OS2)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   525
typedef struct _NPEvent
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   526
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   527
  uint32 event;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   528
  uint32 wParam;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   529
  uint32 lParam;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   530
} NPEvent;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   531
#elif defined (XP_UNIX) && defined(MOZ_X11)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   532
typedef XEvent NPEvent;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   533
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   534
typedef void*			NPEvent;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   535
#endif /* XP_MACOSX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   536
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   537
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   538
typedef void* NPRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   539
#ifndef NP_NO_QUICKDRAW
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   540
typedef RgnHandle NPQDRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   541
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   542
typedef CGPathRef NPCGRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   543
#elif defined(XP_WIN)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   544
typedef HRGN NPRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   545
#elif defined(XP_UNIX) && defined(MOZ_X11)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   546
typedef Region NPRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   547
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   548
typedef void *NPRegion;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   549
#endif /* XP_MACOSX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   550
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   551
#ifdef XP_MACOSX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   552
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   553
 *  Mac-specific structures and definitions.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   554
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   555
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   556
typedef struct NP_Port
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   557
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   558
  CGrafPtr port; /* Grafport */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   559
  int32 portx;   /* position inside the topmost window */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   560
  int32 porty;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   561
} NP_Port;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   562
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   563
typedef struct NP_CGContext
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   564
{
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   565
  CGContextRef context;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   566
  WindowRef window;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   567
} NP_CGContext;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   568
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   569
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   570
 *  Non-standard event types that can be passed to HandleEvent
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   571
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   572
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   573
enum NPEventType {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   574
  NPEventType_GetFocusEvent = (osEvt + 16),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   575
  NPEventType_LoseFocusEvent,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   576
  NPEventType_AdjustCursorEvent,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   577
  NPEventType_MenuCommandEvent,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   578
  NPEventType_ClippingChangedEvent,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   579
  NPEventType_ScrollingBeginsEvent = 1000,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   580
  NPEventType_ScrollingEndsEvent
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   581
};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   582
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   583
#ifdef OBSOLETE
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   584
#define getFocusEvent     (osEvt + 16)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   585
#define loseFocusEvent    (osEvt + 17)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   586
#define adjustCursorEvent (osEvt + 18)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   587
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   588
#endif /* XP_MACOSX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   589
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   590
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   591
 * Values for mode passed to NPP_New:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   592
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   593
#define NP_EMBED 1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   594
#define NP_FULL  2
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   595
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   596
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   597
 * Values for stream type passed to NPP_NewStream:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   598
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   599
#define NP_NORMAL     1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   600
#define NP_SEEK       2
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   601
#define NP_ASFILE     3
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   602
#define NP_ASFILEONLY 4
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   603
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   604
#define NP_MAXREADY	(((unsigned)(~0)<<1)>>1)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   605
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   606
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   607
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   608
/*		     Error and Reason Code definitions			*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   609
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   610
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   611
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   612
 * Values of type NPError:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   613
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   614
#define NPERR_BASE                         0
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   615
#define NPERR_NO_ERROR                    (NPERR_BASE + 0)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   616
#define NPERR_GENERIC_ERROR               (NPERR_BASE + 1)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   617
#define NPERR_INVALID_INSTANCE_ERROR      (NPERR_BASE + 2)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   618
#define NPERR_INVALID_FUNCTABLE_ERROR     (NPERR_BASE + 3)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   619
#define NPERR_MODULE_LOAD_FAILED_ERROR    (NPERR_BASE + 4)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   620
#define NPERR_OUT_OF_MEMORY_ERROR         (NPERR_BASE + 5)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   621
#define NPERR_INVALID_PLUGIN_ERROR        (NPERR_BASE + 6)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   622
#define NPERR_INVALID_PLUGIN_DIR_ERROR    (NPERR_BASE + 7)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   623
#define NPERR_INCOMPATIBLE_VERSION_ERROR  (NPERR_BASE + 8)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   624
#define NPERR_INVALID_PARAM               (NPERR_BASE + 9)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   625
#define NPERR_INVALID_URL                 (NPERR_BASE + 10)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   626
#define NPERR_FILE_NOT_FOUND              (NPERR_BASE + 11)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   627
#define NPERR_NO_DATA                     (NPERR_BASE + 12)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   628
#define NPERR_STREAM_NOT_SEEKABLE         (NPERR_BASE + 13)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   629
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   630
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   631
 * Values of type NPReason:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   632
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   633
#define NPRES_BASE          0
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   634
#define NPRES_DONE         (NPRES_BASE + 0)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   635
#define NPRES_NETWORK_ERR  (NPRES_BASE + 1)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   636
#define NPRES_USER_BREAK   (NPRES_BASE + 2)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   637
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   638
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   639
 * Don't use these obsolete error codes any more.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   640
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   641
#define NP_NOERR  NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   642
#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   643
#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   644
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   645
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   646
 * Version feature information
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   647
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   648
#define NPVERS_HAS_STREAMOUTPUT             8
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   649
#define NPVERS_HAS_NOTIFICATION             9
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   650
#define NPVERS_HAS_LIVECONNECT              9
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   651
#define NPVERS_WIN16_HAS_LIVECONNECT        9
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   652
#define NPVERS_68K_HAS_LIVECONNECT          11
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   653
#define NPVERS_HAS_WINDOWLESS               11
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   654
#define NPVERS_HAS_XPCONNECT_SCRIPTING      13
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   655
#define NPVERS_HAS_NPRUNTIME_SCRIPTING      14
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   656
#define NPVERS_HAS_FORM_VALUES              15
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   657
#define NPVERS_HAS_POPUPS_ENABLED_STATE     16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   658
#define NPVERS_HAS_RESPONSE_HEADERS         17
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   659
#define NPVERS_HAS_NPOBJECT_ENUM            18
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   660
#define NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL 19
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   661
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   662
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   663
/*                        Function Prototypes                           */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   664
/*----------------------------------------------------------------------*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   665
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   666
#if defined(_WINDOWS) && !defined(WIN32)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   667
#define NP_LOADDS  _loadds
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   668
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   669
#if defined(__OS2__)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   670
#define NP_LOADDS _System
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   671
#else
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   672
#define NP_LOADDS
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   673
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   674
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   675
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   676
#ifdef __cplusplus
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   677
extern "C" {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   678
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   679
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   680
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   681
 * NPP_* functions are provided by the plugin and called by the navigator.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   682
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   683
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   684
#ifdef XP_UNIX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   685
char* NPP_GetMIMEDescription(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   686
#endif /* XP_UNIX */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   687
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   688
NPError NP_LOADDS NPP_Initialize(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   689
void    NP_LOADDS NPP_Shutdown(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   690
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   691
                          uint16 mode, int16 argc, char* argn[],
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   692
                          char* argv[], NPSavedData* saved);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   693
NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   694
NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   695
NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   696
                                NPStream* stream, NPBool seekable,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   697
                                uint16* stype);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   698
NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   699
                                    NPReason reason);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   700
int32   NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   701
int32   NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   702
                            int32 len, void* buffer);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   703
void    NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   704
                                   const char* fname);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   705
void    NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   706
int16   NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   707
void    NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   708
                                NPReason reason, void* notifyData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   709
#ifdef OJI
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   710
jref    NP_LOADDS NPP_GetJavaClass(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   711
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   712
NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   713
NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   714
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   715
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   716
 * NPN_* functions are provided by the navigator and called by the plugin.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   717
 */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   718
void    NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   719
                              int* netscape_major, int* netscape_minor);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   720
NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   721
                                   const char* target, void* notifyData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   722
NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   723
                             const char* target);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   724
NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   725
                                    const char* target, uint32 len,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   726
                                    const char* buf, NPBool file,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   727
                                    void* notifyData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   728
NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   729
                              const char* target, uint32 len,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   730
                              const char* buf, NPBool file);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   731
NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   732
NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   733
                                const char* target, NPStream** stream);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   734
int32   NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   735
NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   736
void    NP_LOADDS NPN_Status(NPP instance, const char* message);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   737
const char* NP_LOADDS	NPN_UserAgent(NPP instance);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   738
void*   NP_LOADDS NPN_MemAlloc(uint32 size);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   739
void    NP_LOADDS NPN_MemFree(void* ptr);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   740
uint32  NP_LOADDS NPN_MemFlush(uint32 size);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   741
void    NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   742
#ifdef OJI
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   743
JRIEnv* NP_LOADDS NPN_GetJavaEnv(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   744
jref    NP_LOADDS NPN_GetJavaPeer(NPP instance);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   745
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   746
NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   747
NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   748
void    NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   749
void    NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   750
void    NP_LOADDS NPN_ForceRedraw(NPP instance);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   751
void    NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   752
void    NP_LOADDS NPN_PopPopupsEnabledState(NPP instance);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   753
void    NP_LOADDS NPN_PluginThreadAsyncCall(NPP instance,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   754
                                            void (*func) (void *),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   755
                                            void *userData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   756
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   757
#ifdef __cplusplus
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   758
}  /* end extern "C" */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   759
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   760
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   761
#endif /* RC_INVOKED */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   762
#ifdef __OS2__
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   763
#pragma pack()
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   764
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   765
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   766
#endif /* _NPAPI_H_ */