VAPI (VISION's Application
Programmer Interface) is a part of VISION
designed to help you develop LDVs. You must have guessed that internally,
VISION uses numerous functions to handle images
(bit-planes conversions <--> TOS/VDI indexes, rasters handling,...)
as well as user interface functions (e.g., progress windows).
The aim of VAPI is make available to LDVs these functions reserved, until
now, to the internal operations of VISION.
There are two interests for an LDV:
Of course, VISION
has numerous functions (more or less easy and elegant...), a choice must
then be made on which ones to export.
Furthermore, VISION could
also export its data such as the catalog, the image Browser, etc...
Since it still takes a lot of time to design and make all this, I will
first ensure that VISION exports first a few
"basic" functions, then, if success increases, more will follow.
The VAPI development kit is identical to the LDV one. You will find it here.
Using VAPI from an LDV is very simple: when VISION call the GetLDVCapabilities function, it returns a pointer on a structure of the type VAPI. Without going into details, this stucture contains the following information:
Now, to use a function from VAPI, it's very simple; imagine you want to initialise the destination image raster passed as a parameter in the Run function, with the colour white (in bit-plane or True Color); you just have to insert the following line:
Vapi->RaImgWhite( &out->Raster ) ;
This only suppose you maintained the VAPI pointer provided by VISION through GetLDVCapabilities (done automatically by the skeleton).
The list of all functions defined by the VAPI interface is available here. Sorry, but all the interfaces and the function names are in English! (Translator's note: this remark is obviously for French readers).
Interfaces are grouping function having a common interest. Here is the list (which I hope is not complete) of the current interfaces:
Progress Interface | Raster Interface | Configuration Interface | INI Interface |
MEM Interface | Logging Interface |