switchin() and switchout() now accept mode.

This commit is contained in:
William Kendrick 2008-07-10 20:26:38 +00:00
parent 0b7b36c734
commit f556b503b9
34 changed files with 103 additions and 82 deletions

View file

@ -6,7 +6,7 @@
bill@newbreedsoftware.com
http://www.tuxpaint.org/
July 5, 2007 - July 8, 2008
July 5, 2007 - July 10, 2008
----------------------------------------------------------------------
@ -271,9 +271,9 @@ Interfaces
Plugin event functions:
* void switchin(magic_api * api, int which,
* void switchin(magic_api * api, int which, int mode,
SDL_Surface * snapshot, SDL_Surface * canvas)
void switchout(magic_api * api, int which,
void switchout(magic_api * api, int which, int mode,
SDL_Surface * snapshot, SDL_Surface * canvas)
switchin() is called whenever one of the plugin's Magic tools
becomes active, and switchout() is called whenever one becomes
@ -290,6 +290,11 @@ Interfaces
tool is first 'switched-out', and then 'switched-back-in',
usually moments later.
Finally, it can also happen when the user changes the 'mode' of
a tool (i.e., from paint mode to full-image mode). First
switchout() is called for the old mode, then switchin() is
called for the new mode.
These functions allow users to interact in complicated was with
Magic tools (for example, a tool that lets the user draw
multiple freehand strokes, and then uses that as input such as