Name
hw_HaveLibrary -- check if library has been loaded (V11.0)
Synopsis
int ok = hw_HaveLibrary(STRPTR name, int exact, struct hwTagList *tags);
Function
This function can be used to check if the library specified by name has been loaded. This is only useful when using Miniwood since Hollywood always has all libraries loaded. With Miniwood, however, libraries are loaded manually using the @USING preprocessor command.

The exact parameter allows you to specify whether or not hw_HaveLibrary() should look for an exact match. Some libraries are available in special lite flavours, e.g. the text library is also available in a smaller text-lite flavour. If you set exact to True and pass "text" in name, hw_HaveLibrary() will only return True if the full text library has been loaded, if only text-lite has been loaded it will return False in that case. If you set exact to False and pass "text" in name, hw_HaveLibrary() will return True if either the full text library or the text-lite library have been loaded.

Note that when using Hollywood, this function will always return True.

Designer compatibility
Unsupported

Inputs
name
name of the library to check
exact
True or False indicating whether to look for an exact match (see above)
tags
reserved for future use; set it to NULL for now
Results
ok
True if library is available, False otherwise

Show TOC