2.2 Plugin types and Hollywood APIs
This documentation can be divided into two major parts: The first part describes
all the different plugin types supported by Hollywood and their interfaces. There
is detailed information on all the functions you will have to implement for the
individual plugin types as well as on the way Hollywood interacts with them. As
of Hollywood 10.0, the following plugin types are supported:
- – Convert script plugins: These plugins automatically convert a custom file
format into a Hollywood script. See Convert script plugins for details.
- – Library plugins: These plugins can add new commands and constants to
Hollywood's script language. See Library plugins for details.
- – Image plugins: These plugins can provide loaders for additional image
formats. See Image plugins for details.
- – Animation plugins: These plugins can provide loaders for additional
animation formats. See Animation plugins for details.
- – Sound plugins: These plugins can provide loaders for additional
sound and music formats. See Sound plugins for details.
- – Vectorgraphics plugins: These plugins can provide code for drawing
vector-based graphics. See Vectorgraphics plugins for details.
- – Video plugins: These plugins can provide loaders for additional
video formats. See Video plugins for details.
- – Image saver plugins: These plugins can provide savers for additional
image formats. See Image saver plugins for details.
- – Animation saver plugins: These plugins can provide savers for additional
animation formats. See Animation saver plugins for details.
- – Sample saver plugins: These plugins can provide savers for additional
sample formats. See Sample saver plugins for details.
- – Require hook plugins: These plugins can hook into Hollywood's
@REQUIRE
preprocessor command to do their initialization only when explicitly
asked to. See Require hook plugins for details.
- – Display adapter plugins: These plugins can completely replace Hollywood's
internal display driver with a custom one. This is a very powerful plugin type and can
be used to achieve quite astonishing things. See Display adapter plugins for details.
- – Timer adapter plugins: These plugins can completely replace Hollywood's internal
timer handler with a custom one. See Timer adapter plugins for details.
- – Requester adapter plugins: These plugins can completely replace Hollywood's internal
requester handler with a custom one. See Requester adapter plugins for details.
- – File adapter plugins: These plugins can hook into Hollywood's file handler and
intercept any file they like. This can be used to make Hollywood magically able
to handle compressed files or entirely new file formats. See File adapter plugins for details.
- – Directory adapter plugins: These plugins can hook into Hollywood's directory
handler and intercept access on any directory they like. This can be used to allow
Hollywood to deal with custom directory types, e.g. a plugin that treats a ZIP file
as a directory could be written using the directory adapter plugin interface. See Directory adapter plugins for details.
- – Audio adapter plugins: These plugins can completely replace Hollywood's internal
audio driver with a custom one. See Audio adapter plugins for details.
- – Extension plugins: This is a special plugin type that does not offer any functionality
on its own. Its only purpose is to extend other plugin types. See Extension plugins for details.
- – Network adapter plugins: These plugins can hook into Hollywood's network handler
and implement support for all kinds of custom protocols. This makes it possible to
access servers not supported by Hollywood itself through Hollywood's standard network
library. See Network adapter plugins for details.
The second major part of this manual is the documentation of the functions
that are publically exposed by Hollywood to every plugin. When Hollywood calls
the InitPlugin() function of a plugin, it passes a pointer
to a hwPluginAPI
data structure which contains pointers to all the
API functions that Hollywood has made publically available. Currently, the
hwPluginAPI
structure looks like this:
| typedef struct _hwPluginAPI
{
int hwVersion;
int hwRevision;
hwCRTBase *CRTBase;
hwSysBase *SysBase;
hwDOSBase *DOSBase;
hwGfxBase *GfxBase;
hwAudioBase *AudioBase;
hwRequesterBase *RequesterBase;
hwFontBase *FontBase;
hwFT2Base *FT2Base;
hwLuaBase *LuaBase;
hwMiscBase *MiscBase;
/****** V5.3 vectors start here *****/
hwZBase *ZBase;
hwJPEGBase *JPEGBase;
/****** V6.0 vectors start here *****/
hwPluginLibBase *PluginBase;
hwUtilityBase *UtilityBase;
/****** V7.0 vectors start here *****/
hwUnicodeBase *UnicodeBase;
/****** V7.1 vectors start here *****/
hwLocaleBase *LocaleBase;
} hwPluginAPI;
|
All the individual structure members point to libraries, i.e. collections of
functions that your plugin can use to interact with Hollywood. The way you
have to call these functions is described in the second major part of this
documentation. See GfxBase functions to find out about all functions supported by the GfxBase library, for example.
Show TOC