Files
2022-11-25 03:00:01 +01:00

159 lines
7.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>VISION Documentation (VAPI): Presentation</title></head>
<body background="../images/conc2.gif" bgcolor="#ffffff">
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="pr.htm"><img src="../images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
<em>(VAPI)</em></strong></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Last update: 07/04/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>V
A P I</strong></font></p>
</td>
<td align="center" width="17%"></td>
</tr>
</tbody></table>
</center></div>
<hr>
<p><a name="Présentation"></a><font size="4"><strong>1.
Presentation</strong></font></p>
<p>VAPI (<em><strong>VISION's</strong></em> Application
Programmer Interface) is a part of <em><strong>VISION</strong></em>
designed to help you develop LDVs. You must have guessed that internally,
<em><strong>VISION</strong></em> uses numerous functions to handle images
(bit-planes conversions &lt;--&gt; TOS/VDI indexes, rasters handling,...)
as well as user interface functions (e.g., progress windows).<br>
The aim of VAPI is make available to LDVs these functions reserved, until
now, to the internal operations of <em><strong>VISION</strong></em>.
There are two interests for an LDV:</p>
<ul>
<li>Its author spares the time to develop again an existing function
</li>
<li>The LDV is lighter</li>
</ul>
<p>Of course, <em><strong>VISION</strong></em>
has numerous functions (more or less easy and elegant...), a choice must
then be made on which ones to export.
Furthermore, <font size="3"><em><strong>VISION</strong></em></font> could
also export its data such as the catalog, the image Browser, etc...<br>
Since it still takes a lot of time to design and make all this, I will
first ensure that <em><strong>VISION</strong></em> exports first a few
"basic" functions, then, if success increases, more will follow.
</p>
<p>&nbsp;</p>
<p><a name="dev-kit"></a><font size="4"><strong>2. Development kit
</strong></font></p>
<p>The VAPI development kit is identical to the LDV one.
You will find it <a href="../kitdev.htm">here</a>.</p>
<p>&nbsp;</p>
<p><a name="use"></a><font size="4"><strong>3. Use</strong></font></p>
<p>Using VAPI from an LDV is very simple: when <em><strong>VISION</strong></em>
call the GetLDVCapabilities function, it returns a pointer on a structure
of the type <a href="struct.htm#VAPI">VAPI</a>.
Without going into details, this stucture contains the following
information:</p>
<ul>
<li>A header of the type <a href="struct.htm#VAPI_HEADER">VAPI_HEADER</a></li>
<li>A list of "loose" functions. These functions are in fact
put together in groups (also called interfaces). Each group is
terminated by an unused memory area, which purpose is to host new
functions from the same group. If new groups are created, they will go
at the end of the structure, to garanty ascending compatibility.</li>
</ul>
<p>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:</p>
<p><strong>Vapi-&gt;RaImgWhite( &amp;out-&gt;Raster ) ;</strong></p>
<p>This only suppose you maintained the VAPI pointer provided by
<em><strong>VISION</strong></em> through GetLDVCapabilities (done
automatically by the skeleton).</p>
<p>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).</p>
<p>&nbsp;</p>
<p><a name="interfaces"></a><font size="4"><strong>4. Available interfaces
</strong></font></p>
<p><font size="3">Interfaces are grouping function having a common
interest. Here is the list (which I hope is not complete) of the current
interfaces:</font></p><table border="1" width="90%"><tbody><tr><td align="center" width="25%"><a href="pr.htm"><font size="3">Progress Interface</font></a></td>
<td align="center" width="25%"><a href="ra.htm"><font size="3">Raster Interface</font></a></td>
<td align="center" width="25%"><a href="co.htm">Configuration
Interface</a></td>
<td align="center" width="25%"><a href="in.htm">INI
Interface</a></td>
</tr>
<tr>
<td align="center"><a href="me.htm">MEM Interface</a></td>
<td align="center"><a href="lo.htm">Logging Interface</a>&nbsp;</td>
<td align="center">&nbsp;</td>
<td align="center">&nbsp;</td>
</tr>
</tbody></table>
<p>&nbsp;</p><p>&nbsp;</p>
<p>&nbsp;</p>
<hr>
<div align="center"><center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td align="center" width="17%"><a href="index.htm"><img src="../images/csom.jpg" alt="Back to content " border="0" height="26" hspace="2" width="26"></a><a href="pr.htm"><img src="../images/csuiv.jpg" alt="Next Chapter " border="0" height="26" hspace="2" width="43"></a></td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icoprinc.gif" height="71" width="59"></p>
</td>
<td width="33%"><p align="center"><font color="#0000ff" size="5"><strong><em>VISION </em>Documentation
<em>(VAPI)</em></strong></font></p>
</td>
<td rowspan="2" align="center" valign="top" width="8%"><p align="center"><img src="../images/icointro.gif" height="71" width="59"></p>
</td>
<td valign="top" width="17%"><p align="left">Last update:&nbsp;07/04/18</p>
</td>
</tr>
<tr>
<td width="17%"><p align="center"><a href="..%5C..%5Cdownload/dvldv.zip">Download documentation</a></p>
</td>
<td width="33%"><p align="center"><font size="4"><strong>V
A P I</strong></font></p>
</td>
<td valign="top" width="17%">&nbsp; </td>
</tr>
</tbody></table>
</center></div>
</body></html>