mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 04:51:44 +00:00
5c5c73f3f5
to detect if an image still exists, some things may, for now, access freed images and break. This will be fixed once proper destroy handlers are added.
32 lines
650 B
C
32 lines
650 B
C
#ifndef __GIMP_OBJECT_P_H__
|
|
#define __GIMP_OBJECT_P_H__
|
|
|
|
#include <gtk/gtkobject.h>
|
|
#include "gimpobject.h"
|
|
|
|
struct _GimpObject
|
|
{
|
|
GtkObject object;
|
|
};
|
|
|
|
typedef struct
|
|
{
|
|
GtkObjectClass parent_class;
|
|
}GimpObjectClass;
|
|
|
|
#define GIMP_OBJECT_CLASS(klass) \
|
|
GTK_CHECK_CLASS_CAST (klass, GIMP_TYPE_OBJECT, GimpObjectClass)
|
|
|
|
|
|
#define GIMP_TYPE_INIT(typevar, obtype, classtype, obinit, classinit, parent) \
|
|
if(!typevar){ \
|
|
GtkTypeInfo _info={#obtype, \
|
|
sizeof(obtype), \
|
|
sizeof(classtype), \
|
|
(GtkClassInitFunc)classinit, \
|
|
(GtkObjectInitFunc)obinit, \
|
|
NULL, NULL, NULL}; \
|
|
typevar=gtk_type_unique(parent, &_info); \
|
|
}
|
|
#endif
|