[Contents] [Previous]
[Next] [Index]
Structures
Data structures are plug-in-specific
types defined for use in the Plug-in API. The names of structures begin
with NP, for example, NPWindow. All Plug-in API structures
and definitions are found in npapi.h.
This list is a quick reference to the structures
used by the Plug-in API. Each structure name links to a reference entry.
Structure
name |
Structure
represents |
NPAnyCallbackStruct
|
Unix: Contains
information required during embedded mode printing. |
NPByteRange
|
Represents a particular
range of bytes in a stream. |
NPEmbedPrint
|
Substructure of NPPrint
that contains platform-specific information used during embedded mode printing. |
NPEvent
|
Event passed by NPP_HandleEvent
to a windowless plug-in. |
NPFullPrint
|
Substructure of NPPrint
that contains platform-specific information used during full-page mode
printing. |
NPP
|
Single instance of
a plug-in. |
NP_Port
|
Mac OS: Contains
information required by the window field of an NPWindow
structure. |
NPPrint
|
Information the plug-in
needs to print itself in full-page or embedded modes. |
NPPrintCallbackStruct
|
Unix: Contains
information required during embedded mode printing. |
NP_Rect
|
Rectangular area of
a page. |
NP_Region
|
Region of a page. |
NPSavedData
|
Block of instance
information saved after the plug-in is deleted; can be returned to the
plug-in. |
NPSetWindowCallbackStruct
|
Unix: Contains
information about the plug-in's Unix window environment. |
NPStream
|
Stream of data produced
by Communicator or the plug-in. |
NPWindow
|
Information about
the target into which the plug-in instance can draw. |
[Top] [Structures]
NPAnyCallbackStruct
Used on Unix only.
Contains information required during embedded
mode printing
Syntax
typedef struct
{
int32 type;
} NPAnyCallbackStruct;
Fields
The data structure has the following field:
type |
Always contains NP_PRINT. |
Description
Callback structures are used to pass platform-specific
information. The NPAnyCallbackStruct structure contains information
required by the platformPrint field of the NPEmbedPrint
structure during embedded mode printing.
During printing in embedded mode, the platformPrint
field of the NPEmbedPrint structure points to an NPAnyCallbackStruct.
This structure contains the file pointer to which the plug-in should write
its Postscript data. At the time the plug-in is called, Navigator has already
opened the file and written Postscript for other parts of the page. When
the plug-in is done, it should leave the file open, as Navigator can continue
to write additional Postscript data to the file.
See Also
NPP_Print, NPEmbedPrint, NPSetWindowCallbackStruct, NPPrintCallbackStruct
[Top] [Structures]
NPByteRange
Represents a particular range of bytes from a stream
Syntax
typedef struct _NPByteRange
{
int32 offset; /* negative offset = from the end */
uint32 length;
struct _NPByteRange* next;
} NPByteRange;
Fields
The data structure has the following fields:
offset
|
Offset in bytes of
the requested range, either positive or negative:
-
Positive value: Offset from the beginning of the stream.
-
Negative value: Offset from the end of the stream.
|
length
|
Number of bytes to
fetch from the specified offset. |
next
|
Points to the next
NPByteRange request in the list of requests, or null
if this is the last request. |
Description
The plug-in seeks within a stream by building a linked
list of one or more NPByteRange objects, which represents a set
of discontiguous byte ranges. The only Plug-in API call that uses the NPByteRange
type is NPN_RequestRead, which allows the plug-in to read specified
parts of a file without downloading it.
The plug-in is responsible for deleting
NPByteRange objects when finished with them. Communicator makes
a copy if it needs to keep the objects beyond the call to NPN_RequestRead.
See Also
NPN_RequestRead
[Top] [Structures]
NPEmbedPrint
Substructure of NPPrint that contains platform-specific
information used during embedded mode printing
Syntax
typedef struct _NPEmbedPrint
{
NPWindow window;
void* platformPrint; /* Platform-specific */
} NPEmbedPrint;
Fields
The data structure has the following fields:
window
|
The NPWindow
the plug-in should use for printing. |
platformPrint
|
Additional platform-specific
printing information.
-
Mac OS: THPrint
-
Unix: Pointer to a NPPrintCallbackStruct.
|
Description
The NPP_Print function passes a pointer
to an NPPrint object (previously allocated by Communicator) to
the plug-in. The NPEmbedPrint structure is used when the mode
field of NPPrint is set to NP_EMBED.
Unix
The plug-in location and size in the NPWindow
are in page coordinates (720/ inch), but the printer requires point coordinates
(72/inch).
See Also
NPFullPrint, NP_Port, NPP_Print, NPPrint, NPPrintCallbackStruct
[Top] [Structures]
NPEvent
New in Netscape Navigator 4.0.
Represents an event passed by NPP_HandleEvent
to a windowless plug-in
Syntax
MS Windows
typedef struct _NPEvent
{
uint16 event;
uint32 wParam;
uint32 lParam;
} NPEvent;
Mac OS
typedef EventRecord NPEvent;
TYPE EventRecord =
RECORD {
what: Integer;
message: LongInt;
when: LongInt;
where: Point;
modifiers: Integer;
END;
XWindows
typedef XEvent NPEvent;
Fields
NPEvent on MS Windows
The data structure has the following fields:
event
|
One of the following
event types:
-
WM_PAINT
-
WM_LBUTTONDOWN
-
WM_LBUTTONUP
-
WM_LBUTTONDBLCLK
-
WM_RBUTTONDOWN
-
WM_RBUTTONUP
-
WM_RBUTTONDBLCLK
-
WM_MBUTTONDOWN
-
WM_MBUTTONUP
-
WM_MBUTTONDBLCLK
-
WM_MOUSEMOVE
-
WM_KEYUP
-
WM_KEYDOWN
-
WM_SETCURSOR
-
WM_SETFOCUS
-
WM_KILLFOCUS
For information about these events, see your MS Windows
documentation. |
wParam
|
32 bit field for Windows
event parameter; parameter value depends upon event type. |
lParam
|
32 bit field for Windows
event parameter; parameter value depends upon event type. |
EventRecord NPEvent on Mac OS
NPEvent is defined as an EventRecord
data structure, which has the following fields:
what
|
Integer representing
an event type. Both windowed and windowless plug-ins receive the same events.
Values:
0 nullEvent
1 mouseDown
2 mouseUp
3 keyDown
4 keyUp
5 autoKey
6 updateEvt
7 diskEvt
8 activateEvt
15 osEvt
23 kHighLevelEvent
getFocusEvent 0, 1 (true, false)
loseFocusEvent
adjustCursorEvent 0, 1 (true, false)
For information about these events, see your Mac
OS documentation. |
message
|
LongInt.
Additional information about the event. Type of information depends on
the event type. Undefined for null, mouseUp, and mouseDown
events. |
when
|
LongInt.
Ticks since start-up. |
where
|
Point. Cursor
location. |
modifiers
|
Integer.
Flags. |
Description
MS Windows Description
The type NPEvent represents an event passed
by NPP_HandleEvent to a windowless plug-in. For information about
these events, see your MS Windows documentation.
Mac OS Description
The NPEvent object represents an event passed
by NPP_HandleEvent to a windowless plug-in. This structure is
defined as EventRecord, the event type used by Mac OS platform.
On Mac OS, plug-ins receive the same events for both windowed and windowless
plug-ins, as follows.
-
Mouse events: Sent if the mouse is within the bounds
of the instance.
-
Key events: Sent if the instance has text focus (see
below).
-
Update events: Sent if the update region intersects
the instance's bounds.
-
Activate events: Sent to all instances in the window
being activate or deactivated.
-
Suspend/Resume events: Sent to all instances
in all windows.
-
Null events: Sent to all instances in all windows.
In addition to these standard types, Communicator
provides three additional event types that can be passed in the event->what
field of the EventRecord:
-
getFocusEvent: Sent when the instance could
become the focus of subsequent key events, when the user clicks the instance
or presses the tab key to focus the instance.
-
If your instance accepts key events, return true, and key events
will be sent to the instance until it receives a loseFocusEvent.
-
If your plug-in ignores key events, return false, and the key
events will be processed by Netscape itself.
-
loseFocusEvent: Sent when the instance has lost the text focus,
as a result of the user clicking elsewhere on the page or pressing the
Tab key to move the focus. No key events are sent to the instance until
the next getFocusEvent.
-
adjustCursorEvent: Send when the mouse enters or leaves the bounds
of the instance.
-
If your plug-in wants to set the cursor when the mouse is within the instance,
set the cursor and return true.
-
If you don't want a special cursor, return false and Netscape
will use the standard arrow cursor.
XWindows Description
The NPEvent object represents an event passed
by NPP_HandleEvent to a windowless plug-in. The NPEvent
structure is defined as XEvent, the definition of the event type
used by the XWindows platform. For information about the XEvent
structure and XWindows events, see your XWindows documentation.
See Also
NPP_HandleEvent
[Top] [Structures]
NPFullPrint
Substructure of NPPrint that contains platform-specific
information used during full-page mode printing
Syntax
typedef struct _NPFullPrint
{
NPBool pluginPrinted; /* true: print fullscreen */
NPBool printOne; /* true: print one copy */
/* to default printer */
void* platformPrint; /* Platform-specific */
} NPFullPrint;
Fields
The data structure has the following fields:
pluginPrinted
|
Determines whether
the plug-in prints in full-page mode. Values:
-
true: Plug-in takes complete control of the printing process and
prints full-page.
-
false: (Default) Plug-in renders its area of the page only (for
embedded plug-in).
|
printOne
|
Not currently in
use. Should always be false in Communicator 4.0.
-
true: Print single copy of page to the default printer.
-
false: Display print dialogs so user can choose printer, other
options.
|
platformPrint
|
Platform-specific
printing information.
-
Mac OS: THPrint
-
MS Windows: Printer's device context
|
Description
The NPP_Print function passes the plug-in
a pointer to an NPPrint object (previously allocated by Communicator).
The NPFullPrint structure is used when the mode field
of NPPrint is set to NP_Full.
The pluginPrinted field of this
structure determines whether the plug-in prints in full-page mode or not.
If you want the plug-in to take complete control of the printing process,
it should print the full page and set the field pluginPrinted
to true before returning.
If you want an embedded plug-in to simply render
its area of the page, set pluginPrinted to false and
return immediately; Communicator calls NPP_Print again with the
NPEmbedPrint substructure of NPPrint.
See Also
NPP_Print, NPPrint, NPEmbedPrint
[Top] [Structures]
NPP
Represents a single instance of a plug-in
Syntax
typedef struct _NPP
{
void* pdata; /* plug-in private data */
void* ndata; /* Netscape private data */
} NPP_t;
typedef NPP_t* NPP;
Fields
The data structure has the following fields:
pdata
|
Plug-in private value
that a plug-in can use to store a pointer to an internal data structure
associated with the instance; not modified by Communicator. |
ndata
|
Communicator private
value that can store data associated with the instance; should not be modified
by the plug-in. |
Description
Communicator creates an NPP structure for
each plug-in instance and passes a pointer to it to NPP_New. This
pointer identifies the instance on which API calls should operate and represents
the opaque instance handle of a plug-in. NPP contains private
instance data for both the plug-in and Communicator.
The NPP_Destroy function informs the
plug-in when the NPP instance is about to be deleted; after this
call returns, the NPP pointer is no longer valid.
See Also
NPP_New, NPP_Destroy
[Top] [Structures]
NP_Port
Used on Mac OS only.
Contains information required by the window
field of an NPWindow structure
Syntax
typedef struct NP_Port
{
CGrafPtr port; /* Grafport */
int32 portx; /* position inside the topmost window */
int32 porty;
} NP_Port;
Fields
The data structure has the following fields:
port
|
Standard Mac OS port
into which the plug-in should draw. |
portx, porty
|
Top-left corner of
the plug-in rectangle in port coordinates (taking the scroll position into
account). |
Description
On Mac OS, the window field of an NPWindow
structure points to an NP_Port object, which is allocated by Communicator.
The NP_Port is valid for the lifetime of the NPWindow,
that is, until NPP_SetWindow is called again with a different
value or the instance is destroyed.
Since the port is shared between the plug-in and
other plug-ins and Communicator, the plug-in should always do the following:
-
Draw only within the area designated by the NPWindow.
-
Save the current port settings before changing the port for drawing.
-
Set the desired port settings before drawing.
-
Restore the previous port settings after drawing.
See Also
NPP_SetWindow, NPWindow
[Top] [Structures]
NPPrint
Contains information the plug-in needs to print itself
in full-page or embedded mode
Syntax
typedef struct _NPPrint
{
uint16 mode; /* NP_FULL or NP_EMBED */
union
{
NPFullPrint fullPrint; /* if mode is NP_FULL */
NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
} print;
} NPPrint;
Fields
The data structure has the following fields:
mode
|
Determines whether
plug-in prints in full-page or embedded mode. Values:
-
NP_FULL: Pointer to NPFullPrint structure. Plug-in can
optionally print in full-page mode. The fullPrint field of the
union is valid. See NPFullPrint and NPP_Print.
-
NP_EMBED: Pointer to NPEmbedPrint structure. Plug-in
should print in embedded mode. The embedPrint field of the union
is valid. See NPEmbedPrint.
|
Description
The NPP_Print function passes a pointer
to an NPPrint object (previously allocated by Communicator) to
the plug-in. The pointer and fields within the NPPrint structure
are valid only for the duration of the NPP_Print call.
See Also
NPP_Print, NPFullPrint, NPEmbedPrint
[Top] [Structures]
NPPrintCallbackStruct
Used on Unix only.
Contains information required by the platformPrint
field of the NPEmbedPrint during embedded mode printing
Syntax
typedef struct
{
int32 type;
FILE* fp;
} NPPrintCallbackStruct;
Fields
The data structure has the following fields:
type
|
Always contains NP_PRINT. |
fp
|
Pointer to file to
which the plug-in should write its Postscript data. |
Description
Callback structures are used to pass platform-specific
information. The NPPrintCallbackStruct structure contains the
file pointer to which the plug-in should write its Postscript data. This
information is required by the platformPrint field of the NPEmbedPrint
structure during embedded mode printing.
At the time the plug-in is called, Navigator has
already opened the file and written Postscript for other parts of the page.
When the plug-in is done, it should leave the file open, as Navigator can
continue to write additional Postscript data to the file.
See Also
NPP_Print, NPEmbedPrint, NPSetWindowCallbackStruct, NPAnyCallbackStruct
[Top] [Structures]
NP_Rect
Represents a rectangular area of a page
Syntax
typedef struct _NPRect
{
uint16 top;
uint16 left;
uint16 bottom;
uint16 right;
} NPRect;
Fields
The data structure has the following fields:
top, left, bottom, right
|
Top, left side, bottom,
and right side of the rectangle. |
Description
NPRect defines the bounding box of the area
of the plug-in window to be updated, painted, invalidated, or clipped to.
See Also
NPN_ForceRedraw, NPN_InvalidateRect, NPN_InvalidateRegion, NP_Region, NPWindow
[Top] [Structures]
NP_Region
New in Netscape Navigator 4.0.
Represents a platform-defined region of a page
Syntax
MS Windows:
<
typedef HRGN NPRegion;
Mac OS:
typedef RgnHandle NPRegion;
XWindows:
typedef Region NPRegion;
Description
NPRect defines the region of the plug-in
window to be updated, painted, invalidated, or clipped to. For information
about the region type definition used by your platform, see your platform
documentation.
See Also
NPN_ForceRedraw, NPN_InvalidateRect, NPN_InvalidateRegion, NP_Rect, NPWindow
[Top] [Structures]
NPSavedData
Block of instance information saved after the plug-in
is deleted; can be returned to the plug-in
Syntax
typedef struct _NPSavedData
{
int32 len;
void* buf;
} NPSavedData;
Fields
The data structure has the following fields:
len
|
Length in bytes of
the buffer pointed to by buf; set by the plug-in. |
buf
|
Pointer to a memory
buffer allocated by the plug-in with NPN_MemAlloc. Can be any
reasonable size; its contents are private to the plug-in and are not modified
by Netscape. |
Description
The NPSavedData object contains a block
of per-instance information that Communicator saves after the instance
is deleted. This information can be returned to another instance of the
same plug-in if the user returns to the web page that contains it.
You can use the plug-in's NPP_Destroy
function to allocate an NPSavedData object using the NPN_MemAlloc
function, fill in the fields, and return it to Communicator as an output
parameter. See "Instance Destruction" for
a code example that shows how to use NPSavedData.
If the user revisits a web page that contains
a plug-in, Communicator returns the NPSavedData to the new instance
of the plug-in in a call to NPP_New. After this, the plug-in is
responsible for keeping or deleting the objects as necessary.
See Also
NPP_New, NPP_Destroy
[Top] [Structures]
NPSetWindowCallbackStruct
Used only on Unix.
Contains information about the plug-in's Unix
window environment
Syntax
typedef struct
{
int32 type;
Display* display;
Visual* visual;
Colormap colormap;
unsigned int depth;
} NPSetWindowCallbackStruct;
Fields
The data structure has the following fields:
type |
Always contains NP_SetWindow. |
display |
Standard X Toolkit
attribute. Pointer to the Display structure that represents the
browser-server connection. |
visual |
Standard X Toolkit
attribute. X Visual used by the top-level shell window in the Netscape
window hierarchy. |
colormap |
Standard X Toolkit
attribute. Colormap for the plug-in window. |
depth |
Standard X Toolkit
attribute. Depth of the plug-in window. |
Description
Callback structures are used to pass platform-specific
information. The NPSetWindowCallbackStruct object, allocated by
Communicator, contains information required for the ws_info field
of an NPWindow.
The NPP_SetWindow function passes a pointer
to this structure to the plug-in. The structure is valid for the lifetime
of the NPWindow, that is, until NPP_SetWindow is called
again or the instance is destroyed.
The type field of this structure always
contains NP_SetWindow. The remaining fields are Standard X Toolkit
attributes of the top-level shell window in the Netscape window hierarchy.
See Also
NPP_SetWindow, NPWindow, NPPrintCallbackStruct, NPAnyCallbackStruct
[Top] [Structures]
NPStream
Represents a stream of data either produced by Communicator
and consumed by the plug-in, or produced by the plug-in and consumed by
Communicator
Syntax
typedef struct _NPStream
{
void* pdata; /* plug-in private data */
void* ndata; /* Netscape private data */
const char* url;
uint32 end;
uint32 lastmodified;
void* notifyData;
} NPStream;
Fields
The data structure has the following fields:
Plug-in-private value
that the plug-in can use to store a pointer to private data associated
with the instance; not modified by Communicator. |
ndata
|
Communicator-private
value that can store data associated with the instance; should not be modified
by the plug-in. |
url
|
The URL that the data
in the stream is read from or written to. |
end
|
Offset in bytes of
the end of the stream (equivalent to the length of the stream in bytes).
Can be zero for streams of unknown length, such as streams returned from
older FTP servers or generated "on the fly" by CGI scripts. |
lastmodified
|
Time the data in the
URL was last modified (if applicable), measured in seconds since 12:00
midnight GMT, January 1, 1970. |
notifyData
|
Used only for streams
generated in response to a NPN_GetURLNotify or NPN_PostURLNotify
request.
-
For these streams, notifyData is set to the value of the notifyData
parameter to NPN_GetURLNotify or NPN_PostURLNotify.
-
For other streams, notifyData is null.
|
Description
Communicator allocates and initializes the NPStream
object and passes it to the plug-in in as a parameter to NPP_NewStream
or NPN_NewStream. Communicator cannot delete the object until
after it calls NPP_DestroyStream or the plug-in calls NPN_DestroyStream.
Streams produced by Communicator: Communicator
creates the NPStream object and passes it to the plug-in initially
as a parameter to NPP_NewStream. All API calls that operate on
the stream (such as NPP_WriteReady and NPP_Write) use
a pointer to this stream. Communicator informs the plug-in when the stream
is about to be deleted through NPP_DestroyStream, after which
the NPStream object is no longer valid.
Streams produced by the plug-in: Communicator
creates the NPStream object and returns it as an output parameter
when the plug-in calls NPP_NewStream. The plug-in must pass a
pointer to the NPStream to all API calls that operate on the stream,
such as NPN_Write and NPN_DestroyStream.
See Also
NPP_NewStream, NPN_DestroyStream, NPP_NewStream, NPP_DestroyStream
[Top] [Structures]
NPWindow
Contains information about the target into which
the plug-in instance can draw
Syntax
typedef struct _NPWindow
{
void* window; /* Platform specific handle */
uint32 x; /* Coordinates of top left corner */
uint32 y; /* relative to a Netscape page */
uint32 width; /* Maximum window size */
uint32 height;
NPRect clipRect; /* Clipping rectangle coordinates */
/* in port - Used by Mac only */
#ifdef XP_UNIX
void * ws_info; /* Platform-dependent additional data */
#endif /* XP_UNIX */
NPWindowType type; /* Window or drawable target */
} NPWindow;
Fields
The data structure has the following fields:
window
|
Platform-specific
handle to a native window element in the Netscape window hierarchy on Windows
(HWND) and Unix (X Window ID). Mac
OS: window is a pointer to an NP_Port. |
x, y
|
The x and y coordinates
for the top left corner of the plug-in relative to the page (and thus relative
to the origin of the drawable). Should not be modified by the plug-in. |
height, width
|
The height
and width of the plug-in area. Should not be modified by the plug-in. |
clipRect
|
Clipping rectangle
of the plug-in; the origin is the top left corner of the drawable or window.
Clipping to the clipRect prevents the plug-in from overwriting
the status bar, scroll bars, and other page elements when partially scrolled
off the screen. Mac OS: clipRect
is the rectangle in port coordinates to which the plug-in should clip its
drawing. |
ws_info
|
Unix: Contains
information about the plug-in's Unix window environment; points
to an NPSetWindowCallbackStruct. |
type
|
New in Netscape
Navigator 4.0. NPWindowType value that specifies whether the
NPWindow instance represents a window or a drawable. Values:
-
NPWindowTypeWindow: Indicates that the window field holds
a platform-specific handle to a window (as in Navigator 2.0 and Navigator
3.0). The plug-in is considered windowed.
-
NPWindowTypeDrawable: Indicates that the window field
holds a platform-specific handle to a drawable or an off-screen pixmap.
The plug-in is considered windowless. Values:
--Windows: HDC --Mac
OS: pointer to NP_Port structure
|
Description
The NPWindow structure represents the native
window or a drawable, and contains information about coordinate position,
size, whether the plug-in is windowed or windowless, and some platform-specific
information. The plug-in area is a native window element on Windows and
Unix, or a rectangle within a native window on Mac OS. The x,
y, height, and width coordinates of NPWindow
specify the position and size of this area.
Communicator calls NPP_SetValue whenever
the drawable changes.
A windowed plug-in is drawn into a native window
(or portion of a native window) on a web page. For windowed plug-ins, Communicator
calls the NPP_SetWindow method with an NPWindow structure
that represents a drawable (a pointer to an NPWindow allocated
by Communicator). This window is valid until NPP_SetWindow is
called again with a different window or the instance is destroyed.
A windowless plug-in is drawn into a target called
a drawable, which can be defined in several ways depending on the
platform. For windowless plug-ins, Communicator calls the NPP_SetWindow
method with an NPWindow structure that represents a drawable.
The plug-in should not modify the field values
in this structure.
See Also
NPP_SetWindow, NP_Port, NPSetWindowCallbackStruct, NP_Rect
[Top] [Structures]
Constants and Definitions
This section is a reference to the program definitions
used by the Plug-in API. All program definitions are found in npapi.h.
[Top] [Constants
and Definitions]
Definition of Basic Types
All program definitions are found in npapi.h.
Type |
Definition |
_UINT16
|
unsigned short
uint16 |
_UINT32
|
Platform-dependent:
unsigned int uint32 or unsigned long uint32 |
_INT16
|
short int16
|
_INT32
|
Platform-dependent:
int32 or long int32 |
false
|
0
|
true
|
1
|
null
|
0L
|
NPBool
|
unsigned char
|
NPError
|
int16
|
NPReason
|
int16
|
NPMIMEType
|
char*
|
[Top] [Constants
and Definitions]
Error Codes
Return values of type NPError. See Definition
of Basic Types for a definition of the NPError type.
Code |
Value |
Description |
NPERR_NO_ERROR
|
0
|
No errors occurred. |
NPERR_GENERIC_ERROR
|
1
|
Error with no specific
error code occurred. |
NPERR_INVALID_INSTANCE_ERROR
|
2
|
Invalid instance passed
to the plug-in. |
NPERR_INVALID_FUNCTABLE_ERROR
|
3
|
Function table invalid. |
NPERR_MODULE_LOAD_FAILED_ERROR
|
4
|
Loading of plug-in
failed. |
NPERR_OUT_OF_MEMORY_ERROR
|
5
|
Memory allocation
failed. |
NPERR_INVALID_PLUGIN_ERROR
|
6
|
Plug-in missing or
invalid. |
NPERR_INVALID_PLUGIN_DIR_ERROR
|
7
|
Plug-in directory
missing or invalid. |
NPERR_INCOMPATIBLE_VERSION_ERROR
|
8
|
Versions of plug-in
and Communicator do not match. |
NPERR_INVALID_PARAM
|
9
|
Parameter missing
or invalid. |
NPERR_INVALID_URL
|
10
|
URL missing or invalid. |
NPERR_FILE_NOT_FOUND
|
11
|
File missing or invalid. |
NPERR_NO_DATA
|
12
|
Stream contains no
data. |
NPERR_STREAM_NOT_SEEKABLE
|
13
|
Seekable stream expected. |
[Top] [Constants
and Definitions]
Result Codes
Result values of type NPReason. Used by
NPP_DestroyStream.
Constant |
Value |
Description |
NPRES_DONE
|
0
|
(Most common): Completed
normally; all data was sent to the instance. |
NPRES_NETWORK_ERR
|
1
|
Stream failed due
to problems with network, disk I/O, lack of memory, or other problems. |
NPRES_USER_BREAK
|
2
|
User canceled stream
directly by clicking the Stop button or indirectly by some
action such as deleting the instance or initiating higher-priority network
operations. |
[Top] [Constants
and Definitions]
Plug-in Version Constants
Constant |
Value |
Description |
NP_VERSION_MAJOR
|
0
|
Major version number;
changes with major code release number. |
NP_VERSION_MINOR
|
11
|
Minor version number;
changes with point release number. |
For information about using these constants, see NPN_Version.
[Top] [Constants
and Definitions]
Version Feature Constants
For information about using these constants, see
NPN_Version and "Getting the Current
Version."
NPVERS
Constant: Version Feature Information |
Value |
Supported
Feature |
NPVERS_HAS_STREAMOUTPUT |
8
|
Streaming data. |
NPVERS_HAS_NOTIFICATION |
9
|
Notification of completion. |
NPVERS_HAS_LIVECONNECT |
9
|
LiveConnect. |
NPVERS_WIN16_HAS_LIVECONNECT |
9
|
LiveConnect (Win16). |
NPVERS_68K_HAS_LIVECONNECT |
11
|
LiveConnect (68K). |
NPVERS_HAS_WINDOWLESS |
11
|
Windowless plug-in. |
[Top] [Constants
and Definitions]
[Contents] [Previous]
[Next] [Index]
Last Updated: 01/15/97 16:37:58
Copyright © 1997 Netscape
Communications Corporation