Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
npruntime.h File Reference
#include "nptypes.h"
+ Include dependency graph for npruntime.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _NPString
 
struct  _NPVariant
 
struct  NPClass
 
struct  NPObject
 

Macros

#define NP_BEGIN_MACRO   do {
 
#define NP_END_MACRO   } while (0)
 
#define NPVARIANT_IS_VOID(_v)   ((_v).type == NPVariantType_Void)
 
#define NPVARIANT_IS_NULL(_v)   ((_v).type == NPVariantType_Null)
 
#define NPVARIANT_IS_BOOLEAN(_v)   ((_v).type == NPVariantType_Bool)
 
#define NPVARIANT_IS_INT32(_v)   ((_v).type == NPVariantType_Int32)
 
#define NPVARIANT_IS_DOUBLE(_v)   ((_v).type == NPVariantType_Double)
 
#define NPVARIANT_IS_STRING(_v)   ((_v).type == NPVariantType_String)
 
#define NPVARIANT_IS_OBJECT(_v)   ((_v).type == NPVariantType_Object)
 
#define NPVARIANT_TO_BOOLEAN(_v)   ((_v).value.boolValue)
 
#define NPVARIANT_TO_INT32(_v)   ((_v).value.intValue)
 
#define NPVARIANT_TO_DOUBLE(_v)   ((_v).value.doubleValue)
 
#define NPVARIANT_TO_STRING(_v)   ((_v).value.stringValue)
 
#define NPVARIANT_TO_OBJECT(_v)   ((_v).value.objectValue)
 
#define VOID_TO_NPVARIANT(_v)
 
#define NULL_TO_NPVARIANT(_v)
 
#define BOOLEAN_TO_NPVARIANT(_val, _v)
 
#define INT32_TO_NPVARIANT(_val, _v)
 
#define DOUBLE_TO_NPVARIANT(_val, _v)
 
#define STRINGZ_TO_NPVARIANT(_val, _v)
 
#define STRINGN_TO_NPVARIANT(_val, _len, _v)
 
#define OBJECT_TO_NPVARIANT(_val, _v)
 
#define NP_CLASS_STRUCT_VERSION   3
 
#define NP_CLASS_STRUCT_VERSION_ENUM   2
 
#define NP_CLASS_STRUCT_VERSION_CTOR   3
 
#define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass)   ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM)
 
#define NP_CLASS_STRUCT_VERSION_HAS_CTOR(npclass)   ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR)
 

Typedefs

typedef struct NPObject NPObject
 
typedef struct NPClass NPClass
 
typedef char NPUTF8
 
typedef struct _NPString NPString
 
typedef struct _NPVariant NPVariant
 
typedef void * NPIdentifier
 
typedef NPObject *(* NPAllocateFunctionPtr )(NPP npp, NPClass *aClass)
 
typedef void(* NPDeallocateFunctionPtr )(NPObject *npobj)
 
typedef void(* NPInvalidateFunctionPtr )(NPObject *npobj)
 
typedef bool(* NPHasMethodFunctionPtr )(NPObject *npobj, NPIdentifier name)
 
typedef bool(* NPInvokeFunctionPtr )(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result)
 
typedef bool(* NPInvokeDefaultFunctionPtr )(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
 
typedef bool(* NPHasPropertyFunctionPtr )(NPObject *npobj, NPIdentifier name)
 
typedef bool(* NPGetPropertyFunctionPtr )(NPObject *npobj, NPIdentifier name, NPVariant *result)
 
typedef bool(* NPSetPropertyFunctionPtr )(NPObject *npobj, NPIdentifier name, const NPVariant *value)
 
typedef bool(* NPRemovePropertyFunctionPtr )(NPObject *npobj, NPIdentifier name)
 
typedef bool(* NPEnumerationFunctionPtr )(NPObject *npobj, NPIdentifier **value, uint32_t *count)
 
typedef bool(* NPConstructFunctionPtr )(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
 

Enumerations

enum  NPVariantType {
  NPVariantType_Void, NPVariantType_Null, NPVariantType_Bool, NPVariantType_Int32,
  NPVariantType_Double, NPVariantType_String, NPVariantType_Object
}
 

Functions

void NPN_ReleaseVariantValue (NPVariant *variant)
 
NPIdentifier NPN_GetStringIdentifier (const NPUTF8 *name)
 
void NPN_GetStringIdentifiers (const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
 
NPIdentifier NPN_GetIntIdentifier (int32_t intid)
 
bool NPN_IdentifierIsString (NPIdentifier identifier)
 
NPUTF8NPN_UTF8FromIdentifier (NPIdentifier identifier)
 
int32_t NPN_IntFromIdentifier (NPIdentifier identifier)
 
NPObjectNPN_CreateObject (NPP npp, NPClass *aClass)
 
NPObjectNPN_RetainObject (NPObject *npobj)
 
void NPN_ReleaseObject (NPObject *npobj)
 
bool NPN_Invoke (NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result)
 
bool NPN_InvokeDefault (NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
 
bool NPN_Evaluate (NPP npp, NPObject *npobj, NPString *script, NPVariant *result)
 
bool NPN_GetProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result)
 
bool NPN_SetProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value)
 
bool NPN_RemoveProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName)
 
bool NPN_HasProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName)
 
bool NPN_HasMethod (NPP npp, NPObject *npobj, NPIdentifier methodName)
 
bool NPN_Enumerate (NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count)
 
bool NPN_Construct (NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)
 
void NPN_SetException (NPObject *npobj, const NPUTF8 *message)
 

Macro Definition Documentation

#define BOOLEAN_TO_NPVARIANT (   _val,
  _v 
)
Value:
(_v).type = NPVariantType_Bool; \
(_v).value.boolValue = !!(_val); \
NP_END_MACRO

Definition at line 149 of file npruntime.h.

#define DOUBLE_TO_NPVARIANT (   _val,
  _v 
)
Value:
(_v).type = NPVariantType_Double; \
(_v).value.doubleValue = _val; \

Definition at line 161 of file npruntime.h.

#define INT32_TO_NPVARIANT (   _val,
  _v 
)
Value:
(_v).type = NPVariantType_Int32; \
(_v).value.intValue = _val; \

Definition at line 155 of file npruntime.h.

#define NP_BEGIN_MACRO   do {

Definition at line 73 of file npruntime.h.

#define NP_CLASS_STRUCT_VERSION   3

Definition at line 312 of file npruntime.h.

#define NP_CLASS_STRUCT_VERSION_CTOR   3

Definition at line 315 of file npruntime.h.

#define NP_CLASS_STRUCT_VERSION_ENUM   2

Definition at line 314 of file npruntime.h.

#define NP_CLASS_STRUCT_VERSION_HAS_CTOR (   npclass)    ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_CTOR)

Definition at line 320 of file npruntime.h.

#define NP_CLASS_STRUCT_VERSION_HAS_ENUM (   npclass)    ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM)

Definition at line 317 of file npruntime.h.

#define NP_END_MACRO   } while (0)

Definition at line 74 of file npruntime.h.

#define NPVARIANT_IS_BOOLEAN (   _v)    ((_v).type == NPVariantType_Bool)

Definition at line 125 of file npruntime.h.

#define NPVARIANT_IS_DOUBLE (   _v)    ((_v).type == NPVariantType_Double)

Definition at line 127 of file npruntime.h.

#define NPVARIANT_IS_INT32 (   _v)    ((_v).type == NPVariantType_Int32)

Definition at line 126 of file npruntime.h.

#define NPVARIANT_IS_NULL (   _v)    ((_v).type == NPVariantType_Null)

Definition at line 124 of file npruntime.h.

#define NPVARIANT_IS_OBJECT (   _v)    ((_v).type == NPVariantType_Object)

Definition at line 129 of file npruntime.h.

#define NPVARIANT_IS_STRING (   _v)    ((_v).type == NPVariantType_String)

Definition at line 128 of file npruntime.h.

#define NPVARIANT_IS_VOID (   _v)    ((_v).type == NPVariantType_Void)

Definition at line 123 of file npruntime.h.

#define NPVARIANT_TO_BOOLEAN (   _v)    ((_v).value.boolValue)

Definition at line 131 of file npruntime.h.

#define NPVARIANT_TO_DOUBLE (   _v)    ((_v).value.doubleValue)

Definition at line 133 of file npruntime.h.

#define NPVARIANT_TO_INT32 (   _v)    ((_v).value.intValue)

Definition at line 132 of file npruntime.h.

#define NPVARIANT_TO_OBJECT (   _v)    ((_v).value.objectValue)

Definition at line 135 of file npruntime.h.

#define NPVARIANT_TO_STRING (   _v)    ((_v).value.stringValue)

Definition at line 134 of file npruntime.h.

#define NULL_TO_NPVARIANT (   _v)
Value:
(_v).type = NPVariantType_Null; \
(_v).value.objectValue = NULL; \

Definition at line 143 of file npruntime.h.

#define OBJECT_TO_NPVARIANT (   _val,
  _v 
)
Value:
(_v).type = NPVariantType_Object; \
(_v).value.objectValue = _val; \

Definition at line 181 of file npruntime.h.

#define STRINGN_TO_NPVARIANT (   _val,
  _len,
  _v 
)
Value:
(_v).type = NPVariantType_String; \
NPString str = { _val, (uint32_t)(_len) }; \
(_v).value.stringValue = str; \

Definition at line 174 of file npruntime.h.

#define STRINGZ_TO_NPVARIANT (   _val,
  _v 
)
Value:
(_v).type = NPVariantType_String; \
NPString str = { _val, (uint32_t)(strlen(_val)) }; \
(_v).value.stringValue = str; \

Definition at line 167 of file npruntime.h.

#define VOID_TO_NPVARIANT (   _v)
Value:
(_v).type = NPVariantType_Void; \
(_v).value.objectValue = NULL; \

Definition at line 137 of file npruntime.h.

Typedef Documentation

typedef NPObject*(* NPAllocateFunctionPtr)(NPP npp, NPClass *aClass)

Definition at line 247 of file npruntime.h.

typedef struct NPClass NPClass

Definition at line 82 of file npruntime.h.

typedef bool(* NPConstructFunctionPtr)(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)

Definition at line 267 of file npruntime.h.

typedef void(* NPDeallocateFunctionPtr)(NPObject *npobj)

Definition at line 248 of file npruntime.h.

typedef bool(* NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value, uint32_t *count)

Definition at line 265 of file npruntime.h.

typedef bool(* NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, NPVariant *result)

Definition at line 259 of file npruntime.h.

typedef bool(* NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name)

Definition at line 250 of file npruntime.h.

typedef bool(* NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name)

Definition at line 258 of file npruntime.h.

typedef void* NPIdentifier

Definition at line 210 of file npruntime.h.

typedef void(* NPInvalidateFunctionPtr)(NPObject *npobj)

Definition at line 249 of file npruntime.h.

typedef bool(* NPInvokeDefaultFunctionPtr)(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result)

Definition at line 254 of file npruntime.h.

typedef bool(* NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result)

Definition at line 251 of file npruntime.h.

typedef struct NPObject NPObject

Definition at line 81 of file npruntime.h.

typedef bool(* NPRemovePropertyFunctionPtr)(NPObject *npobj, NPIdentifier name)

Definition at line 263 of file npruntime.h.

typedef bool(* NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *value)

Definition at line 261 of file npruntime.h.

typedef struct _NPString NPString
typedef char NPUTF8

Definition at line 84 of file npruntime.h.

typedef struct _NPVariant NPVariant

Enumeration Type Documentation

Enumerator
NPVariantType_Void 
NPVariantType_Null 
NPVariantType_Bool 
NPVariantType_Int32 
NPVariantType_Double 
NPVariantType_String 
NPVariantType_Object 

Definition at line 90 of file npruntime.h.

Function Documentation

bool NPN_Construct ( NPP  npp,
NPObject npobj,
const NPVariant args,
uint32_t  argCount,
NPVariant result 
)
NPObject* NPN_CreateObject ( NPP  npp,
NPClass aClass 
)

Definition at line 323 of file EvBrowserPluginMain.cpp.

324 {
325  return browser->createobject(instance, npClass);
326 }

+ Here is the caller graph for this function:

bool NPN_Enumerate ( NPP  npp,
NPObject npobj,
NPIdentifier **  identifier,
uint32_t *  count 
)
bool NPN_Evaluate ( NPP  npp,
NPObject npobj,
NPString script,
NPVariant result 
)
NPIdentifier NPN_GetIntIdentifier ( int32_t  intid)
bool NPN_GetProperty ( NPP  npp,
NPObject npobj,
NPIdentifier  propertyName,
NPVariant result 
)
NPIdentifier NPN_GetStringIdentifier ( const NPUTF8 name)
void NPN_GetStringIdentifiers ( const NPUTF8 **  names,
int32_t  nameCount,
NPIdentifier identifiers 
)

Definition at line 328 of file EvBrowserPluginMain.cpp.

329 {
330  browser->getstringidentifiers(names, nameCount, identifiers);
331 }

+ Here is the caller graph for this function:

bool NPN_HasMethod ( NPP  npp,
NPObject npobj,
NPIdentifier  methodName 
)
bool NPN_HasProperty ( NPP  npp,
NPObject npobj,
NPIdentifier  propertyName 
)
bool NPN_IdentifierIsString ( NPIdentifier  identifier)
int32_t NPN_IntFromIdentifier ( NPIdentifier  identifier)
bool NPN_Invoke ( NPP  npp,
NPObject npobj,
NPIdentifier  methodName,
const NPVariant args,
uint32_t  argCount,
NPVariant result 
)
bool NPN_InvokeDefault ( NPP  npp,
NPObject npobj,
const NPVariant args,
uint32_t  argCount,
NPVariant result 
)
void NPN_ReleaseObject ( NPObject npobj)
void NPN_ReleaseVariantValue ( NPVariant variant)
bool NPN_RemoveProperty ( NPP  npp,
NPObject npobj,
NPIdentifier  propertyName 
)
NPObject* NPN_RetainObject ( NPObject npobj)
void NPN_SetException ( NPObject npobj,
const NPUTF8 message 
)
bool NPN_SetProperty ( NPP  npp,
NPObject npobj,
NPIdentifier  propertyName,
const NPVariant value 
)
NPUTF8* NPN_UTF8FromIdentifier ( NPIdentifier  identifier)