Finished organizing Magic tools; updated docs

Added group code to `tp_magic_example.c`, and documented
in the "Creating Tux Paint Magic Tool Plugins" docs.
This commit is contained in:
Bill Kendrick 2021-09-21 01:02:22 -07:00
parent 5882a48412
commit 1d5dd8eb9f
16 changed files with 209 additions and 60 deletions

View file

@ -10,7 +10,7 @@
Credits: Andrew Corcoran <akanewbie@gmail.com>
Copyright (c) 2002-2009 by Bill Kendrick and others; see AUTHORS.txt
Copyright (c) 2002-2021 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com
http://www.tuxpaint.org/
@ -29,7 +29,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: May 6, 2009
Last updated: September 21, 2021
$Id$
*/
@ -87,6 +87,7 @@ Uint32 tint_api_version(void);
int tint_get_tool_count(magic_api * api);
SDL_Surface *tint_get_icon(magic_api * api, int which);
char *tint_get_name(magic_api * api, int which);
int tint_get_group(magic_api * api, int which);
char *tint_get_description(magic_api * api, int which, int mode);
static int tint_grey(Uint8 r1, Uint8 g1, Uint8 b1);
static void do_tint_pixel(void *ptr, int which, SDL_Surface * canvas, SDL_Surface * last, int x, int y);
@ -144,6 +145,12 @@ char *tint_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
return (strdup(gettext_noop(tint_names[which])));
}
// Return our group (both the same):
int tint_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
{
return MAGIC_TYPE_COLOR_FILTERS;
}
// Return our descriptions, localized:
char *tint_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
{