Commit 80a8d5a7 authored by Nate Summers's avatar Nate Summers

Introduced GimpPaintTool and GimpDrawTool

parent 2fd2a4e6
2001-02-26 Nathan Summers <rock@gimp.org>
app/tools/gimpdrawtool.c
* app/tools/gimpdrawtool.h
* app/tools/gimppainttool.c
* app/tools/gimppainttool.h
* app/tools/gimppainttool_kernels.h: Created GimpDrawTool and
GimpPaintTool, real classes that replace the old DrawCore and
PaintCore
* app/Makefile.am
* app/apptypes.h
* app/context_manager.c
* app/gdisplay.c
* app/gimage_mask.c
* app/gimpbrush.c
* app/gimpbrush.h
* app/gimpbrushgenerated.c
* app/gimpbrushpipe.c
* app/gimpcontext.c
* app/info_window.c
* app/path_transform.h
* app/undo.c
* app/pdb/tools_cmds.c
* app/tools/Makefile.am
* app/tools/bezier_selectP.h
* app/tools/gimptoolinfo.c
* app/tools/measure.c
* app/tools/measure.h
* app/tools/move.c
* app/tools/paint_options.c
* app/tools/tool.c
* app/tools/tool.h
* app/tools/tools.c
* app/tools/transform_core.h
* tools/pdbgen/Makefile.am: changed accordingly
* libgimp/Makefile.am: fixed glitch in build
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcolorpickertool.h
* app/tools/gimppaintbrushtool.c
* app/tools/gimppaintbrushtool.h:new names
* app/draw_core.c
* app/draw_core.h
* app/tools/color_picker.c
* app/tools/color_picker.h
* app/tools/paint_core.c
* app/tools/paint_core.h
* app/tools/paint_core_kernels.h
* app/tools/paintbrush.c
* app/tools/paintbrush.h: removed
2001-02-25 Michael Natterer <mitch@gimp.org>
* app/channel_ops.c
......
......@@ -72,8 +72,6 @@ gimp_SOURCES = \
disp_callbacks.h \
docindex.c \
docindex.h \
draw_core.c \
draw_core.h \
drawable.c \
drawable.h \
errorconsole.c \
......
......@@ -111,7 +111,7 @@ typedef struct _BoundSeg BoundSeg;
typedef struct _ColorNotebook ColorNotebook;
typedef struct _DrawCore DrawCore;
typedef struct _GimpDrawTool GimpDrawTool;
typedef struct _GDisplay GDisplay;
......@@ -133,7 +133,7 @@ typedef gpointer ImageMap;
typedef struct _InfoDialog InfoDialog;
typedef struct _PaintCore PaintCore;
typedef struct _GimpPaintTool GimpPaintTool;
typedef struct _Path Path;
typedef struct _PathPoint PathPoint;
......
......@@ -46,7 +46,6 @@
#include "gimppattern.h"
#include "gimprc.h"
/*
* the list of all images
*/
......
......@@ -51,7 +51,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "brush_scale.h"
#include "libgimp/gimpintl.h"
......@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint height);
static gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_want_null_motion (GimpPaintTool *paint_tool);
static GimpViewableClass *parent_class = NULL;
......@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename)
}
static GimpBrush *
gimp_brush_select_brush (PaintCore *paint_core)
gimp_brush_select_brush (GimpPaintTool *paint_core)
{
return paint_core->brush;
}
static gboolean
gimp_brush_want_null_motion (PaintCore *paint_core)
gimp_brush_want_null_motion (GimpPaintTool *paint_core)
{
return TRUE;
}
......
......@@ -51,7 +51,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "brush_scale.h"
#include "libgimp/gimpintl.h"
......@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint height);
static gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_want_null_motion (GimpPaintTool *paint_tool);
static GimpViewableClass *parent_class = NULL;
......@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename)
}
static GimpBrush *
gimp_brush_select_brush (PaintCore *paint_core)
gimp_brush_select_brush (GimpPaintTool *paint_core)
{
return paint_core->brush;
}
static gboolean
gimp_brush_want_null_motion (PaintCore *paint_core)
gimp_brush_want_null_motion (GimpPaintTool *paint_core)
{
return TRUE;
}
......
......@@ -53,8 +53,8 @@ struct _GimpBrushClass
GimpDataClass parent_class;
/* FIXME: these are no virtual function pointers but bad hacks: */
GimpBrush * (* select_brush) (PaintCore *paint_core);
gboolean (* want_null_motion) (PaintCore *paint_core);
GimpBrush * (* select_brush) (GimpPaintTool *paint_tool);
gboolean (* want_null_motion) (GimpPaintTool *paint_tool);
};
......
......@@ -41,7 +41,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#define OVERSAMPLING 5
......
......@@ -41,7 +41,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#define OVERSAMPLING 5
......
......@@ -41,7 +41,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#define OVERSAMPLING 5
......
......@@ -53,15 +53,15 @@
#include "gimprc.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "libgimp/gimpparasiteio.h"
#include "libgimp/gimpintl.h"
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool);
static void gimp_brush_pipe_destroy (GtkObject *object);
......@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL;
static GimpBrush *
gimp_brush_pipe_select_brush (PaintCore *paint_core)
gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i, brushix, ix;
gdouble angle;
g_return_val_if_fail (paint_core != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), NULL);
g_return_val_if_fail (paint_tool != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), NULL);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return GIMP_BRUSH (pipe->current);
......@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = (pipe->index[i] + 1) % pipe->rank[i];
break;
case PIPE_SELECT_ANGULAR:
angle = atan2 (paint_core->cury - paint_core->lasty,
paint_core->curx - paint_core->lastx);
angle = atan2 (paint_tool->cury - paint_tool->lasty,
paint_tool->curx - paint_tool->lastx);
/* Offset angle to be compatible with PSP tubes */
angle += G_PI_2;
/* Map it to the [0..2*G_PI) interval */
......@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = rand () % pipe->rank[i];
break;
case PIPE_SELECT_PRESSURE:
ix = RINT (paint_core->curpressure * (pipe->rank[i] - 1));
ix = RINT (paint_tool->curpressure * (pipe->rank[i] - 1));
break;
case PIPE_SELECT_TILT_X:
ix = RINT (paint_core->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_TILT_Y:
ix = RINT (paint_core->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_CONSTANT:
default:
......@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
}
static gboolean
gimp_brush_pipe_want_null_motion (PaintCore *paint_core)
gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i;
g_return_val_if_fail (paint_core != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), TRUE);
g_return_val_if_fail (paint_tool != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), TRUE);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return TRUE;
......
......@@ -53,15 +53,15 @@
#include "gimprc.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "libgimp/gimpparasiteio.h"
#include "libgimp/gimpintl.h"
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool);
static void gimp_brush_pipe_destroy (GtkObject *object);
......@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL;
static GimpBrush *
gimp_brush_pipe_select_brush (PaintCore *paint_core)
gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i, brushix, ix;
gdouble angle;
g_return_val_if_fail (paint_core != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), NULL);
g_return_val_if_fail (paint_tool != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), NULL);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return GIMP_BRUSH (pipe->current);
......@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = (pipe->index[i] + 1) % pipe->rank[i];
break;
case PIPE_SELECT_ANGULAR:
angle = atan2 (paint_core->cury - paint_core->lasty,
paint_core->curx - paint_core->lastx);
angle = atan2 (paint_tool->cury - paint_tool->lasty,
paint_tool->curx - paint_tool->lastx);
/* Offset angle to be compatible with PSP tubes */
angle += G_PI_2;
/* Map it to the [0..2*G_PI) interval */
......@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = rand () % pipe->rank[i];
break;
case PIPE_SELECT_PRESSURE:
ix = RINT (paint_core->curpressure * (pipe->rank[i] - 1));
ix = RINT (paint_tool->curpressure * (pipe->rank[i] - 1));
break;
case PIPE_SELECT_TILT_X:
ix = RINT (paint_core->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_TILT_Y:
ix = RINT (paint_core->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_CONSTANT:
default:
......@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
}
static gboolean
gimp_brush_pipe_want_null_motion (PaintCore *paint_core)
gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i;
g_return_val_if_fail (paint_core != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), TRUE);
g_return_val_if_fail (paint_tool != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), TRUE);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return TRUE;
......
......@@ -1394,6 +1394,8 @@ gimp_context_real_set_tool (GimpContext *context,
GTK_SIGNAL_FUNC (gimp_context_tool_dirty),
context);
/* FIXME if (tool_info != standard_tool_info) */
if (tool_info != standard_tool_info)
context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name);
}
......
......@@ -22,7 +22,7 @@
#include "apptypes.h"
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "tools/paint_options.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
......
......@@ -25,7 +25,6 @@
#include "apptypes.h"
#include "draw_core.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -47,7 +46,8 @@
#include "undo.h"
#include "tools/by_color_select.h"
#include "tools/paint_core.h"
#include "tools/gimpdrawtool.h"
#include "tools/gimppainttool.h"
#include "tools/tool.h"
#include "tools/transform_core.h"
......
......@@ -31,7 +31,6 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
......
......@@ -26,7 +26,7 @@
#include "temp_buf.h"
/* FIXME: include rect_select.h here */
#include "color_picker.h"
#include "gimpcolorpickertool.h"
static void gimp_tool_info_class_init (GimpToolInfoClass *klass);
......@@ -236,7 +236,7 @@ gimp_tool_info_get_standard (void)
if (! standard_tool_info)
{
standard_tool_info =
gimp_tool_info_new (GIMP_TYPE_COLOR_PICKER,
gimp_tool_info_new (GIMP_TYPE_COLOR_PICKER_TOOL,
"gimp:standard_tool",
"Standard Tool",
"Well something must be broken",
......
......@@ -24,7 +24,7 @@
#include "apptypes.h"
#include "tools/color_picker.h"
#include "tools/gimpcolorpickertool.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
......@@ -161,7 +161,7 @@ info_window_create_extended (InfoDialog *info_win)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER)), 22, 0, FALSE);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER_TOOL)), 22, 0, FALSE);
gtk_table_attach (GTK_TABLE (table), preview, 0, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 2, 2);
gtk_widget_show (preview);
......
......@@ -31,7 +31,6 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
......
......@@ -31,7 +31,6 @@
#include "colormaps.h"
#include "cursorutil.h"
#include "disp_callbacks.h"
#include "draw_core.h"
#include "gdisplay.h"
#include "gdisplay_ops.h"
#include "gimage.h"
......
......@@ -22,7 +22,7 @@
#include "apptypes.h"
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "tools/paint_options.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
......
......@@ -51,7 +51,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "brush_scale.h"
#include "libgimp/gimpintl.h"
......@@ -65,8 +65,8 @@ static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint height);
static gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_want_null_motion (GimpPaintTool *paint_tool);
static GimpViewableClass *parent_class = NULL;
......@@ -330,13 +330,13 @@ gimp_brush_load (const gchar *filename)
}
static GimpBrush *
gimp_brush_select_brush (PaintCore *paint_core)
gimp_brush_select_brush (GimpPaintTool *paint_core)
{
return paint_core->brush;
}
static gboolean
gimp_brush_want_null_motion (PaintCore *paint_core)
gimp_brush_want_null_motion (GimpPaintTool *paint_core)
{
return TRUE;
}
......
......@@ -53,8 +53,8 @@ struct _GimpBrushClass
GimpDataClass parent_class;
/* FIXME: these are no virtual function pointers but bad hacks: */
GimpBrush * (* select_brush) (PaintCore *paint_core);
gboolean (* want_null_motion) (PaintCore *paint_core);
GimpBrush * (* select_brush) (GimpPaintTool *paint_tool);
gboolean (* want_null_motion) (GimpPaintTool *paint_tool);
};
......
......@@ -41,7 +41,7 @@
#include "temp_buf.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#define OVERSAMPLING 5
......
......@@ -53,15 +53,15 @@
#include "gimprc.h"
/* this needs to go away */
#include "tools/paint_core.h"
#include "tools/gimppainttool.h"
#include "libgimp/gimpparasiteio.h"
#include "libgimp/gimpintl.h"
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
static GimpBrush * gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool);
static gboolean gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool);
static void gimp_brush_pipe_destroy (GtkObject *object);
......@@ -69,16 +69,16 @@ static GimpBrushClass *parent_class = NULL;
static GimpBrush *
gimp_brush_pipe_select_brush (PaintCore *paint_core)
gimp_brush_pipe_select_brush (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i, brushix, ix;
gdouble angle;
g_return_val_if_fail (paint_core != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), NULL);
g_return_val_if_fail (paint_tool != NULL, NULL);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), NULL);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return GIMP_BRUSH (pipe->current);
......@@ -92,8 +92,8 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = (pipe->index[i] + 1) % pipe->rank[i];
break;
case PIPE_SELECT_ANGULAR:
angle = atan2 (paint_core->cury - paint_core->lasty,
paint_core->curx - paint_core->lastx);
angle = atan2 (paint_tool->cury - paint_tool->lasty,
paint_tool->curx - paint_tool->lastx);
/* Offset angle to be compatible with PSP tubes */
angle += G_PI_2;
/* Map it to the [0..2*G_PI) interval */
......@@ -108,13 +108,13 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
ix = rand () % pipe->rank[i];
break;
case PIPE_SELECT_PRESSURE:
ix = RINT (paint_core->curpressure * (pipe->rank[i] - 1));
ix = RINT (paint_tool->curpressure * (pipe->rank[i] - 1));
break;
case PIPE_SELECT_TILT_X:
ix = RINT (paint_core->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curxtilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_TILT_Y:
ix = RINT (paint_core->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
ix = RINT (paint_tool->curytilt / 2.0 * pipe->rank[i]) + pipe->rank[i]/2;
break;
case PIPE_SELECT_CONSTANT:
default:
......@@ -134,15 +134,15 @@ gimp_brush_pipe_select_brush (PaintCore *paint_core)
}
static gboolean
gimp_brush_pipe_want_null_motion (PaintCore *paint_core)
gimp_brush_pipe_want_null_motion (GimpPaintTool *paint_tool)
{
GimpBrushPipe *pipe;
gint i;
g_return_val_if_fail (paint_core != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_core->brush), TRUE);
g_return_val_if_fail (paint_tool != NULL, TRUE);
g_return_val_if_fail (GIMP_IS_BRUSH_PIPE (paint_tool->brush), TRUE);
pipe = GIMP_BRUSH_PIPE (paint_core->brush);
pipe = GIMP_BRUSH_PIPE (paint_tool->brush);
if (pipe->nbrushes == 1)
return TRUE;
......
......@@ -1394,6 +1394,8 @@ gimp_context_real_set_tool (GimpContext *context,
GTK_SIGNAL_FUNC (gimp_context_tool_dirty),
context);
/* FIXME if (tool_info != standard_tool_info) */
if (tool_info != standard_tool_info)
context->tool_name = g_strdup (GIMP_OBJECT (tool_info)->name);
}
......
......@@ -24,7 +24,7 @@
#include "apptypes.h"
#include "tools/color_picker.h"
#include "tools/gimpcolorpickertool.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
......@@ -161,7 +161,7 @@ info_window_create_extended (InfoDialog *info_win)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER)), 22, 0, FALSE);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER_TOOL)), 22, 0, FALSE);
gtk_table_attach (GTK_TABLE (table), preview, 0, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 2, 2);
gtk_widget_show (preview);
......
......@@ -24,7 +24,7 @@
#include "apptypes.h"
#include "tools/color_picker.h"
#include "tools/gimpcolorpickertool.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
......@@ -161,7 +161,7 @@ info_window_create_extended (InfoDialog *info_win)
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER)), 22, 0, FALSE);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_manager_get_info_by_type (GIMP_TYPE_COLOR_PICKER_TOOL)), 22, 0, FALSE);
gtk_table_attach (GTK_TABLE (table), preview, 0, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 2, 2);
gtk_widget_show (preview);
......
......@@ -36,14 +36,16 @@
#include "selection.h"
#include "temp_buf.h"
#include "paint_core.h"
#include "tools/gimppainttool.h"
#include "paint_options.h"
#include "paintbrush.h"
#include "tools/gimppaintbrushtool.h"
#include "tool_options.h"
#include "tools.h"
#include "tools/tool.h"
#include "tools/tool_manager.h"
#include "libgimp/gimpintl.h"
#include "pixmaps2.h"
#include "libgimp/gimpintl.h"
/* defines */
#define PAINT_LEFT_THRESHOLD 0.05
......@@ -106,24 +108,51 @@ static gdouble non_gui_incremental;
static GimpUnit non_gui_fade_unit;
static GimpUnit non_gui_gradient_unit;
static GimpPaintToolClass *parent_class;
/* forward function declarations */
static void paintbrush_motion (PaintCore *,
static void gimp_paintbrush_tool_motion (GimpPaintTool *,
GimpDrawable *,
PaintPressureOptions *,
gdouble ,
gdouble ,
PaintApplicationMode ,
GradientPaintMode );
static gpointer paintbrush_paint_func (PaintCore *paint_core,
static void gimp_paintbrush_tool_paint_func (GimpPaintTool *paint_core,
GimpDrawable *drawable,
PaintState state);
static void gimp_paintbrush_tool_class_init (GimpPaintToolClass *klass);
/* functions */