Commit 6086f832 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/core/Makefile.am new object for registering GimpPaintCore subclasses,

2002-02-27  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimppaintinfo.[ch]: new object for registering
	GimpPaintCore subclasses, just like GimpToolInfo for tools.

	* app/core/gimp.h: added gimp->paint_info_list to hold them.

	* app/core/gimptoolinfo.[ch]: removed the "pdb_string" and
	"paint_core_name" pointers and added a GimpPaintInfo pointer
	instead.

	* app/core/gimpimage-mask.c
	* app/gui/vectors-commands.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/tool_manager.c: changed accordingly.

	* app/paint/paint-types.h
	* app/paint/paint.c: added paint class registration stuff like
	the tool_manager does.

	* app/paint/gimpairbrush.[ch]
	* app/paint/gimpclone.[ch]
	* app/paint/gimpconvolve.[ch]
	* app/paint/gimpdodgeburn.[ch]
	* app/paint/gimperaser.[ch]
	* app/paint/gimppaintbrush.[ch]
	* app/paint/gimppencil.[ch]
	* app/paint/gimpsmudge.[ch]: added register functions which are
	called from paint_init().

	The core object system lives not only in "core/", but in
	core, paint, vectors, file, plug-in and xcf, so I had to hack
	a bit to keep the deps working:

	* app/pdb/pdb-types.h: don't include "paint/paint-types.h"...

	* app/core/core-types.h: ...because it's included here. Moved
	the inclusions of the core's subsystems' "foo/foo-types.h"
	files to the end of the file.

	* app/paint/Makefile.am: Some slimy radioactive uglyness.

	* app/gui/drawable-commands.c
	* app/tools/gimpblendtool.c: removed calling core functions via
	the PDB because it makes no sense to do it manually in only a few
	places.  This needs to be done generically using generated
	wrappers living in "app/commands/" or something...
parent 80704d02
2002-02-27 Michael Natterer <mitch@gimp.org>
* app/core/Makefile.am
* app/core/gimppaintinfo.[ch]: new object for registering
GimpPaintCore subclasses, just like GimpToolInfo for tools.
* app/core/gimp.h: added gimp->paint_info_list to hold them.
* app/core/gimptoolinfo.[ch]: removed the "pdb_string" and
"paint_core_name" pointers and added a GimpPaintInfo pointer
instead.
* app/core/gimpimage-mask.c
* app/gui/vectors-commands.c
* app/tools/gimpbezierselecttool.c
* app/tools/tool_manager.c: changed accordingly.
* app/paint/paint-types.h
* app/paint/paint.c: added paint class registration stuff like
the tool_manager does.
* app/paint/gimpairbrush.[ch]
* app/paint/gimpclone.[ch]
* app/paint/gimpconvolve.[ch]
* app/paint/gimpdodgeburn.[ch]
* app/paint/gimperaser.[ch]
* app/paint/gimppaintbrush.[ch]
* app/paint/gimppencil.[ch]
* app/paint/gimpsmudge.[ch]: added register functions which are
called from paint_init().
The core object system lives not only in "core/", but in
core, paint, vectors, file, plug-in and xcf, so I had to hack
a bit to keep the deps working:
* app/pdb/pdb-types.h: don't include "paint/paint-types.h"...
* app/core/core-types.h: ...because it's included here. Moved
the inclusions of the core's subsystems' "foo/foo-types.h"
files to the end of the file.
* app/paint/Makefile.am: Some slimy radioactive uglyness.
* app/gui/drawable-commands.c
* app/tools/gimpblendtool.c: removed calling core functions via
the PDB because it makes no sense to do it manually in only a few
places. This needs to be done generically using generated
wrappers living in "app/commands/" or something...
2002-02-27 Sven Neumann <sven@gimp.org>
* config.guess
......
......@@ -31,10 +31,9 @@
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-desaturate.h"
#include "core/gimpdrawable-equalize.h"
#include "core/gimpdrawable-invert.h"
#include "core/gimpimage.h"
#include "pdb/procedural_db.h"
#include "display/gimpdisplay-foreach.h"
#include "widgets/gimpitemfactory.h"
......@@ -86,8 +85,6 @@ drawable_invert_cmd_callback (GtkWidget *widget,
{
GimpImage *gimage;
GimpDrawable *active_drawable;
Argument *return_vals;
gint nreturn_vals;
return_if_no_drawable (gimage, active_drawable);
if (gimp_drawable_is_indexed (active_drawable))
......@@ -96,18 +93,7 @@ drawable_invert_cmd_callback (GtkWidget *widget,
return;
}
return_vals =
procedural_db_run_proc (gimage->gimp,
"gimp_invert",
&nreturn_vals,
GIMP_PDB_DRAWABLE, gimp_item_get_ID (GIMP_ITEM (active_drawable)),
GIMP_PDB_END);
if (!return_vals || return_vals[0].value.pdb_int != GIMP_PDB_SUCCESS)
g_message (_("Invert operation failed."));
procedural_db_destroy_args (return_vals, nreturn_vals);
gimp_drawable_invert (active_drawable);
gdisplays_flush ();
}
......
......@@ -31,6 +31,7 @@
#include "core/gimpimage-mask.h"
#include "core/gimpimage-mask-select.h"
#include "core/gimplist.h"
#include "core/gimppaintinfo.h"
#include "core/gimptoolinfo.h"
#include "paint/gimppaintcore.h"
......@@ -287,7 +288,6 @@ vectors_stroke_vectors (GimpVectors *vectors)
{
GimpTool *active_tool;
GimpPaintCore *core;
GType core_type;
GimpToolInfo *tool_info;
GimpPaintOptions *paint_options;
GimpDisplay *gdisp;
......@@ -307,11 +307,7 @@ vectors_stroke_vectors (GimpVectors *vectors)
paint_options = (GimpPaintOptions *) tool_info->tool_options;
g_print ("core_name: %s\n", tool_info->paint_core_name);
core_type = g_type_from_name (tool_info->paint_core_name);
core = g_object_new (core_type, NULL);
core = g_object_new (tool_info->paint_info->paint_type, NULL);
gdisp = gimp_context_get_display (gimp_get_current_context (gimage->gimp));
......
......@@ -130,6 +130,8 @@ libappcore_a_sources = @STRIP_BEGIN@ \
gimpmodules.h \
gimpobject.c \
gimpobject.h \
gimppaintinfo.c \
gimppaintinfo.h \
gimppattern.c \
gimppattern.h \
gimppattern-header.h \
......
......@@ -24,9 +24,6 @@
#include "libgimpmath/gimpmath.h"
#include "base/base-types.h"
#include "pdb/pdb-types.h"
#include "plug-in/plug-in-types.h"
#include "vectors/vectors-types.h"
#include "core/core-enums.h"
......@@ -186,6 +183,7 @@ typedef struct _GimpItem GimpItem;
typedef struct _GimpBuffer GimpBuffer;
typedef struct _GimpPaintInfo GimpPaintInfo;
typedef struct _GimpToolInfo GimpToolInfo;
typedef struct _GimpImagefile GimpImagefile;
......@@ -278,4 +276,10 @@ struct _GimpCoords
};
#include "paint/paint-types.h"
#include "vectors/vectors-types.h"
#include "pdb/pdb-types.h"
#include "plug-in/plug-in-types.h"
#endif /* __CORE_TYPES_H__ */
......@@ -71,6 +71,8 @@ struct _Gimp
GimpParasiteList *parasites;
GimpContainer *paint_info_list;
GimpContainer *modules;
gboolean write_modulerc;
......
......@@ -37,6 +37,7 @@
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimplayermask.h"
#include "gimppaintinfo.h"
#include "gimptoolinfo.h"
#include "undo.h"
......@@ -609,7 +610,7 @@ gimp_image_mask_stroke (GimpImage *gimage,
if (num_strokes == 0)
return TRUE;
pdb_string = gimp_context_get_tool (context)->pdb_string;
pdb_string = gimp_context_get_tool (context)->paint_info->pdb_string;
/* find the drawable offsets */
gimp_drawable_offsets (drawable, &offx, &offy);
......
/* The GIMP -- an 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <glib-object.h>
#include "core-types.h"
#include "gimp.h"
#include "gimppaintinfo.h"
static void gimp_paint_info_class_init (GimpPaintInfoClass *klass);
static void gimp_paint_info_init (GimpPaintInfo *paint_info);
static void gimp_paint_info_finalize (GObject *object);
static GimpObjectClass *parent_class = NULL;
GType
gimp_paint_info_get_type (void)
{
static GType paint_info_type = 0;
if (! paint_info_type)
{
static const GTypeInfo paint_info_info =
{
sizeof (GimpPaintInfoClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_paint_info_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpPaintInfo),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_paint_info_init,
};
paint_info_type = g_type_register_static (GIMP_TYPE_OBJECT,
"GimpPaintInfo",
&paint_info_info, 0);
}
return paint_info_type;
}
static void
gimp_paint_info_class_init (GimpPaintInfoClass *klass)
{
GObjectClass *object_class;
object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gimp_paint_info_finalize;
}
static void
gimp_paint_info_init (GimpPaintInfo *paint_info)
{
paint_info->gimp = NULL;
paint_info->paint_type = G_TYPE_NONE;
paint_info->pdb_string = NULL;
paint_info->paint_options = NULL;
}
static void
gimp_paint_info_finalize (GObject *object)
{
GimpPaintInfo *paint_info;
paint_info = GIMP_PAINT_INFO (object);
if (paint_info->pdb_string)
{
g_free (paint_info->pdb_string);
paint_info->pdb_string = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
GimpPaintInfo *
gimp_paint_info_new (Gimp *gimp,
GType paint_type,
const gchar *pdb_string)
{
GimpPaintInfo *paint_info;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (pdb_string != NULL, NULL);
paint_info = g_object_new (GIMP_TYPE_PAINT_INFO,
"name", g_type_name (paint_type),
NULL);
paint_info->gimp = gimp;
paint_info->paint_type = paint_type;
paint_info->pdb_string = g_strdup (pdb_string);
return paint_info;
}
/* The GIMP -- an 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 2 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_PAINT_INFO_H__
#define __GIMP_PAINT_INFO_H__
#include "gimpdata.h"
#define GIMP_TYPE_PAINT_INFO (gimp_paint_info_get_type ())
#define GIMP_PAINT_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PAINT_INFO, GimpPaintInfo))
#define GIMP_PAINT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PAINT_INFO, GimpPaintInfoClass))
#define GIMP_IS_PAINT_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PAINT_INFO))
#define GIMP_IS_PAINT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PAINT_INFO))
#define GIMP_PAINT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PAINT_INFO, GimpPaintInfoClass))
typedef struct _GimpPaintInfoClass GimpPaintInfoClass;
struct _GimpPaintInfo
{
GimpObject parent_instance;
Gimp *gimp;
GType paint_type;
gchar *pdb_string;
GimpPaintOptions *paint_options;
};
struct _GimpPaintInfoClass
{
GimpObjectClass parent_class;
};
GType gimp_paint_info_get_type (void) G_GNUC_CONST;
GimpPaintInfo * gimp_paint_info_new (Gimp *gimp,
GType paint_type,
const gchar *pdb_string);
#endif /* __GIMP_PAINT_INFO_H__ */
......@@ -25,7 +25,9 @@
#include "base/temp-buf.h"
#include "gimp.h"
#include "gimpcontainer.h"
#include "gimpcontext.h"
#include "gimppaintinfo.h"
#include "gimptoolinfo.h"
......@@ -100,15 +102,12 @@ gimp_tool_info_init (GimpToolInfo *tool_info)
tool_info->help_domain = NULL;
tool_info->help_data = NULL;
tool_info->pdb_string = NULL;
tool_info->paint_core_name = NULL;
tool_info->stock_id = NULL;
tool_info->stock_pixbuf = NULL;
tool_info->context = NULL;
tool_info->tool_options = NULL;
tool_info->paint_info = NULL;
}
static void
......@@ -246,12 +245,12 @@ gimp_tool_info_new (Gimp *gimp,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *pdb_string,
const gchar *paint_core_name,
const gchar *stock_id,
GdkPixbuf *stock_pixbuf)
{
GimpToolInfo *tool_info;
GimpPaintInfo *paint_info;
GimpToolInfo *tool_info;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
......@@ -259,15 +258,21 @@ gimp_tool_info_new (Gimp *gimp,
g_return_val_if_fail (blurb != NULL, NULL);
g_return_val_if_fail (help != NULL, NULL);
g_return_val_if_fail (menu_path != NULL, NULL);
g_return_val_if_fail (pdb_string != NULL, NULL);
g_return_val_if_fail (paint_core_name != NULL, NULL);
g_return_val_if_fail (stock_id != NULL, NULL);
g_return_val_if_fail (! stock_pixbuf || GDK_IS_PIXBUF (stock_pixbuf), NULL);
paint_info = (GimpPaintInfo *)
gimp_container_get_child_by_name (gimp->paint_info_list, paint_core_name);
g_return_val_if_fail (GIMP_IS_PAINT_INFO (paint_info), NULL);
tool_info = g_object_new (GIMP_TYPE_TOOL_INFO,
"name", identifier,
NULL);
tool_info->paint_info = paint_info;
if (tool_context)
{
tool_info->context = gimp_context_new (gimp,
......@@ -287,9 +292,6 @@ gimp_tool_info_new (Gimp *gimp,
tool_info->help_domain = g_strdup (help_domain);
tool_info->help_data = g_strdup (help_data);
tool_info->pdb_string = g_strdup (pdb_string);
tool_info->paint_core_name = g_strdup (paint_core_name);
tool_info->stock_id = stock_id;
tool_info->stock_pixbuf = stock_pixbuf;
......
......@@ -52,15 +52,12 @@ struct _GimpToolInfo
gchar *help_domain;
gchar *help_data;
gchar *pdb_string;
gchar *paint_core_name;
const gchar *stock_id;
GdkPixbuf *stock_pixbuf;
GimpContext *context;
GimpToolOptions *tool_options;
GimpPaintInfo *paint_info;
};
struct _GimpToolInfoClass
......@@ -82,7 +79,6 @@ GimpToolInfo * gimp_tool_info_new (Gimp *gimp,
const gchar *menu_accel,
const gchar *help_domain,
const gchar *help_data,
const gchar *pdb_string,
const gchar *paint_core_name,
const gchar *stock_id,
GdkPixbuf *stock_pixbuf);
......
......@@ -31,10 +31,9 @@
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-desaturate.h"
#include "core/gimpdrawable-equalize.h"
#include "core/gimpdrawable-invert.h"
#include "core/gimpimage.h"
#include "pdb/procedural_db.h"
#include "display/gimpdisplay-foreach.h"
#include "widgets/gimpitemfactory.h"
......@@ -86,8 +85,6 @@ drawable_invert_cmd_callback (GtkWidget *widget,
{
GimpImage *gimage;
GimpDrawable *active_drawable;
Argument *return_vals;
gint nreturn_vals;
return_if_no_drawable (gimage, active_drawable);
if (gimp_drawable_is_indexed (active_drawable))
......@@ -96,18 +93,7 @@ drawable_invert_cmd_callback (GtkWidget *widget,
return;
}
return_vals =
procedural_db_run_proc (gimage->gimp,
"gimp_invert",
&nreturn_vals,
GIMP_PDB_DRAWABLE, gimp_item_get_ID (GIMP_ITEM (active_drawable)),
GIMP_PDB_END);
if (!return_vals || return_vals[0].value.pdb_int != GIMP_PDB_SUCCESS)
g_message (_("Invert operation failed."));
procedural_db_destroy_args (return_vals, nreturn_vals);
gimp_drawable_invert (active_drawable);
gdisplays_flush ();
}
......
......@@ -31,6 +31,7 @@
#include "core/gimpimage-mask.h"
#include "core/gimpimage-mask-select.h"
#include "core/gimplist.h"
#include "core/gimppaintinfo.h"
#include "core/gimptoolinfo.h"
#include "paint/gimppaintcore.h"
......@@ -287,7 +288,6 @@ vectors_stroke_vectors (GimpVectors *vectors)
{
GimpTool *active_tool;
GimpPaintCore *core;
GType core_type;
GimpToolInfo *tool_info;
GimpPaintOptions *paint_options;
GimpDisplay *gdisp;
......@@ -307,11 +307,7 @@ vectors_stroke_vectors (GimpVectors *vectors)
paint_options = (GimpPaintOptions *) tool_info->tool_options;
g_print ("core_name: %s\n", tool_info->paint_core_name);
core_type = g_type_from_name (tool_info->paint_core_name);
core = g_object_new (core_type, NULL);
core = g_object_new (tool_info->paint_info->paint_type, NULL);
gdisp = gimp_context_get_display (gimp_get_current_context (gimage->gimp));
......
......@@ -31,6 +31,9 @@ libapppaint_a_SOURCES = @STRIP_BEGIN@ \
gimpsmudge.h \
@STRIP_END@
## This is a truly ugly hack
libapppaint_a_LIBADD = ../core/gimppaintinfo.o
AM_CPPFLAGS = @STRIP_BEGIN@ \
-DG_LOG_DOMAIN=\"Gimp-Paint\" \
@GIMP_THREAD_FLAGS@ \
......
......@@ -74,6 +74,13 @@ static AirbrushTimeout airbrush_timeout;
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_airbrush_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_AIRBRUSH);
}
GType
gimp_airbrush_get_type (void)
{
......
......@@ -62,7 +62,11 @@ struct _GimpAirbrushOptions
};
GType gimp_airbrush_get_type (void) G_GNUC_CONST;
void gimp_airbrush_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_airbrush_get_type (void) G_GNUC_CONST;
GimpAirbrushOptions * gimp_airbrush_options_new (void);
......
......@@ -89,6 +89,13 @@ static gint first = TRUE;
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_clone_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_CLONE);
}
GType
gimp_clone_get_type (void)
{
......
......@@ -87,7 +87,11 @@ struct _GimpCloneOptions
};
GType gimp_clone_get_type (void) G_GNUC_CONST;
void gimp_clone_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_clone_get_type (void) G_GNUC_CONST;
GimpCloneOptions * gimp_clone_options_new (void);
......
......@@ -113,6 +113,13 @@ static gfloat sharpen_matrix [25] =
static GimpPaintCoreClass *parent_class;
void
gimp_convolve_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_CONVOLVE);
}
GType
gimp_convolve_get_type (void)
{
......
......@@ -62,7 +62,11 @@ struct _GimpConvolveOptions
};
GType gimp_convolve_get_type (void) G_GNUC_CONST;
void gimp_convolve_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_convolve_get_type (void) G_GNUC_CONST;
GimpConvolveOptions * gimp_convolve_options_new (void);
......
......@@ -74,6 +74,13 @@ static gfloat gimp_dodgeburn_shadows_lut_func (gpointer user_data,
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_dodgeburn_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_DODGEBURN);
}
GType
gimp_dodgeburn_get_type (void)
{
......
......@@ -67,7 +67,11 @@ struct _GimpDodgeBurnOptions
};
GType gimp_dodgeburn_get_type (void) G_GNUC_CONST;
void gimp_dodgeburn_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_dodgeburn_get_type (void) G_GNUC_CONST;
GimpDodgeBurnOptions * gimp_dodgeburn_options_new (void);
......
......@@ -52,6 +52,13 @@ static void gimp_eraser_motion (GimpPaintCore *paint_core,
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_eraser_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_ERASER);
}
GType
gimp_eraser_get_type (void)
{
......
......@@ -62,7 +62,11 @@ struct _GimpEraserOptions
};
GType gimp_eraser_get_type (void) G_GNUC_CONST;
void gimp_eraser_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_eraser_get_type (void) G_GNUC_CONST;
GimpEraserOptions * gimp_eraser_options_new (void);
......
......@@ -62,6 +62,13 @@ static void gimp_paintbrush_motion (GimpPaintCore *paint_core,
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_paintbrush_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_PAINTBRUSH);
}
GType
gimp_paintbrush_get_type (void)
{
......
......@@ -45,6 +45,9 @@ struct _GimpPaintbrushClass
};
void gimp_paintbrush_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_paintbrush_get_type (void) G_GNUC_CONST;
......
......@@ -55,6 +55,13 @@ static void gimp_pencil_motion (GimpPaintCore *paint_core,
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_pencil_register (Gimp *gimp,
GimpPaintRegisterCallback callback)
{
(* callback) (gimp, GIMP_TYPE_PENCIL);
}
GType
gimp_pencil_get_type (void)
{
......
......@@ -48,6 +48,9 @@ struct _GimpPencilClass
};
void gimp_pencil_register (Gimp *gimp,
GimpPaintRegisterCallback callback);
GType gimp_pencil_get_type (void) G_GNUC_CONST;
......
......@@ -72,6 +72,13 @@ static guchar *accum_data = NULL;
static GimpPaintCoreClass *parent_class = NULL;
void
gimp_smudge_register (Gimp *gimp,
GimpPaintRegisterCallback callback)