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,7 +6,7 @@
Author: Adam 'foo-script' Rakowski ; foo-script@o2.pl
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/
@ -24,6 +24,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
*/
@ -52,6 +54,7 @@ int puzzle_init(magic_api * api);
int puzzle_get_tool_count(magic_api * api);
SDL_Surface *puzzle_get_icon(magic_api * api, int which);
char *puzzle_get_name(magic_api * api, int which);
int puzzle_get_group(magic_api * api, int which);
char *puzzle_get_description(magic_api * api, int which, int mode);
void puzzle_release(magic_api * api, int which,
SDL_Surface * canvas, SDL_Surface * last, int x, int y, SDL_Rect * update_rect);
@ -103,6 +106,11 @@ char *puzzle_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUS
return (strdup(gettext_noop("Puzzle")));
}
int puzzle_get_group(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED)
{
return MAGIC_TYPE_DISTORTS;
}
char *puzzle_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode)
{