2018-04-08 21:28:23 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_PAINT_TOOL_PAINT_H__
|
|
|
|
#define __GIMP_PAINT_TOOL_PAINT_H__
|
|
|
|
|
|
|
|
|
app: reorganize gimppainttool-paint, to allow use by subclasses
We'd like subclasses of GimpPaintTool to be able to issue paint
commands to the tool's paint-core (in particular, see the next
commit.) Since paint commands should be executed on the paint
thread, the subclasses must not call the paint-core functions
directly, but should rather let gimppainttool-paint issue the
commands on their behalf.
Reorgainze gimppainttool-paint to make it usable for this purpose
by subclasses. In particular, add
gimp_paint_tool_paint_core_paint() and
gimp_paint_tool_paint_core_interpolate(), which call the
corresponding paint-core functions on the paint thread.
Additionally, rename the {start,end,flush}_paint() virtual
functions of GimpPaintTool to paint_{start,end,flush}(), and rename
gimp_paint_tool_is_painting() to gimp_paint_tool_paint_is_active(),
so that all the gimppainttool-paint-related stuff are grouped under
the same namespace.
2018-04-16 21:36:35 +08:00
|
|
|
gboolean gimp_paint_tool_paint_start (GimpPaintTool *tool,
|
|
|
|
GimpDisplay *display,
|
|
|
|
const GimpCoords *coords,
|
|
|
|
guint32 time,
|
|
|
|
gboolean constrain,
|
|
|
|
GError **error);
|
|
|
|
void gimp_paint_tool_paint_end (GimpPaintTool *tool,
|
|
|
|
guint32 time,
|
|
|
|
gboolean cancel);
|
|
|
|
|
|
|
|
gboolean gimp_paint_tool_paint_is_active (GimpPaintTool *tool);
|
|
|
|
|
|
|
|
void gimp_paint_tool_paint_motion (GimpPaintTool *tool,
|
|
|
|
const GimpCoords *coords,
|
|
|
|
guint32 time);
|
|
|
|
|
|
|
|
void gimp_paint_tool_paint_core_paint (GimpPaintTool *tool,
|
|
|
|
GimpPaintState state,
|
|
|
|
guint32 time);
|
|
|
|
void gimp_paint_tool_paint_core_interpolate (GimpPaintTool *tool,
|
|
|
|
const GimpCoords *coords,
|
|
|
|
guint32 time);
|
2018-04-08 21:28:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_PAINT_TOOL_PAINT_H__ */
|