|  | VISION Documentation (VAPI) |  | Last update 08/04/18
| S T R U C T U R E S |

VAPI_HEADER

typedef struct
{
unsigned short Version ;
unsigned short StrSize ;
void *Global ;
void cdecl (*GEMMessageLoop)(void *msg) ;
char RFU[116] ;
}
VAPI_HEADER ;

Field | Type | Description
Version | unsigned short | Of type 0x0101. This number is incremented for each evolution. This version number will be used eventually by the LDV to make controls. If the VAPI version does not contain the necessary interfaces or functions, the LDV must return the ELDV_BADVAPIVERSION error code
StrSize | unsigned short | Size of the VAPI structure
Global | void * | Pointer on the global table (given by the AES) of VISION. This table the allows the LDV to use MT_AES. For more details, see the LDGs documentation. The type is void * and not int *, to avoid conflicts with compilers (int is 16 bits under Pure C and 32 bits under GCC). It is then up to the LDV programer to "cast" this pointer to the 16 bits type of a particular compiler.

GEMMessageLoop

void cdecl (*)(void *)

Pointer on the GEM message loop function of VISION. This allows the LDV, if it uses AES, to filter, in the message it receives, those where recipient is the LDV, and those where recipient is VISION. Since the LDV is launched by VISION, it receives the messsages where recipient should be VISION, and thus should forward them to VISION using this function. This is especially useful for the Redraw messages, otherwise VISION windows will not be drawn while the LDV is running. The msg parameter is of the type void * and not int *, for the same reason as previously.

RFU | 116 octets | Reserved for future use. Don't touch!

VAPI

typedef struct
{
VAPI_HEADER Header ;
/* Progress Interface */
....
/* Raster Interface */
...
/* More interfaces to come! */
}
VAPI ;

The raw description of this structure is not really of interest, let's rather see the list of functions available.

REMAP_COLORS

    typedef struct
    {
      unsigned char *red ;
      unsigned char *green ;
      unsigned char *blue ;
      void          *pt_img ;
      long          nb_pts ;
    }
    REMAP_COLORS ;

Such a pointer on this structure shall be passed to RaTCxxRemapColors functions.
red, green and blue point to an array defining elementary values.
pt_img points to the first pixel to change
nb_pts is the number of pixels to change starting at pt_img and using ref, green and blue arrays.

Functions available

These functions are directly accessed through the VAPI pointer internal to the LDVs, the desired functions have just to be called as follows:
Vapi->FunctionName( ListeOfParameters ) ;
Do not forget to test the return value is the function may return one!

Functions are grouped by interfaces in the following chapters. To find easily the an interface, all the function names in the same group begin with the same 2 letteres (e.g., "Pr" for functions of the progress group).

|  | VISION Documentation (VAPI) |  | Last update: 08/04/18
Download documentation | S T R U C T U R E S |