EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificaciones Pagina 206

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 304
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 205
CHAPTER 7: Integrating External Libraries Defining entry points for indirect access 206
Defining entry points for indirect access
The C-client object interface for external libraries allows your C or C++ shared-library code to define,
create, use, and manage JavaScript objects.
The following entry points are required if you wish to use the object interface:
Shared-library function API
Your shared-library C/C++ code defines its interface to JavaScript in two sets of functions, collected in
SoServerInterface
and SoObjectInterface function-pointer structures.
Return values from most functions are integer constants. The error code
kESErrOK == 0 indicates success.
ESClientInterface()
int ESClientInterface (SoCClient_e kReason, SoServerInterface* pServer,
SoHServer hServer)
kReason
The reason for this call, one of these constants:
X kSoCClient_init: The function is being called for initialization upon load.
X kSoCClient_term.: The function is being called for termination upon unload.
pServer
A pointer to an SoServerInterface containing function pointers for the entry points,
which enable the shared-library code to call into JavaScript to create and access
JavaScript classes and objects.
The shared-library code is responsible for storing this structure between the
initialization and termination call, and retrieving it to access the functions.
hServer
An SoHServer reference for this shared library. The server is an object factory that
creates and manages SoHObject
objects.
The shared-library code is responsible for storing this structure between the
initialization and termination calls. You must pass it to taggedDataInit()
and
taggedDataFree()
.
Your library must define this global function in order to use the object interface to JavaScript. The
function is called twice in each session, immediately upon loading the library, and again when
unloading it.
Returns an error code,
kESErrOK on success.
ESMallocMem()
void * ESMallocMem ( size_t nbytes)
nbytes
The number of bytes to allocate.
Provides a memory allocation routine to be used by JavaScript for managing memory associated
with the librarys objects.
Returns a pointer to the allocated block of memory.
Vista de pagina 205
1 2 ... 201 202 203 204 205 206 207 208 209 210 211 ... 303 304

Comentarios a estos manuales

Sin comentarios