mirror of https://github.com/GNOME/gimp.git
app/Makefile.am removed. added.
2001-01-10 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimpsignal.[ch]: removed. * app/gimpmarshal.[ch]: added. * app/channel.[ch] * app/gimpbrush.[ch] * app/gimpbrushgenerated.c * app/gimpbrushlist.[ch] * app/gimpbrushpipe.[ch] * app/gimpcontext.c * app/gimpdrawable.c * app/gimpimage.c * app/gimplist.[ch] * app/gimpobject.[ch] * app/gimpset.[ch] * app/layer.c * app/layers_dialog.c * app/module_db.c * app/parasitelist.[ch]: removed gimp_signal_new() and GIMP_TYPE_INIT(). Fixed lots of object related uglyness.
This commit is contained in:
parent
c935ec8367
commit
92c45a90e6
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
||||||
|
2001-01-10 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/Makefile.am
|
||||||
|
* app/gimpsignal.[ch]: removed.
|
||||||
|
* app/gimpmarshal.[ch]: added.
|
||||||
|
|
||||||
|
* app/channel.[ch]
|
||||||
|
* app/gimpbrush.[ch]
|
||||||
|
* app/gimpbrushgenerated.c
|
||||||
|
* app/gimpbrushlist.[ch]
|
||||||
|
* app/gimpbrushpipe.[ch]
|
||||||
|
* app/gimpcontext.c
|
||||||
|
* app/gimpdrawable.c
|
||||||
|
* app/gimpimage.c
|
||||||
|
* app/gimplist.[ch]
|
||||||
|
* app/gimpobject.[ch]
|
||||||
|
* app/gimpset.[ch]
|
||||||
|
* app/layer.c
|
||||||
|
* app/layers_dialog.c
|
||||||
|
* app/module_db.c
|
||||||
|
* app/parasitelist.[ch]: removed gimp_signal_new() and
|
||||||
|
GIMP_TYPE_INIT(). Fixed lots of object related uglyness.
|
||||||
|
|
||||||
2001-01-09 Sven Neumann <sven@gimp.org>
|
2001-01-09 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
Merged fix from gimp-1-2:
|
Merged fix from gimp-1-2:
|
||||||
|
|
|
@ -16,14 +16,14 @@ libgimpim_a_SOURCES = \
|
||||||
gimpdrawable.h \
|
gimpdrawable.h \
|
||||||
gimpimage.c \
|
gimpimage.c \
|
||||||
gimpimage.h \
|
gimpimage.h \
|
||||||
|
gimpmarshal.c \
|
||||||
|
gimpmarshal.h \
|
||||||
gimpobject.c \
|
gimpobject.c \
|
||||||
gimpobject.h \
|
gimpobject.h \
|
||||||
gimppreviewcache.h \
|
gimppreviewcache.h \
|
||||||
gimppreviewcache.c \
|
gimppreviewcache.c \
|
||||||
gimpset.c \
|
gimpset.c \
|
||||||
gimpset.h \
|
gimpset.h
|
||||||
gimpsignal.c \
|
|
||||||
gimpsignal.h
|
|
||||||
|
|
||||||
gimp_SOURCES = \
|
gimp_SOURCES = \
|
||||||
about_dialog.c \
|
about_dialog.c \
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "gdisplay.h"
|
#include "gdisplay.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "gimplut.h"
|
#include "gimplut.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
@ -95,20 +94,28 @@ gimp_channel_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_channel_class_init (GimpChannelClass *class)
|
gimp_channel_class_init (GimpChannelClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
channel_signals[REMOVED] =
|
channel_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpChannelClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
|
|
||||||
|
klass->removed = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -63,6 +63,8 @@ struct _GimpChannel
|
||||||
struct _GimpChannelClass
|
struct _GimpChannelClass
|
||||||
{
|
{
|
||||||
GimpDrawableClass parent_class;
|
GimpDrawableClass parent_class;
|
||||||
|
|
||||||
|
void (* removed) (GimpChannel *channel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,19 +45,17 @@
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "brush_header.h"
|
#include "brush_header.h"
|
||||||
#include "patterns.h"
|
|
||||||
#include "pattern_header.h"
|
|
||||||
#include "gimpbrush.h"
|
#include "gimpbrush.h"
|
||||||
#include "gimpbrushlist.h"
|
#include "gimpbrushlist.h"
|
||||||
|
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
|
#include "patterns.h"
|
||||||
|
#include "pattern_header.h"
|
||||||
#include "paint_core.h"
|
#include "paint_core.h"
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
|
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DIRTY,
|
DIRTY,
|
||||||
|
@ -68,9 +66,11 @@ enum
|
||||||
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
||||||
|
|
||||||
static guint gimp_brush_signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class;
|
static guint gimp_brush_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
static GimpObjectClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_destroy (GtkObject *object)
|
gimp_brush_destroy (GtkObject *object)
|
||||||
|
@ -91,26 +91,38 @@ static void
|
||||||
gimp_brush_class_init (GimpBrushClass *klass)
|
gimp_brush_class_init (GimpBrushClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
type = object_class->type;
|
gimp_brush_signals[DIRTY] =
|
||||||
|
gtk_signal_new ("dirty",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gimp_brush_signals[RENAME] =
|
||||||
|
gtk_signal_new ("rename",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_brush_destroy;
|
object_class->destroy = gimp_brush_destroy;
|
||||||
|
|
||||||
klass->select_brush = gimp_brush_select_brush;
|
klass->dirty = NULL;
|
||||||
|
klass->rename = NULL;
|
||||||
|
|
||||||
|
klass->select_brush = gimp_brush_select_brush;
|
||||||
klass->want_null_motion = gimp_brush_want_null_motion;
|
klass->want_null_motion = gimp_brush_want_null_motion;
|
||||||
|
|
||||||
gimp_brush_signals[DIRTY] =
|
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gimp_brush_signals[RENAME] =
|
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -45,19 +45,17 @@
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "brush_header.h"
|
#include "brush_header.h"
|
||||||
#include "patterns.h"
|
|
||||||
#include "pattern_header.h"
|
|
||||||
#include "gimpbrush.h"
|
#include "gimpbrush.h"
|
||||||
#include "gimpbrushlist.h"
|
#include "gimpbrushlist.h"
|
||||||
|
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
|
#include "patterns.h"
|
||||||
|
#include "pattern_header.h"
|
||||||
#include "paint_core.h"
|
#include "paint_core.h"
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
|
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DIRTY,
|
DIRTY,
|
||||||
|
@ -68,9 +66,11 @@ enum
|
||||||
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
||||||
|
|
||||||
static guint gimp_brush_signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class;
|
static guint gimp_brush_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
static GimpObjectClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_destroy (GtkObject *object)
|
gimp_brush_destroy (GtkObject *object)
|
||||||
|
@ -91,26 +91,38 @@ static void
|
||||||
gimp_brush_class_init (GimpBrushClass *klass)
|
gimp_brush_class_init (GimpBrushClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
type = object_class->type;
|
gimp_brush_signals[DIRTY] =
|
||||||
|
gtk_signal_new ("dirty",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gimp_brush_signals[RENAME] =
|
||||||
|
gtk_signal_new ("rename",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_brush_destroy;
|
object_class->destroy = gimp_brush_destroy;
|
||||||
|
|
||||||
klass->select_brush = gimp_brush_select_brush;
|
klass->dirty = NULL;
|
||||||
|
klass->rename = NULL;
|
||||||
|
|
||||||
|
klass->select_brush = gimp_brush_select_brush;
|
||||||
klass->want_null_motion = gimp_brush_want_null_motion;
|
klass->want_null_motion = gimp_brush_want_null_motion;
|
||||||
|
|
||||||
gimp_brush_signals[DIRTY] =
|
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gimp_brush_signals[RENAME] =
|
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -23,7 +23,13 @@
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpBrushClass GimpBrushClass;
|
#define GIMP_TYPE_BRUSH (gimp_brush_get_type ())
|
||||||
|
#define GIMP_BRUSH(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH, GimpBrush))
|
||||||
|
#define GIMP_IS_BRUSH(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH))
|
||||||
|
#define GIMP_BRUSH_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gimp_brush_get_type(), GimpBrushClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpBrushClass GimpBrushClass;
|
||||||
|
|
||||||
struct _GimpBrush
|
struct _GimpBrush
|
||||||
{
|
{
|
||||||
|
@ -42,14 +48,14 @@ struct _GimpBrushClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
|
|
||||||
|
void (* dirty) (GimpBrush *brush);
|
||||||
|
void (* rename) (GimpBrush *brush);
|
||||||
|
|
||||||
|
/* FIXME: these are no virtual function pointers but bad hacks: */
|
||||||
GimpBrush * (* select_brush) (PaintCore *paint_core);
|
GimpBrush * (* select_brush) (PaintCore *paint_core);
|
||||||
gboolean (* want_null_motion) (PaintCore *paint_core);
|
gboolean (* want_null_motion) (PaintCore *paint_core);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GIMP_BRUSH_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_brush_get_type(), GimpBrushClass)
|
|
||||||
#define GIMP_TYPE_BRUSH (gimp_brush_get_type ())
|
|
||||||
#define GIMP_BRUSH(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH, GimpBrush))
|
|
||||||
#define GIMP_IS_BRUSH(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH))
|
|
||||||
|
|
||||||
GtkType gimp_brush_get_type (void);
|
GtkType gimp_brush_get_type (void);
|
||||||
GimpBrush * gimp_brush_load (gchar *filename);
|
GimpBrush * gimp_brush_load (gchar *filename);
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
||||||
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class = NULL;
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_generated_destroy (GtkObject *object)
|
gimp_brush_generated_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -62,7 +62,7 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
||||||
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class = NULL;
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_generated_destroy (GtkObject *object)
|
gimp_brush_generated_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -62,7 +62,7 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
||||||
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class = NULL;
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_generated_destroy (GtkObject *object)
|
gimp_brush_generated_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -62,7 +62,7 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,14 @@
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
static GimpBrushClass *parent_class;
|
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
||||||
static void gimp_brush_pipe_destroy (GtkObject *object);
|
static void gimp_brush_pipe_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush *
|
static GimpBrush *
|
||||||
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
||||||
{
|
{
|
||||||
|
@ -182,8 +182,8 @@ gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpBrushClass *brush_class;
|
GimpBrushClass *brush_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
brush_class = GIMP_BRUSH_CLASS (klass);
|
brush_class = (GimpBrushClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
@ -405,5 +405,3 @@ gimp_brush_pipe_load (gchar *filename)
|
||||||
|
|
||||||
return GIMP_BRUSH (pipe);
|
return GIMP_BRUSH (pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,14 @@
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
static GimpBrushClass *parent_class;
|
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
||||||
static void gimp_brush_pipe_destroy (GtkObject *object);
|
static void gimp_brush_pipe_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush *
|
static GimpBrush *
|
||||||
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
||||||
{
|
{
|
||||||
|
@ -182,8 +182,8 @@ gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpBrushClass *brush_class;
|
GimpBrushClass *brush_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
brush_class = GIMP_BRUSH_CLASS (klass);
|
brush_class = (GimpBrushClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
@ -405,5 +405,3 @@ gimp_brush_pipe_load (gchar *filename)
|
||||||
|
|
||||||
return GIMP_BRUSH (pipe);
|
return GIMP_BRUSH (pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct _GimpBrushPipeClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_brush_pixmap_get_type (void);
|
|
||||||
GtkType gimp_brush_pipe_get_type (void);
|
GtkType gimp_brush_pipe_get_type (void);
|
||||||
|
|
||||||
GimpBrush * gimp_brush_pipe_load (gchar *filename);
|
GimpBrush * gimp_brush_pipe_load (gchar *filename);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "gdisplay.h"
|
#include "gdisplay.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "gimplut.h"
|
#include "gimplut.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
@ -95,20 +94,28 @@ gimp_channel_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_channel_class_init (GimpChannelClass *class)
|
gimp_channel_class_init (GimpChannelClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
channel_signals[REMOVED] =
|
channel_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpChannelClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
|
|
||||||
|
klass->removed = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -63,6 +63,8 @@ struct _GimpChannel
|
||||||
struct _GimpChannelClass
|
struct _GimpChannelClass
|
||||||
{
|
{
|
||||||
GimpDrawableClass parent_class;
|
GimpDrawableClass parent_class;
|
||||||
|
|
||||||
|
void (* removed) (GimpChannel *channel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "gdisplay.h"
|
#include "gdisplay.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "gimplut.h"
|
#include "gimplut.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
@ -95,20 +94,28 @@ gimp_channel_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_channel_class_init (GimpChannelClass *class)
|
gimp_channel_class_init (GimpChannelClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
channel_signals[REMOVED] =
|
channel_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpChannelClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
|
|
||||||
|
klass->removed = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -63,6 +63,8 @@ struct _GimpChannel
|
||||||
struct _GimpChannelClass
|
struct _GimpChannelClass
|
||||||
{
|
{
|
||||||
GimpDrawableClass parent_class;
|
GimpDrawableClass parent_class;
|
||||||
|
|
||||||
|
void (* removed) (GimpChannel *channel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#include "gimpbrush.h"
|
#include "gimpbrush.h"
|
||||||
#include "gimpbrushlist.h"
|
#include "gimpbrushlist.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gradient_header.h"
|
#include "gradient_header.h"
|
||||||
#include "gradient.h"
|
#include "gradient.h"
|
||||||
#include "patterns.h"
|
#include "patterns.h"
|
||||||
|
@ -421,84 +421,108 @@ gimp_context_class_init (GimpContextClass *klass)
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
parent_class = gtk_type_class (gimp_object_get_type ());
|
||||||
|
|
||||||
gimp_context_signals[IMAGE_CHANGED] =
|
gimp_context_signals[IMAGE_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[IMAGE_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[IMAGE_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
image_changed),
|
image_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[DISPLAY_CHANGED] =
|
gimp_context_signals[DISPLAY_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[DISPLAY_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[DISPLAY_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
display_changed),
|
display_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[TOOL_CHANGED] =
|
gimp_context_signals[TOOL_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[TOOL_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[TOOL_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
tool_changed),
|
tool_changed),
|
||||||
gimp_sigtype_int);
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[FOREGROUND_CHANGED] =
|
gimp_context_signals[FOREGROUND_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[FOREGROUND_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[FOREGROUND_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
foreground_changed),
|
foreground_changed),
|
||||||
gimp_sigtype_int_int_int);
|
gimp_marshal_NONE__INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 3,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[BACKGROUND_CHANGED] =
|
gimp_context_signals[BACKGROUND_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[BACKGROUND_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[BACKGROUND_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
background_changed),
|
background_changed),
|
||||||
gimp_sigtype_int_int_int);
|
gimp_marshal_NONE__INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 3,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[OPACITY_CHANGED] =
|
gimp_context_signals[OPACITY_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[OPACITY_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[OPACITY_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
opacity_changed),
|
opacity_changed),
|
||||||
gimp_sigtype_double);
|
gimp_marshal_NONE__DOUBLE,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_DOUBLE);
|
||||||
|
|
||||||
gimp_context_signals[PAINT_MODE_CHANGED] =
|
gimp_context_signals[PAINT_MODE_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[PAINT_MODE_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[PAINT_MODE_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
paint_mode_changed),
|
paint_mode_changed),
|
||||||
gimp_sigtype_int);
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[BRUSH_CHANGED] =
|
gimp_context_signals[BRUSH_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[BRUSH_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[BRUSH_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
brush_changed),
|
brush_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[PATTERN_CHANGED] =
|
gimp_context_signals[PATTERN_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[PATTERN_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[PATTERN_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
pattern_changed),
|
pattern_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[GRADIENT_CHANGED] =
|
gimp_context_signals[GRADIENT_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[GRADIENT_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[GRADIENT_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
gradient_changed),
|
gradient_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_context_signals,
|
gtk_object_class_add_signals (object_class, gimp_context_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
|
@ -57,6 +57,7 @@ static void gimp_drawable_class_init (GimpDrawableClass *klass);
|
||||||
static void gimp_drawable_init (GimpDrawable *drawable);
|
static void gimp_drawable_init (GimpDrawable *drawable);
|
||||||
static void gimp_drawable_destroy (GtkObject *object);
|
static void gimp_drawable_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
static guint gimp_drawable_signals[LAST_SIGNAL] = { 0 };
|
static guint gimp_drawable_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
@ -91,16 +92,19 @@ static void
|
||||||
gimp_drawable_class_init (GimpDrawableClass *klass)
|
gimp_drawable_class_init (GimpDrawableClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type = GIMP_TYPE_DRAWABLE;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_drawable_signals[INVALIDATE_PREVIEW] =
|
gimp_drawable_signals[INVALIDATE_PREVIEW] =
|
||||||
gimp_signal_new ("invalidate_pr", GTK_RUN_LAST, type,
|
gtk_signal_new ("invalidate_preview",
|
||||||
GTK_SIGNAL_OFFSET (GimpDrawableClass,
|
GTK_RUN_FIRST,
|
||||||
invalidate_preview),
|
object_class->type,
|
||||||
gimp_sigtype_void);
|
GTK_SIGNAL_OFFSET (GimpDrawableClass,
|
||||||
|
invalidate_preview),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_drawable_signals,
|
gtk_object_class_add_signals (object_class, gimp_drawable_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
#include "parasitelist.h"
|
#include "parasitelist.h"
|
||||||
#include "undo.h"
|
#include "undo.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "tile_manager.h"
|
#include "tile_manager.h"
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
|
@ -82,12 +81,13 @@ static guint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
gimp_layer_get_type (void)
|
gimp_layer_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_type = 0;
|
static GtkType layer_type = 0;
|
||||||
|
|
||||||
if (!layer_type)
|
if (! layer_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_info =
|
GtkTypeInfo layer_info =
|
||||||
{
|
{
|
||||||
|
@ -113,14 +113,19 @@ gimp_layer_class_init (GimpLayerClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpDrawableClass *drawable_class;
|
GimpDrawableClass *drawable_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) klass;
|
object_class = (GtkObjectClass *) klass;
|
||||||
drawable_class = (GimpDrawableClass *) klass;
|
drawable_class = (GimpDrawableClass *) klass;
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
layer_signals[REMOVED] =
|
layer_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpLayerClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -141,7 +146,7 @@ gimp_layer_mask_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_mask_type = 0;
|
static GtkType layer_mask_type = 0;
|
||||||
|
|
||||||
if (!layer_mask_type)
|
if (! layer_mask_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_mask_info =
|
GtkTypeInfo layer_mask_info =
|
||||||
{
|
{
|
||||||
|
@ -167,8 +172,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
|
||||||
|
layer_mask_parent_class = gtk_type_class (GIMP_TYPE_CHANNEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimplist.h"
|
#include "gimplist.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,23 +73,35 @@ gimp_list_init (GimpList *list)
|
||||||
static void
|
static void
|
||||||
gimp_list_class_init (GimpListClass *klass)
|
gimp_list_class_init (GimpListClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
|
GtkObjectClass *object_class;
|
||||||
GtkType type = object_class->type;
|
|
||||||
|
|
||||||
parent_class = gtk_type_parent_class (type);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
object_class->destroy = gimp_list_destroy;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_list_signals[ADD]=
|
gimp_list_signals[ADD]=
|
||||||
gimp_signal_new ("add", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("add",
|
||||||
gimp_sigtype_pointer);
|
GTK_RUN_FIRST,
|
||||||
gimp_list_signals[REMOVE]=
|
object_class->type,
|
||||||
gimp_signal_new ("remove", GTK_RUN_FIRST, type, 0,
|
GTK_SIGNAL_OFFSET (GimpListClass,
|
||||||
gimp_sigtype_pointer);
|
add),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class,
|
gimp_list_signals[REMOVE]=
|
||||||
gimp_list_signals,
|
gtk_signal_new ("remove",
|
||||||
LAST_SIGNAL);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpListClass,
|
||||||
|
remove),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, gimp_list_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
object_class->destroy = gimp_list_destroy;
|
||||||
|
|
||||||
klass->add = gimp_list_add_func;
|
klass->add = gimp_list_add_func;
|
||||||
klass->remove = gimp_list_remove_func;
|
klass->remove = gimp_list_remove_func;
|
||||||
|
@ -99,16 +110,26 @@ gimp_list_class_init (GimpListClass *klass)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_list_get_type (void)
|
gimp_list_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType list_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! list_type)
|
||||||
GimpList,
|
{
|
||||||
GimpListClass,
|
GtkTypeInfo list_info =
|
||||||
gimp_list_init,
|
{
|
||||||
gimp_list_class_init,
|
"GimpList",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpList),
|
||||||
|
sizeof (GimpListClass),
|
||||||
|
(GtkClassInitFunc) gimp_list_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_list_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL
|
||||||
|
};
|
||||||
|
|
||||||
return type;
|
list_type = gtk_type_unique (GIMP_TYPE_OBJECT, &list_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
GimpList *
|
GimpList *
|
||||||
|
@ -117,7 +138,7 @@ gimp_list_new (GtkType type,
|
||||||
{
|
{
|
||||||
GimpList *list;
|
GimpList *list;
|
||||||
|
|
||||||
list = gtk_type_new (gimp_list_get_type ());
|
list = gtk_type_new (GIMP_TYPE_LIST);
|
||||||
|
|
||||||
list->type = type;
|
list->type = type;
|
||||||
list->weak = weak;
|
list->weak = weak;
|
||||||
|
@ -172,9 +193,7 @@ gimp_list_add (GimpList *list,
|
||||||
gtk_object_sink (GTK_OBJECT (object));
|
gtk_object_sink (GTK_OBJECT (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
GIMP_LIST_CLASS (GTK_OBJECT (list)->klass)->add (list, object);
|
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[ADD], object);
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT(list), gimp_list_signals[ADD], object);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -191,8 +210,6 @@ gimp_list_remove (GimpList *list,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GIMP_LIST_CLASS (GTK_OBJECT (list)->klass)->remove (list, object);
|
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[REMOVE], object);
|
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[REMOVE], object);
|
||||||
|
|
||||||
if (list->weak)
|
if (list->weak)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
|
|
||||||
|
|
||||||
/* GimpList - a typed list of objects with signals for adding and
|
/* GimpList - a typed list of objects with signals for adding and
|
||||||
* removing of stuff. If it is weak, destroyed objects get removed
|
* removing of stuff. If it is weak, destroyed objects get removed
|
||||||
* automatically. If it is not, it refs them so they won't be freed
|
* automatically. If it is not, it refs them so they won't be freed
|
||||||
|
@ -29,28 +30,32 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_LIST gimp_list_get_type ()
|
#define GIMP_TYPE_LIST (gimp_list_get_type ())
|
||||||
#define GIMP_LIST(obj) GTK_CHECK_CAST (obj, GIMP_TYPE_LIST, GimpList)
|
#define GIMP_LIST(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LIST, GimpList))
|
||||||
#define GIMP_IS_LIST(obj) GTK_CHECK_TYPE (obj, gimp_list_get_type())
|
#define GIMP_IS_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LIST))
|
||||||
#define GIMP_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_list_get_type(), GimpListClass)
|
#define GIMP_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LIST, GimpListClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpListClass GimpListClass;
|
||||||
|
|
||||||
struct _GimpList
|
struct _GimpList
|
||||||
{
|
{
|
||||||
GimpObject gobject;
|
GimpObject gobject;
|
||||||
GtkType type;
|
|
||||||
GSList* list;
|
GtkType type;
|
||||||
gboolean weak;
|
GSList *list;
|
||||||
|
gboolean weak;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpListClass
|
struct _GimpListClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
void (* add) (GimpList *list, void *data);
|
|
||||||
void (* remove) (GimpList *list, void *data);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct _GimpListClass GimpListClass;
|
void (* add) (GimpList *list,
|
||||||
|
gpointer object);
|
||||||
|
void (* remove) (GimpList *list,
|
||||||
|
gpointer object);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_list_get_type (void);
|
GtkType gimp_list_get_type (void);
|
||||||
|
@ -68,7 +73,6 @@ gboolean gimp_list_have (GimpList *list,
|
||||||
void gimp_list_foreach (GimpList *list,
|
void gimp_list_foreach (GimpList *list,
|
||||||
GFunc func,
|
GFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
gint gimp_list_size (GimpList *list);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_LIST_H__ */
|
#endif /* __GIMP_LIST_H__ */
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
/* 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 <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "gimpmarshal.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__INT_INT_INT_INT) (GtkObject *object,
|
||||||
|
gint arg1,
|
||||||
|
gint arg2,
|
||||||
|
gint arg3,
|
||||||
|
gint arg4,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__INT_INT_INT_INT) func) (object,
|
||||||
|
GTK_VALUE_INT (args[0]),
|
||||||
|
GTK_VALUE_INT (args[1]),
|
||||||
|
GTK_VALUE_INT (args[2]),
|
||||||
|
GTK_VALUE_INT (args[3]),
|
||||||
|
func_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__INT_INT_INT) (GtkObject *object,
|
||||||
|
gint arg1,
|
||||||
|
gint arg2,
|
||||||
|
gint arg3,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__INT_INT_INT) func) (object,
|
||||||
|
GTK_VALUE_INT (args[0]),
|
||||||
|
GTK_VALUE_INT (args[1]),
|
||||||
|
GTK_VALUE_INT (args[2]),
|
||||||
|
func_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__DOUBLE) (GtkObject *object,
|
||||||
|
gdouble arg1,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__DOUBLE (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__DOUBLE) func) (object,
|
||||||
|
GTK_VALUE_DOUBLE (args[0]),
|
||||||
|
func_data);
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/* 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_MARSHAL_H__
|
||||||
|
#define __GIMP_MARSHAL_H__
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__INT_INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__DOUBLE (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GIMP_MARSHAL_H__ */
|
|
@ -38,14 +38,24 @@ gimp_object_class_init (GimpObjectClass *klass)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_object_get_type (void)
|
gimp_object_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type = 0;
|
static GtkType object_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! object_type)
|
||||||
GimpObject,
|
{
|
||||||
GimpObjectClass,
|
GtkTypeInfo object_info =
|
||||||
gimp_object_init,
|
{
|
||||||
gimp_object_class_init,
|
"GimpObject",
|
||||||
GTK_TYPE_OBJECT);
|
sizeof (GimpObject),
|
||||||
|
sizeof (GimpObjectClass),
|
||||||
|
(GtkClassInitFunc) gimp_object_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_object_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
return type;
|
object_type = gtk_type_unique (GTK_TYPE_OBJECT, &object_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return object_type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OBJECT (gimp_object_get_type ())
|
#define GIMP_TYPE_OBJECT (gimp_object_get_type ())
|
||||||
#define GIMP_OBJECT(obj) (GTK_CHECK_CAST (obj, GIMP_TYPE_OBJECT, GimpObject))
|
#define GIMP_OBJECT(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_OBJECT, GimpObject))
|
||||||
#define GIMP_IS_OBJECT(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_OBJECT))
|
#define GIMP_IS_OBJECT(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_OBJECT))
|
||||||
#define GIMP_OBJECT_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, GIMP_TYPE_OBJECT, GimpObjectClass))
|
#define GIMP_OBJECT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OBJECT, GimpObjectClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpObjectClass GimpObjectClass;
|
typedef struct _GimpObjectClass GimpObjectClass;
|
||||||
|
@ -42,19 +42,7 @@ struct _GimpObjectClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_INIT(typevar, obtype, classtype, obinit, classinit, parent) \
|
GtkType gimp_object_get_type (void);
|
||||||
if(!typevar){ \
|
|
||||||
GtkTypeInfo _info={#obtype, \
|
|
||||||
sizeof(obtype), \
|
|
||||||
sizeof(classtype), \
|
|
||||||
(GtkClassInitFunc)classinit, \
|
|
||||||
(GtkObjectInitFunc)obinit, \
|
|
||||||
NULL, NULL, NULL}; \
|
|
||||||
typevar=gtk_type_unique(parent, &_info); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_object_get_type (void);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_OBJECT_H__ */
|
#endif /* __GIMP_OBJECT_H__ */
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "parasitelist.h"
|
#include "parasitelist.h"
|
||||||
|
|
||||||
#include "libgimp/gimpparasite.h"
|
#include "libgimp/gimpparasite.h"
|
||||||
|
@ -36,14 +35,17 @@ enum
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint parasite_list_signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static void parasite_list_destroy (GtkObject *list);
|
static void parasite_list_destroy (GtkObject *list);
|
||||||
static void parasite_list_init (ParasiteList *list);
|
static void parasite_list_init (ParasiteList *list);
|
||||||
static void parasite_list_class_init (ParasiteListClass *klass);
|
static void parasite_list_class_init (ParasiteListClass *klass);
|
||||||
static int free_a_parasite (void *key,
|
static int free_a_parasite (gpointer key,
|
||||||
void *parasite,
|
gpointer parasite,
|
||||||
void *unused);
|
gpointer unused);
|
||||||
|
|
||||||
|
|
||||||
|
static guint parasite_list_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parasite_list_init (ParasiteList *list)
|
parasite_list_init (ParasiteList *list)
|
||||||
|
@ -54,17 +56,37 @@ parasite_list_init (ParasiteList *list)
|
||||||
static void
|
static void
|
||||||
parasite_list_class_init (ParasiteListClass *klass)
|
parasite_list_class_init (ParasiteListClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *class = GTK_OBJECT_CLASS (klass);
|
GtkObjectClass *object_class;
|
||||||
GtkType type = class->type;
|
|
||||||
|
|
||||||
class->destroy = parasite_list_destroy;
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parasite_list_signals[ADD] =
|
parasite_list_signals[ADD] =
|
||||||
gimp_signal_new ("add", GTK_RUN_FIRST, type, 0, gimp_sigtype_pointer);
|
gtk_signal_new ("add",
|
||||||
parasite_list_signals[REMOVE] =
|
GTK_RUN_FIRST,
|
||||||
gimp_signal_new ("remove", GTK_RUN_FIRST, type, 0, gimp_sigtype_pointer);
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ParasiteListClass,
|
||||||
|
add),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (class, parasite_list_signals, LAST_SIGNAL);
|
parasite_list_signals[REMOVE] =
|
||||||
|
gtk_signal_new ("remove",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ParasiteListClass,
|
||||||
|
remove),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, parasite_list_signals,
|
||||||
|
LAST_SIGNAL);
|
||||||
|
|
||||||
|
object_class->destroy = parasite_list_destroy;
|
||||||
|
|
||||||
|
klass->add = NULL;
|
||||||
|
klass->remove = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -72,7 +94,7 @@ parasite_list_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type = 0;
|
static GtkType type = 0;
|
||||||
|
|
||||||
if (!type)
|
if (! type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo info =
|
GtkTypeInfo info =
|
||||||
{
|
{
|
||||||
|
@ -85,8 +107,10 @@ parasite_list_get_type (void)
|
||||||
NULL,
|
NULL,
|
||||||
(GtkClassInitFunc) NULL
|
(GtkClassInitFunc) NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
type = gtk_type_unique (GIMP_TYPE_OBJECT, &info);
|
type = gtk_type_unique (GIMP_TYPE_OBJECT, &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
#define GIMP_IS_PARASITE_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PARASITE_LIST))
|
#define GIMP_IS_PARASITE_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PARASITE_LIST))
|
||||||
#define PARASITE_LIST_CLASS(class) GIMP_CHECK_CLASS_CAST (class, parasite_list_get_type(), ParasiteListClass)
|
#define PARASITE_LIST_CLASS(class) GIMP_CHECK_CLASS_CAST (class, parasite_list_get_type(), ParasiteListClass)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _ParasiteListClass ParasiteListClass;
|
||||||
|
|
||||||
struct _ParasiteList
|
struct _ParasiteList
|
||||||
{
|
{
|
||||||
GimpObject object;
|
GimpObject object;
|
||||||
|
@ -34,7 +37,7 @@ struct _ParasiteList
|
||||||
GHashTable *table;
|
GHashTable *table;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _ParasiteListClass
|
struct _ParasiteListClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
|
|
||||||
|
@ -42,7 +45,7 @@ typedef struct _ParasiteListClass
|
||||||
GimpParasite *parasite);
|
GimpParasite *parasite);
|
||||||
void (* remove) (ParasiteList *list,
|
void (* remove) (ParasiteList *list,
|
||||||
GimpParasite *parasite);
|
GimpParasite *parasite);
|
||||||
} ParasiteListClass;
|
};
|
||||||
|
|
||||||
|
|
||||||
/* function declarations */
|
/* function declarations */
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "appenv.h"
|
#include "appenv.h"
|
||||||
#include "module_db.h"
|
#include "module_db.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "datafiles.h"
|
#include "datafiles.h"
|
||||||
#include "gimpset.h"
|
#include "gimpset.h"
|
||||||
|
@ -397,6 +396,8 @@ module_db_browser_new (void)
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkObjectClass parent_class;
|
GtkObjectClass parent_class;
|
||||||
|
|
||||||
|
void (* modified) (ModuleInfo *module_info);
|
||||||
} ModuleInfoClass;
|
} ModuleInfoClass;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -424,18 +425,23 @@ static void
|
||||||
module_info_class_init (ModuleInfoClass *klass)
|
module_info_class_init (ModuleInfoClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
type = object_class->type;
|
module_info_signals[MODIFIED] =
|
||||||
|
gtk_signal_new ("modified",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ModuleInfoClass,
|
||||||
|
modified),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = module_info_destroy;
|
object_class->destroy = module_info_destroy;
|
||||||
|
|
||||||
module_info_signals[MODIFIED] =
|
klass->modified = NULL;
|
||||||
gimp_signal_new ("modified", 0, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -45,19 +45,17 @@
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "brush_header.h"
|
#include "brush_header.h"
|
||||||
#include "patterns.h"
|
|
||||||
#include "pattern_header.h"
|
|
||||||
#include "gimpbrush.h"
|
#include "gimpbrush.h"
|
||||||
#include "gimpbrushlist.h"
|
#include "gimpbrushlist.h"
|
||||||
|
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
|
#include "patterns.h"
|
||||||
|
#include "pattern_header.h"
|
||||||
#include "paint_core.h"
|
#include "paint_core.h"
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
|
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DIRTY,
|
DIRTY,
|
||||||
|
@ -68,9 +66,11 @@ enum
|
||||||
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_want_null_motion (PaintCore *paint_core);
|
||||||
|
|
||||||
static guint gimp_brush_signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class;
|
static guint gimp_brush_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
static GimpObjectClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_destroy (GtkObject *object)
|
gimp_brush_destroy (GtkObject *object)
|
||||||
|
@ -91,26 +91,38 @@ static void
|
||||||
gimp_brush_class_init (GimpBrushClass *klass)
|
gimp_brush_class_init (GimpBrushClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
type = object_class->type;
|
gimp_brush_signals[DIRTY] =
|
||||||
|
gtk_signal_new ("dirty",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gimp_brush_signals[RENAME] =
|
||||||
|
gtk_signal_new ("rename",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpBrushClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_brush_destroy;
|
object_class->destroy = gimp_brush_destroy;
|
||||||
|
|
||||||
klass->select_brush = gimp_brush_select_brush;
|
klass->dirty = NULL;
|
||||||
|
klass->rename = NULL;
|
||||||
|
|
||||||
|
klass->select_brush = gimp_brush_select_brush;
|
||||||
klass->want_null_motion = gimp_brush_want_null_motion;
|
klass->want_null_motion = gimp_brush_want_null_motion;
|
||||||
|
|
||||||
gimp_brush_signals[DIRTY] =
|
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gimp_brush_signals[RENAME] =
|
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_brush_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -23,7 +23,13 @@
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpBrushClass GimpBrushClass;
|
#define GIMP_TYPE_BRUSH (gimp_brush_get_type ())
|
||||||
|
#define GIMP_BRUSH(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH, GimpBrush))
|
||||||
|
#define GIMP_IS_BRUSH(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH))
|
||||||
|
#define GIMP_BRUSH_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gimp_brush_get_type(), GimpBrushClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpBrushClass GimpBrushClass;
|
||||||
|
|
||||||
struct _GimpBrush
|
struct _GimpBrush
|
||||||
{
|
{
|
||||||
|
@ -42,14 +48,14 @@ struct _GimpBrushClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
|
|
||||||
|
void (* dirty) (GimpBrush *brush);
|
||||||
|
void (* rename) (GimpBrush *brush);
|
||||||
|
|
||||||
|
/* FIXME: these are no virtual function pointers but bad hacks: */
|
||||||
GimpBrush * (* select_brush) (PaintCore *paint_core);
|
GimpBrush * (* select_brush) (PaintCore *paint_core);
|
||||||
gboolean (* want_null_motion) (PaintCore *paint_core);
|
gboolean (* want_null_motion) (PaintCore *paint_core);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GIMP_BRUSH_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_brush_get_type(), GimpBrushClass)
|
|
||||||
#define GIMP_TYPE_BRUSH (gimp_brush_get_type ())
|
|
||||||
#define GIMP_BRUSH(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH, GimpBrush))
|
|
||||||
#define GIMP_IS_BRUSH(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH))
|
|
||||||
|
|
||||||
GtkType gimp_brush_get_type (void);
|
GtkType gimp_brush_get_type (void);
|
||||||
GimpBrush * gimp_brush_load (gchar *filename);
|
GimpBrush * gimp_brush_load (gchar *filename);
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
static void gimp_brush_generated_generate (GimpBrushGenerated *brush);
|
||||||
|
|
||||||
|
|
||||||
static GimpObjectClass *parent_class = NULL;
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_brush_generated_destroy (GtkObject *object)
|
gimp_brush_generated_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||||
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -62,7 +62,7 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ static gint brush_compare_func (gconstpointer first,
|
||||||
|
|
||||||
|
|
||||||
/* class functions */
|
/* class functions */
|
||||||
static GimpObjectClass* parent_class = NULL;
|
static GimpListClass* parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -91,11 +91,12 @@ gimp_brush_list_class_init (GimpBrushListClass *klass)
|
||||||
{
|
{
|
||||||
GimpListClass *gimp_list_class;
|
GimpListClass *gimp_list_class;
|
||||||
|
|
||||||
gimp_list_class = GIMP_LIST_CLASS (klass);
|
gimp_list_class = (GimpListClass *) klass;
|
||||||
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_LIST);
|
||||||
|
|
||||||
gimp_list_class->add = gimp_brush_list_add_func;
|
gimp_list_class->add = gimp_brush_list_add_func;
|
||||||
gimp_list_class->remove = gimp_brush_list_remove_func;
|
gimp_list_class->remove = gimp_brush_list_remove_func;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gimp_list_get_type ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -123,7 +124,7 @@ gimp_brush_list_get_type (void)
|
||||||
(GtkClassInitFunc) NULL
|
(GtkClassInitFunc) NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
type = gtk_type_unique (gimp_list_get_type (), &info);
|
type = gtk_type_unique (GIMP_TYPE_LIST, &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
|
@ -134,7 +135,7 @@ gimp_brush_list_new (void)
|
||||||
{
|
{
|
||||||
GimpBrushList *list;
|
GimpBrushList *list;
|
||||||
|
|
||||||
list = GIMP_BRUSH_LIST (gtk_type_new (gimp_brush_list_get_type ()));
|
list = GIMP_BRUSH_LIST (gtk_type_new (GIMP_TYPE_BRUSH_LIST));
|
||||||
|
|
||||||
GIMP_LIST (list)->type = GIMP_TYPE_BRUSH;
|
GIMP_LIST (list)->type = GIMP_TYPE_BRUSH;
|
||||||
GIMP_LIST (list)->weak = FALSE;
|
GIMP_LIST (list)->weak = FALSE;
|
||||||
|
@ -309,15 +310,6 @@ brushes_free (void)
|
||||||
g_free (vbr_dir);
|
g_free (vbr_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static GSList *
|
|
||||||
insert_brush_in_list (GSList *list,
|
|
||||||
GimpBrush *brush)
|
|
||||||
{
|
|
||||||
return g_slist_insert_sorted (list, brush, brush_compare_func);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
gint
|
gint
|
||||||
gimp_brush_list_get_brush_index (GimpBrushList *brush_list,
|
gimp_brush_list_get_brush_index (GimpBrushList *brush_list,
|
||||||
GimpBrush *brush)
|
GimpBrush *brush)
|
||||||
|
@ -331,7 +323,7 @@ gimp_brush_list_get_brush_by_index (GimpBrushList *brush_list,
|
||||||
gint index)
|
gint index)
|
||||||
{
|
{
|
||||||
GimpBrush *brush = NULL;
|
GimpBrush *brush = NULL;
|
||||||
GSList *list;
|
GSList *list;
|
||||||
|
|
||||||
/* FIXME: make a gimp_list function that does this? */
|
/* FIXME: make a gimp_list function that does this? */
|
||||||
list = g_slist_nth (GIMP_LIST (brush_list)->list, index);
|
list = g_slist_nth (GIMP_LIST (brush_list)->list, index);
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
#define GIMP_TYPE_BRUSH_LIST (gimp_brush_list_get_type ())
|
#define GIMP_TYPE_BRUSH_LIST (gimp_brush_list_get_type ())
|
||||||
#define GIMP_BRUSH_LIST(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH_LIST, GimpBrushList))
|
#define GIMP_BRUSH_LIST(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_BRUSH_LIST, GimpBrushList))
|
||||||
#define GIMP_IS_BRUSH_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH_LIST))
|
#define GIMP_IS_BRUSH_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH_LIST))
|
||||||
#define GIMP_BRUSH_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gimp_brush_list_get_type(), GimpBrushListClass))
|
#define GIMP_BRUSH_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, GIMP_TYPE_BRUSH_LIST, GimpBrushListClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpBrushListClass GimpBrushListClass;
|
typedef struct _GimpBrushListClass GimpBrushListClass;
|
||||||
|
|
||||||
|
|
|
@ -56,14 +56,14 @@
|
||||||
#include "libgimp/gimpintl.h"
|
#include "libgimp/gimpintl.h"
|
||||||
|
|
||||||
|
|
||||||
static GimpBrushClass *parent_class;
|
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
static GimpBrush * gimp_brush_pipe_select_brush (PaintCore *paint_core);
|
||||||
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
static gboolean gimp_brush_pipe_want_null_motion (PaintCore *paint_core);
|
||||||
static void gimp_brush_pipe_destroy (GtkObject *object);
|
static void gimp_brush_pipe_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
static GimpBrushClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static GimpBrush *
|
static GimpBrush *
|
||||||
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
gimp_brush_pipe_select_brush (PaintCore *paint_core)
|
||||||
{
|
{
|
||||||
|
@ -182,8 +182,8 @@ gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpBrushClass *brush_class;
|
GimpBrushClass *brush_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
brush_class = GIMP_BRUSH_CLASS (klass);
|
brush_class = (GimpBrushClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
parent_class = gtk_type_class (GIMP_TYPE_BRUSH);
|
||||||
|
|
||||||
|
@ -405,5 +405,3 @@ gimp_brush_pipe_load (gchar *filename)
|
||||||
|
|
||||||
return GIMP_BRUSH (pipe);
|
return GIMP_BRUSH (pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ struct _GimpBrushPipeClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_brush_pixmap_get_type (void);
|
|
||||||
GtkType gimp_brush_pipe_get_type (void);
|
GtkType gimp_brush_pipe_get_type (void);
|
||||||
|
|
||||||
GimpBrush * gimp_brush_pipe_load (gchar *filename);
|
GimpBrush * gimp_brush_pipe_load (gchar *filename);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include "gdisplay.h"
|
#include "gdisplay.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "gimplut.h"
|
#include "gimplut.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
|
@ -95,20 +94,28 @@ gimp_channel_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_channel_class_init (GimpChannelClass *class)
|
gimp_channel_class_init (GimpChannelClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_drawable_get_type ());
|
|
||||||
|
parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
channel_signals[REMOVED] =
|
channel_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpChannelClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, channel_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = gimp_channel_destroy;
|
object_class->destroy = gimp_channel_destroy;
|
||||||
|
|
||||||
|
klass->removed = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -63,6 +63,8 @@ struct _GimpChannel
|
||||||
struct _GimpChannelClass
|
struct _GimpChannelClass
|
||||||
{
|
{
|
||||||
GimpDrawableClass parent_class;
|
GimpDrawableClass parent_class;
|
||||||
|
|
||||||
|
void (* removed) (GimpChannel *channel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#include "gimpbrush.h"
|
#include "gimpbrush.h"
|
||||||
#include "gimpbrushlist.h"
|
#include "gimpbrushlist.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gradient_header.h"
|
#include "gradient_header.h"
|
||||||
#include "gradient.h"
|
#include "gradient.h"
|
||||||
#include "patterns.h"
|
#include "patterns.h"
|
||||||
|
@ -421,84 +421,108 @@ gimp_context_class_init (GimpContextClass *klass)
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
parent_class = gtk_type_class (gimp_object_get_type ());
|
||||||
|
|
||||||
gimp_context_signals[IMAGE_CHANGED] =
|
gimp_context_signals[IMAGE_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[IMAGE_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[IMAGE_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
image_changed),
|
image_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[DISPLAY_CHANGED] =
|
gimp_context_signals[DISPLAY_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[DISPLAY_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[DISPLAY_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
display_changed),
|
display_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[TOOL_CHANGED] =
|
gimp_context_signals[TOOL_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[TOOL_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[TOOL_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
tool_changed),
|
tool_changed),
|
||||||
gimp_sigtype_int);
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[FOREGROUND_CHANGED] =
|
gimp_context_signals[FOREGROUND_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[FOREGROUND_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[FOREGROUND_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
foreground_changed),
|
foreground_changed),
|
||||||
gimp_sigtype_int_int_int);
|
gimp_marshal_NONE__INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 3,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[BACKGROUND_CHANGED] =
|
gimp_context_signals[BACKGROUND_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[BACKGROUND_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[BACKGROUND_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
background_changed),
|
background_changed),
|
||||||
gimp_sigtype_int_int_int);
|
gimp_marshal_NONE__INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 3,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[OPACITY_CHANGED] =
|
gimp_context_signals[OPACITY_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[OPACITY_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[OPACITY_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
opacity_changed),
|
opacity_changed),
|
||||||
gimp_sigtype_double);
|
gimp_marshal_NONE__DOUBLE,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_DOUBLE);
|
||||||
|
|
||||||
gimp_context_signals[PAINT_MODE_CHANGED] =
|
gimp_context_signals[PAINT_MODE_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[PAINT_MODE_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[PAINT_MODE_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
paint_mode_changed),
|
paint_mode_changed),
|
||||||
gimp_sigtype_int);
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_context_signals[BRUSH_CHANGED] =
|
gimp_context_signals[BRUSH_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[BRUSH_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[BRUSH_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
brush_changed),
|
brush_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[PATTERN_CHANGED] =
|
gimp_context_signals[PATTERN_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[PATTERN_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[PATTERN_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
pattern_changed),
|
pattern_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_context_signals[GRADIENT_CHANGED] =
|
gimp_context_signals[GRADIENT_CHANGED] =
|
||||||
gimp_signal_new (gimp_context_signal_names[GRADIENT_CHANGED],
|
gtk_signal_new (gimp_context_signal_names[GRADIENT_CHANGED],
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpContextClass,
|
GTK_SIGNAL_OFFSET (GimpContextClass,
|
||||||
gradient_changed),
|
gradient_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_context_signals,
|
gtk_object_class_add_signals (object_class, gimp_context_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
|
@ -57,6 +57,7 @@ static void gimp_drawable_class_init (GimpDrawableClass *klass);
|
||||||
static void gimp_drawable_init (GimpDrawable *drawable);
|
static void gimp_drawable_init (GimpDrawable *drawable);
|
||||||
static void gimp_drawable_destroy (GtkObject *object);
|
static void gimp_drawable_destroy (GtkObject *object);
|
||||||
|
|
||||||
|
|
||||||
static guint gimp_drawable_signals[LAST_SIGNAL] = { 0 };
|
static guint gimp_drawable_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GimpDrawableClass *parent_class = NULL;
|
static GimpDrawableClass *parent_class = NULL;
|
||||||
|
@ -91,16 +92,19 @@ static void
|
||||||
gimp_drawable_class_init (GimpDrawableClass *klass)
|
gimp_drawable_class_init (GimpDrawableClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type = GIMP_TYPE_DRAWABLE;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_drawable_signals[INVALIDATE_PREVIEW] =
|
gimp_drawable_signals[INVALIDATE_PREVIEW] =
|
||||||
gimp_signal_new ("invalidate_pr", GTK_RUN_LAST, type,
|
gtk_signal_new ("invalidate_preview",
|
||||||
GTK_SIGNAL_OFFSET (GimpDrawableClass,
|
GTK_RUN_FIRST,
|
||||||
invalidate_preview),
|
object_class->type,
|
||||||
gimp_sigtype_void);
|
GTK_SIGNAL_OFFSET (GimpDrawableClass,
|
||||||
|
invalidate_preview),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_drawable_signals,
|
gtk_object_class_add_signals (object_class, gimp_drawable_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
120
app/gimpimage.c
120
app/gimpimage.c
|
@ -32,8 +32,8 @@
|
||||||
#include "gimage_mask.h"
|
#include "gimage_mask.h"
|
||||||
#include "gimpcontext.h"
|
#include "gimpcontext.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
#include "gimpmarshal.h"
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimpparasite.h"
|
#include "gimpparasite.h"
|
||||||
#include "layer.h"
|
#include "layer.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
|
@ -162,37 +162,88 @@ static void
|
||||||
gimp_image_class_init (GimpImageClass *klass)
|
gimp_image_class_init (GimpImageClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
|
||||||
|
|
||||||
type = object_class->type;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_image_signals[CLEAN] =
|
gimp_image_signals[CLEAN] =
|
||||||
gimp_signal_new ("clean", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("clean",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
clean),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[DIRTY] =
|
gimp_image_signals[DIRTY] =
|
||||||
gimp_signal_new ("dirty", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("dirty",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
dirty),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[REPAINT] =
|
gimp_image_signals[REPAINT] =
|
||||||
gimp_signal_new ("repaint", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("repaint",
|
||||||
gimp_sigtype_int_int_int_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
repaint),
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT,
|
||||||
|
GTK_TYPE_NONE, 4,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[RENAME] =
|
gimp_image_signals[RENAME] =
|
||||||
gimp_signal_new ("rename", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("rename",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
rename),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESIZE] =
|
gimp_image_signals[RESIZE] =
|
||||||
gimp_signal_new ("resize", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("resize",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
resize),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[RESTRUCTURE] =
|
gimp_image_signals[RESTRUCTURE] =
|
||||||
gimp_signal_new ("restructure", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("restructure",
|
||||||
gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
restructure),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gimp_image_signals[COLORMAP_CHANGED] =
|
gimp_image_signals[COLORMAP_CHANGED] =
|
||||||
gimp_signal_new ("colormap_changed", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("colormap_changed",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
colormap_changed),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gimp_image_signals[UNDO_EVENT] =
|
gimp_image_signals[UNDO_EVENT] =
|
||||||
gimp_signal_new ("undo_event", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("undo_event",
|
||||||
gimp_sigtype_int);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpImageClass,
|
||||||
|
undo_event),
|
||||||
|
gtk_marshal_NONE__INT,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_INT);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_image_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -250,15 +301,26 @@ gimp_image_init (GimpImage *gimage)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_image_get_type (void)
|
gimp_image_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType image_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! image_type)
|
||||||
GimpImage,
|
{
|
||||||
GimpImageClass,
|
GtkTypeInfo image_info =
|
||||||
gimp_image_init,
|
{
|
||||||
gimp_image_class_init,
|
"GimpImage",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpImage),
|
||||||
return type;
|
sizeof (GimpImageClass),
|
||||||
|
(GtkClassInitFunc) gimp_image_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_image_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
image_type = gtk_type_unique (GIMP_TYPE_OBJECT, &image_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return image_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
#include "parasitelist.h"
|
#include "parasitelist.h"
|
||||||
#include "undo.h"
|
#include "undo.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "tile_manager.h"
|
#include "tile_manager.h"
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
|
@ -82,12 +81,13 @@ static guint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
gimp_layer_get_type (void)
|
gimp_layer_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_type = 0;
|
static GtkType layer_type = 0;
|
||||||
|
|
||||||
if (!layer_type)
|
if (! layer_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_info =
|
GtkTypeInfo layer_info =
|
||||||
{
|
{
|
||||||
|
@ -113,14 +113,19 @@ gimp_layer_class_init (GimpLayerClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpDrawableClass *drawable_class;
|
GimpDrawableClass *drawable_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) klass;
|
object_class = (GtkObjectClass *) klass;
|
||||||
drawable_class = (GimpDrawableClass *) klass;
|
drawable_class = (GimpDrawableClass *) klass;
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
layer_signals[REMOVED] =
|
layer_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpLayerClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -141,7 +146,7 @@ gimp_layer_mask_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_mask_type = 0;
|
static GtkType layer_mask_type = 0;
|
||||||
|
|
||||||
if (!layer_mask_type)
|
if (! layer_mask_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_mask_info =
|
GtkTypeInfo layer_mask_info =
|
||||||
{
|
{
|
||||||
|
@ -167,8 +172,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
|
||||||
|
layer_mask_parent_class = gtk_type_class (GIMP_TYPE_CHANNEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimplist.h"
|
#include "gimplist.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,23 +73,35 @@ gimp_list_init (GimpList *list)
|
||||||
static void
|
static void
|
||||||
gimp_list_class_init (GimpListClass *klass)
|
gimp_list_class_init (GimpListClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
|
GtkObjectClass *object_class;
|
||||||
GtkType type = object_class->type;
|
|
||||||
|
|
||||||
parent_class = gtk_type_parent_class (type);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
object_class->destroy = gimp_list_destroy;
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_list_signals[ADD]=
|
gimp_list_signals[ADD]=
|
||||||
gimp_signal_new ("add", GTK_RUN_FIRST, type, 0,
|
gtk_signal_new ("add",
|
||||||
gimp_sigtype_pointer);
|
GTK_RUN_FIRST,
|
||||||
gimp_list_signals[REMOVE]=
|
object_class->type,
|
||||||
gimp_signal_new ("remove", GTK_RUN_FIRST, type, 0,
|
GTK_SIGNAL_OFFSET (GimpListClass,
|
||||||
gimp_sigtype_pointer);
|
add),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class,
|
gimp_list_signals[REMOVE]=
|
||||||
gimp_list_signals,
|
gtk_signal_new ("remove",
|
||||||
LAST_SIGNAL);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpListClass,
|
||||||
|
remove),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, gimp_list_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
object_class->destroy = gimp_list_destroy;
|
||||||
|
|
||||||
klass->add = gimp_list_add_func;
|
klass->add = gimp_list_add_func;
|
||||||
klass->remove = gimp_list_remove_func;
|
klass->remove = gimp_list_remove_func;
|
||||||
|
@ -99,16 +110,26 @@ gimp_list_class_init (GimpListClass *klass)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_list_get_type (void)
|
gimp_list_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type;
|
static GtkType list_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! list_type)
|
||||||
GimpList,
|
{
|
||||||
GimpListClass,
|
GtkTypeInfo list_info =
|
||||||
gimp_list_init,
|
{
|
||||||
gimp_list_class_init,
|
"GimpList",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpList),
|
||||||
|
sizeof (GimpListClass),
|
||||||
|
(GtkClassInitFunc) gimp_list_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_list_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL
|
||||||
|
};
|
||||||
|
|
||||||
return type;
|
list_type = gtk_type_unique (GIMP_TYPE_OBJECT, &list_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
GimpList *
|
GimpList *
|
||||||
|
@ -117,7 +138,7 @@ gimp_list_new (GtkType type,
|
||||||
{
|
{
|
||||||
GimpList *list;
|
GimpList *list;
|
||||||
|
|
||||||
list = gtk_type_new (gimp_list_get_type ());
|
list = gtk_type_new (GIMP_TYPE_LIST);
|
||||||
|
|
||||||
list->type = type;
|
list->type = type;
|
||||||
list->weak = weak;
|
list->weak = weak;
|
||||||
|
@ -172,9 +193,7 @@ gimp_list_add (GimpList *list,
|
||||||
gtk_object_sink (GTK_OBJECT (object));
|
gtk_object_sink (GTK_OBJECT (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
GIMP_LIST_CLASS (GTK_OBJECT (list)->klass)->add (list, object);
|
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[ADD], object);
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT(list), gimp_list_signals[ADD], object);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -191,8 +210,6 @@ gimp_list_remove (GimpList *list,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GIMP_LIST_CLASS (GTK_OBJECT (list)->klass)->remove (list, object);
|
|
||||||
|
|
||||||
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[REMOVE], object);
|
gtk_signal_emit (GTK_OBJECT (list), gimp_list_signals[REMOVE], object);
|
||||||
|
|
||||||
if (list->weak)
|
if (list->weak)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "gimpobject.h"
|
#include "gimpobject.h"
|
||||||
|
|
||||||
|
|
||||||
/* GimpList - a typed list of objects with signals for adding and
|
/* GimpList - a typed list of objects with signals for adding and
|
||||||
* removing of stuff. If it is weak, destroyed objects get removed
|
* removing of stuff. If it is weak, destroyed objects get removed
|
||||||
* automatically. If it is not, it refs them so they won't be freed
|
* automatically. If it is not, it refs them so they won't be freed
|
||||||
|
@ -29,28 +30,32 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_LIST gimp_list_get_type ()
|
#define GIMP_TYPE_LIST (gimp_list_get_type ())
|
||||||
#define GIMP_LIST(obj) GTK_CHECK_CAST (obj, GIMP_TYPE_LIST, GimpList)
|
#define GIMP_LIST(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_LIST, GimpList))
|
||||||
#define GIMP_IS_LIST(obj) GTK_CHECK_TYPE (obj, gimp_list_get_type())
|
#define GIMP_IS_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_LIST))
|
||||||
#define GIMP_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_list_get_type(), GimpListClass)
|
#define GIMP_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LIST, GimpListClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpListClass GimpListClass;
|
||||||
|
|
||||||
struct _GimpList
|
struct _GimpList
|
||||||
{
|
{
|
||||||
GimpObject gobject;
|
GimpObject gobject;
|
||||||
GtkType type;
|
|
||||||
GSList* list;
|
GtkType type;
|
||||||
gboolean weak;
|
GSList *list;
|
||||||
|
gboolean weak;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpListClass
|
struct _GimpListClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
void (* add) (GimpList *list, void *data);
|
|
||||||
void (* remove) (GimpList *list, void *data);
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct _GimpListClass GimpListClass;
|
void (* add) (GimpList *list,
|
||||||
|
gpointer object);
|
||||||
|
void (* remove) (GimpList *list,
|
||||||
|
gpointer object);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_list_get_type (void);
|
GtkType gimp_list_get_type (void);
|
||||||
|
@ -68,7 +73,6 @@ gboolean gimp_list_have (GimpList *list,
|
||||||
void gimp_list_foreach (GimpList *list,
|
void gimp_list_foreach (GimpList *list,
|
||||||
GFunc func,
|
GFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
gint gimp_list_size (GimpList *list);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_LIST_H__ */
|
#endif /* __GIMP_LIST_H__ */
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
/* 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 <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "gimpmarshal.h"
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__INT_INT_INT_INT) (GtkObject *object,
|
||||||
|
gint arg1,
|
||||||
|
gint arg2,
|
||||||
|
gint arg3,
|
||||||
|
gint arg4,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__INT_INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__INT_INT_INT_INT) func) (object,
|
||||||
|
GTK_VALUE_INT (args[0]),
|
||||||
|
GTK_VALUE_INT (args[1]),
|
||||||
|
GTK_VALUE_INT (args[2]),
|
||||||
|
GTK_VALUE_INT (args[3]),
|
||||||
|
func_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__INT_INT_INT) (GtkObject *object,
|
||||||
|
gint arg1,
|
||||||
|
gint arg2,
|
||||||
|
gint arg3,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__INT_INT_INT) func) (object,
|
||||||
|
GTK_VALUE_INT (args[0]),
|
||||||
|
GTK_VALUE_INT (args[1]),
|
||||||
|
GTK_VALUE_INT (args[2]),
|
||||||
|
func_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef void (* GimpSignal_NONE__DOUBLE) (GtkObject *object,
|
||||||
|
gdouble arg1,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_marshal_NONE__DOUBLE (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
(* (GimpSignal_NONE__DOUBLE) func) (object,
|
||||||
|
GTK_VALUE_DOUBLE (args[0]),
|
||||||
|
func_data);
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/* 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_MARSHAL_H__
|
||||||
|
#define __GIMP_MARSHAL_H__
|
||||||
|
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__INT_INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__INT_INT_INT (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
void gimp_marshal_NONE__DOUBLE (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GIMP_MARSHAL_H__ */
|
|
@ -38,14 +38,24 @@ gimp_object_class_init (GimpObjectClass *klass)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_object_get_type (void)
|
gimp_object_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type = 0;
|
static GtkType object_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (type,
|
if (! object_type)
|
||||||
GimpObject,
|
{
|
||||||
GimpObjectClass,
|
GtkTypeInfo object_info =
|
||||||
gimp_object_init,
|
{
|
||||||
gimp_object_class_init,
|
"GimpObject",
|
||||||
GTK_TYPE_OBJECT);
|
sizeof (GimpObject),
|
||||||
|
sizeof (GimpObjectClass),
|
||||||
|
(GtkClassInitFunc) gimp_object_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_object_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL,
|
||||||
|
};
|
||||||
|
|
||||||
return type;
|
object_type = gtk_type_unique (GTK_TYPE_OBJECT, &object_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return object_type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OBJECT (gimp_object_get_type ())
|
#define GIMP_TYPE_OBJECT (gimp_object_get_type ())
|
||||||
#define GIMP_OBJECT(obj) (GTK_CHECK_CAST (obj, GIMP_TYPE_OBJECT, GimpObject))
|
#define GIMP_OBJECT(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_OBJECT, GimpObject))
|
||||||
#define GIMP_IS_OBJECT(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_OBJECT))
|
#define GIMP_IS_OBJECT(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_OBJECT))
|
||||||
#define GIMP_OBJECT_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, GIMP_TYPE_OBJECT, GimpObjectClass))
|
#define GIMP_OBJECT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OBJECT, GimpObjectClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpObjectClass GimpObjectClass;
|
typedef struct _GimpObjectClass GimpObjectClass;
|
||||||
|
@ -42,19 +42,7 @@ struct _GimpObjectClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_INIT(typevar, obtype, classtype, obinit, classinit, parent) \
|
GtkType gimp_object_get_type (void);
|
||||||
if(!typevar){ \
|
|
||||||
GtkTypeInfo _info={#obtype, \
|
|
||||||
sizeof(obtype), \
|
|
||||||
sizeof(classtype), \
|
|
||||||
(GtkClassInitFunc)classinit, \
|
|
||||||
(GtkObjectInitFunc)obinit, \
|
|
||||||
NULL, NULL, NULL}; \
|
|
||||||
typevar=gtk_type_unique(parent, &_info); \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GtkType gimp_object_get_type (void);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_OBJECT_H__ */
|
#endif /* __GIMP_OBJECT_H__ */
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
#include "gimpset.h"
|
#include "gimpset.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* Yep, this can be optimized quite a lot */
|
/* Yep, this can be optimized quite a lot */
|
||||||
|
@ -49,6 +48,7 @@ enum
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static Node * gimp_set_find_node (GimpSet *set,
|
static Node * gimp_set_find_node (GimpSet *set,
|
||||||
gpointer object);
|
gpointer object);
|
||||||
static Node * gimp_set_node_new (GimpSet *set,
|
static Node * gimp_set_node_new (GimpSet *set,
|
||||||
|
@ -56,10 +56,12 @@ static Node * gimp_set_node_new (GimpSet *set,
|
||||||
static void gimp_set_node_free (GimpSet *set,
|
static void gimp_set_node_free (GimpSet *set,
|
||||||
Node *node);
|
Node *node);
|
||||||
|
|
||||||
|
|
||||||
static guint gimp_set_signals[LAST_SIGNAL] = { 0 };
|
static guint gimp_set_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static GimpObjectClass *parent_class = NULL;
|
static GimpObjectClass *parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_set_destroy (GtkObject *object)
|
gimp_set_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
|
@ -90,33 +92,39 @@ gimp_set_class_init (GimpSetClass* klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parent_class = gtk_type_class (gimp_object_get_type ());
|
parent_class = gtk_type_class (GIMP_TYPE_OBJECT);
|
||||||
|
|
||||||
gimp_set_signals[ADD]=
|
gimp_set_signals[ADD]=
|
||||||
gimp_signal_new ("add",
|
gtk_signal_new ("add",
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpSetClass,
|
GTK_SIGNAL_OFFSET (GimpSetClass,
|
||||||
add),
|
add),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_set_signals[REMOVE]=
|
gimp_set_signals[REMOVE]=
|
||||||
gimp_signal_new ("remove",
|
gtk_signal_new ("remove",
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpSetClass,
|
GTK_SIGNAL_OFFSET (GimpSetClass,
|
||||||
remove),
|
remove),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gimp_set_signals[ACTIVE_CHANGED]=
|
gimp_set_signals[ACTIVE_CHANGED]=
|
||||||
gimp_signal_new ("active_changed",
|
gtk_signal_new ("active_changed",
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
object_class->type,
|
object_class->type,
|
||||||
GTK_SIGNAL_OFFSET (GimpSetClass,
|
GTK_SIGNAL_OFFSET (GimpSetClass,
|
||||||
active_changed),
|
active_changed),
|
||||||
gimp_sigtype_pointer);
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, gimp_set_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, gimp_set_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -130,16 +138,26 @@ gimp_set_class_init (GimpSetClass* klass)
|
||||||
GtkType
|
GtkType
|
||||||
gimp_set_get_type (void)
|
gimp_set_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType gimpset_type = 0;
|
static GtkType set_type = 0;
|
||||||
|
|
||||||
GIMP_TYPE_INIT (gimpset_type,
|
if (! set_type)
|
||||||
GimpSet,
|
{
|
||||||
GimpSetClass,
|
GtkTypeInfo set_info =
|
||||||
gimp_set_init,
|
{
|
||||||
gimp_set_class_init,
|
"GimpSet",
|
||||||
GIMP_TYPE_OBJECT);
|
sizeof (GimpSet),
|
||||||
|
sizeof (GimpSetClass),
|
||||||
|
(GtkClassInitFunc) gimp_set_class_init,
|
||||||
|
(GtkObjectInitFunc) gimp_set_init,
|
||||||
|
/* reserved_1 */ NULL,
|
||||||
|
/* reserved_2 */ NULL,
|
||||||
|
(GtkClassInitFunc) NULL
|
||||||
|
};
|
||||||
|
|
||||||
return gimpset_type;
|
set_type = gtk_type_unique (GIMP_TYPE_OBJECT, &set_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
return set_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
* is also illegal to ask for a weak untyped gimpset.
|
* is also illegal to ask for a weak untyped gimpset.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GIMP_TYPE_SET gimp_set_get_type ()
|
#define GIMP_TYPE_SET (gimp_set_get_type ())
|
||||||
#define GIMP_SET(obj) GTK_CHECK_CAST (obj, GIMP_TYPE_SET, GimpSet)
|
#define GIMP_SET(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_SET, GimpSet))
|
||||||
#define GIMP_IS_SET(obj) GTK_CHECK_TYPE (obj, gimp_set_get_type())
|
#define GIMP_IS_SET(obj) (GTK_CHECK_TYPE ((obj), gimp_set_get_type()))
|
||||||
#define GIMP_SET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gimp_set_get_type(), GimpSetClass)
|
#define GIMP_SET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gimp_set_get_type(), GimpSetClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpSetClass GimpSetClass;
|
typedef struct _GimpSetClass GimpSetClass;
|
||||||
|
@ -57,12 +57,12 @@ struct _GimpSetClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
|
|
||||||
void (* add) (GimpSet *gimpset,
|
void (* add) (GimpSet *gimpset,
|
||||||
gpointer object);
|
gpointer object);
|
||||||
void (* remove) (GimpSet *gimpset,
|
void (* remove) (GimpSet *gimpset,
|
||||||
gpointer object);
|
gpointer object);
|
||||||
void (* active_changed) (GimpSet *gimpset,
|
void (* active_changed) (GimpSet *gimpset,
|
||||||
gpointer object);
|
gpointer object);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
216
app/gimpsignal.c
216
app/gimpsignal.c
|
@ -1,216 +0,0 @@
|
||||||
/* 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 "gimpsignal.h"
|
|
||||||
|
|
||||||
struct _GimpSignalType
|
|
||||||
{
|
|
||||||
GtkSignalMarshaller marshaller;
|
|
||||||
GtkType return_type;
|
|
||||||
guint nparams;
|
|
||||||
const GtkType *param_types;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef const GtkType TypeArr[];
|
|
||||||
|
|
||||||
GimpSignalID
|
|
||||||
gimp_signal_new (const gchar *name,
|
|
||||||
GtkSignalRunType signal_flags,
|
|
||||||
GtkType object_type,
|
|
||||||
guint function_offset,
|
|
||||||
GimpSignalType *sig_type)
|
|
||||||
{
|
|
||||||
return gtk_signal_newv (name,
|
|
||||||
signal_flags,
|
|
||||||
object_type,
|
|
||||||
function_offset,
|
|
||||||
sig_type->marshaller,
|
|
||||||
sig_type->return_type,
|
|
||||||
sig_type->nparams,
|
|
||||||
/* Bah. We try to be const correct, but
|
|
||||||
gtk isn't.. */
|
|
||||||
(GtkType *) sig_type->param_types);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* void__void */
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_void =
|
|
||||||
{
|
|
||||||
gtk_signal_default_marshaller,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
0,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType * const gimp_sigtype_void = &sigtype_void;
|
|
||||||
|
|
||||||
|
|
||||||
/* void__pointer */
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_marshaller_pointer (GtkObject *object,
|
|
||||||
GtkSignalFunc func,
|
|
||||||
gpointer func_data,
|
|
||||||
GtkArg *args)
|
|
||||||
{
|
|
||||||
(* (GimpHandlerPointer) func) (object,
|
|
||||||
GTK_VALUE_POINTER (args[0]),
|
|
||||||
func_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeArr pointer_types =
|
|
||||||
{
|
|
||||||
GTK_TYPE_POINTER
|
|
||||||
};
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_pointer =
|
|
||||||
{
|
|
||||||
gimp_marshaller_pointer,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
1,
|
|
||||||
pointer_types
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType * const gimp_sigtype_pointer = &sigtype_pointer;
|
|
||||||
|
|
||||||
|
|
||||||
/* void__int */
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_marshaller_int (GtkObject *object,
|
|
||||||
GtkSignalFunc func,
|
|
||||||
gpointer func_data,
|
|
||||||
GtkArg *args)
|
|
||||||
{
|
|
||||||
(* (GimpHandlerInt) func) (object,
|
|
||||||
GTK_VALUE_INT (args[0]),
|
|
||||||
func_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeArr int_types =
|
|
||||||
{
|
|
||||||
GTK_TYPE_INT
|
|
||||||
};
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_int =
|
|
||||||
{
|
|
||||||
gimp_marshaller_int,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
1,
|
|
||||||
int_types
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType* const gimp_sigtype_int = &sigtype_int;
|
|
||||||
|
|
||||||
|
|
||||||
/* void__double */
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_marshaller_double (GtkObject *object,
|
|
||||||
GtkSignalFunc func,
|
|
||||||
gpointer func_data,
|
|
||||||
GtkArg *args)
|
|
||||||
{
|
|
||||||
(* (GimpHandlerDouble) func) (object,
|
|
||||||
GTK_VALUE_DOUBLE (args[0]),
|
|
||||||
func_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeArr double_types =
|
|
||||||
{
|
|
||||||
GTK_TYPE_DOUBLE
|
|
||||||
};
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_double =
|
|
||||||
{
|
|
||||||
gimp_marshaller_double,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
1,
|
|
||||||
double_types
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType* const gimp_sigtype_double = &sigtype_double;
|
|
||||||
|
|
||||||
|
|
||||||
/* void__int_int_int */
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_marshaller_int_int_int (GtkObject *object,
|
|
||||||
GtkSignalFunc func,
|
|
||||||
gpointer func_data,
|
|
||||||
GtkArg *args)
|
|
||||||
{
|
|
||||||
(* (GimpHandlerIntIntInt) func) (object,
|
|
||||||
GTK_VALUE_INT (args[0]),
|
|
||||||
GTK_VALUE_INT (args[1]),
|
|
||||||
GTK_VALUE_INT (args[2]),
|
|
||||||
func_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeArr int_int_int_types =
|
|
||||||
{
|
|
||||||
GTK_TYPE_INT,
|
|
||||||
GTK_TYPE_INT,
|
|
||||||
GTK_TYPE_INT
|
|
||||||
};
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_int_int_int =
|
|
||||||
{
|
|
||||||
gimp_marshaller_int_int_int,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
3,
|
|
||||||
int_int_int_types
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType* const gimp_sigtype_int_int_int = &sigtype_int_int_int;
|
|
||||||
|
|
||||||
|
|
||||||
/* void__int_int_int_int */
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_marshaller_int_int_int_int (GtkObject *object,
|
|
||||||
GtkSignalFunc func,
|
|
||||||
gpointer func_data,
|
|
||||||
GtkArg *args)
|
|
||||||
{
|
|
||||||
(* (GimpHandlerIntIntIntInt) func) (object,
|
|
||||||
GTK_VALUE_INT (args[0]),
|
|
||||||
GTK_VALUE_INT (args[1]),
|
|
||||||
GTK_VALUE_INT (args[2]),
|
|
||||||
GTK_VALUE_INT (args[3]),
|
|
||||||
func_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static TypeArr int_int_int_int_types =
|
|
||||||
{
|
|
||||||
GTK_TYPE_INT,
|
|
||||||
GTK_TYPE_INT,
|
|
||||||
GTK_TYPE_INT,
|
|
||||||
GTK_TYPE_INT
|
|
||||||
};
|
|
||||||
|
|
||||||
static GimpSignalType sigtype_int_int_int_int =
|
|
||||||
{
|
|
||||||
gimp_marshaller_int_int_int_int,
|
|
||||||
GTK_TYPE_NONE,
|
|
||||||
4,
|
|
||||||
int_int_int_int_types
|
|
||||||
};
|
|
||||||
|
|
||||||
GimpSignalType * const gimp_sigtype_int_int_int_int = &sigtype_int_int_int_int;
|
|
|
@ -1,76 +0,0 @@
|
||||||
/* 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_SIGNAL_H__
|
|
||||||
#define __GIMP_SIGNAL_H__
|
|
||||||
|
|
||||||
|
|
||||||
#include <gtk/gtksignal.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* This is the gtk "signal id" */
|
|
||||||
typedef guint GimpSignalID;
|
|
||||||
|
|
||||||
typedef const struct _GimpSignalType GimpSignalType;
|
|
||||||
|
|
||||||
|
|
||||||
/* The arguments are encoded in the names.. */
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_void;
|
|
||||||
typedef void (* GimpHandlerVoid) (GtkObject *object,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_pointer;
|
|
||||||
typedef void (* GimpHandlerPointer) (GtkObject *object,
|
|
||||||
gpointer p,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_int;
|
|
||||||
typedef void (* GimpHandlerInt) (GtkObject *object,
|
|
||||||
gint i,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_double;
|
|
||||||
typedef void (* GimpHandlerDouble) (GtkObject *object,
|
|
||||||
gdouble d,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_int_int_int;
|
|
||||||
typedef void (* GimpHandlerIntIntInt) (GtkObject *object,
|
|
||||||
gint i1,
|
|
||||||
gint i2,
|
|
||||||
gint i3,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
extern GimpSignalType * const gimp_sigtype_int_int_int_int;
|
|
||||||
typedef void (* GimpHandlerIntIntIntInt) (GtkObject *object,
|
|
||||||
gint i1,
|
|
||||||
gint i2,
|
|
||||||
gint i3,
|
|
||||||
gint i4,
|
|
||||||
gpointer data);
|
|
||||||
|
|
||||||
|
|
||||||
GimpSignalID gimp_signal_new (const gchar *name,
|
|
||||||
GtkSignalRunType signal_flags,
|
|
||||||
GtkType object_type,
|
|
||||||
guint function_offset,
|
|
||||||
GimpSignalType *sig_type);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_SIGNAL_H__ */
|
|
|
@ -2268,7 +2268,7 @@ layer_widget_create (GimpImage *gimage,
|
||||||
|
|
||||||
gtk_widget_ref (layer_widget->list_item);
|
gtk_widget_ref (layer_widget->list_item);
|
||||||
|
|
||||||
gtk_signal_connect_while_alive (GTK_OBJECT (layer), "invalidate_pr",
|
gtk_signal_connect_while_alive (GTK_OBJECT (layer), "invalidate_preview",
|
||||||
GTK_SIGNAL_FUNC (invalidate_preview_callback),
|
GTK_SIGNAL_FUNC (invalidate_preview_callback),
|
||||||
(gpointer)layer_widget,
|
(gpointer)layer_widget,
|
||||||
GTK_OBJECT (layer_widget->list_item));
|
GTK_OBJECT (layer_widget->list_item));
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "appenv.h"
|
#include "appenv.h"
|
||||||
#include "module_db.h"
|
#include "module_db.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "datafiles.h"
|
#include "datafiles.h"
|
||||||
#include "gimpset.h"
|
#include "gimpset.h"
|
||||||
|
@ -397,6 +396,8 @@ module_db_browser_new (void)
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkObjectClass parent_class;
|
GtkObjectClass parent_class;
|
||||||
|
|
||||||
|
void (* modified) (ModuleInfo *module_info);
|
||||||
} ModuleInfoClass;
|
} ModuleInfoClass;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -424,18 +425,23 @@ static void
|
||||||
module_info_class_init (ModuleInfoClass *klass)
|
module_info_class_init (ModuleInfoClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
type = object_class->type;
|
module_info_signals[MODIFIED] =
|
||||||
|
gtk_signal_new ("modified",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ModuleInfoClass,
|
||||||
|
modified),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = module_info_destroy;
|
object_class->destroy = module_info_destroy;
|
||||||
|
|
||||||
module_info_signals[MODIFIED] =
|
klass->modified = NULL;
|
||||||
gimp_signal_new ("modified", 0, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
22
app/layer.c
22
app/layer.c
|
@ -39,7 +39,6 @@
|
||||||
#include "temp_buf.h"
|
#include "temp_buf.h"
|
||||||
#include "parasitelist.h"
|
#include "parasitelist.h"
|
||||||
#include "undo.h"
|
#include "undo.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimppreviewcache.h"
|
#include "gimppreviewcache.h"
|
||||||
#include "tile_manager.h"
|
#include "tile_manager.h"
|
||||||
#include "tile.h"
|
#include "tile.h"
|
||||||
|
@ -82,12 +81,13 @@ static guint layer_signals[LAST_SIGNAL] = { 0 };
|
||||||
static GimpDrawableClass *layer_parent_class = NULL;
|
static GimpDrawableClass *layer_parent_class = NULL;
|
||||||
static GimpChannelClass *layer_mask_parent_class = NULL;
|
static GimpChannelClass *layer_mask_parent_class = NULL;
|
||||||
|
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
gimp_layer_get_type (void)
|
gimp_layer_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_type = 0;
|
static GtkType layer_type = 0;
|
||||||
|
|
||||||
if (!layer_type)
|
if (! layer_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_info =
|
GtkTypeInfo layer_info =
|
||||||
{
|
{
|
||||||
|
@ -113,14 +113,19 @@ gimp_layer_class_init (GimpLayerClass *klass)
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GimpDrawableClass *drawable_class;
|
GimpDrawableClass *drawable_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass *) klass;
|
object_class = (GtkObjectClass *) klass;
|
||||||
drawable_class = (GimpDrawableClass *) klass;
|
drawable_class = (GimpDrawableClass *) klass;
|
||||||
|
|
||||||
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
layer_parent_class = gtk_type_class (GIMP_TYPE_DRAWABLE);
|
||||||
|
|
||||||
layer_signals[REMOVED] =
|
layer_signals[REMOVED] =
|
||||||
gimp_signal_new ("removed",
|
gtk_signal_new ("removed",
|
||||||
0, object_class->type, 0, gimp_sigtype_void);
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GimpLayerClass,
|
||||||
|
removed),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
|
@ -141,7 +146,7 @@ gimp_layer_mask_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType layer_mask_type = 0;
|
static GtkType layer_mask_type = 0;
|
||||||
|
|
||||||
if (!layer_mask_type)
|
if (! layer_mask_type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo layer_mask_info =
|
GtkTypeInfo layer_mask_info =
|
||||||
{
|
{
|
||||||
|
@ -167,8 +172,9 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *class)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass *) class;
|
||||||
layer_mask_parent_class = gtk_type_class (gimp_channel_get_type ());
|
|
||||||
|
layer_mask_parent_class = gtk_type_class (GIMP_TYPE_CHANNEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
gtk_object_class_add_signals (object_class, layer_mask_signals, LAST_SIGNAL);
|
||||||
|
|
|
@ -2268,7 +2268,7 @@ layer_widget_create (GimpImage *gimage,
|
||||||
|
|
||||||
gtk_widget_ref (layer_widget->list_item);
|
gtk_widget_ref (layer_widget->list_item);
|
||||||
|
|
||||||
gtk_signal_connect_while_alive (GTK_OBJECT (layer), "invalidate_pr",
|
gtk_signal_connect_while_alive (GTK_OBJECT (layer), "invalidate_preview",
|
||||||
GTK_SIGNAL_FUNC (invalidate_preview_callback),
|
GTK_SIGNAL_FUNC (invalidate_preview_callback),
|
||||||
(gpointer)layer_widget,
|
(gpointer)layer_widget,
|
||||||
GTK_OBJECT (layer_widget->list_item));
|
GTK_OBJECT (layer_widget->list_item));
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "appenv.h"
|
#include "appenv.h"
|
||||||
#include "module_db.h"
|
#include "module_db.h"
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "gimprc.h"
|
#include "gimprc.h"
|
||||||
#include "datafiles.h"
|
#include "datafiles.h"
|
||||||
#include "gimpset.h"
|
#include "gimpset.h"
|
||||||
|
@ -397,6 +396,8 @@ module_db_browser_new (void)
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GtkObjectClass parent_class;
|
GtkObjectClass parent_class;
|
||||||
|
|
||||||
|
void (* modified) (ModuleInfo *module_info);
|
||||||
} ModuleInfoClass;
|
} ModuleInfoClass;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -424,18 +425,23 @@ static void
|
||||||
module_info_class_init (ModuleInfoClass *klass)
|
module_info_class_init (ModuleInfoClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *object_class;
|
GtkObjectClass *object_class;
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
object_class = GTK_OBJECT_CLASS (klass);
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
type = object_class->type;
|
module_info_signals[MODIFIED] =
|
||||||
|
gtk_signal_new ("modified",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ModuleInfoClass,
|
||||||
|
modified),
|
||||||
|
gtk_signal_default_marshaller,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
||||||
|
|
||||||
object_class->destroy = module_info_destroy;
|
object_class->destroy = module_info_destroy;
|
||||||
|
|
||||||
module_info_signals[MODIFIED] =
|
klass->modified = NULL;
|
||||||
gimp_signal_new ("modified", 0, type, 0, gimp_sigtype_void);
|
|
||||||
|
|
||||||
gtk_object_class_add_signals (object_class, module_info_signals, LAST_SIGNAL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "apptypes.h"
|
#include "apptypes.h"
|
||||||
|
|
||||||
#include "gimpsignal.h"
|
|
||||||
#include "parasitelist.h"
|
#include "parasitelist.h"
|
||||||
|
|
||||||
#include "libgimp/gimpparasite.h"
|
#include "libgimp/gimpparasite.h"
|
||||||
|
@ -36,14 +35,17 @@ enum
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint parasite_list_signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
static void parasite_list_destroy (GtkObject *list);
|
static void parasite_list_destroy (GtkObject *list);
|
||||||
static void parasite_list_init (ParasiteList *list);
|
static void parasite_list_init (ParasiteList *list);
|
||||||
static void parasite_list_class_init (ParasiteListClass *klass);
|
static void parasite_list_class_init (ParasiteListClass *klass);
|
||||||
static int free_a_parasite (void *key,
|
static int free_a_parasite (gpointer key,
|
||||||
void *parasite,
|
gpointer parasite,
|
||||||
void *unused);
|
gpointer unused);
|
||||||
|
|
||||||
|
|
||||||
|
static guint parasite_list_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parasite_list_init (ParasiteList *list)
|
parasite_list_init (ParasiteList *list)
|
||||||
|
@ -54,17 +56,37 @@ parasite_list_init (ParasiteList *list)
|
||||||
static void
|
static void
|
||||||
parasite_list_class_init (ParasiteListClass *klass)
|
parasite_list_class_init (ParasiteListClass *klass)
|
||||||
{
|
{
|
||||||
GtkObjectClass *class = GTK_OBJECT_CLASS (klass);
|
GtkObjectClass *object_class;
|
||||||
GtkType type = class->type;
|
|
||||||
|
|
||||||
class->destroy = parasite_list_destroy;
|
object_class = (GtkObjectClass *) klass;
|
||||||
|
|
||||||
parasite_list_signals[ADD] =
|
parasite_list_signals[ADD] =
|
||||||
gimp_signal_new ("add", GTK_RUN_FIRST, type, 0, gimp_sigtype_pointer);
|
gtk_signal_new ("add",
|
||||||
parasite_list_signals[REMOVE] =
|
GTK_RUN_FIRST,
|
||||||
gimp_signal_new ("remove", GTK_RUN_FIRST, type, 0, gimp_sigtype_pointer);
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ParasiteListClass,
|
||||||
|
add),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
gtk_object_class_add_signals (class, parasite_list_signals, LAST_SIGNAL);
|
parasite_list_signals[REMOVE] =
|
||||||
|
gtk_signal_new ("remove",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (ParasiteListClass,
|
||||||
|
remove),
|
||||||
|
gtk_marshal_NONE__POINTER,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_POINTER);
|
||||||
|
|
||||||
|
gtk_object_class_add_signals (object_class, parasite_list_signals,
|
||||||
|
LAST_SIGNAL);
|
||||||
|
|
||||||
|
object_class->destroy = parasite_list_destroy;
|
||||||
|
|
||||||
|
klass->add = NULL;
|
||||||
|
klass->remove = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
|
@ -72,7 +94,7 @@ parasite_list_get_type (void)
|
||||||
{
|
{
|
||||||
static GtkType type = 0;
|
static GtkType type = 0;
|
||||||
|
|
||||||
if (!type)
|
if (! type)
|
||||||
{
|
{
|
||||||
GtkTypeInfo info =
|
GtkTypeInfo info =
|
||||||
{
|
{
|
||||||
|
@ -85,8 +107,10 @@ parasite_list_get_type (void)
|
||||||
NULL,
|
NULL,
|
||||||
(GtkClassInitFunc) NULL
|
(GtkClassInitFunc) NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
type = gtk_type_unique (GIMP_TYPE_OBJECT, &info);
|
type = gtk_type_unique (GIMP_TYPE_OBJECT, &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
#define GIMP_IS_PARASITE_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PARASITE_LIST))
|
#define GIMP_IS_PARASITE_LIST(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PARASITE_LIST))
|
||||||
#define PARASITE_LIST_CLASS(class) GIMP_CHECK_CLASS_CAST (class, parasite_list_get_type(), ParasiteListClass)
|
#define PARASITE_LIST_CLASS(class) GIMP_CHECK_CLASS_CAST (class, parasite_list_get_type(), ParasiteListClass)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _ParasiteListClass ParasiteListClass;
|
||||||
|
|
||||||
struct _ParasiteList
|
struct _ParasiteList
|
||||||
{
|
{
|
||||||
GimpObject object;
|
GimpObject object;
|
||||||
|
@ -34,7 +37,7 @@ struct _ParasiteList
|
||||||
GHashTable *table;
|
GHashTable *table;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _ParasiteListClass
|
struct _ParasiteListClass
|
||||||
{
|
{
|
||||||
GimpObjectClass parent_class;
|
GimpObjectClass parent_class;
|
||||||
|
|
||||||
|
@ -42,7 +45,7 @@ typedef struct _ParasiteListClass
|
||||||
GimpParasite *parasite);
|
GimpParasite *parasite);
|
||||||
void (* remove) (ParasiteList *list,
|
void (* remove) (ParasiteList *list,
|
||||||
GimpParasite *parasite);
|
GimpParasite *parasite);
|
||||||
} ParasiteListClass;
|
};
|
||||||
|
|
||||||
|
|
||||||
/* function declarations */
|
/* function declarations */
|
||||||
|
|
Loading…
Reference in New Issue