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

@ -6,11 +6,7 @@
Tux Paint - A simple drawing program for children.
Copyright (c) 2002-2008 by Bill Kendrick and others; see AUTHORS.txt
bill@newbreedsoftware.com
http://www.tuxpaint.org/
Copyright (c) 2013 by Lukasz Dmitrowski
Copyright (c) 2013-2021 by Lukasz Dmitrowski
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -26,6 +22,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: September 21, 2021
*/
#include <stdio.h>
@ -41,6 +39,7 @@ int xor_init(magic_api * api);
int xor_get_tool_count(magic_api * api);
SDL_Surface *xor_get_icon(magic_api * api, int which);
char *xor_get_name(magic_api * api, int which);
int xor_get_group(magic_api * api, int which);
char *xor_get_description(magic_api * api, int which, int mode);
void xor_drag(magic_api * api, int which, SDL_Surface * canvas,
@ -93,6 +92,11 @@ char *xor_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
return (strdup(gettext_noop("Xor Colors")));
}
int xor_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
{
return MAGIC_TYPE_COLOR_FILTERS;
}
char *xor_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
{
if (mode == MODE_PAINT)