Sync MAGIC-API after some tweaks
This commit is contained in:
parent
a0b720b3ad
commit
a0bb47d9da
10 changed files with 225 additions and 90 deletions
|
|
@ -212,6 +212,10 @@ Magic Tool Plugin API Documentation
|
|||
Note: Called once by Tux Paint, at startup. It is called after
|
||||
your "init()", if it succeeded.
|
||||
|
||||
Note: You may wish to resond differently, based on whether certain
|
||||
features have been disabled (e.g., 'paint' versus 'entire picture'
|
||||
controls, or 'Magic sizes' controls).
|
||||
|
||||
int modes(magic_api * api, int which)
|
||||
|
||||
This lets you tell Tux Paint what modes your tool can be used in;
|
||||
|
|
@ -319,20 +323,28 @@ Magic Tool Plugin API Documentation
|
|||
if the 'Magic' tool should not offer sizing options. Returning '1'
|
||||
is the same as returning '0'.
|
||||
|
||||
Note: Called once for each Magic tool your plugin claims to
|
||||
contain (by your "get_tool_count()").
|
||||
Note: For each Magic tool your plugin claims to contain (reported
|
||||
by your "get_tool_count()" function), this function will be called
|
||||
for each mode the tool claims to support (reported by your
|
||||
"modes()" function).
|
||||
|
||||
Note: Added to Tux Paint 0.9.30; Magic API version 0x00000008.
|
||||
|
||||
Uint8 default_size(magic_api * api, int which, int mode)
|
||||
|
||||
Return the default size the 'Magic' tool accepts, in the given
|
||||
mode. 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().
|
||||
Return the default size the 'Magic' tool should start out with, in
|
||||
the given mode. 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()").
|
||||
Note: For each Magic tool your plugin claims to contain (reported
|
||||
by your "get_tool_count()" function), this function will be called
|
||||
for each mode the tool claims to support (reported by your
|
||||
"modes()" function).
|
||||
|
||||
Note: Added to Tux Paint 0.9.30; Magic API version 0x00000008.
|
||||
|
||||
void shutdown(magic_api * api)
|
||||
|
||||
|
|
@ -1029,10 +1041,16 @@ macOS
|
|||
|
||||
* alpha: See "RGBA"
|
||||
* &: See "ampersand"
|
||||
* ampersand: "&". A symbol in C that allows you to refer to the memory
|
||||
address of a variable; that is, a pointer. (For example, consider "int
|
||||
i;". Later, "&i" refers to the memory where "i" is stored, not the
|
||||
value of "i" itself; it is a 'pointer to "i"'.) See also: "star"
|
||||
* ampersand (pointers): "&". A symbol in C that allows you to refer to
|
||||
the memory address of a variable; that is, a pointer. (For example,
|
||||
consider "int i;". Later, "&i" refers to the memory where "i" is
|
||||
stored, not the value of "i" itself; it is a 'pointer to "i"'.) See
|
||||
also: "star"
|
||||
* ampersand (bitwise operator): "&". A symbol in C that acts as a
|
||||
bitwise "and" operator. Only bits set in both values will be returned.
|
||||
For example, "11 & 6" compares the binary values '1011' to '0110'.
|
||||
Only the bit in the 2's place is set, so the result is 2 ('0010'). See
|
||||
also: "bit"
|
||||
* API: Application Programming Interface. TBD
|
||||
* argument: A value sent to a function.
|
||||
* arrow: "->". A symbol in C that references an element within a pointer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue