Added Magic tool API version API.
This commit is contained in:
parent
abf6a2a1bb
commit
73b8464b75
22 changed files with 85 additions and 172 deletions
|
|
@ -113,6 +113,11 @@ Interfaces
|
|||
palette. (It will be called whenever one of the plguin's Magic
|
||||
tools that accept colors becomes active, or the user picks a new
|
||||
color while such a tool is currently active.)
|
||||
* Uint32 api_version(void)
|
||||
The plugin should return an integer value representing the version
|
||||
of the Tux Paint 'Magic' tool plugin API it was built against.
|
||||
Simply return TP_MAGIC_API_VERSION, which is defined in
|
||||
"tp_magic_api.h", to satisfy this requirement.
|
||||
* int init(magic_api * api)
|
||||
The plugin should do any initialization here. This function is
|
||||
called once, at Tux Paint startup. Return '1' if initialization
|
||||
|
|
|
|||
|
|
@ -143,6 +143,12 @@ would have functions whose names begin with "blur_").</p>
|
|||
Magic tools that accept colors becomes active, or the user picks a new
|
||||
color while such a tool is currently active.)
|
||||
|
||||
<li>Uint32 api_version(void)<br>
|
||||
The plugin should return an integer value representing the version of
|
||||
the Tux Paint 'Magic' tool plugin API it was built against.
|
||||
Simply return TP_MAGIC_API_VERSION, which is defined in
|
||||
"tp_magic_api.h", to satisfy this requirement.
|
||||
|
||||
<li>int init(magic_api * api)<br>
|
||||
The plugin should do any initialization here. This function is called once,
|
||||
at Tux Paint startup. Return '1' if initialization was successful,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ Mix_Chunk * snd_effect[NUM_TOOLS];
|
|||
Uint8 example_r, example_g, example_b;
|
||||
|
||||
|
||||
Uint32 example_api_version(void) { return(TP_MAGIC_API_VERSION); }
|
||||
|
||||
|
||||
// No setup required:
|
||||
int example_init(magic_api * api)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue