npapi.h File Reference

jref

JRIEnv

__NATIVESYMBIANPORT__

XP_NATIVESYMBIAN

NP_VERSION_MAJOR

NP_VERSION_MINOR

NP_INFO_ProductVersion

NP_INFO_MIMEType

NP_INFO_FileOpenName

NP_INFO_FileExtents

NP_INFO_FileDescription

NP_INFO_ProductName

NP_INFO_CompanyName

NP_INFO_FileVersion

NP_INFO_InternalName

NP_INFO_LegalCopyright

NP_INFO_OriginalFilename

_UINT16

Typedef uint16

typedef unsigned shortuint16

Typedef uint16_t

typedef unsigned shortuint16_t

_UINT32

Typedef uint32

typedef unsigned longuint32

Typedef uint32_t

typedef unsigned longuint32_t

_UINT32_T_DECLARED

_INT16

Typedef int16

typedef shortint16

Typedef int16_t

typedef shortint16_t

_INT32

Typedef int32

typedef intint32

Typedef int32_t

typedef longint32_t

_INT32_T_DECLARED

FALSE

TRUE

NULL

Typedef int64_t

typedef long longint64_t

Typedef uint64_t

typedef unsigned long longuint64_t

Typedef NPBool

typedef unsigned charNPBool

Typedef NPError

typedef int16 NPError

Typedef NPReason

typedef int16 NPReason

Typedef NPMIMEType

typedef const TDesC8 &NPMIMEType

Typedef NPP_t

typedef struct _NPPNPP_t

Typedef NPP

typedef NPP_t *NPP

Typedef NPStream

typedef struct _NPStreamNPStream

Typedef NPByteRange

typedef struct _NPByteRangeNPByteRange

Typedef NPSavedData

typedef struct _NPSavedDataNPSavedData

Typedef NPRect

typedef struct _NPRectNPRect

Typedef NPSize

typedef struct _NPSizeNPSize

Enum NPFocusDirection

EnumeratorValueDescription
NPFocusNext0
NPFocusPrevious1

kNPEventNotHandled

kNPEventHandled

kNPEventStartIME

Typedef GenericEntry

typedef struct NPN_GenericElementGenericEntry

NP_ABI_GCC3_MASK

_NP_ABI_MIXIN_FOR_GCC3

_NP_ABI_MIXIN_FOR_MACHO

NP_ABI_MASK

Enum NPPVariable

Enum NPNVariable

Enum NPNURLVariable

EnumeratorValueDescription
NPNURLVCookie501
NPNURLVProxy

Enum NPNToolkitType

EnumeratorValueDescription
NPNVGtk121
NPNVGtk2

Enum NPWindowType

EnumeratorValueDescription
NPWindowTypeWindow1
NPWindowTypeDrawable

Typedef NPWindow

typedef struct _NPWindowNPWindow

Typedef NPImageExpose

typedef struct _NPImageExposeNPImageExpose

Typedef NPFullPrint

typedef struct _NPFullPrintNPFullPrint

Typedef NPEmbedPrint

typedef struct _NPEmbedPrintNPEmbedPrint

Typedef NPPrint

typedef struct _NPPrintNPPrint

Typedef NPEvent

typedef struct _NPEventNPEvent

Typedef NPRegion

typedef void *NPRegion

Typedef NPNSString

typedef struct _NPNSStringNPNSString

Typedef NPNSWindow

typedef struct _NPNSWindowNPNSWindow

Typedef NPNSMenu

typedef struct _NPNSMenuNPNSMenu

Typedef NPMenu

typedef void *NPMenu

Enum NPCoordinateSpace

NP_EMBED

NP_FULL

NP_NORMAL

NP_SEEK

NP_ASFILE

NP_ASFILEONLY

NP_MAXREADY

NP_CLEAR_ALL

NP_CLEAR_CACHE

NPERR_BASE

NPERR_NO_ERROR

NPERR_GENERIC_ERROR

NPERR_INVALID_INSTANCE_ERROR

NPERR_INVALID_FUNCTABLE_ERROR

NPERR_MODULE_LOAD_FAILED_ERROR

NPERR_OUT_OF_MEMORY_ERROR

NPERR_INVALID_PLUGIN_ERROR

NPERR_INVALID_PLUGIN_DIR_ERROR

NPERR_INCOMPATIBLE_VERSION_ERROR

NPERR_INVALID_PARAM

NPERR_INVALID_URL

NPERR_FILE_NOT_FOUND

NPERR_NO_DATA

NPERR_STREAM_NOT_SEEKABLE

NPRES_BASE

NPRES_DONE

NPRES_NETWORK_ERR

NPRES_USER_BREAK

NP_NOERR

NP_EINVAL

NP_EABORT

NPVERS_HAS_STREAMOUTPUT

NPVERS_HAS_NOTIFICATION

NPVERS_HAS_LIVECONNECT

NPVERS_WIN16_HAS_LIVECONNECT

NPVERS_68K_HAS_LIVECONNECT

NPVERS_HAS_WINDOWLESS

NPVERS_HAS_XPCONNECT_SCRIPTING

NPVERS_HAS_NPRUNTIME_SCRIPTING

NPVERS_HAS_FORM_VALUES

NPVERS_HAS_POPUPS_ENABLED_STATE

NPVERS_HAS_RESPONSE_HEADERS

NPVERS_HAS_NPOBJECT_ENUM

NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL

NPVERS_HAS_ALL_NETWORK_STREAMS

NPVERS_HAS_URL_AND_AUTH_INFO

NPVERS_HAS_PRIVATE_MODE

NPVERS_MACOSX_HAS_EVENT_MODELS

NPVERS_HAS_CANCEL_SRC_STREAM

NPVERS_HAS_ADVANCED_KEY_HANDLING

NPVERS_HAS_URL_REDIRECT_HANDLING

NPVERS_HAS_CLEAR_SITE_DATA

NP_LOADDS

NPP_Initialize ( void )

NPError NPP_Initialize(void)

NPP_Shutdown ( void )

IMPORT_C voidNPP_Shutdown(void)

Shutdown plugin

NPP_New ( NPMIMEType, NPP, uint16, CDesCArray *, CDesCArray *, NPSavedData * )

NPError NPP_New(NPMIMETypepluginType,
NPPinstance,
uint16mode,
CDesCArray *argn,
CDesCArray *argv,
NPSavedData *saved
)

NPP_Destroy ( NPP, NPSavedData ** )

NPError NPP_Destroy(NPPinstance,
NPSavedData **save
)

Deletes a specific instance of a plug-in

Parameters
instancePointer to the plug-in instance to delete
saveState or other information to save for reuse by a new instance of this plug-in at the same URL. Passed to NPP_New
Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the function returns a NPError error code

NPP_SetWindow ( NPP, NPWindow * )

NPError NPP_SetWindow(NPPinstance,
NPWindow *window
)

Tells the plug-in when a window is created, moved, sized, or destroyed.

Parameters
instancePointer to the current plug-in instance
Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the function returns a NPError error code

NPP_NewStream ( NPP, NPMIMEType, NPStream *, NPBool, uint16 * )

NPError NPP_NewStream(NPPinstance,
NPMIMETypetype,
NPStream *stream,
NPBoolseekable,
uint16 *stype
)

Notifies a plug-in instance of a new data stream.

Parameters
instancePointer to the current plug-in instance
typePointer to MIME type of the stream.
streamPointer to new stream.
seekableBoolean indicating whether the stream is seekable.
stypeRequested mode of new stream. NP_NORMAL (Default): Delivers stream data to the instance in a series of calls to NPP_WriteReady and NPP_Write. NP_ASFILEONLY: Saves stream data to a file in the local cache. NP_ASFILE: File download. Like NP_ASFILEONLY except that data is delivered to the plug-in as it is saved to the file (as in mode NP_NORMAL). NP_SEEK: Stream data randomly accessible by the plug-in as needed, through calls to NPN_RequestRead
Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the function returns a NPError error code

NPP_DestroyStream ( NPP, NPStream *, NPReason )

NPError NPP_DestroyStream(NPPinstance,
NPStream *stream,
NPReasonreason
)

Tells the plug-in that a stream is about to be closed or destroyed.

Parameters
instancePointer to the current plug-in instance
streamPointer to current stream.
reasonReason the stream was destroyed. NPRES_DONE (Most common): Completed normally; all data was sent to the instance. NPRES_USER_BREAK: 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. NPRES_NETWORK_ERR: Stream failed due to problems with network, disk I/O, lack of memory, or other problems
Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the function returns a NPError error code

NPP_WriteReady ( NPP, NPStream * )

int32 NPP_WriteReady(NPPinstance,
NPStream *stream
)

Determines maximum number of bytes that the plug-in can consume.

Parameters
instancePointer to the current plug-in instance
streamPointer to current stream.
Return Value
the maximum number of bytes that an instance is prepared to accept from the stream

NPP_Write ( NPP, NPStream *, int32, int32, void * )

int32 NPP_Write(NPPinstance,
NPStream *stream,
int32offset,
int32len,
void *buffer
)

Delivers data to a plug-in instance.

Parameters
instancePointer to the current plug-in instance
streamPointer to current stream.
offsetOffset in bytes of buf from the beginning of the data in the stream. Can be used to check stream progress or bye range requests from NPN_RequestRead.
lenLength in bytes of buf; number of bytes accepted.
bufferBuffer of data, delivered by the stream, that contains len bytes of data offset bytes from the start of the stream. The buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it needs to keep.
Return Value
If successful, the function returns the number of bytes consumed by the instance If unsuccessful, the function destroys the stream by returning a negative value.

NPP_StreamAsFile ( NPP, NPStream *, const TDesC & )

voidNPP_StreamAsFile(NPPinstance,
NPStream *stream,
const TDesC &fname
)

NPP_Print ( NPP, NPPrint * )

voidNPP_Print(NPPinstance,
NPPrint *platformPrint
)

Requests a platform-specific print operation for an embedded or full-screen plug-in.

Parameters
instancePointer to the current plug-in instance

NPP_HandleEvent ( NPP, void * )

int16_t NPP_HandleEvent(NPPinstance,
void *event
)

Delivers a platform-specific window event to the instance.

Parameters
instancePointer to the current plug-in instance
eventPlatform-specific value representing the event handled by the function.
Return Value
If the plug-in handles the event, the function should return true If the plug-in ignores the event, the function returns false

NPP_URLNotify ( NPP, const TDesC &, NPReason, void * )

voidNPP_URLNotify(NPPinstance,
const TDesC &url,
NPReasonreason,
void *notifyData
)

NPP_GetValue ( NPP, NPPVariable, void * )

NPError NPP_GetValue(NPPinstance,
NPPVariablevariable,
void *value
)

Allows the browser to query the plug-in for information.

Parameters
instancePointer to the current plug-in instance
variablePlug-in information the call gets.
valueValue of the variable
Return Value
If successful, the function returns the function returns NPERR_NO_ERROR. If unsuccessful, the function returns a NPErr error code.

NPP_SetValue ( NPP, NPNVariable, void * )

NPError NPP_SetValue(NPPinstance,
NPNVariablevariable,
void *value
)

Sets information about the plug-in.

Parameters
instancePointer to the current plug-in instance
variablePlug-in information the call gets.
valueValue of the variable
Return Value
If successful, the function returns the function returns NPERR_NO_ERROR. If unsuccessful, the function returns a NPErr error code.

NPP_GotFocus ( NPP, NPFocusDirection )

NPBool NPP_GotFocus(NPPinstance,
NPFocusDirectiondirection
)

NPP_LostFocus ( NPP )

voidNPP_LostFocus(NPPinstance)

NPP_URLRedirectNotify ( NPP, const char *, int32_t, void * )

voidNPP_URLRedirectNotify(NPPinstance,
const char *url,
int32_tstatus,
void *notifyData
)

NPP_ClearSiteData ( const char *, uint64_t, uint64_t )

NPError NPP_ClearSiteData(const char *site,
uint64_tflags,
uint64_tmaxAge
)

NPP_GetSitesWithData ( void )

char **NPP_GetSitesWithData(void)

NPN_GetURLNotify ( NPP, const TDesC &, const TDesC *, void * )

NPError NPN_GetURLNotify(NPPinstance,
const TDesC &url,
const TDesC *target,
void *notifyData
)

NPN_GetURL ( NPP, const TDesC &, const TDesC * )

NPError NPN_GetURL(NPPinstance,
const TDesC &url,
const TDesC *target
)

NPN_PostURLNotify ( NPP, const TDesC &, const TDesC *, const TDesC &, NPBool, void * )

NPError NPN_PostURLNotify(NPPinstance,
const TDesC &url,
const TDesC *target,
const TDesC &buf,
NPBoolfile,
void *notifyData
)

NPN_PostURL ( NPP, const TDesC &, const TDesC *, const TDesC &, NPBool )

NPError NPN_PostURL(NPPinstance,
const TDesC &url,
const TDesC *target,
const TDesC &buf,
NPBoolfile
)

NPN_NewStream ( NPP, NPMIMEType, const TDesC *, NPStream ** )

NPError NPN_NewStream(NPPinstance,
NPMIMETypetype,
const TDesC *target,
NPStream **stream
)

NPN_RequestRead ( NPStream *, NPByteRange * )

NPError NPN_RequestRead(NPStream *stream,
NPByteRange *rangeList
)

Requests a range of bytes for a seekable stream

Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the function returns a NPError error code

NPN_Write ( NPP, NPStream *, int32_t, void * )

int32_t NPN_Write(NPPinstance,
NPStream *stream,
int32_tlen,
void *buffer
)

NPN_DestroyStream ( NPP, NPStream *, NPReason )

NPError NPN_DestroyStream(NPPinstance,
NPStream *stream,
NPReasonreason
)

Closes and deletes a stream.

Parameters
instancePointer to the current plug-in instance
streamPointer to current stream.
reasonReason the stream was stopped so the application can give the user appropriate feedback. Values: NPRES_DONE (most common): Stream completed normally; all data was sent by the plug-in to the browser. NPRES_USER_BREAK: Plug-in is terminating the stream due to a user request. NPRES_NETWORK_ERR: Stream failed due to network problems
Return Value
If successful, the function returns NPERR_NO_ERROR If unsuccessful, the plug-in is not loaded and the function returns a NPError error code

NPN_Status ( NPP, const TDesC & )

voidNPN_Status(NPPinstance,
const TDesC &message
)

NPN_UserAgent ( NPP )

const TDesC *NPN_UserAgent(NPPinstance)

Returns the browser's user agent field

The user agent is the part of the HTTP header that identifies the browser during transfers. You can use this information to verify that the expected browser is in use, or you can use it in combination with NPN_Version to supply different code for different versions of Netscape browsers

Parameters
instancePointer to the current plug-in instance
Return Value
A pointer to a buffer that contains the user agent field of the browser

NPN_MemAlloc ( uint32 )

void *NPN_MemAlloc(uint32size)

Allocates memory from the browser's memory space.

Size of memory, in bytes, to allocate in the browser's memory space

Return Value
If successful, the function returns a pointer to the allocated memory, in bytes If insufficient memory is available, the plug-in returns null

NPN_MemFree ( void * )

voidNPN_MemFree(void *ptr)

Deallocates a block of allocated memory.

Block of memory previously allocated using NPN_MemAlloc

NPN_MemFlush ( uint32 )

uint32 NPN_MemFlush(uint32size)

Requests that the browser free a specified amount of memory

Size of memory, in bytes, to free in the browser's memory space.

Return Value
If successful, the function returns the amount of freed memory, in bytes If no memory can be freed, the plug-in returns 0

NPN_ReloadPlugins ( NPBool )

voidNPN_ReloadPlugins(NPBoolreloadPages)

Reloads all plug-ins in the Plugins directory.

Whether to reload pages. Values: true: Reload pages. false: Do not reload pages

NPN_GetJavaEnv ( void )

void *NPN_GetJavaEnv(void)

Get java runtime environment

Return Value
Java runtime environment.

NPN_GetJavaPeer ( NPP )

void *NPN_GetJavaPeer(NPPinstance)

Get java runtime peer

Return Value
Java runtime peer

NPN_GetValue ( NPP, NPNVariable, void * )

NPError NPN_GetValue(NPPinstance,
NPNVariablevariable,
void *value
)

Allows the browser to query the plug-in for information.

Parameters
instancePointer to the current plug-in instance
variablePlug-in information the call gets.
valueValue of the variable
Return Value
If successful, the function returns the function returns NPERR_NO_ERROR. If unsuccessful, the function returns a NPErr error code.

NPN_SetValue ( NPP, NPPVariable, void * )

NPError NPN_SetValue(NPPinstance,
NPPVariablevariable,
void *value
)

Sets various modes of plug-in operation.

Parameters
instancePointer to the current plug-in instance
variableVariable to be set
valueValue of the variable
Return Value
If successful, the function returns the function returns NPERR_NO_ERROR. If unsuccessful, the function returns a NPErr error code.

NPN_InvalidateRect ( NPP, NPRect * )

voidNPN_InvalidateRect(NPPinstance,
NPRect *invalidRect
)

Invalidates specified drawing area prior to repainting or refreshing a windowless plug-in.

Parameters
instancePointer to the current plug-in instance
invalidRectThe area to invalidate, specified in a coordinate system that originates at the top left of the plug-in.

NPN_InvalidateRegion ( NPP, NPRegion )

voidNPN_InvalidateRegion(NPPinstance,
NPRegioninvalidRegion
)

Invalidates specified drawing region prior to repainting or refreshing a windowless plug-in

Parameters
instancePointer to the current plug-in instance
invalidRegionThe area to invalidate, specified in a coordinate system that originates at the top left of the plug-in

NPN_ForceRedraw ( NPP )

voidNPN_ForceRedraw(NPPinstance)

Forces a paint message for a windowless plug-in.

Parameters
instancePointer to the current plug-in instance

NPN_PushPopupsEnabledState ( NPP, NPBool )

voidNPN_PushPopupsEnabledState(NPPinstance,
NPBoolenabled
)

Push popup enabled state

Parameters
instanceThe NPP indicating which plugin instance's is making the request
enabledtrue enable popup, false disable popup

NPN_PopPopupsEnabledState ( NPP )

voidNPN_PopPopupsEnabledState(NPPinstance)

Pop popup enabled state

Parameters
instanceThe NPP indicating which plugin instance's is making the request

NPN_PluginThreadAsyncCall ( NPP, void(*)(void *), void * )

voidNPN_PluginThreadAsyncCall(NPPinstance,
void(*)(void *)func,
void *userData
)

Thread safe way to request that the browser calls a plugin function on the browser or plugin thread (the thread on which the plugin was initiated

Parameters
funcPointer to the function to call on the correct thread
userDataPointer to the data to pass to the function func once called

NPN_GetValueForURL ( NPP, NPNURLVariable, const char *, char **, uint32_t * )

NPError NPN_GetValueForURL(NPPinstance,
NPNURLVariablevariable,
const char *url,
char **value,
uint32_t *len
)

NPN_SetValueForURL ( NPP, NPNURLVariable, const char *, const char *, uint32_t )

NPError NPN_SetValueForURL(NPPinstance,
NPNURLVariablevariable,
const char *url,
const char *value,
uint32_tlen
)

NPN_GetAuthenticationInfo ( NPP, const char *, const char *, int32_t, const char *, const char *, char **, uint32_t *, char **, uint32_t * )

NPError NPN_GetAuthenticationInfo(NPPinstance,
const char *protocol,
const char *host,
int32_tport,
const char *scheme,
const char *realm,
char **username,
uint32_t *ulen,
char **password,
uint32_t *plen
)

NPN_ScheduleTimer ( NPP, uint32_t, NPBool, void(*)(NPP npp, uint32_t timerID) )

uint32_t NPN_ScheduleTimer(NPPinstance,
uint32_tinterval,
NPBoolrepeat,
void(*)(NPP npp, uint32_t timerID)timerFunc
)

NPN_UnscheduleTimer ( NPP, uint32_t )

voidNPN_UnscheduleTimer(NPPinstance,
uint32_ttimerID
)

NPN_PopUpContextMenu ( NPP, NPMenu * )

NPError NPN_PopUpContextMenu(NPPinstance,
NPMenu *menu
)

NPN_ConvertPoint ( NPP, double, double, NPCoordinateSpace, double *, double *, NPCoordinateSpace )

NPBool NPN_ConvertPoint(NPPinstance,
doublesourceX,
doublesourceY,
NPCoordinateSpacesourceSpace,
double *destX,
double *destY,
NPCoordinateSpacedestSpace
)