Sync docs & more info re: forthcoming Magic size feature
This commit is contained in:
parent
8cd00d279e
commit
84bfec3365
12 changed files with 233 additions and 10 deletions
|
|
@ -177,7 +177,7 @@ Magic Tool Plugin API Documentation
|
|||
|
||||
Note: Called once by Tux Paint, at startup. It is called first.
|
||||
|
||||
int init(magic_api * api)
|
||||
int init(magic_api * api, Uint32 disabled_features)
|
||||
|
||||
The plugin should do any initialization here. Return '1' if
|
||||
initialization was successful, or '0' if not (and Tux Paint will
|
||||
|
|
@ -187,6 +187,21 @@ Magic Tool Plugin API Documentation
|
|||
"api_version()", if Tux Paint believes your plugin to be
|
||||
compatible.
|
||||
|
||||
The disabled_features value contains bits set for any Tux Paint
|
||||
features relevant to Magic tools which have been disabled in this
|
||||
session. Test using the C bitwise 'and' operator, '&'. The
|
||||
features are defined in tp_magic_api.h:
|
||||
* MAGIC_FEATURE_SIZE: Magic tool size (Magic tool size)
|
||||
Your Magic tool(s) may wish to react differently depending on
|
||||
whether one or more features have been disabled. (For example, the
|
||||
"Brick" Magic tool always offered two tool variations: large and
|
||||
small. With the addition of the size feature, only one tool is
|
||||
necessary. However, with the size option disabled, the plugin is
|
||||
able to revert back to providing two separate tools.)
|
||||
|
||||
Note: Changed most recently in Tux Paint 0.9.30; Magic API version
|
||||
0x00000008.
|
||||
|
||||
int get_tool_count(magic_api * api)
|
||||
|
||||
This should return the number of Magic tools this plugin provides
|
||||
|
|
@ -304,6 +319,18 @@ Magic Tool Plugin API Documentation
|
|||
Note: Called once for each Magic tool your plugin claims to
|
||||
contain (by your "get_tool_count()").
|
||||
|
||||
int default_size(magic_api * api, int which)
|
||||
|
||||
Return the default size the 'Magic' tool accepts. This will be the
|
||||
default setting for the tool the first time it is used during a
|
||||
Tux Paint session. If Tux Paint is being invoked with the sizing
|
||||
option disabled, this will be the only size requested by Tux
|
||||
Paint. Return a number between '1' and the amount you returned in
|
||||
accepted_sizes().
|
||||
|
||||
Note: Called once for each Magic tool your plugin claims to
|
||||
contain (by your "get_tool_count()").
|
||||
|
||||
void shutdown(magic_api * api)
|
||||
|
||||
The plugin should do any cleanup here. If you allocated any memory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue