Put more Magic tools into their groups

...WIP
This commit is contained in:
Bill Kendrick 2021-09-21 00:07:14 -07:00
parent 12b503be9c
commit 448a4b4487
8 changed files with 72 additions and 12 deletions

View file

@ -6,7 +6,7 @@
Credits: Bill Kendrick<bill@newbreedsoftware.com> & Andrew Corcoran <akanewbie@gmail.com>
Copyright (c) 2002-2008 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/
@ -25,7 +25,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
Last updated: July 8, 2008
Last updated: September 20, 2021
$Id$
*/
@ -44,6 +44,7 @@ int blur_init(magic_api * api);
int blur_get_tool_count(magic_api * api);
SDL_Surface *blur_get_icon(magic_api * api, int which);
char *blur_get_name(magic_api * api, int which);
int blur_get_group(magic_api * api, int which);
char *blur_get_description(magic_api * api, int which, int mode);
void blur_drag(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * last, int ox, int oy, int x, int y, SDL_Rect * update_rect);
@ -80,6 +81,10 @@ const char *blur_names[blur_NUM_TOOLS] = {
gettext_noop("Blur"),
};
const int blur_groups[blur_NUM_TOOLS] = {
MAGIC_TYPE_DISTORTS,
};
const char *blur_descs[blur_NUM_TOOLS][2] = {
{gettext_noop("Click and drag the mouse around to blur the image."),
gettext_noop("Click to blur the entire image.")},
@ -125,6 +130,12 @@ char *blur_get_name(magic_api * api ATTRIBUTE_UNUSED, int which)
return (strdup(gettext_noop(blur_names[which])));
}
// Return our group
int blur_get_group(magic_api * api ATTRIBUTE_UNUSED, int which)
{
return blur_groups[which];
}
// Return our descriptions, localized:
char *blur_get_description(magic_api * api ATTRIBUTE_UNUSED, int which, int mode)
{