Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 5ea9a249e974f38e9d955cc501d3e529 > files > 13

Hermes-devel-1.3.3-18.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>Hermes 1.3 API: Initialisation of the Library</TITLE>
 <LINK HREF="api-2.htm" REL=next>

 <LINK HREF="api.htm#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="api-2.htm">Next</A>
Previous
<A HREF="api.htm#toc1">Contents</A>
<HR>
<H2><A NAME="s1">1. Initialisation of the Library</A></H2>

<P>Hermes has to be fully initialised before any conversion routines can be 
called. Otherwise error codes will be returned. All initialisation routines
are reference counted, so feel free to call them repeatedly, they will only
be initialised once (or if you closed it down and open it again). 
<P>
<P>
<H2><A NAME="ss1.1">1.1 int Hermes_Init()</A>
</H2>

<P>Hermes_Init will initialise Hermes and return a non-zero status code on
success. In detail, this is what happens:
<P>
<UL>
<LI>Check reference count. If non-zero, return success immediately.</LI>
<LI>If assembler support is compiled in, run the processor detection
routine. Hold your breath.</LI>
<LI>Call the Converter Factory to initialise all converters with the
fastest possible configuration.</LI>
<LI>Initialise clearing routines using the Clearing Factory.</LI>
<LI>Initialise dithering matrices.</LI>
<LI>Increase reference count, return success.</LI>
</UL>
<P>
<P>
<H2><A NAME="ss1.2">1.2 int Hermes_Done()</A>
</H2>

<P>Hermes_Done will decrease the reference count of HERMES and if it goes down
to zero, it will deinitialise the library. That means it will get rid of all
the converter routines, etc.
<P>If the reference count ever falls below zero, this routine will return an
error because you've done something wrong.
<P>
<P>
<P>
<HR>
<A HREF="api-2.htm">Next</A>
Previous
<A HREF="api.htm#toc1">Contents</A>
</BODY>
</HTML>