EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificaciones Pagina 207

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 304
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 206
CHAPTER 7: Integrating External Libraries Defining entry points for indirect access 207
SoServerInterface
SoServerInterface is a structure of function pointers which enable the shared-library code to call
JavaScript objects. It is passed to the global ESClientInterface()
function for initialization when the library is
loaded, and again for cleanup when the library is unloaded. Between these calls, your shared-library code
must store the structure and use it to access the communication functions.
You can store information for every object and class in your C code. The recommended method is to create
a data structure during the initialize()
and free it during finalize(). You can then access that data with
setClientData() and getClientData().
The
SoServerInterface structure contains these function pointers:
SoServerInterface {
SoServerDumpServer_f dumpServer; //debugging, show server in console
SoServerDumpObject_f dumpObject; //debugging, show object in console
SoServerAddClass_f addClass; //define a JS class
SoServerAddMethod_f addMethod; // define a method
SoServerAddMethods_f addMethods; // define a set of methods
SoServerAddProperty_f addProperty; // define a property
SoServerAddProperties_f addProperties; // define a set of properties
SoServerGetClass_f getClass; // get class for an instance
SoServerGetServer_f getServer; // get server for an instance
SoServerSetClientData_f setClientData; //set data in instance
SoServerGetClientData_f getClientData; //get data from instance
SoServerEval_f eval; // call JavaScript interpreter
SoServerTaggedDataInit_f taggedDataInit; // init tagged data
SoServerTaggedDataFree_f taggedDataFree; // free tagged data
}
These functions allow your C/C++ shared library code to create, modify, and access JavaScript classes and
objects. The functions must conform to the following type definitions.
dumpServer()
ESerror_t dumpServer (SoHServer hServer);
hServer
The SoHServer reference for this shared library, as passed to your global
ESClientInterface()
function on initialization.
Prints the contents of this server to the JavaScript Console in the ExtendScript Toolkit, for
debugging.
Returns an error code,
kESErrOK on success.
dumpObject()
ESerror_t dumpObject (SoHObject hObject);
hObject
The SoHObject reference for an instance of this class.
Prints the contents of this object to the JavaScript Console in the ExtendScript Toolkit, for
debugging.
Returns an error code,
kESErrOK on success.
Vista de pagina 206
1 2 ... 202 203 204 205 206 207 208 209 210 211 212 ... 303 304

Comentarios a estos manuales

Sin comentarios