mirror of https://github.com/GNOME/gimp.git
app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10 Michael Natterer <mitch@gimp.org> * app/config/*.c * app/core/*.c * app/display/*.c * app/text/*.c * app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related core reordering and cleanup.
This commit is contained in:
parent
51d76ae248
commit
0d4a10fee4
|
@ -1,3 +1,12 @@
|
|||
2005-12-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/config/*.c
|
||||
* app/core/*.c
|
||||
* app/display/*.c
|
||||
* app/text/*.c
|
||||
* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
|
||||
core reordering and cleanup.
|
||||
|
||||
2005-12-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/paint/gimpclone.c (gimp_clone_motion): In fixed mode, paint
|
||||
|
|
|
@ -36,18 +36,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_base_config_class_init (GimpBaseConfigClass *klass);
|
||||
static void gimp_base_config_finalize (GObject *object);
|
||||
static void gimp_base_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_base_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -58,45 +46,27 @@ enum
|
|||
PROP_TILE_CACHE_SIZE
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static void gimp_base_config_finalize (GObject *object);
|
||||
static void gimp_base_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_base_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
GType
|
||||
gimp_base_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
G_DEFINE_TYPE (GimpBaseConfig, gimp_base_config, G_TYPE_OBJECT);
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
static const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpBaseConfigClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_base_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBaseConfig),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
#define parent_class gimp_base_config_parent_class
|
||||
|
||||
config_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpBaseConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_base_config_finalize;
|
||||
object_class->set_property = gimp_base_config_set_property;
|
||||
|
@ -127,6 +97,11 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
|
|||
GIMP_CONFIG_PARAM_CONFIRM);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_base_config_init (GimpBaseConfig *config)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_base_config_finalize (GObject *object)
|
||||
{
|
||||
|
|
|
@ -38,28 +38,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_core_config_class_init (GimpCoreConfigClass *klass);
|
||||
static void gimp_core_config_init (GimpCoreConfig *config);
|
||||
static void gimp_core_config_finalize (GObject *object);
|
||||
static void gimp_core_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_core_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_core_config_default_image_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_core_config_default_grid_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_core_config_color_management_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#define DEFAULT_BRUSH "Circle (11)"
|
||||
#define DEFAULT_PATTERN "Pine"
|
||||
#define DEFAULT_PALETTE "Default"
|
||||
|
@ -67,6 +45,7 @@ static void gimp_core_config_color_management_notify (GObject *object,
|
|||
#define DEFAULT_FONT "Sans"
|
||||
#define DEFAULT_COMMENT "Created with GIMP"
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -111,47 +90,38 @@ enum
|
|||
PROP_SAVE_DOCUMENT_HISTORY
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static void gimp_core_config_finalize (GObject *object);
|
||||
static void gimp_core_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_core_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_core_config_default_image_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_core_config_default_grid_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_core_config_color_management_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
|
||||
|
||||
GType
|
||||
gimp_core_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
G_DEFINE_TYPE (GimpCoreConfig, gimp_core_config, GIMP_TYPE_BASE_CONFIG);
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
static const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpCoreConfigClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_core_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpCoreConfig),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_core_config_init
|
||||
};
|
||||
#define parent_class gimp_core_config_parent_class
|
||||
|
||||
config_type = g_type_register_static (GIMP_TYPE_BASE_CONFIG,
|
||||
"GimpCoreConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
gchar *path;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_core_config_finalize;
|
||||
object_class->set_property = gimp_core_config_set_property;
|
||||
object_class->get_property = gimp_core_config_get_property;
|
||||
|
|
|
@ -38,27 +38,7 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_display_config_class_init (GimpDisplayConfigClass *klass);
|
||||
static void gimp_display_config_init (GimpDisplayConfig *config);
|
||||
static void gimp_display_config_finalize (GObject *object);
|
||||
static void gimp_display_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_display_config_view_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_display_config_fullscreen_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#define DEFAULT_ACTIVATE_ON_FOCUS TRUE
|
||||
#define DEFAULT_ACTIVATE_ON_FOCUS TRUE
|
||||
|
||||
|
||||
enum
|
||||
|
@ -89,48 +69,37 @@ enum
|
|||
PROP_ACTIVATE_ON_FOCUS
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static void gimp_display_config_finalize (GObject *object);
|
||||
static void gimp_display_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_display_config_view_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void gimp_display_config_fullscreen_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
|
||||
|
||||
GType
|
||||
gimp_display_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
G_DEFINE_TYPE (GimpDisplayConfig, gimp_display_config, GIMP_TYPE_CORE_CONFIG);
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
static const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpDisplayConfigClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_display_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDisplayConfig),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_display_config_init
|
||||
};
|
||||
#define parent_class gimp_display_config_parent_class
|
||||
|
||||
config_type = g_type_register_static (GIMP_TYPE_CORE_CONFIG,
|
||||
"GimpDisplayConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_config_class_init (GimpDisplayConfigClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpRGB white;
|
||||
GimpRGB black;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_display_config_finalize;
|
||||
object_class->set_property = gimp_display_config_set_property;
|
||||
object_class->get_property = gimp_display_config_get_property;
|
||||
|
|
|
@ -34,18 +34,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_gui_config_class_init (GimpGuiConfigClass *klass);
|
||||
static void gimp_gui_config_finalize (GObject *object);
|
||||
static void gimp_gui_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_gui_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
#define DEFAULT_THEME "Default"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
@ -56,6 +44,7 @@ static void gimp_gui_config_get_property (GObject *object,
|
|||
# define DEFAULT_WEB_BROWSER "mozilla-firefox %s"
|
||||
#endif
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -92,47 +81,29 @@ enum
|
|||
PROP_CURSOR_FORMAT
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static void gimp_gui_config_finalize (GObject *object);
|
||||
static void gimp_gui_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_gui_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
GType
|
||||
gimp_gui_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
G_DEFINE_TYPE (GimpGuiConfig, gimp_gui_config, GIMP_TYPE_DISPLAY_CONFIG);
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
static const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpGuiConfigClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_gui_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpGuiConfig),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
#define parent_class gimp_gui_config_parent_class
|
||||
|
||||
config_type = g_type_register_static (GIMP_TYPE_DISPLAY_CONFIG,
|
||||
"GimpGuiConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
gchar *path;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_gui_config_finalize;
|
||||
object_class->set_property = gimp_gui_config_set_property;
|
||||
object_class->get_property = gimp_gui_config_get_property;
|
||||
|
@ -282,6 +253,11 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
0);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_gui_config_init (GimpGuiConfig *config)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_gui_config_finalize (GObject *object)
|
||||
{
|
||||
|
|
|
@ -32,17 +32,6 @@
|
|||
#include "gimppluginconfig.h"
|
||||
|
||||
|
||||
static void gimp_plugin_config_class_init (GimpPluginConfigClass *klass);
|
||||
static void gimp_plugin_config_finalize (GObject *object);
|
||||
static void gimp_plugin_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_plugin_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
|
@ -53,47 +42,29 @@ enum
|
|||
PROP_SCRIPT_FU_PATH
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
static void gimp_plugin_config_finalize (GObject *object);
|
||||
static void gimp_plugin_config_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_plugin_config_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
GType
|
||||
gimp_plugin_config_get_type (void)
|
||||
{
|
||||
static GType config_type = 0;
|
||||
G_DEFINE_TYPE (GimpPluginConfig, gimp_plugin_config, GIMP_TYPE_GUI_CONFIG);
|
||||
|
||||
if (! config_type)
|
||||
{
|
||||
static const GTypeInfo config_info =
|
||||
{
|
||||
sizeof (GimpPluginConfigClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_plugin_config_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPluginConfig),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
#define parent_class gimp_plugin_config_parent_class
|
||||
|
||||
config_type = g_type_register_static (GIMP_TYPE_GUI_CONFIG,
|
||||
"GimpPluginConfig",
|
||||
&config_info, 0);
|
||||
}
|
||||
|
||||
return config_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
gchar *path;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_plugin_config_finalize;
|
||||
object_class->set_property = gimp_plugin_config_set_property;
|
||||
object_class->get_property = gimp_plugin_config_get_property;
|
||||
|
@ -106,6 +77,7 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
|||
GIMP_CONFIG_PATH_DIR_LIST, path,
|
||||
0);
|
||||
g_free (path);
|
||||
|
||||
path = gimp_config_build_data_path ("gfig");
|
||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
|
||||
PROP_GFIG_PATH,
|
||||
|
@ -113,6 +85,7 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
|||
GIMP_CONFIG_PATH_DIR_LIST, path,
|
||||
0);
|
||||
g_free (path);
|
||||
|
||||
path = gimp_config_build_data_path ("gflare");
|
||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
|
||||
PROP_GFLARE_PATH,
|
||||
|
@ -120,6 +93,7 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
|||
GIMP_CONFIG_PATH_DIR_LIST, path,
|
||||
0);
|
||||
g_free (path);
|
||||
|
||||
path = gimp_config_build_data_path ("gimpressionist");
|
||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
|
||||
PROP_GIMPRESSIONIST_PATH,
|
||||
|
@ -128,6 +102,7 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
|||
GIMP_CONFIG_PATH_DIR_LIST, path,
|
||||
0);
|
||||
g_free (path);
|
||||
|
||||
path = gimp_config_build_data_path ("scripts");
|
||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class,
|
||||
PROP_SCRIPT_FU_PATH,
|
||||
|
@ -138,6 +113,11 @@ gimp_plugin_config_class_init (GimpPluginConfigClass *klass)
|
|||
g_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_plugin_config_init (GimpPluginConfig *config)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_plugin_config_finalize (GObject *object)
|
||||
{
|
||||
|
|
|
@ -48,74 +48,38 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_rc_class_init (GimpRcClass *klass);
|
||||
static void gimp_rc_config_iface_init (gpointer iface,
|
||||
gpointer iface_data);
|
||||
static void gimp_rc_init (GimpRc *rc);
|
||||
static void gimp_rc_dispose (GObject *object);
|
||||
static void gimp_rc_finalize (GObject *object);
|
||||
static void gimp_rc_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_rc_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static GimpConfig * gimp_rc_duplicate (GimpConfig *object);
|
||||
static void gimp_rc_load (GimpRc *rc);
|
||||
static gboolean gimp_rc_idle_save (GimpRc *rc);
|
||||
static void gimp_rc_notify (GimpRc *rc,
|
||||
GParamSpec *param,
|
||||
gpointer data);
|
||||
static void gimp_rc_config_iface_init (GimpConfigInterface *iface);
|
||||
|
||||
static void gimp_rc_dispose (GObject *object);
|
||||
static void gimp_rc_finalize (GObject *object);
|
||||
static void gimp_rc_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_rc_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static GimpConfig * gimp_rc_duplicate (GimpConfig *object);
|
||||
static void gimp_rc_load (GimpRc *rc);
|
||||
static gboolean gimp_rc_idle_save (GimpRc *rc);
|
||||
static void gimp_rc_notify (GimpRc *rc,
|
||||
GParamSpec *param,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpRc, gimp_rc, GIMP_TYPE_PLUGIN_CONFIG,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_rc_config_iface_init));
|
||||
|
||||
#define parent_class gimp_rc_parent_class
|
||||
|
||||
GType
|
||||
gimp_rc_get_type (void)
|
||||
{
|
||||
static GType rc_type = 0;
|
||||
|
||||
if (! rc_type)
|
||||
{
|
||||
static const GTypeInfo rc_info =
|
||||
{
|
||||
sizeof (GimpRcClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_rc_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpRc),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_rc_init
|
||||
};
|
||||
static const GInterfaceInfo rc_iface_info =
|
||||
{
|
||||
gimp_rc_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
rc_type = g_type_register_static (GIMP_TYPE_PLUGIN_CONFIG,
|
||||
"GimpRc", &rc_info, 0);
|
||||
|
||||
g_type_add_interface_static (rc_type, GIMP_TYPE_CONFIG, &rc_iface_info);
|
||||
}
|
||||
|
||||
return rc_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_rc_class_init (GimpRcClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = gimp_rc_dispose;
|
||||
object_class->finalize = gimp_rc_finalize;
|
||||
|
@ -128,12 +92,14 @@ gimp_rc_class_init (GimpRcClass *klass)
|
|||
FALSE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_SYSTEM_GIMPRC,
|
||||
g_param_spec_string ("system-gimprc",
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_class_install_property (object_class, PROP_USER_GIMPRC,
|
||||
g_param_spec_string ("user-gimprc",
|
||||
NULL, NULL,
|
||||
|
@ -254,14 +220,11 @@ gimp_rc_get_property (GObject *object,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_rc_config_iface_init (gpointer iface,
|
||||
gpointer iface_data)
|
||||
gimp_rc_config_iface_init (GimpConfigInterface *iface)
|
||||
{
|
||||
GimpConfigInterface *config_iface = (GimpConfigInterface *) iface;
|
||||
|
||||
config_iface->serialize = gimp_rc_serialize;
|
||||
config_iface->deserialize = gimp_rc_deserialize;
|
||||
config_iface->duplicate = gimp_rc_duplicate;
|
||||
iface->serialize = gimp_rc_serialize;
|
||||
iface->deserialize = gimp_rc_deserialize;
|
||||
iface->duplicate = gimp_rc_duplicate;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -84,9 +84,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_class_init (GimpClass *klass);
|
||||
static void gimp_init (Gimp *gimp);
|
||||
|
||||
static void gimp_dispose (GObject *object);
|
||||
static void gimp_finalize (GObject *object);
|
||||
|
||||
|
@ -108,47 +105,19 @@ static void gimp_edit_config_notify (GObject *edit_config,
|
|||
GObject *global_config);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (Gimp, gimp, GIMP_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_parent_class
|
||||
|
||||
static guint gimp_signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
|
||||
GType
|
||||
gimp_get_type (void)
|
||||
{
|
||||
static GType object_type = 0;
|
||||
|
||||
if (! object_type)
|
||||
{
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GimpClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (Gimp),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"Gimp",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
return object_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_class_init (GimpClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_signals[INITIALIZE] =
|
||||
g_signal_new ("initialize",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -42,64 +42,35 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_brush_class_init (GimpBrushClass *klass);
|
||||
static void gimp_brush_init (GimpBrush *brush);
|
||||
static void gimp_brush_finalize (GObject *object);
|
||||
|
||||
static void gimp_brush_finalize (GObject *object);
|
||||
static gint64 gimp_brush_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gint64 gimp_brush_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static gboolean gimp_brush_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_brush_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_brush_get_extension (GimpData *data);
|
||||
|
||||
static gboolean gimp_brush_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_brush_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_brush_get_extension (GimpData *data);
|
||||
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
|
||||
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
|
||||
GimpCoords *last_coords,
|
||||
GimpCoords *cur_coords);
|
||||
|
||||
G_DEFINE_TYPE (GimpBrush, gimp_brush, GIMP_TYPE_DATA);
|
||||
|
||||
#define parent_class gimp_brush_parent_class
|
||||
|
||||
static guint brush_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_brush_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrush),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpBrush",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_class_init (GimpBrushClass *klass)
|
||||
|
@ -109,8 +80,6 @@ gimp_brush_class_init (GimpBrushClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
brush_signals[SPACING_CHANGED] =
|
||||
g_signal_new ("spacing-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -210,7 +179,7 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
|
|||
TempBuf *mask_buf = NULL;
|
||||
TempBuf *pixmap_buf = NULL;
|
||||
TempBuf *return_buf = NULL;
|
||||
guchar transp[4] = { 0, 0, 0, 0 };
|
||||
guchar transp[4] = { 0, 0, 0, 0 };
|
||||
guchar *mask;
|
||||
guchar *buf;
|
||||
gint x, y;
|
||||
|
@ -240,8 +209,8 @@ gimp_brush_get_new_preview (GimpViewable *viewable,
|
|||
/* TODO: the scale function should scale the pixmap and the
|
||||
* mask in one run
|
||||
*/
|
||||
pixmap_buf =
|
||||
brush_scale_pixmap (pixmap_buf, brush_width, brush_height);
|
||||
pixmap_buf = brush_scale_pixmap (pixmap_buf,
|
||||
brush_width, brush_height);
|
||||
}
|
||||
|
||||
scale = TRUE;
|
||||
|
|
|
@ -60,9 +60,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
|
||||
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
|
||||
|
||||
static void gimp_brush_generated_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -78,36 +75,10 @@ static gchar * gimp_brush_generated_get_extension (GimpData *data);
|
|||
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
|
||||
|
||||
|
||||
static GimpBrushClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBrushGenerated, gimp_brush_generated, GIMP_TYPE_BRUSH);
|
||||
|
||||
#define parent_class gimp_brush_generated_parent_class
|
||||
|
||||
GType
|
||||
gimp_brush_generated_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushGeneratedClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_generated_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrushGenerated),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_generated_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
|
||||
"GimpBrushGenerated",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||
|
@ -115,8 +86,6 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_brush_generated_set_property;
|
||||
object_class->get_property = gimp_brush_generated_get_property;
|
||||
|
||||
|
|
|
@ -60,9 +60,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
|
||||
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
|
||||
|
||||
static void gimp_brush_generated_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -78,36 +75,10 @@ static gchar * gimp_brush_generated_get_extension (GimpData *data);
|
|||
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
|
||||
|
||||
|
||||
static GimpBrushClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBrushGenerated, gimp_brush_generated, GIMP_TYPE_BRUSH);
|
||||
|
||||
#define parent_class gimp_brush_generated_parent_class
|
||||
|
||||
GType
|
||||
gimp_brush_generated_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushGeneratedClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_generated_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrushGenerated),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_generated_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
|
||||
"GimpBrushGenerated",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||
|
@ -115,8 +86,6 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_brush_generated_set_property;
|
||||
object_class->get_property = gimp_brush_generated_get_property;
|
||||
|
||||
|
|
|
@ -60,9 +60,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
|
||||
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
|
||||
|
||||
static void gimp_brush_generated_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -78,36 +75,10 @@ static gchar * gimp_brush_generated_get_extension (GimpData *data);
|
|||
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
|
||||
|
||||
|
||||
static GimpBrushClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBrushGenerated, gimp_brush_generated, GIMP_TYPE_BRUSH);
|
||||
|
||||
#define parent_class gimp_brush_generated_parent_class
|
||||
|
||||
GType
|
||||
gimp_brush_generated_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushGeneratedClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_generated_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrushGenerated),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_generated_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
|
||||
"GimpBrushGenerated",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
||||
|
@ -115,8 +86,6 @@ gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_brush_generated_set_property;
|
||||
object_class->get_property = gimp_brush_generated_get_property;
|
||||
|
||||
|
|
|
@ -55,9 +55,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_brush_pipe_class_init (GimpBrushPipeClass *klass);
|
||||
static void gimp_brush_pipe_init (GimpBrushPipe *pipe);
|
||||
|
||||
static void gimp_brush_pipe_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_brush_pipe_get_memsize (GimpObject *object,
|
||||
|
@ -78,36 +75,10 @@ static gboolean gimp_brush_pipe_want_null_motion (GimpBrush *brush,
|
|||
GimpCoords *cur_coords);
|
||||
|
||||
|
||||
static GimpBrushClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBrushPipe, gimp_brush_pipe, GIMP_TYPE_BRUSH);
|
||||
|
||||
#define parent_class gimp_brush_pipe_parent_class
|
||||
|
||||
GType
|
||||
gimp_brush_pipe_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushPipeClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_pipe_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrushPipe),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_pipe_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
|
||||
"GimpBrushPipe",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
||||
|
@ -117,8 +88,6 @@ gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpBrushClass *brush_class = GIMP_BRUSH_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_brush_pipe_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_brush_pipe_get_memsize;
|
||||
|
|
|
@ -55,9 +55,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_brush_pipe_class_init (GimpBrushPipeClass *klass);
|
||||
static void gimp_brush_pipe_init (GimpBrushPipe *pipe);
|
||||
|
||||
static void gimp_brush_pipe_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_brush_pipe_get_memsize (GimpObject *object,
|
||||
|
@ -78,36 +75,10 @@ static gboolean gimp_brush_pipe_want_null_motion (GimpBrush *brush,
|
|||
GimpCoords *cur_coords);
|
||||
|
||||
|
||||
static GimpBrushClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBrushPipe, gimp_brush_pipe, GIMP_TYPE_BRUSH);
|
||||
|
||||
#define parent_class gimp_brush_pipe_parent_class
|
||||
|
||||
GType
|
||||
gimp_brush_pipe_get_type (void)
|
||||
{
|
||||
static GType brush_type = 0;
|
||||
|
||||
if (! brush_type)
|
||||
{
|
||||
static const GTypeInfo brush_info =
|
||||
{
|
||||
sizeof (GimpBrushPipeClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_brush_pipe_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBrushPipe),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_brush_pipe_init,
|
||||
};
|
||||
|
||||
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
|
||||
"GimpBrushPipe",
|
||||
&brush_info, 0);
|
||||
}
|
||||
|
||||
return brush_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
||||
|
@ -117,8 +88,6 @@ gimp_brush_pipe_class_init (GimpBrushPipeClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpBrushClass *brush_class = GIMP_BRUSH_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_brush_pipe_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_brush_pipe_get_memsize;
|
||||
|
|
|
@ -33,66 +33,37 @@
|
|||
#include "gimpbuffer.h"
|
||||
|
||||
|
||||
static void gimp_buffer_class_init (GimpBufferClass *klass);
|
||||
static void gimp_buffer_init (GimpBuffer *buffer);
|
||||
static void gimp_buffer_finalize (GObject *object);
|
||||
|
||||
static void gimp_buffer_finalize (GObject *object);
|
||||
static gint64 gimp_buffer_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gint64 gimp_buffer_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gboolean gimp_buffer_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static void gimp_buffer_get_preview_size (GimpViewable *viewable,
|
||||
gint size,
|
||||
gboolean is_popup,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static gboolean gimp_buffer_get_popup_size (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static TempBuf * gimp_buffer_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_buffer_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gboolean gimp_buffer_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static void gimp_buffer_get_preview_size (GimpViewable *viewable,
|
||||
gint size,
|
||||
gboolean is_popup,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static gboolean gimp_buffer_get_popup_size (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean dot_for_dot,
|
||||
gint *popup_width,
|
||||
gint *popup_height);
|
||||
static TempBuf * gimp_buffer_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_buffer_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpBuffer, gimp_buffer, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_buffer_parent_class
|
||||
|
||||
GType
|
||||
gimp_buffer_get_type (void)
|
||||
{
|
||||
static GType buffer_type = 0;
|
||||
|
||||
if (! buffer_type)
|
||||
{
|
||||
static const GTypeInfo buffer_info =
|
||||
{
|
||||
sizeof (GimpBufferClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_buffer_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBuffer),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_buffer_init,
|
||||
};
|
||||
|
||||
buffer_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpBuffer",
|
||||
&buffer_info, 0);
|
||||
}
|
||||
|
||||
return buffer_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_buffer_class_init (GimpBufferClass *klass)
|
||||
|
@ -101,8 +72,6 @@ gimp_buffer_class_init (GimpBufferClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_buffer_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_buffer_get_memsize;
|
||||
|
|
|
@ -66,9 +66,7 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_channel_class_init (GimpChannelClass *klass);
|
||||
static void gimp_channel_init (GimpChannel *channel);
|
||||
static void gimp_channel_pickable_iface_init (GimpPickableInterface *pickable_iface);
|
||||
static void gimp_channel_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_channel_finalize (GObject *object);
|
||||
|
||||
|
@ -211,50 +209,14 @@ static void gimp_channel_validate (TileManager *tm,
|
|||
Tile *tile);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpChannel, gimp_channel, GIMP_TYPE_DRAWABLE,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
|
||||
gimp_channel_pickable_iface_init));
|
||||
|
||||
#define parent_class gimp_channel_parent_class
|
||||
|
||||
static guint channel_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpDrawableClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_channel_get_type (void)
|
||||
{
|
||||
static GType channel_type = 0;
|
||||
|
||||
if (! channel_type)
|
||||
{
|
||||
static const GTypeInfo channel_info =
|
||||
{
|
||||
sizeof (GimpChannelClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_channel_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpChannel),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_channel_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo pickable_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_channel_pickable_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
channel_type = g_type_register_static (GIMP_TYPE_DRAWABLE,
|
||||
"GimpChannel",
|
||||
&channel_info, 0);
|
||||
|
||||
g_type_add_interface_static (channel_type, GIMP_TYPE_PICKABLE,
|
||||
&pickable_iface_info);
|
||||
}
|
||||
|
||||
return channel_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_channel_class_init (GimpChannelClass *klass)
|
||||
|
@ -265,8 +227,6 @@ gimp_channel_class_init (GimpChannelClass *klass)
|
|||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
channel_signals[COLOR_CHANGED] =
|
||||
g_signal_new ("color-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -354,9 +314,9 @@ gimp_channel_init (GimpChannel *channel)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_channel_pickable_iface_init (GimpPickableInterface *pickable_iface)
|
||||
gimp_channel_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
pickable_iface->get_opacity_at = gimp_channel_get_opacity_at;
|
||||
iface->get_opacity_at = gimp_channel_get_opacity_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -73,88 +73,48 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_container_class_init (GimpContainerClass *klass);
|
||||
static void gimp_container_init (GimpContainer *container);
|
||||
static void gimp_container_config_iface_init (GimpConfigInterface *config_iface);
|
||||
static void gimp_container_config_iface_init (GimpConfigInterface *iface);
|
||||
|
||||
static void gimp_container_dispose (GObject *object);
|
||||
static void gimp_container_dispose (GObject *object);
|
||||
|
||||
static void gimp_container_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_container_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_container_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_container_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static gint64 gimp_container_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static gint64 gimp_container_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gboolean gimp_container_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
static gboolean gimp_container_deserialize (GimpConfig *config,
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
static gboolean gimp_container_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
static gboolean gimp_container_deserialize (GimpConfig *config,
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
|
||||
static void gimp_container_disconnect_callback (GimpObject *object,
|
||||
gpointer data);
|
||||
static void gimp_container_disconnect_callback (GimpObject *object,
|
||||
gpointer data);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpContainer, gimp_container, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_container_config_iface_init));
|
||||
|
||||
#define parent_class gimp_container_parent_class
|
||||
|
||||
static guint container_signals[LAST_SIGNAL] = { 0, };
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_container_get_type (void)
|
||||
{
|
||||
static GType container_type = 0;
|
||||
|
||||
if (! container_type)
|
||||
{
|
||||
static const GTypeInfo container_info =
|
||||
{
|
||||
sizeof (GimpContainerClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_container_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpContainer),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_container_init,
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_container_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
container_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpContainer",
|
||||
&container_info, 0);
|
||||
|
||||
g_type_add_interface_static (container_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return container_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_container_class_init (GimpContainerClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpObjectClass *gimp_object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
container_signals[ADD] =
|
||||
g_signal_new ("add",
|
||||
|
@ -251,10 +211,10 @@ gimp_container_init (GimpContainer *container)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_container_config_iface_init (GimpConfigInterface *config_iface)
|
||||
gimp_container_config_iface_init (GimpConfigInterface *iface)
|
||||
{
|
||||
config_iface->serialize = gimp_container_serialize;
|
||||
config_iface->deserialize = gimp_container_deserialize;
|
||||
iface->serialize = gimp_container_serialize;
|
||||
iface->deserialize = gimp_container_deserialize;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -64,9 +64,7 @@ typedef void (* GimpContextCopyPropFunc) (GimpContext *src,
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_context_class_init (GimpContextClass *klass);
|
||||
static void gimp_context_init (GimpContext *context);
|
||||
static void gimp_context_config_iface_init (GimpConfigInterface *config_iface);
|
||||
static void gimp_context_config_iface_init (GimpConfigInterface *iface);
|
||||
|
||||
static GObject * gimp_context_constructor (GType type,
|
||||
guint n_params,
|
||||
|
@ -311,9 +309,13 @@ static GType gimp_context_prop_types[] =
|
|||
};
|
||||
|
||||
|
||||
static guint gimp_context_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpContext, gimp_context, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_context_config_iface_init));
|
||||
|
||||
static GimpObjectClass * parent_class = NULL;
|
||||
#define parent_class gimp_context_parent_class
|
||||
|
||||
static guint gimp_context_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpToolInfo *standard_tool_info = NULL;
|
||||
static GimpBrush *standard_brush = NULL;
|
||||
|
@ -323,43 +325,6 @@ static GimpPalette *standard_palette = NULL;
|
|||
static GimpFont *standard_font = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_context_get_type (void)
|
||||
{
|
||||
static GType context_type = 0;
|
||||
|
||||
if (! context_type)
|
||||
{
|
||||
static const GTypeInfo context_info =
|
||||
{
|
||||
sizeof (GimpContextClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_context_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpContext),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_context_init,
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_context_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
context_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpContext",
|
||||
&context_info, 0);
|
||||
|
||||
g_type_add_interface_static (context_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return context_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_context_class_init (GimpContextClass *klass)
|
||||
{
|
||||
|
@ -371,8 +336,6 @@ gimp_context_class_init (GimpContextClass *klass)
|
|||
gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);
|
||||
gimp_rgba_set (&white, 1.0, 1.0, 1.0, GIMP_OPACITY_OPAQUE);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_context_signals[IMAGE_CHANGED] =
|
||||
g_signal_new ("image-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -700,12 +663,11 @@ gimp_context_init (GimpContext *context)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_context_config_iface_init (GimpConfigInterface *config_iface)
|
||||
gimp_context_config_iface_init (GimpConfigInterface *iface)
|
||||
{
|
||||
config_iface->serialize = gimp_context_serialize;
|
||||
|
||||
config_iface->serialize_property = gimp_context_serialize_property;
|
||||
config_iface->deserialize_property = gimp_context_deserialize_property;
|
||||
iface->serialize = gimp_context_serialize;
|
||||
iface->serialize_property = gimp_context_serialize_property;
|
||||
iface->deserialize_property = gimp_context_deserialize_property;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
|
||||
#define WRITABLE_PATH_KEY "gimp-data-factory-writable-path"
|
||||
|
||||
static void gimp_data_factory_class_init (GimpDataFactoryClass *klass);
|
||||
static void gimp_data_factory_init (GimpDataFactory *factory);
|
||||
|
||||
static void gimp_data_factory_finalize (GObject *object);
|
||||
|
||||
|
@ -58,36 +56,11 @@ static gchar * gimp_data_factory_get_save_dir (GimpDataFactory *factory);
|
|||
static void gimp_data_factory_load_data (const GimpDatafileData *file_data,
|
||||
gpointer data);
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
||||
G_DEFINE_TYPE (GimpDataFactory, gimp_data_factory, GIMP_TYPE_OBJECT);
|
||||
|
||||
GType
|
||||
gimp_data_factory_get_type (void)
|
||||
{
|
||||
static GType factory_type = 0;
|
||||
#define parent_class gimp_data_factory_parent_class
|
||||
|
||||
if (! factory_type)
|
||||
{
|
||||
static const GTypeInfo factory_info =
|
||||
{
|
||||
sizeof (GimpDataFactoryClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_data_factory_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDataFactory),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_data_factory_init,
|
||||
};
|
||||
|
||||
factory_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpDataFactory",
|
||||
&factory_info, 0);
|
||||
}
|
||||
|
||||
return factory_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_data_factory_class_init (GimpDataFactoryClass *klass)
|
||||
|
@ -95,8 +68,6 @@ gimp_data_factory_class_init (GimpDataFactoryClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_data_factory_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_data_factory_get_memsize;
|
||||
|
|
|
@ -29,65 +29,38 @@
|
|||
#include "gimpimagefile.h"
|
||||
|
||||
|
||||
static void gimp_document_list_config_iface_init (gpointer iface,
|
||||
gpointer iface_data);
|
||||
static void gimp_document_list_config_iface_init (GimpConfigInterface *iface);
|
||||
static gboolean gimp_document_list_serialize (GimpConfig *config,
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
GimpConfigWriter *writer,
|
||||
gpointer data);
|
||||
static gboolean gimp_document_list_deserialize (GimpConfig *config,
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
GScanner *scanner,
|
||||
gint nest_level,
|
||||
gpointer data);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDocumentList, gimp_document_list, GIMP_TYPE_LIST,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_document_list_config_iface_init));
|
||||
|
||||
static const gchar *document_symbol = "document";
|
||||
|
||||
|
||||
GType
|
||||
gimp_document_list_get_type (void)
|
||||
static void
|
||||
gimp_document_list_class_init (GimpDocumentListClass *klass)
|
||||
{
|
||||
static GType document_list_type = 0;
|
||||
|
||||
if (! document_list_type)
|
||||
{
|
||||
static const GTypeInfo document_list_info =
|
||||
{
|
||||
sizeof (GimpDocumentListClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL, /* class_init */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDocumentList),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo document_list_iface_info =
|
||||
{
|
||||
gimp_document_list_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
document_list_type = g_type_register_static (GIMP_TYPE_LIST,
|
||||
"GimpDocumentList",
|
||||
&document_list_info, 0);
|
||||
|
||||
g_type_add_interface_static (document_list_type, GIMP_TYPE_CONFIG,
|
||||
&document_list_iface_info);
|
||||
}
|
||||
|
||||
return document_list_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_document_list_config_iface_init (gpointer iface,
|
||||
gpointer iface_data)
|
||||
gimp_document_list_init (GimpDocumentList *list)
|
||||
{
|
||||
GimpConfigInterface *config_iface = (GimpConfigInterface *) iface;
|
||||
}
|
||||
|
||||
config_iface->serialize = gimp_document_list_serialize;
|
||||
config_iface->deserialize = gimp_document_list_deserialize;
|
||||
static void
|
||||
gimp_document_list_config_iface_init (GimpConfigInterface *iface)
|
||||
{
|
||||
iface->serialize = gimp_document_list_serialize;
|
||||
iface->deserialize = gimp_document_list_deserialize;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -62,9 +62,7 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_drawable_class_init (GimpDrawableClass *klass);
|
||||
static void gimp_drawable_init (GimpDrawable *drawable);
|
||||
static void gimp_drawable_pickable_iface_init (GimpPickableInterface *pickable_iface);
|
||||
static void gimp_drawable_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_drawable_finalize (GObject *object);
|
||||
|
||||
|
@ -152,50 +150,14 @@ static void gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
|
|||
gint height);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDrawable, gimp_drawable, GIMP_TYPE_ITEM,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
|
||||
gimp_drawable_pickable_iface_init));
|
||||
|
||||
#define parent_class gimp_drawable_parent_class
|
||||
|
||||
static guint gimp_drawable_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpItemClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_drawable_get_type (void)
|
||||
{
|
||||
static GType drawable_type = 0;
|
||||
|
||||
if (! drawable_type)
|
||||
{
|
||||
static const GTypeInfo drawable_info =
|
||||
{
|
||||
sizeof (GimpDrawableClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_drawable_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDrawable),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_drawable_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo pickable_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_drawable_pickable_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
drawable_type = g_type_register_static (GIMP_TYPE_ITEM,
|
||||
"GimpDrawable",
|
||||
&drawable_info, 0);
|
||||
|
||||
g_type_add_interface_static (drawable_type, GIMP_TYPE_PICKABLE,
|
||||
&pickable_iface_info);
|
||||
}
|
||||
|
||||
return drawable_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_drawable_class_init (GimpDrawableClass *klass)
|
||||
|
@ -205,8 +167,6 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_drawable_signals[UPDATE] =
|
||||
g_signal_new ("update",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -268,12 +228,12 @@ gimp_drawable_init (GimpDrawable *drawable)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_drawable_pickable_iface_init (GimpPickableInterface *pickable_iface)
|
||||
gimp_drawable_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
pickable_iface->get_image = gimp_item_get_image;
|
||||
pickable_iface->get_image_type = gimp_drawable_type;
|
||||
pickable_iface->get_tiles = gimp_drawable_data;
|
||||
pickable_iface->get_color_at = gimp_drawable_get_color_at;
|
||||
iface->get_image = gimp_item_get_image;
|
||||
iface->get_image_type = gimp_drawable_type;
|
||||
iface->get_tiles = gimp_drawable_data;
|
||||
iface->get_color_at = gimp_drawable_get_color_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -50,9 +50,6 @@ struct _GimpEnvironValue
|
|||
extern char **environ;
|
||||
|
||||
|
||||
static void gimp_environ_table_class_init (GimpEnvironTableClass *class);
|
||||
static void gimp_environ_table_init (GimpEnvironTable *environ_table);
|
||||
|
||||
static void gimp_environ_table_finalize (GObject *object);
|
||||
|
||||
static void gimp_environ_table_load_env_file (const GimpDatafileData *file_data,
|
||||
|
@ -73,54 +70,26 @@ static void gimp_environ_table_clear_envp (GimpEnvironTable *enviro
|
|||
static void gimp_environ_table_free_value (gpointer value);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpEnvironTable, gimp_environ_table, G_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_environ_table_parent_class
|
||||
|
||||
GType
|
||||
gimp_environ_table_get_type (void)
|
||||
{
|
||||
static GType environ_table_type = 0;
|
||||
|
||||
if (! environ_table_type)
|
||||
{
|
||||
static const GTypeInfo environ_table_info =
|
||||
{
|
||||
sizeof (GimpEnvironTableClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_environ_table_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpEnvironTable),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_environ_table_init,
|
||||
};
|
||||
|
||||
environ_table_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpEnvironTable",
|
||||
&environ_table_info, 0);
|
||||
}
|
||||
|
||||
return environ_table_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_environ_table_class_init (GimpEnvironTableClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class->finalize = gimp_environ_table_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_environ_table_init (GimpEnvironTable *environ_table)
|
||||
{
|
||||
environ_table->vars = NULL;
|
||||
environ_table->vars = NULL;
|
||||
environ_table->internal = NULL;
|
||||
|
||||
environ_table->envp = NULL;
|
||||
environ_table->envp = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
#define EPSILON 1e-10
|
||||
|
||||
|
||||
static void gimp_gradient_class_init (GimpGradientClass *klass);
|
||||
static void gimp_gradient_init (GimpGradient *gradient);
|
||||
|
||||
static void gimp_gradient_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_gradient_get_memsize (GimpObject *object,
|
||||
|
@ -81,99 +78,10 @@ static inline gdouble gimp_gradient_calc_sphere_decreasing_factor (gdouble mid
|
|||
gdouble pos);
|
||||
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpGradient, gimp_gradient, GIMP_TYPE_DATA);
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_linear_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
if (pos <= middle)
|
||||
{
|
||||
if (middle < EPSILON)
|
||||
return 0.0;
|
||||
else
|
||||
return 0.5 * pos / middle;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos -= middle;
|
||||
middle = 1.0 - middle;
|
||||
#define parent_class gimp_gradient_parent_class
|
||||
|
||||
if (middle < EPSILON)
|
||||
return 1.0;
|
||||
else
|
||||
return 0.5 + 0.5 * pos / middle;
|
||||
}
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_curved_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
if (middle < EPSILON)
|
||||
middle = EPSILON;
|
||||
|
||||
return pow (pos, log (0.5) / log (middle));
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sine_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos);
|
||||
|
||||
return (sin ((-G_PI / 2.0) + G_PI * pos) + 1.0) / 2.0;
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sphere_increasing_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos) - 1.0;
|
||||
|
||||
/* Works for convex increasing and concave decreasing */
|
||||
return sqrt (1.0 - pos * pos);
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sphere_decreasing_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos);
|
||||
|
||||
/* Works for convex decreasing and concave increasing */
|
||||
return 1.0 - sqrt(1.0 - pos * pos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GType
|
||||
gimp_gradient_get_type (void)
|
||||
{
|
||||
static GType gradient_type = 0;
|
||||
|
||||
if (! gradient_type)
|
||||
{
|
||||
static const GTypeInfo gradient_info =
|
||||
{
|
||||
sizeof (GimpGradientClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_gradient_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpGradient),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_gradient_init,
|
||||
};
|
||||
|
||||
gradient_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpGradient",
|
||||
&gradient_info, 0);
|
||||
}
|
||||
|
||||
return gradient_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_gradient_class_init (GimpGradientClass *klass)
|
||||
|
@ -183,8 +91,6 @@ gimp_gradient_class_init (GimpGradientClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_gradient_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_gradient_get_memsize;
|
||||
|
@ -345,6 +251,9 @@ gimp_gradient_duplicate (GimpData *data)
|
|||
return GIMP_DATA (gradient);
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
GimpData *
|
||||
gimp_gradient_new (const gchar *name)
|
||||
{
|
||||
|
@ -535,42 +444,6 @@ gimp_gradient_get_color_at (GimpGradient *gradient,
|
|||
return seg;
|
||||
}
|
||||
|
||||
static GimpGradientSegment *
|
||||
gimp_gradient_get_segment_at_internal (GimpGradient *gradient,
|
||||
GimpGradientSegment *seg,
|
||||
gdouble pos)
|
||||
{
|
||||
/* handle FP imprecision at the edges of the gradient */
|
||||
pos = CLAMP (pos, 0.0, 1.0);
|
||||
|
||||
if (! seg)
|
||||
seg = gradient->segments;
|
||||
|
||||
while (seg)
|
||||
{
|
||||
if (pos >= seg->left)
|
||||
{
|
||||
if (pos <= seg->right)
|
||||
{
|
||||
return seg;
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = seg->next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = seg->prev;
|
||||
}
|
||||
}
|
||||
|
||||
/* Oops: we should have found a segment, but we didn't */
|
||||
g_warning ("%s: no matching segment for position %0.15f", G_STRFUNC, pos);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GimpGradientSegment *
|
||||
gimp_gradient_get_segment_at (GimpGradient *gradient,
|
||||
gdouble pos)
|
||||
|
@ -1823,3 +1696,104 @@ gimp_gradient_segment_range_move (GimpGradient *gradient,
|
|||
|
||||
return delta;
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static GimpGradientSegment *
|
||||
gimp_gradient_get_segment_at_internal (GimpGradient *gradient,
|
||||
GimpGradientSegment *seg,
|
||||
gdouble pos)
|
||||
{
|
||||
/* handle FP imprecision at the edges of the gradient */
|
||||
pos = CLAMP (pos, 0.0, 1.0);
|
||||
|
||||
if (! seg)
|
||||
seg = gradient->segments;
|
||||
|
||||
while (seg)
|
||||
{
|
||||
if (pos >= seg->left)
|
||||
{
|
||||
if (pos <= seg->right)
|
||||
{
|
||||
return seg;
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = seg->next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
seg = seg->prev;
|
||||
}
|
||||
}
|
||||
|
||||
/* Oops: we should have found a segment, but we didn't */
|
||||
g_warning ("%s: no matching segment for position %0.15f", G_STRFUNC, pos);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_linear_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
if (pos <= middle)
|
||||
{
|
||||
if (middle < EPSILON)
|
||||
return 0.0;
|
||||
else
|
||||
return 0.5 * pos / middle;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos -= middle;
|
||||
middle = 1.0 - middle;
|
||||
|
||||
if (middle < EPSILON)
|
||||
return 1.0;
|
||||
else
|
||||
return 0.5 + 0.5 * pos / middle;
|
||||
}
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_curved_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
if (middle < EPSILON)
|
||||
middle = EPSILON;
|
||||
|
||||
return pow (pos, log (0.5) / log (middle));
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sine_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos);
|
||||
|
||||
return (sin ((-G_PI / 2.0) + G_PI * pos) + 1.0) / 2.0;
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sphere_increasing_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos) - 1.0;
|
||||
|
||||
/* Works for convex increasing and concave decreasing */
|
||||
return sqrt (1.0 - pos * pos);
|
||||
}
|
||||
|
||||
static inline gdouble
|
||||
gimp_gradient_calc_sphere_decreasing_factor (gdouble middle,
|
||||
gdouble pos)
|
||||
{
|
||||
pos = gimp_gradient_calc_linear_factor (middle, pos);
|
||||
|
||||
/* Works for convex decreasing and concave increasing */
|
||||
return 1.0 - sqrt(1.0 - pos * pos);
|
||||
}
|
||||
|
|
|
@ -52,69 +52,28 @@ enum
|
|||
PROP_OFFSET_UNIT
|
||||
};
|
||||
|
||||
static void gimp_grid_class_init (GimpGridClass *klass);
|
||||
static void gimp_grid_finalize (GObject *object);
|
||||
static void gimp_grid_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_grid_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_grid_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_grid_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpGrid, gimp_grid, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
|
||||
GType
|
||||
gimp_grid_get_type (void)
|
||||
{
|
||||
static GType grid_type = 0;
|
||||
|
||||
if (! grid_type)
|
||||
{
|
||||
static const GTypeInfo grid_info =
|
||||
{
|
||||
sizeof (GimpGridClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_grid_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpGrid),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo grid_iface_info =
|
||||
{
|
||||
NULL, /* iface_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
grid_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpGrid", &grid_info, 0);
|
||||
|
||||
g_type_add_interface_static (grid_type, GIMP_TYPE_CONFIG,
|
||||
&grid_iface_info);
|
||||
}
|
||||
|
||||
return grid_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_grid_class_init (GimpGridClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpRGB black;
|
||||
GimpRGB white;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_grid_finalize;
|
||||
object_class->get_property = gimp_grid_get_property;
|
||||
object_class->set_property = gimp_grid_set_property;
|
||||
|
||||
|
@ -173,12 +132,10 @@ gimp_grid_class_init (GimpGridClass *klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_grid_finalize (GObject *object)
|
||||
gimp_grid_init (GimpGrid *grid)
|
||||
{
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gimp_grid_get_property (GObject *object,
|
||||
guint property_id,
|
||||
|
|
|
@ -116,9 +116,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_image_class_init (GimpImageClass *klass);
|
||||
static void gimp_image_init (GimpImage *gimage);
|
||||
|
||||
static GObject *gimp_image_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params);
|
||||
|
@ -198,41 +195,13 @@ static gint valid_combinations[][MAX_CHANNELS + 1] =
|
|||
{ -1, -1, COMBINE_INDEXED_A_INDEXED_A, -1, -1 },
|
||||
};
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpImage, gimp_image, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_image_parent_class
|
||||
|
||||
static guint gimp_image_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_image_get_type (void)
|
||||
{
|
||||
static GType image_type = 0;
|
||||
|
||||
if (! image_type)
|
||||
{
|
||||
static const GTypeInfo image_info =
|
||||
{
|
||||
sizeof (GimpImageClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_image_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpImage),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_image_init,
|
||||
};
|
||||
|
||||
image_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpImage",
|
||||
&image_info, 0);
|
||||
}
|
||||
|
||||
return image_type;
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
gimp_image_class_init (GimpImageClass *klass)
|
||||
|
@ -241,8 +210,6 @@ gimp_image_class_init (GimpImageClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_image_signals[MODE_CHANGED] =
|
||||
g_signal_new ("mode-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -55,10 +55,10 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_imagefile_class_init (GimpImagefileClass *klass);
|
||||
static void gimp_imagefile_init (GimpImagefile *imagefile);
|
||||
static void gimp_imagefile_finalize (GObject *object);
|
||||
|
||||
static void gimp_imagefile_name_changed (GimpObject *object);
|
||||
|
||||
static void gimp_imagefile_info_changed (GimpImagefile *imagefile);
|
||||
static void gimp_imagefile_notify_thumbnail (GimpImagefile *imagefile,
|
||||
GParamSpec *pspec);
|
||||
|
@ -87,39 +87,12 @@ static void gimp_thumbnail_set_info (GimpThumbnail *thumbnail,
|
|||
gint height);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpImagefile, gimp_imagefile, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_imagefile_parent_class
|
||||
|
||||
static guint gimp_imagefile_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_imagefile_get_type (void)
|
||||
{
|
||||
static GType imagefile_type = 0;
|
||||
|
||||
if (!imagefile_type)
|
||||
{
|
||||
static const GTypeInfo imagefile_info =
|
||||
{
|
||||
sizeof (GimpImagefileClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_imagefile_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpImagefile),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_imagefile_init,
|
||||
};
|
||||
|
||||
imagefile_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpImagefile",
|
||||
&imagefile_info, 0);
|
||||
}
|
||||
|
||||
return imagefile_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_imagefile_class_init (GimpImagefileClass *klass)
|
||||
|
@ -129,8 +102,6 @@ gimp_imagefile_class_init (GimpImagefileClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
gchar *creator;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_imagefile_signals[INFO_CHANGED] =
|
||||
g_signal_new ("info-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -61,9 +61,7 @@ struct _GimpImageMap
|
|||
};
|
||||
|
||||
|
||||
static void gimp_image_map_class_init (GimpImageMapClass *klass);
|
||||
static void gimp_image_map_init (GimpImageMap *image_map);
|
||||
static void gimp_image_map_pickable_iface_init (GimpPickableInterface *pickable_iface);
|
||||
static void gimp_image_map_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_image_map_finalize (GObject *object);
|
||||
|
||||
|
@ -77,56 +75,20 @@ static guchar * gimp_image_map_get_color_at (GimpPickable *pickable,
|
|||
static gboolean gimp_image_map_do (GimpImageMap *image_map);
|
||||
|
||||
|
||||
static guint image_map_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpImageMap, gimp_image_map, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
|
||||
gimp_image_map_pickable_iface_init));
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
#define parent_class gimp_image_map_parent_class
|
||||
|
||||
static guint image_map_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GType
|
||||
gimp_image_map_get_type (void)
|
||||
{
|
||||
static GType image_map_type = 0;
|
||||
|
||||
if (! image_map_type)
|
||||
{
|
||||
static const GTypeInfo image_map_info =
|
||||
{
|
||||
sizeof (GimpImageMapClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_image_map_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpImageMap),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_image_map_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo pickable_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_image_map_pickable_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
image_map_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpImageMap",
|
||||
&image_map_info, 0);
|
||||
|
||||
g_type_add_interface_static (image_map_type, GIMP_TYPE_PICKABLE,
|
||||
&pickable_iface_info);
|
||||
}
|
||||
|
||||
return image_map_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_image_map_class_init (GimpImageMapClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
image_map_signals[FLUSH] =
|
||||
g_signal_new ("flush",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -153,12 +115,12 @@ gimp_image_map_init (GimpImageMap *image_map)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_image_map_pickable_iface_init (GimpPickableInterface *pickable_iface)
|
||||
gimp_image_map_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
pickable_iface->get_image = gimp_image_map_get_image;
|
||||
pickable_iface->get_image_type = gimp_image_map_get_image_type;
|
||||
pickable_iface->get_tiles = gimp_image_map_get_tiles;
|
||||
pickable_iface->get_color_at = gimp_image_map_get_color_at;
|
||||
iface->get_image = gimp_image_map_get_image;
|
||||
iface->get_image_type = gimp_image_map_get_image_type;
|
||||
iface->get_tiles = gimp_image_map_get_tiles;
|
||||
iface->get_color_at = gimp_image_map_get_color_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -80,9 +80,6 @@ struct _GimpInterpreterMagic
|
|||
};
|
||||
|
||||
|
||||
static void gimp_interpreter_db_class_init (GimpInterpreterDBClass *class);
|
||||
static void gimp_interpreter_db_init (GimpInterpreterDB *db);
|
||||
|
||||
static void gimp_interpreter_db_finalize (GObject *object);
|
||||
|
||||
static void gimp_interpreter_db_load_interp_file (const GimpDatafileData *file_data,
|
||||
|
@ -105,45 +102,15 @@ static void gimp_interpreter_db_clear_magics (GimpInterpreterDB *d
|
|||
static void gimp_interpreter_db_resolve_programs (GimpInterpreterDB *db);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpInterpreterDB, gimp_interpreter_db, G_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_interpreter_db_parent_class
|
||||
|
||||
GType
|
||||
gimp_interpreter_db_get_type (void)
|
||||
{
|
||||
static GType interpreter_db_type = 0;
|
||||
|
||||
if (! interpreter_db_type)
|
||||
{
|
||||
static const GTypeInfo interpreter_db_info =
|
||||
{
|
||||
sizeof (GimpInterpreterDBClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_interpreter_db_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpInterpreterDB),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_interpreter_db_init,
|
||||
};
|
||||
|
||||
interpreter_db_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpInterpreterDB",
|
||||
&interpreter_db_info, 0);
|
||||
}
|
||||
|
||||
return interpreter_db_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_interpreter_db_class_init (GimpInterpreterDBClass *class)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = gimp_interpreter_db_finalize;
|
||||
}
|
||||
|
@ -151,21 +118,19 @@ gimp_interpreter_db_class_init (GimpInterpreterDBClass *class)
|
|||
static void
|
||||
gimp_interpreter_db_init (GimpInterpreterDB *db)
|
||||
{
|
||||
db->programs = NULL;
|
||||
db->programs = NULL;
|
||||
|
||||
db->magics = NULL;
|
||||
db->magic_names = NULL;
|
||||
db->magics = NULL;
|
||||
db->magic_names = NULL;
|
||||
|
||||
db->extensions = NULL;
|
||||
db->extensions = NULL;
|
||||
db->extension_names = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_interpreter_db_finalize (GObject *object)
|
||||
{
|
||||
GimpInterpreterDB *db;
|
||||
|
||||
db = GIMP_INTERPRETER_DB (object);
|
||||
GimpInterpreterDB *db = GIMP_INTERPRETER_DB (object);
|
||||
|
||||
gimp_interpreter_db_clear (db);
|
||||
|
||||
|
|
|
@ -63,9 +63,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_item_class_init (GimpItemClass *klass);
|
||||
static void gimp_item_init (GimpItem *item);
|
||||
|
||||
static void gimp_item_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -106,40 +103,12 @@ static void gimp_item_real_resize (GimpItem *item,
|
|||
gint offset_y);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpItem, gimp_item, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_item_parent_class
|
||||
|
||||
static guint gimp_item_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_item_get_type (void)
|
||||
{
|
||||
static GType item_type = 0;
|
||||
|
||||
if (! item_type)
|
||||
{
|
||||
static const GTypeInfo item_info =
|
||||
{
|
||||
sizeof (GimpItemClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_item_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpItem),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_item_init,
|
||||
};
|
||||
|
||||
item_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpItem",
|
||||
&item_info, 0);
|
||||
}
|
||||
|
||||
return item_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_item_class_init (GimpItemClass *klass)
|
||||
|
@ -148,8 +117,6 @@ gimp_item_class_init (GimpItemClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gimp_item_signals[REMOVED] =
|
||||
g_signal_new ("removed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -34,8 +34,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_item_undo_class_init (GimpItemUndoClass *klass);
|
||||
|
||||
static GObject * gimp_item_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params);
|
||||
|
@ -52,36 +50,10 @@ static void gimp_item_undo_free (GimpUndo *undo,
|
|||
GimpUndoMode undo_mode);
|
||||
|
||||
|
||||
static GimpUndoClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpItemUndo, gimp_item_undo, GIMP_TYPE_UNDO);
|
||||
|
||||
#define parent_class gimp_item_undo_parent_class
|
||||
|
||||
GType
|
||||
gimp_item_undo_get_type (void)
|
||||
{
|
||||
static GType undo_type = 0;
|
||||
|
||||
if (! undo_type)
|
||||
{
|
||||
static const GTypeInfo undo_info =
|
||||
{
|
||||
sizeof (GimpItemUndoClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_item_undo_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpItemUndo),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
|
||||
undo_type = g_type_register_static (GIMP_TYPE_UNDO,
|
||||
"GimpItemUndo",
|
||||
&undo_info, 0);
|
||||
}
|
||||
|
||||
return undo_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_item_undo_class_init (GimpItemUndoClass *klass)
|
||||
|
@ -89,8 +61,6 @@ gimp_item_undo_class_init (GimpItemUndoClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->constructor = gimp_item_undo_constructor;
|
||||
object_class->set_property = gimp_item_undo_set_property;
|
||||
object_class->get_property = gimp_item_undo_get_property;
|
||||
|
@ -104,6 +74,11 @@ gimp_item_undo_class_init (GimpItemUndoClass *klass)
|
|||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_item_undo_init (GimpItemUndo *undo)
|
||||
{
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gimp_item_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
|
|
|
@ -69,9 +69,7 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_layer_class_init (GimpLayerClass *klass);
|
||||
static void gimp_layer_init (GimpLayer *layer);
|
||||
static void gimp_layer_pickable_iface_init (GimpPickableInterface *pickable_iface);
|
||||
static void gimp_layer_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_layer_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -167,48 +165,14 @@ static void gimp_layer_layer_mask_update (GimpDrawable *layer_mask,
|
|||
GimpLayer *layer);
|
||||
|
||||
|
||||
static guint layer_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpLayer, gimp_layer, GIMP_TYPE_DRAWABLE,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
|
||||
gimp_layer_pickable_iface_init));
|
||||
|
||||
static GimpDrawableClass *parent_class = NULL;
|
||||
#define parent_class gimp_layer_parent_class
|
||||
|
||||
static guint layer_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GType
|
||||
gimp_layer_get_type (void)
|
||||
{
|
||||
static GType layer_type = 0;
|
||||
|
||||
if (! layer_type)
|
||||
{
|
||||
static const GTypeInfo layer_info =
|
||||
{
|
||||
sizeof (GimpLayerClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_layer_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpLayer),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_layer_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo pickable_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_layer_pickable_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
layer_type = g_type_register_static (GIMP_TYPE_DRAWABLE,
|
||||
"GimpLayer",
|
||||
&layer_info, 0);
|
||||
|
||||
g_type_add_interface_static (layer_type, GIMP_TYPE_PICKABLE,
|
||||
&pickable_iface_info);
|
||||
}
|
||||
|
||||
return layer_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_class_init (GimpLayerClass *klass)
|
||||
|
@ -219,8 +183,6 @@ gimp_layer_class_init (GimpLayerClass *klass)
|
|||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
layer_signals[OPACITY_CHANGED] =
|
||||
g_signal_new ("opacity-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -337,9 +299,9 @@ gimp_layer_init (GimpLayer *layer)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_layer_pickable_iface_init (GimpPickableInterface *pickable_iface)
|
||||
gimp_layer_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
pickable_iface->get_opacity_at = gimp_layer_get_opacity_at;
|
||||
iface->get_opacity_at = gimp_layer_get_opacity_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -45,50 +45,21 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_layer_mask_class_init (GimpLayerMaskClass *klass);
|
||||
static void gimp_layer_mask_init (GimpLayerMask *layer_mask);
|
||||
|
||||
static gboolean gimp_layer_mask_is_attached (GimpItem *item);
|
||||
static GimpItem * gimp_layer_mask_duplicate (GimpItem *item,
|
||||
GType new_type,
|
||||
gboolean add_alpha);
|
||||
static gboolean gimp_layer_mask_rename (GimpItem *item,
|
||||
const gchar *new_name,
|
||||
const gchar *undo_desc);
|
||||
static gboolean gimp_layer_mask_is_attached (GimpItem *item);
|
||||
static GimpItem * gimp_layer_mask_duplicate (GimpItem *item,
|
||||
GType new_type,
|
||||
gboolean add_alpha);
|
||||
static gboolean gimp_layer_mask_rename (GimpItem *item,
|
||||
const gchar *new_name,
|
||||
const gchar *undo_desc);
|
||||
|
||||
|
||||
static guint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE (GimpLayerMask, gimp_layer_mask, GIMP_TYPE_CHANNEL);
|
||||
|
||||
static GimpChannelClass *parent_class = NULL;
|
||||
#define parent_class gimp_layer_mask_parent_class
|
||||
|
||||
static guint layer_mask_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GType
|
||||
gimp_layer_mask_get_type (void)
|
||||
{
|
||||
static GType layer_mask_type = 0;
|
||||
|
||||
if (! layer_mask_type)
|
||||
{
|
||||
static const GTypeInfo layer_mask_info =
|
||||
{
|
||||
sizeof (GimpLayerMaskClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_layer_mask_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpLayerMask),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_layer_mask_init,
|
||||
};
|
||||
|
||||
layer_mask_type = g_type_register_static (GIMP_TYPE_CHANNEL,
|
||||
"GimpLayerMask",
|
||||
&layer_mask_info, 0);
|
||||
}
|
||||
|
||||
return layer_mask_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_layer_mask_class_init (GimpLayerMaskClass *klass)
|
||||
|
@ -96,8 +67,6 @@ gimp_layer_mask_class_init (GimpLayerMaskClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
layer_mask_signals[APPLY_CHANGED] =
|
||||
g_signal_new ("apply-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -39,9 +39,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_list_class_init (GimpListClass *klass);
|
||||
static void gimp_list_init (GimpList *list);
|
||||
|
||||
static void gimp_list_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -80,36 +77,10 @@ static void gimp_list_object_renamed (GimpObject *object,
|
|||
GimpList *list);
|
||||
|
||||
|
||||
static GimpContainerClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpList, gimp_list, GIMP_TYPE_CONTAINER);
|
||||
|
||||
#define parent_class gimp_list_parent_class
|
||||
|
||||
GType
|
||||
gimp_list_get_type (void)
|
||||
{
|
||||
static GType list_type = 0;
|
||||
|
||||
if (! list_type)
|
||||
{
|
||||
static const GTypeInfo list_info =
|
||||
{
|
||||
sizeof (GimpListClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_list_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpList),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_list_init,
|
||||
};
|
||||
|
||||
list_type = g_type_register_static (GIMP_TYPE_CONTAINER,
|
||||
"GimpList",
|
||||
&list_info, 0);
|
||||
}
|
||||
|
||||
return list_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_list_class_init (GimpListClass *klass)
|
||||
|
@ -118,8 +89,6 @@ gimp_list_class_init (GimpListClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpContainerClass *container_class = GIMP_CONTAINER_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_list_set_property;
|
||||
object_class->get_property = gimp_list_get_property;
|
||||
|
||||
|
|
|
@ -45,64 +45,33 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_object_class_init (GimpObjectClass *klass);
|
||||
static void gimp_object_init (GimpObject *object);
|
||||
|
||||
static void gimp_object_dispose (GObject *object);
|
||||
static void gimp_object_finalize (GObject *object);
|
||||
static void gimp_object_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_object_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gint64 gimp_object_real_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static void gimp_object_name_normalize (GimpObject *object);
|
||||
static void gimp_object_dispose (GObject *object);
|
||||
static void gimp_object_finalize (GObject *object);
|
||||
static void gimp_object_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_object_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gint64 gimp_object_real_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
static void gimp_object_name_normalize (GimpObject *object);
|
||||
|
||||
|
||||
static guint object_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE (GimpObject, gimp_object, G_TYPE_OBJECT);
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
#define parent_class gimp_object_parent_class
|
||||
|
||||
static guint object_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GType
|
||||
gimp_object_get_type (void)
|
||||
{
|
||||
static GType object_type = 0;
|
||||
|
||||
if (! object_type)
|
||||
{
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GimpObjectClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_object_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpObject),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_object_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpObject",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
return object_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_object_class_init (GimpObjectClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_signals[DISCONNECT] =
|
||||
g_signal_new ("disconnect",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -28,44 +28,15 @@
|
|||
#include "gimppaintinfo.h"
|
||||
|
||||
|
||||
static void gimp_paint_info_class_init (GimpPaintInfoClass *klass);
|
||||
static void gimp_paint_info_init (GimpPaintInfo *paint_info);
|
||||
|
||||
static void gimp_paint_info_finalize (GObject *object);
|
||||
static gchar * gimp_paint_info_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static void gimp_paint_info_finalize (GObject *object);
|
||||
static gchar * gimp_paint_info_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpPaintInfo, gimp_paint_info, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_paint_info_parent_class
|
||||
|
||||
GType
|
||||
gimp_paint_info_get_type (void)
|
||||
{
|
||||
static GType paint_info_type = 0;
|
||||
|
||||
if (! paint_info_type)
|
||||
{
|
||||
static const GTypeInfo paint_info_info =
|
||||
{
|
||||
sizeof (GimpPaintInfoClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_paint_info_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPaintInfo),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_paint_info_init,
|
||||
};
|
||||
|
||||
paint_info_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpPaintInfo",
|
||||
&paint_info_info, 0);
|
||||
}
|
||||
|
||||
return paint_info_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_info_class_init (GimpPaintInfoClass *klass)
|
||||
|
@ -73,8 +44,6 @@ gimp_paint_info_class_init (GimpPaintInfoClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_paint_info_finalize;
|
||||
|
||||
viewable_class->get_description = gimp_paint_info_get_description;
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_palette_class_init (GimpPaletteClass *klass);
|
||||
static void gimp_palette_init (GimpPalette *palette);
|
||||
|
||||
static void gimp_palette_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_palette_get_memsize (GimpObject *object,
|
||||
|
@ -76,39 +73,11 @@ static GimpData * gimp_palette_duplicate (GimpData *data);
|
|||
static void gimp_palette_entry_free (GimpPaletteEntry *entry);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_DATA);
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
#define parent_class gimp_palette_parent_class
|
||||
|
||||
|
||||
GType
|
||||
gimp_palette_get_type (void)
|
||||
{
|
||||
static GType palette_type = 0;
|
||||
|
||||
if (! palette_type)
|
||||
{
|
||||
static const GTypeInfo palette_info =
|
||||
{
|
||||
sizeof (GimpPaletteClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_palette_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPalette),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_palette_init,
|
||||
};
|
||||
|
||||
palette_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpPalette",
|
||||
&palette_info, 0);
|
||||
}
|
||||
|
||||
return palette_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_palette_class_init (GimpPaletteClass *klass)
|
||||
{
|
||||
|
@ -117,8 +86,6 @@ gimp_palette_class_init (GimpPaletteClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_palette_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_palette_get_memsize;
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_palette_class_init (GimpPaletteClass *klass);
|
||||
static void gimp_palette_init (GimpPalette *palette);
|
||||
|
||||
static void gimp_palette_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_palette_get_memsize (GimpObject *object,
|
||||
|
@ -76,39 +73,11 @@ static GimpData * gimp_palette_duplicate (GimpData *data);
|
|||
static void gimp_palette_entry_free (GimpPaletteEntry *entry);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_DATA);
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
#define parent_class gimp_palette_parent_class
|
||||
|
||||
|
||||
GType
|
||||
gimp_palette_get_type (void)
|
||||
{
|
||||
static GType palette_type = 0;
|
||||
|
||||
if (! palette_type)
|
||||
{
|
||||
static const GTypeInfo palette_info =
|
||||
{
|
||||
sizeof (GimpPaletteClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_palette_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPalette),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_palette_init,
|
||||
};
|
||||
|
||||
palette_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpPalette",
|
||||
&palette_info, 0);
|
||||
}
|
||||
|
||||
return palette_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_palette_class_init (GimpPaletteClass *klass)
|
||||
{
|
||||
|
@ -117,8 +86,6 @@ gimp_palette_class_init (GimpPaletteClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_palette_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_palette_get_memsize;
|
||||
|
|
|
@ -43,9 +43,6 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_palette_class_init (GimpPaletteClass *klass);
|
||||
static void gimp_palette_init (GimpPalette *palette);
|
||||
|
||||
static void gimp_palette_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_palette_get_memsize (GimpObject *object,
|
||||
|
@ -76,39 +73,11 @@ static GimpData * gimp_palette_duplicate (GimpData *data);
|
|||
static void gimp_palette_entry_free (GimpPaletteEntry *entry);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_DATA);
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
#define parent_class gimp_palette_parent_class
|
||||
|
||||
|
||||
GType
|
||||
gimp_palette_get_type (void)
|
||||
{
|
||||
static GType palette_type = 0;
|
||||
|
||||
if (! palette_type)
|
||||
{
|
||||
static const GTypeInfo palette_info =
|
||||
{
|
||||
sizeof (GimpPaletteClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_palette_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPalette),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_palette_init,
|
||||
};
|
||||
|
||||
palette_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpPalette",
|
||||
&palette_info, 0);
|
||||
}
|
||||
|
||||
return palette_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_palette_class_init (GimpPaletteClass *klass)
|
||||
{
|
||||
|
@ -117,8 +86,6 @@ gimp_palette_class_init (GimpPaletteClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_palette_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_palette_get_memsize;
|
||||
|
|
|
@ -46,8 +46,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_parasite_list_class_init (GimpParasiteListClass *klass);
|
||||
static void gimp_parasite_list_init (GimpParasiteList *list);
|
||||
static void gimp_parasite_list_finalize (GObject *object);
|
||||
static gint64 gimp_parasite_list_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
@ -76,57 +74,22 @@ static void parasite_count_if_persistent (const gchar *key,
|
|||
gint *count);
|
||||
|
||||
|
||||
static guint parasite_list_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpParasiteList, gimp_parasite_list, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_parasite_list_config_iface_init));
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
#define parent_class gimp_parasite_list_parent_class
|
||||
|
||||
static const gchar *parasite_symbol = "parasite";
|
||||
static guint parasite_list_signals[LAST_SIGNAL] = { 0 };
|
||||
static const gchar *parasite_symbol = "parasite";
|
||||
|
||||
|
||||
GType
|
||||
gimp_parasite_list_get_type (void)
|
||||
{
|
||||
static GType list_type = 0;
|
||||
|
||||
if (! list_type)
|
||||
{
|
||||
static const GTypeInfo list_info =
|
||||
{
|
||||
sizeof (GimpParasiteListClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_parasite_list_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpParasiteList),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_parasite_list_init,
|
||||
};
|
||||
static const GInterfaceInfo list_iface_info =
|
||||
{
|
||||
gimp_parasite_list_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
list_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpParasiteList",
|
||||
&list_info, 0);
|
||||
g_type_add_interface_static (list_type, GIMP_TYPE_CONFIG,
|
||||
&list_iface_info);
|
||||
}
|
||||
|
||||
return list_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_parasite_list_class_init (GimpParasiteListClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
parasite_list_signals[ADD] =
|
||||
g_signal_new ("add",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -55,56 +55,27 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_pattern_class_init (GimpPatternClass *klass);
|
||||
static void gimp_pattern_init (GimpPattern *pattern);
|
||||
static void gimp_pattern_finalize (GObject *object);
|
||||
|
||||
static void gimp_pattern_finalize (GObject *object);
|
||||
static gint64 gimp_pattern_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gint64 gimp_pattern_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_pattern_get_extension (GimpData *data);
|
||||
static GimpData * gimp_pattern_duplicate (GimpData *data);
|
||||
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_pattern_get_extension (GimpData *data);
|
||||
static GimpData * gimp_pattern_duplicate (GimpData *data);
|
||||
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpPattern, gimp_pattern, GIMP_TYPE_DATA);
|
||||
|
||||
#define parent_class gimp_pattern_parent_class
|
||||
|
||||
GType
|
||||
gimp_pattern_get_type (void)
|
||||
{
|
||||
static GType pattern_type = 0;
|
||||
|
||||
if (! pattern_type)
|
||||
{
|
||||
static const GTypeInfo pattern_info =
|
||||
{
|
||||
sizeof (GimpPatternClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_pattern_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPattern),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_pattern_init,
|
||||
};
|
||||
|
||||
pattern_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpPattern",
|
||||
&pattern_info, 0);
|
||||
}
|
||||
|
||||
return pattern_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_pattern_class_init (GimpPatternClass *klass)
|
||||
|
@ -114,8 +85,6 @@ gimp_pattern_class_init (GimpPatternClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_pattern_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_pattern_get_memsize;
|
||||
|
|
|
@ -55,56 +55,27 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_pattern_class_init (GimpPatternClass *klass);
|
||||
static void gimp_pattern_init (GimpPattern *pattern);
|
||||
static void gimp_pattern_finalize (GObject *object);
|
||||
|
||||
static void gimp_pattern_finalize (GObject *object);
|
||||
static gint64 gimp_pattern_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gint64 gimp_pattern_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_pattern_get_extension (GimpData *data);
|
||||
static GimpData * gimp_pattern_duplicate (GimpData *data);
|
||||
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
|
||||
gint width,
|
||||
gint height);
|
||||
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static gchar * gimp_pattern_get_extension (GimpData *data);
|
||||
static GimpData * gimp_pattern_duplicate (GimpData *data);
|
||||
|
||||
|
||||
static GimpDataClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpPattern, gimp_pattern, GIMP_TYPE_DATA);
|
||||
|
||||
#define parent_class gimp_pattern_parent_class
|
||||
|
||||
GType
|
||||
gimp_pattern_get_type (void)
|
||||
{
|
||||
static GType pattern_type = 0;
|
||||
|
||||
if (! pattern_type)
|
||||
{
|
||||
static const GTypeInfo pattern_info =
|
||||
{
|
||||
sizeof (GimpPatternClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_pattern_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpPattern),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_pattern_init,
|
||||
};
|
||||
|
||||
pattern_type = g_type_register_static (GIMP_TYPE_DATA,
|
||||
"GimpPattern",
|
||||
&pattern_info, 0);
|
||||
}
|
||||
|
||||
return pattern_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_pattern_class_init (GimpPatternClass *klass)
|
||||
|
@ -114,8 +85,6 @@ gimp_pattern_class_init (GimpPatternClass *klass)
|
|||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpDataClass *data_class = GIMP_DATA_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_pattern_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_pattern_get_memsize;
|
||||
|
|
|
@ -48,7 +48,7 @@ enum
|
|||
static void gimp_pdb_progress_class_init (GimpPdbProgressClass *klass);
|
||||
static void gimp_pdb_progress_init (GimpPdbProgress *progress,
|
||||
GimpPdbProgressClass *klass);
|
||||
static void gimp_pdb_progress_progress_iface_init (GimpProgressInterface *progress_iface);
|
||||
static void gimp_pdb_progress_progress_iface_init (GimpProgressInterface *iface);
|
||||
|
||||
static GObject * gimp_pdb_progress_constructor (GType type,
|
||||
guint n_params,
|
||||
|
@ -149,16 +149,16 @@ gimp_pdb_progress_init (GimpPdbProgress *progress,
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_pdb_progress_progress_iface_init (GimpProgressInterface *progress_iface)
|
||||
gimp_pdb_progress_progress_iface_init (GimpProgressInterface *iface)
|
||||
{
|
||||
progress_iface->start = gimp_pdb_progress_progress_start;
|
||||
progress_iface->end = gimp_pdb_progress_progress_end;
|
||||
progress_iface->is_active = gimp_pdb_progress_progress_is_active;
|
||||
progress_iface->set_text = gimp_pdb_progress_progress_set_text;
|
||||
progress_iface->set_value = gimp_pdb_progress_progress_set_value;
|
||||
progress_iface->get_value = gimp_pdb_progress_progress_get_value;
|
||||
progress_iface->pulse = gimp_pdb_progress_progress_pulse;
|
||||
progress_iface->get_window = gimp_pdb_progress_progress_get_window;
|
||||
iface->start = gimp_pdb_progress_progress_start;
|
||||
iface->end = gimp_pdb_progress_progress_end;
|
||||
iface->is_active = gimp_pdb_progress_progress_is_active;
|
||||
iface->set_text = gimp_pdb_progress_progress_set_text;
|
||||
iface->set_value = gimp_pdb_progress_progress_set_value;
|
||||
iface->get_value = gimp_pdb_progress_progress_get_value;
|
||||
iface->pulse = gimp_pdb_progress_progress_pulse;
|
||||
iface->get_window = gimp_pdb_progress_progress_get_window;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
|
|
@ -43,9 +43,7 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_projection_class_init (GimpProjectionClass *klass);
|
||||
static void gimp_projection_init (GimpProjection *proj);
|
||||
static void gimp_projection_pickable_iface_init (GimpPickableInterface *pickable_iface);
|
||||
static void gimp_projection_pickable_iface_init (GimpPickableInterface *iface);
|
||||
|
||||
static void gimp_projection_finalize (GObject *object);
|
||||
|
||||
|
@ -98,48 +96,14 @@ static void gimp_projection_image_flush (GimpImage *gimage,
|
|||
GimpProjection *proj);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpProjection, gimp_projection, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
|
||||
gimp_projection_pickable_iface_init));
|
||||
|
||||
#define parent_class gimp_projection_parent_class
|
||||
|
||||
static guint projection_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_projection_get_type (void)
|
||||
{
|
||||
static GType projection_type = 0;
|
||||
|
||||
if (! projection_type)
|
||||
{
|
||||
static const GTypeInfo projection_info =
|
||||
{
|
||||
sizeof (GimpProjectionClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_projection_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpProjection),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_projection_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo pickable_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_projection_pickable_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
projection_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpProjection",
|
||||
&projection_info, 0);
|
||||
|
||||
g_type_add_interface_static (projection_type, GIMP_TYPE_PICKABLE,
|
||||
&pickable_iface_info);
|
||||
}
|
||||
|
||||
return projection_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_projection_class_init (GimpProjectionClass *klass)
|
||||
|
@ -147,8 +111,6 @@ gimp_projection_class_init (GimpProjectionClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
projection_signals[UPDATE] =
|
||||
g_signal_new ("update",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -186,13 +148,13 @@ gimp_projection_init (GimpProjection *proj)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_projection_pickable_iface_init (GimpPickableInterface *pickable_iface)
|
||||
gimp_projection_pickable_iface_init (GimpPickableInterface *iface)
|
||||
{
|
||||
pickable_iface->get_image = gimp_projection_get_image;
|
||||
pickable_iface->get_image_type = gimp_projection_get_image_type;
|
||||
pickable_iface->get_tiles = gimp_projection_get_tiles;
|
||||
pickable_iface->get_color_at = gimp_projection_get_color_at;
|
||||
pickable_iface->get_opacity_at = gimp_projection_get_opacity_at;
|
||||
iface->get_image = gimp_projection_get_image;
|
||||
iface->get_image_type = gimp_projection_get_image_type;
|
||||
iface->get_tiles = gimp_projection_get_tiles;
|
||||
iface->get_color_at = gimp_projection_get_color_at;
|
||||
iface->get_opacity_at = gimp_projection_get_opacity_at;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -42,9 +42,6 @@
|
|||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static void gimp_selection_class_init (GimpSelectionClass *klass);
|
||||
static void gimp_selection_init (GimpSelection *selection);
|
||||
|
||||
static gboolean gimp_selection_is_attached (GimpItem *item);
|
||||
static void gimp_selection_translate (GimpItem *item,
|
||||
gint offset_x,
|
||||
|
@ -126,36 +123,10 @@ static void gimp_selection_validate (TileManager *tm,
|
|||
Tile *tile);
|
||||
|
||||
|
||||
static GimpChannelClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpSelection, gimp_selection, GIMP_TYPE_CHANNEL);
|
||||
|
||||
#define parent_class gimp_selection_parent_class
|
||||
|
||||
GType
|
||||
gimp_selection_get_type (void)
|
||||
{
|
||||
static GType selection_type = 0;
|
||||
|
||||
if (! selection_type)
|
||||
{
|
||||
static const GTypeInfo selection_info =
|
||||
{
|
||||
sizeof (GimpSelectionClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_selection_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpSelection),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_selection_init,
|
||||
};
|
||||
|
||||
selection_type = g_type_register_static (GIMP_TYPE_CHANNEL,
|
||||
"GimpSelection",
|
||||
&selection_info, 0);
|
||||
}
|
||||
|
||||
return selection_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_selection_class_init (GimpSelectionClass *klass)
|
||||
|
@ -165,8 +136,6 @@ gimp_selection_class_init (GimpSelectionClass *klass)
|
|||
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
|
||||
GimpChannelClass *channel_class = GIMP_CHANNEL_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
viewable_class->default_stock_id = "gimp-selection";
|
||||
|
||||
item_class->is_attached = gimp_selection_is_attached;
|
||||
|
|
|
@ -52,8 +52,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_stroke_desc_class_init (GimpStrokeDescClass *klass);
|
||||
|
||||
static GObject * gimp_stroke_desc_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params);
|
||||
|
@ -68,53 +66,17 @@ static void gimp_stroke_desc_get_property (GObject *object,
|
|||
GParamSpec *pspec);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpStrokeDesc, gimp_stroke_desc, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
#define parent_class gimp_stroke_desc_parent_class
|
||||
|
||||
GType
|
||||
gimp_stroke_desc_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
static const GTypeInfo info =
|
||||
{
|
||||
sizeof (GimpStrokeDescClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_stroke_desc_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpStrokeDesc),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
NULL, /* ifact_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpStrokeDesc",
|
||||
&info, 0);
|
||||
|
||||
g_type_add_interface_static (type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_desc_class_init (GimpStrokeDescClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->constructor = gimp_stroke_desc_constructor;
|
||||
object_class->finalize = gimp_stroke_desc_finalize;
|
||||
object_class->set_property = gimp_stroke_desc_set_property;
|
||||
|
@ -147,6 +109,11 @@ gimp_stroke_desc_class_init (GimpStrokeDescClass *klass)
|
|||
0);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_desc_init (GimpStrokeDesc *desc)
|
||||
{
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gimp_stroke_desc_constructor (GType type,
|
||||
guint n_params,
|
||||
|
|
|
@ -57,59 +57,27 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_stroke_options_class_init (GimpStrokeOptionsClass *klass);
|
||||
|
||||
static void gimp_stroke_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_stroke_options_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_stroke_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_stroke_options_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
static guint stroke_options_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE (GimpStrokeOptions, gimp_stroke_options, GIMP_TYPE_CONTEXT);
|
||||
|
||||
static GimpContextClass *parent_class = NULL;
|
||||
static guint stroke_options_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GType
|
||||
gimp_stroke_options_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
static const GTypeInfo info =
|
||||
{
|
||||
sizeof (GimpStrokeOptionsClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_stroke_options_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpStrokeOptions),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
|
||||
type = g_type_register_static (GIMP_TYPE_CONTEXT,
|
||||
"GimpStrokeOptions",
|
||||
&info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_options_class_init (GimpStrokeOptionsClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GParamSpec *array_spec;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_stroke_options_set_property;
|
||||
object_class->get_property = gimp_stroke_options_get_property;
|
||||
|
||||
|
@ -173,6 +141,11 @@ gimp_stroke_options_class_init (GimpStrokeOptionsClass *klass)
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_options_init (GimpStrokeOptions *options)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
|
|
@ -69,73 +69,32 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_template_class_init (GimpTemplateClass *klass);
|
||||
|
||||
static void gimp_template_finalize (GObject *object);
|
||||
static void gimp_template_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_template_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_template_notify (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_template_finalize (GObject *object);
|
||||
static void gimp_template_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_template_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_template_notify (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpTemplate, gimp_template, GIMP_TYPE_VIEWABLE,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
#define parent_class gimp_template_parent_class
|
||||
|
||||
GType
|
||||
gimp_template_get_type (void)
|
||||
{
|
||||
static GType template_type = 0;
|
||||
|
||||
if (! template_type)
|
||||
{
|
||||
static const GTypeInfo template_info =
|
||||
{
|
||||
sizeof (GimpTemplateClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_template_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpTemplate),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
NULL, /* iface_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
template_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpTemplate",
|
||||
&template_info, 0);
|
||||
|
||||
g_type_add_interface_static (template_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return template_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_template_class_init (GimpTemplateClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpViewableClass *viewable_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_template_finalize;
|
||||
object_class->finalize = gimp_template_finalize;
|
||||
|
||||
object_class->set_property = gimp_template_set_property;
|
||||
object_class->get_property = gimp_template_get_property;
|
||||
|
@ -199,6 +158,11 @@ gimp_template_class_init (GimpTemplateClass *klass)
|
|||
0);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_template_init (GimpTemplate *template)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_template_finalize (GObject *object)
|
||||
{
|
||||
|
@ -319,11 +283,9 @@ static void
|
|||
gimp_template_notify (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GimpTemplate *template;
|
||||
GimpTemplate *template = GIMP_TEMPLATE (object);
|
||||
gint channels;
|
||||
|
||||
template = GIMP_TEMPLATE (object);
|
||||
|
||||
if (G_OBJECT_CLASS (parent_class)->notify)
|
||||
G_OBJECT_CLASS (parent_class)->notify (object, pspec);
|
||||
|
||||
|
|
|
@ -44,52 +44,23 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_tool_info_class_init (GimpToolInfoClass *klass);
|
||||
static void gimp_tool_info_init (GimpToolInfo *tool_info);
|
||||
|
||||
static void gimp_tool_info_finalize (GObject *object);
|
||||
static void gimp_tool_info_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_tool_info_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gchar * gimp_tool_info_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
static void gimp_tool_info_finalize (GObject *object);
|
||||
static void gimp_tool_info_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_tool_info_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gchar * gimp_tool_info_get_description (GimpViewable *viewable,
|
||||
gchar **tooltip);
|
||||
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpToolInfo, gimp_tool_info, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_tool_info_parent_class
|
||||
|
||||
GType
|
||||
gimp_tool_info_get_type (void)
|
||||
{
|
||||
static GType tool_info_type = 0;
|
||||
|
||||
if (! tool_info_type)
|
||||
{
|
||||
static const GTypeInfo tool_info_info =
|
||||
{
|
||||
sizeof (GimpToolInfoClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_tool_info_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpToolInfo),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_tool_info_init,
|
||||
};
|
||||
|
||||
tool_info_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpToolInfo",
|
||||
&tool_info_info, 0);
|
||||
}
|
||||
|
||||
return tool_info_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_tool_info_class_init (GimpToolInfoClass *klass)
|
||||
|
@ -97,8 +68,6 @@ gimp_tool_info_class_init (GimpToolInfoClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_tool_info_finalize;
|
||||
object_class->get_property = gimp_tool_info_get_property;
|
||||
object_class->set_property = gimp_tool_info_set_property;
|
||||
|
|
|
@ -37,9 +37,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_tool_options_init (GimpToolOptions *options);
|
||||
static void gimp_tool_options_class_init (GimpToolOptionsClass *options_class);
|
||||
|
||||
static void gimp_tool_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -52,44 +49,14 @@ static void gimp_tool_options_get_property (GObject *object,
|
|||
static void gimp_tool_options_real_reset (GimpToolOptions *tool_options);
|
||||
|
||||
|
||||
static GimpContextClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpToolOptions, gimp_tool_options, GIMP_TYPE_CONTEXT);
|
||||
|
||||
|
||||
GType
|
||||
gimp_tool_options_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
static const GTypeInfo info =
|
||||
{
|
||||
sizeof (GimpToolOptionsClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_tool_options_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpToolOptions),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_tool_options_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GIMP_TYPE_CONTEXT,
|
||||
"GimpToolOptions",
|
||||
&info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_tool_options_class_init (GimpToolOptionsClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_tool_options_set_property;
|
||||
object_class->get_property = gimp_tool_options_get_property;
|
||||
|
||||
|
|
|
@ -59,8 +59,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_undo_class_init (GimpUndoClass *klass);
|
||||
|
||||
static GObject * gimp_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params);
|
||||
|
@ -97,38 +95,12 @@ static gboolean gimp_undo_create_preview_idle (gpointer data);
|
|||
static void gimp_undo_create_preview_private (GimpUndo *undo);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpUndo, gimp_undo, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_undo_parent_class
|
||||
|
||||
static guint undo_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_undo_get_type (void)
|
||||
{
|
||||
static GType undo_type = 0;
|
||||
|
||||
if (! undo_type)
|
||||
{
|
||||
static const GTypeInfo undo_info =
|
||||
{
|
||||
sizeof (GimpUndoClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_undo_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpUndo),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
|
||||
undo_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpUndo",
|
||||
&undo_info, 0);
|
||||
}
|
||||
|
||||
return undo_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_undo_class_init (GimpUndoClass *klass)
|
||||
|
@ -137,8 +109,6 @@ gimp_undo_class_init (GimpUndoClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
undo_signals[POP] =
|
||||
g_signal_new ("pop",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -217,6 +187,12 @@ gimp_undo_class_init (GimpUndoClass *klass)
|
|||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_undo_init (GimpUndo *undo)
|
||||
{
|
||||
undo->time = time (NULL);
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gimp_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
|
@ -231,8 +207,6 @@ gimp_undo_constructor (GType type,
|
|||
|
||||
g_assert (GIMP_IS_IMAGE (undo->gimage));
|
||||
|
||||
undo->time = time (NULL);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
#include "gimpundostack.h"
|
||||
|
||||
|
||||
static void gimp_undo_stack_class_init (GimpUndoStackClass *klass);
|
||||
static void gimp_undo_stack_init (GimpUndoStack *stack);
|
||||
|
||||
static void gimp_undo_stack_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_undo_stack_get_memsize (GimpObject *object,
|
||||
|
@ -43,36 +40,10 @@ static void gimp_undo_stack_free (GimpUndo *undo,
|
|||
GimpUndoMode undo_mode);
|
||||
|
||||
|
||||
static GimpUndoClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpUndoStack, gimp_undo_stack, GIMP_TYPE_UNDO);
|
||||
|
||||
#define parent_class gimp_undo_stack_parent_class
|
||||
|
||||
GType
|
||||
gimp_undo_stack_get_type (void)
|
||||
{
|
||||
static GType undo_stack_type = 0;
|
||||
|
||||
if (! undo_stack_type)
|
||||
{
|
||||
static const GTypeInfo undo_stack_info =
|
||||
{
|
||||
sizeof (GimpUndoStackClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_undo_stack_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpUndoStack),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_undo_stack_init,
|
||||
};
|
||||
|
||||
undo_stack_type = g_type_register_static (GIMP_TYPE_UNDO,
|
||||
"GimpUndoStack",
|
||||
&undo_stack_info, 0);
|
||||
}
|
||||
|
||||
return undo_stack_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_undo_stack_class_init (GimpUndoStackClass *klass)
|
||||
|
@ -81,8 +52,6 @@ gimp_undo_stack_class_init (GimpUndoStackClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_undo_stack_finalize;
|
||||
|
||||
gimp_object_class->get_memsize = gimp_undo_stack_get_memsize;
|
||||
|
|
|
@ -52,9 +52,7 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_viewable_class_init (GimpViewableClass *klass);
|
||||
static void gimp_viewable_init (GimpViewable *viewable);
|
||||
static void gimp_viewable_config_iface_init (GimpConfigInterface *config_iface);
|
||||
static void gimp_viewable_config_iface_init (GimpConfigInterface *iface);
|
||||
|
||||
static void gimp_viewable_finalize (GObject *object);
|
||||
static void gimp_viewable_set_property (GObject *object,
|
||||
|
@ -95,50 +93,16 @@ static gboolean gimp_viewable_serialize_property (GimpConfig *config,
|
|||
GimpConfigWriter *writer);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpViewable, gimp_viewable, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
|
||||
gimp_viewable_config_iface_init));
|
||||
|
||||
#define parent_class gimp_viewable_parent_class
|
||||
|
||||
static guint viewable_signals[LAST_SIGNAL] = { 0 };
|
||||
static GQuark quark_preview_temp_buf = 0;
|
||||
static GQuark quark_preview_pixbuf = 0;
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
||||
static GQuark quark_preview_temp_buf = 0;
|
||||
static GQuark quark_preview_pixbuf = 0;
|
||||
|
||||
|
||||
GType
|
||||
gimp_viewable_get_type (void)
|
||||
{
|
||||
static GType viewable_type = 0;
|
||||
|
||||
if (! viewable_type)
|
||||
{
|
||||
static const GTypeInfo viewable_info =
|
||||
{
|
||||
sizeof (GimpViewableClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_viewable_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpViewable),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_viewable_init,
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_viewable_config_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
viewable_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpViewable",
|
||||
&viewable_info, 0);
|
||||
|
||||
g_type_add_interface_static (viewable_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return viewable_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_viewable_class_init (GimpViewableClass *klass)
|
||||
|
@ -146,8 +110,6 @@ gimp_viewable_class_init (GimpViewableClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
quark_preview_temp_buf = g_quark_from_static_string ("viewable-preview-temp-buf");
|
||||
quark_preview_pixbuf = g_quark_from_static_string ("viewable-preview-pixbuf");
|
||||
|
||||
|
@ -201,9 +163,9 @@ gimp_viewable_init (GimpViewable *viewable)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_viewable_config_iface_init (GimpConfigInterface *config_iface)
|
||||
gimp_viewable_config_iface_init (GimpConfigInterface *iface)
|
||||
{
|
||||
config_iface->serialize_property = gimp_viewable_serialize_property;
|
||||
iface->serialize_property = gimp_viewable_serialize_property;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -29,15 +29,16 @@
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_canvas_class_init (GimpCanvasClass *klass);
|
||||
static void gimp_canvas_init (GimpCanvas *gdisp);
|
||||
static void gimp_canvas_realize (GtkWidget *widget);
|
||||
static void gimp_canvas_unrealize (GtkWidget *widget);
|
||||
static GdkGC * gimp_canvas_gc_new (GimpCanvas *canvas,
|
||||
GimpCanvasStyle style);
|
||||
static void gimp_canvas_realize (GtkWidget *widget);
|
||||
static void gimp_canvas_unrealize (GtkWidget *widget);
|
||||
static GdkGC * gimp_canvas_gc_new (GimpCanvas *canvas,
|
||||
GimpCanvasStyle style);
|
||||
|
||||
|
||||
static GtkDrawingAreaClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpCanvas, gimp_canvas, GTK_TYPE_DRAWING_AREA);
|
||||
|
||||
#define parent_class gimp_canvas_parent_class
|
||||
|
||||
|
||||
static const guchar stipples[GIMP_CANVAS_NUM_STIPPLES][8] =
|
||||
{
|
||||
|
@ -124,41 +125,11 @@ static const guchar stipples[GIMP_CANVAS_NUM_STIPPLES][8] =
|
|||
};
|
||||
|
||||
|
||||
GType
|
||||
gimp_canvas_get_type (void)
|
||||
{
|
||||
static GType canvas_type = 0;
|
||||
|
||||
if (! canvas_type)
|
||||
{
|
||||
static const GTypeInfo canvas_info =
|
||||
{
|
||||
sizeof (GimpCanvasClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_canvas_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpCanvas),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_canvas_init,
|
||||
};
|
||||
|
||||
canvas_type = g_type_register_static (GTK_TYPE_DRAWING_AREA,
|
||||
"GimpCanvas",
|
||||
&canvas_info, 0);
|
||||
}
|
||||
|
||||
return canvas_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_canvas_class_init (GimpCanvasClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
widget_class->realize = gimp_canvas_realize;
|
||||
widget_class->unrealize = gimp_canvas_unrealize;
|
||||
}
|
||||
|
|
|
@ -54,9 +54,7 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_display_class_init (GimpDisplayClass *klass);
|
||||
static void gimp_display_init (GimpDisplay *gdisp);
|
||||
static void gimp_display_progress_iface_init (GimpProgressInterface *progress_iface);
|
||||
static void gimp_display_progress_iface_init (GimpProgressInterface *iface);
|
||||
|
||||
static void gimp_display_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -92,54 +90,18 @@ static void gimp_display_paint_area (GimpDisplay *gdisp,
|
|||
gint h);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDisplay, gimp_display, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PROGRESS,
|
||||
gimp_display_progress_iface_init));
|
||||
|
||||
#define parent_class gimp_display_parent_class
|
||||
|
||||
GType
|
||||
gimp_display_get_type (void)
|
||||
{
|
||||
static GType display_type = 0;
|
||||
|
||||
if (! display_type)
|
||||
{
|
||||
static const GTypeInfo display_info =
|
||||
{
|
||||
sizeof (GimpDisplayClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_display_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDisplay),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_display_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo progress_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_display_progress_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
display_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpDisplay",
|
||||
&display_info, 0);
|
||||
|
||||
g_type_add_interface_static (display_type, GIMP_TYPE_PROGRESS,
|
||||
&progress_iface_info);
|
||||
}
|
||||
|
||||
return display_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_class_init (GimpDisplayClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->set_property = gimp_display_set_property;
|
||||
object_class->get_property = gimp_display_get_property;
|
||||
|
||||
|
@ -177,16 +139,16 @@ gimp_display_init (GimpDisplay *gdisp)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_iface_init (GimpProgressInterface *progress_iface)
|
||||
gimp_display_progress_iface_init (GimpProgressInterface *iface)
|
||||
{
|
||||
progress_iface->start = gimp_display_progress_start;
|
||||
progress_iface->end = gimp_display_progress_end;
|
||||
progress_iface->is_active = gimp_display_progress_is_active;
|
||||
progress_iface->set_text = gimp_display_progress_set_text;
|
||||
progress_iface->set_value = gimp_display_progress_set_value;
|
||||
progress_iface->get_value = gimp_display_progress_get_value;
|
||||
progress_iface->pulse = gimp_display_progress_pulse;
|
||||
progress_iface->get_window = gimp_display_progress_get_window;
|
||||
iface->start = gimp_display_progress_start;
|
||||
iface->end = gimp_display_progress_end;
|
||||
iface->is_active = gimp_display_progress_is_active;
|
||||
iface->set_text = gimp_display_progress_set_text;
|
||||
iface->set_value = gimp_display_progress_set_value;
|
||||
iface->get_value = gimp_display_progress_get_value;
|
||||
iface->pulse = gimp_display_progress_pulse;
|
||||
iface->get_window = gimp_display_progress_get_window;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -55,93 +55,29 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_display_options_class_init (GimpDisplayOptionsClass *klass);
|
||||
static void gimp_display_options_fs_class_init (GimpDisplayOptionsClass *klass);
|
||||
static void gimp_display_options_init (GimpDisplayOptions *options);
|
||||
|
||||
static void gimp_display_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_options_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_options_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
GType
|
||||
gimp_display_options_get_type (void)
|
||||
{
|
||||
static GType options_type = 0;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptions,
|
||||
gimp_display_options,
|
||||
G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
if (! options_type)
|
||||
{
|
||||
static const GTypeInfo options_info =
|
||||
{
|
||||
sizeof (GimpDisplayOptionsClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_display_options_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDisplayOptions),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_display_options_init
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
NULL, /* iface_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
typedef struct _GimpDisplayOptions GimpDisplayOptionsFullscreen;
|
||||
typedef struct _GimpDisplayOptionsClass GimpDisplayOptionsFullscreenClass;
|
||||
|
||||
options_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpDisplayOptions",
|
||||
&options_info, 0);
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpDisplayOptionsFullscreen,
|
||||
gimp_display_options_fullscreen,
|
||||
GIMP_TYPE_DISPLAY_OPTIONS,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
g_type_add_interface_static (options_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return options_type;
|
||||
}
|
||||
|
||||
GType
|
||||
gimp_display_options_fullscreen_get_type (void)
|
||||
{
|
||||
static GType options_type = 0;
|
||||
|
||||
if (! options_type)
|
||||
{
|
||||
static const GTypeInfo options_info =
|
||||
{
|
||||
sizeof (GimpDisplayOptionsClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_display_options_fs_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDisplayOptions),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo config_iface_info =
|
||||
{
|
||||
NULL, /* iface_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
options_type = g_type_register_static (GIMP_TYPE_DISPLAY_OPTIONS,
|
||||
"GimpDisplayOptionsFullscreen",
|
||||
&options_info, 0);
|
||||
|
||||
g_type_add_interface_static (options_type, GIMP_TYPE_CONFIG,
|
||||
&config_iface_info);
|
||||
}
|
||||
|
||||
return options_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
|
||||
|
@ -202,7 +138,7 @@ gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_display_options_fs_class_init (GimpDisplayOptionsClass *klass)
|
||||
gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpRGB black;
|
||||
|
@ -265,6 +201,12 @@ gimp_display_options_init (GimpDisplayOptions *options)
|
|||
options->padding_mode_set = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_options_fullscreen_init (GimpDisplayOptionsFullscreen *options)
|
||||
{
|
||||
options->padding_mode_set = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_options_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
|
|
@ -88,9 +88,6 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_display_shell_class_init (GimpDisplayShellClass *klass);
|
||||
static void gimp_display_shell_init (GimpDisplayShell *shell);
|
||||
|
||||
static void gimp_display_shell_finalize (GObject *object);
|
||||
static void gimp_display_shell_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -118,9 +115,12 @@ static void gimp_display_shell_menu_position (GtkMenu *menu,
|
|||
gpointer data);
|
||||
|
||||
|
||||
static guint display_shell_signals[LAST_SIGNAL] = { 0 };
|
||||
G_DEFINE_TYPE (GimpDisplayShell, gimp_display_shell, GTK_TYPE_WINDOW);
|
||||
|
||||
#define parent_class gimp_display_shell_parent_class
|
||||
|
||||
static guint display_shell_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GtkWindowClass *parent_class = NULL;
|
||||
|
||||
static const gchar *display_rc_style =
|
||||
"style \"fullscreen-menubar-style\"\n"
|
||||
|
@ -131,34 +131,6 @@ static const gchar *display_rc_style =
|
|||
"widget \"*.gimp-menubar-fullscreen\" style \"fullscreen-menubar-style\"";
|
||||
|
||||
|
||||
GType
|
||||
gimp_display_shell_get_type (void)
|
||||
{
|
||||
static GType shell_type = 0;
|
||||
|
||||
if (! shell_type)
|
||||
{
|
||||
static const GTypeInfo shell_info =
|
||||
{
|
||||
sizeof (GimpDisplayShellClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_display_shell_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpDisplayShell),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_display_shell_init,
|
||||
};
|
||||
|
||||
shell_type = g_type_register_static (GTK_TYPE_WINDOW,
|
||||
"GimpDisplayShell",
|
||||
&shell_info, 0);
|
||||
}
|
||||
|
||||
return shell_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
||||
{
|
||||
|
@ -166,8 +138,6 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
|
|||
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
display_shell_signals[SCALED] =
|
||||
g_signal_new ("scaled",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
|
|
@ -55,10 +55,7 @@
|
|||
#define MAX_SCALE_BUF 20
|
||||
|
||||
|
||||
static void gimp_navigation_editor_class_init (GimpNavigationEditorClass *klass);
|
||||
static void gimp_navigation_editor_init (GimpNavigationEditor *editor);
|
||||
|
||||
static void gimp_navigation_editor_docked_iface_init (GimpDockedInterface *docked_iface);
|
||||
static void gimp_navigation_editor_docked_iface_init (GimpDockedInterface *iface);
|
||||
static void gimp_navigation_editor_set_context (GimpDocked *docked,
|
||||
GimpContext *context);
|
||||
|
||||
|
@ -95,53 +92,19 @@ static void gimp_navigation_editor_shell_reconnect (GimpDisplayShell *sh
|
|||
static void gimp_navigation_editor_update_marker (GimpNavigationEditor *editor);
|
||||
|
||||
|
||||
static GimpEditorClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpNavigationEditor, gimp_navigation_editor,
|
||||
GIMP_TYPE_EDITOR,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_DOCKED,
|
||||
gimp_navigation_editor_docked_iface_init));
|
||||
|
||||
#define parent_class gimp_navigation_editor_parent_class
|
||||
|
||||
GType
|
||||
gimp_navigation_editor_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
static const GTypeInfo editor_info =
|
||||
{
|
||||
sizeof (GimpNavigationEditorClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_navigation_editor_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_navigation */
|
||||
sizeof (GimpNavigationEditor),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_navigation_editor_init,
|
||||
};
|
||||
static const GInterfaceInfo docked_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_navigation_editor_docked_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
type = g_type_register_static (GIMP_TYPE_EDITOR,
|
||||
"GimpNavigationEditor",
|
||||
&editor_info, 0);
|
||||
|
||||
g_type_add_interface_static (type, GIMP_TYPE_DOCKED,
|
||||
&docked_iface_info);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_navigation_editor_class_init (GimpNavigationEditorClass *klass)
|
||||
{
|
||||
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gtk_object_class->destroy = gimp_navigation_editor_destroy;
|
||||
}
|
||||
|
||||
|
@ -177,9 +140,9 @@ gimp_navigation_editor_init (GimpNavigationEditor *editor)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_navigation_editor_docked_iface_init (GimpDockedInterface *docked_iface)
|
||||
gimp_navigation_editor_docked_iface_init (GimpDockedInterface *iface)
|
||||
{
|
||||
docked_iface->set_context = gimp_navigation_editor_set_context;
|
||||
iface->set_context = gimp_navigation_editor_set_context;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -44,58 +44,28 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_scale_combo_box_class_init (GimpScaleComboBoxClass *klass);
|
||||
static void gimp_scale_combo_box_init (GimpScaleComboBox *combo_box);
|
||||
static void gimp_scale_combo_box_finalize (GObject *object);
|
||||
static void gimp_scale_combo_box_changed (GimpScaleComboBox *combo_box);
|
||||
static void gimp_scale_combo_box_finalize (GObject *object);
|
||||
static void gimp_scale_combo_box_changed (GimpScaleComboBox *combo_box);
|
||||
|
||||
static void gimp_scale_combo_box_scale_iter_set (GtkListStore *store,
|
||||
GtkTreeIter *iter,
|
||||
gdouble scale,
|
||||
gboolean persistent);
|
||||
static gboolean gimp_scale_combo_box_row_separator (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data);
|
||||
static void gimp_scale_combo_box_scale_iter_set (GtkListStore *store,
|
||||
GtkTreeIter *iter,
|
||||
gdouble scale,
|
||||
gboolean persistent);
|
||||
static gboolean gimp_scale_combo_box_row_separator (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GtkComboBoxClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpScaleComboBox, gimp_scale_combo_box, GTK_TYPE_COMBO_BOX);
|
||||
|
||||
#define parent_class gimp_scale_combo_box_parent_class
|
||||
|
||||
GType
|
||||
gimp_scale_combo_box_get_type (void)
|
||||
{
|
||||
static GType combo_box_type = 0;
|
||||
|
||||
if (!combo_box_type)
|
||||
{
|
||||
static const GTypeInfo combo_box_info =
|
||||
{
|
||||
sizeof (GimpScaleComboBoxClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_scale_combo_box_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpScaleComboBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_scale_combo_box_init
|
||||
};
|
||||
|
||||
combo_box_type = g_type_register_static (GTK_TYPE_COMBO_BOX,
|
||||
"GimpScaleComboBox",
|
||||
&combo_box_info, 0);
|
||||
}
|
||||
|
||||
return combo_box_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_scale_combo_box_class_init (GimpScaleComboBoxClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_scale_combo_box_finalize;
|
||||
}
|
||||
|
||||
|
@ -174,7 +144,7 @@ gimp_scale_combo_box_finalize (GObject *object)
|
|||
static void
|
||||
gimp_scale_combo_box_changed (GimpScaleComboBox *combo_box)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo_box), &iter))
|
||||
{
|
||||
|
@ -214,7 +184,7 @@ gimp_scale_combo_box_row_separator (GtkTreeModel *model,
|
|||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gboolean separator;
|
||||
gboolean separator;
|
||||
|
||||
gtk_tree_model_get (model, iter,
|
||||
SEPARATOR, &separator,
|
||||
|
@ -229,7 +199,7 @@ gimp_scale_combo_box_scale_iter_set (GtkListStore *store,
|
|||
gdouble scale,
|
||||
gboolean persistent)
|
||||
{
|
||||
gchar label[32];
|
||||
gchar label[32];
|
||||
|
||||
g_snprintf (label, sizeof (label), "%d%%", (int) ROUND (100.0 * scale));
|
||||
|
||||
|
@ -416,8 +386,8 @@ gimp_scale_combo_box_set_scale (GimpScaleComboBox *combo_box,
|
|||
gdouble
|
||||
gimp_scale_combo_box_get_scale (GimpScaleComboBox *combo_box)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gdouble scale = 1.0;
|
||||
GtkTreeIter iter;
|
||||
gdouble scale = 1.0;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_SCALE_COMBO_BOX (combo_box), FALSE);
|
||||
|
||||
|
|
|
@ -57,9 +57,7 @@ struct _GimpStatusbarMsg
|
|||
#define CURSOR_LEN 256
|
||||
|
||||
|
||||
static void gimp_statusbar_class_init (GimpStatusbarClass *klass);
|
||||
static void gimp_statusbar_init (GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_progress_iface_init (GimpProgressInterface *progress_iface);
|
||||
static void gimp_statusbar_progress_iface_init (GimpProgressInterface *iface);
|
||||
|
||||
static void gimp_statusbar_destroy (GtkObject *object);
|
||||
|
||||
|
@ -89,46 +87,12 @@ static guint gimp_statusbar_get_context_id (GimpStatusbar *statusbar,
|
|||
const gchar *context);
|
||||
|
||||
|
||||
static GtkHBoxClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpStatusbar, gimp_statusbar, GTK_TYPE_HBOX,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PROGRESS,
|
||||
gimp_statusbar_progress_iface_init));
|
||||
|
||||
#define parent_class gimp_statusbar_parent_class
|
||||
|
||||
GType
|
||||
gimp_statusbar_get_type (void)
|
||||
{
|
||||
static GType statusbar_type = 0;
|
||||
|
||||
if (! statusbar_type)
|
||||
{
|
||||
static const GTypeInfo statusbar_info =
|
||||
{
|
||||
sizeof (GimpStatusbarClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_statusbar_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpStatusbar),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_statusbar_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo progress_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_statusbar_progress_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
statusbar_type = g_type_register_static (GTK_TYPE_HBOX,
|
||||
"GimpStatusbar",
|
||||
&statusbar_info, 0);
|
||||
|
||||
g_type_add_interface_static (statusbar_type, GIMP_TYPE_PROGRESS,
|
||||
&progress_iface_info);
|
||||
}
|
||||
|
||||
return statusbar_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_class_init (GimpStatusbarClass *klass)
|
||||
|
@ -136,8 +100,6 @@ gimp_statusbar_class_init (GimpStatusbarClass *klass)
|
|||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->destroy = gimp_statusbar_destroy;
|
||||
|
||||
gtk_widget_class_install_style_property (widget_class,
|
||||
|
@ -252,15 +214,15 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_iface_init (GimpProgressInterface *progress_iface)
|
||||
gimp_statusbar_progress_iface_init (GimpProgressInterface *iface)
|
||||
{
|
||||
progress_iface->start = gimp_statusbar_progress_start;
|
||||
progress_iface->end = gimp_statusbar_progress_end;
|
||||
progress_iface->is_active = gimp_statusbar_progress_is_active;
|
||||
progress_iface->set_text = gimp_statusbar_progress_set_text;
|
||||
progress_iface->set_value = gimp_statusbar_progress_set_value;
|
||||
progress_iface->get_value = gimp_statusbar_progress_get_value;
|
||||
progress_iface->pulse = gimp_statusbar_progress_pulse;
|
||||
iface->start = gimp_statusbar_progress_start;
|
||||
iface->end = gimp_statusbar_progress_end;
|
||||
iface->is_active = gimp_statusbar_progress_is_active;
|
||||
iface->set_text = gimp_statusbar_progress_set_text;
|
||||
iface->set_value = gimp_statusbar_progress_set_value;
|
||||
iface->get_value = gimp_statusbar_progress_get_value;
|
||||
iface->pulse = gimp_statusbar_progress_pulse;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -50,9 +50,6 @@ struct _GimpEnvironValue
|
|||
extern char **environ;
|
||||
|
||||
|
||||
static void gimp_environ_table_class_init (GimpEnvironTableClass *class);
|
||||
static void gimp_environ_table_init (GimpEnvironTable *environ_table);
|
||||
|
||||
static void gimp_environ_table_finalize (GObject *object);
|
||||
|
||||
static void gimp_environ_table_load_env_file (const GimpDatafileData *file_data,
|
||||
|
@ -73,54 +70,26 @@ static void gimp_environ_table_clear_envp (GimpEnvironTable *enviro
|
|||
static void gimp_environ_table_free_value (gpointer value);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpEnvironTable, gimp_environ_table, G_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_environ_table_parent_class
|
||||
|
||||
GType
|
||||
gimp_environ_table_get_type (void)
|
||||
{
|
||||
static GType environ_table_type = 0;
|
||||
|
||||
if (! environ_table_type)
|
||||
{
|
||||
static const GTypeInfo environ_table_info =
|
||||
{
|
||||
sizeof (GimpEnvironTableClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_environ_table_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpEnvironTable),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_environ_table_init,
|
||||
};
|
||||
|
||||
environ_table_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpEnvironTable",
|
||||
&environ_table_info, 0);
|
||||
}
|
||||
|
||||
return environ_table_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_environ_table_class_init (GimpEnvironTableClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
object_class->finalize = gimp_environ_table_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_environ_table_init (GimpEnvironTable *environ_table)
|
||||
{
|
||||
environ_table->vars = NULL;
|
||||
environ_table->vars = NULL;
|
||||
environ_table->internal = NULL;
|
||||
|
||||
environ_table->envp = NULL;
|
||||
environ_table->envp = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -80,9 +80,6 @@ struct _GimpInterpreterMagic
|
|||
};
|
||||
|
||||
|
||||
static void gimp_interpreter_db_class_init (GimpInterpreterDBClass *class);
|
||||
static void gimp_interpreter_db_init (GimpInterpreterDB *db);
|
||||
|
||||
static void gimp_interpreter_db_finalize (GObject *object);
|
||||
|
||||
static void gimp_interpreter_db_load_interp_file (const GimpDatafileData *file_data,
|
||||
|
@ -105,45 +102,15 @@ static void gimp_interpreter_db_clear_magics (GimpInterpreterDB *d
|
|||
static void gimp_interpreter_db_resolve_programs (GimpInterpreterDB *db);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpInterpreterDB, gimp_interpreter_db, G_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_interpreter_db_parent_class
|
||||
|
||||
GType
|
||||
gimp_interpreter_db_get_type (void)
|
||||
{
|
||||
static GType interpreter_db_type = 0;
|
||||
|
||||
if (! interpreter_db_type)
|
||||
{
|
||||
static const GTypeInfo interpreter_db_info =
|
||||
{
|
||||
sizeof (GimpInterpreterDBClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gimp_interpreter_db_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpInterpreterDB),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_interpreter_db_init,
|
||||
};
|
||||
|
||||
interpreter_db_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpInterpreterDB",
|
||||
&interpreter_db_info, 0);
|
||||
}
|
||||
|
||||
return interpreter_db_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_interpreter_db_class_init (GimpInterpreterDBClass *class)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = gimp_interpreter_db_finalize;
|
||||
}
|
||||
|
@ -151,21 +118,19 @@ gimp_interpreter_db_class_init (GimpInterpreterDBClass *class)
|
|||
static void
|
||||
gimp_interpreter_db_init (GimpInterpreterDB *db)
|
||||
{
|
||||
db->programs = NULL;
|
||||
db->programs = NULL;
|
||||
|
||||
db->magics = NULL;
|
||||
db->magic_names = NULL;
|
||||
db->magics = NULL;
|
||||
db->magic_names = NULL;
|
||||
|
||||
db->extensions = NULL;
|
||||
db->extensions = NULL;
|
||||
db->extension_names = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_interpreter_db_finalize (GObject *object)
|
||||
{
|
||||
GimpInterpreterDB *db;
|
||||
|
||||
db = GIMP_INTERPRETER_DB (object);
|
||||
GimpInterpreterDB *db = GIMP_INTERPRETER_DB (object);
|
||||
|
||||
gimp_interpreter_db_clear (db);
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@ struct _GimpFontClass
|
|||
};
|
||||
|
||||
|
||||
static void gimp_font_class_init (GimpFontClass *klass);
|
||||
static void gimp_font_init (GimpFont *font);
|
||||
static void gimp_font_finalize (GObject *object);
|
||||
static void gimp_font_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -90,36 +88,10 @@ static TempBuf * gimp_font_get_new_preview (GimpViewable *viewable,
|
|||
gint height);
|
||||
|
||||
|
||||
static GimpViewableClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpFont, gimp_font, GIMP_TYPE_VIEWABLE);
|
||||
|
||||
#define parent_class gimp_font_parent_class
|
||||
|
||||
GType
|
||||
gimp_font_get_type (void)
|
||||
{
|
||||
static GType font_type = 0;
|
||||
|
||||
if (! font_type)
|
||||
{
|
||||
static const GTypeInfo font_info =
|
||||
{
|
||||
sizeof (GimpFontClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_font_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_font */
|
||||
sizeof (GimpFont),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_font_init,
|
||||
};
|
||||
|
||||
font_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
|
||||
"GimpFont",
|
||||
&font_info, 0);
|
||||
}
|
||||
|
||||
return font_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_font_class_init (GimpFontClass *klass)
|
||||
|
@ -127,8 +99,6 @@ gimp_font_class_init (GimpFontClass *klass)
|
|||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_font_finalize;
|
||||
object_class->set_property = gimp_font_set_property;
|
||||
|
||||
|
|
|
@ -52,55 +52,23 @@
|
|||
typedef char * (* GimpFontDescToStringFunc) (const PangoFontDescription *desc);
|
||||
|
||||
|
||||
static void gimp_font_list_class_init (GimpFontListClass *klass);
|
||||
static void gimp_font_list_init (GimpFontList *list);
|
||||
static void gimp_font_list_add_font (GimpFontList *list,
|
||||
PangoContext *context,
|
||||
PangoFontDescription *desc);
|
||||
|
||||
static void gimp_font_list_add_font (GimpFontList *list,
|
||||
PangoContext *context,
|
||||
PangoFontDescription *desc);
|
||||
|
||||
static void gimp_font_list_load_names (GimpFontList *list,
|
||||
PangoFontMap *fontmap,
|
||||
PangoContext *context);
|
||||
static void gimp_font_list_load_names (GimpFontList *list,
|
||||
PangoFontMap *fontmap,
|
||||
PangoContext *context);
|
||||
|
||||
|
||||
static GimpListClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpFontList, gimp_font_list, GIMP_TYPE_LIST);
|
||||
|
||||
static GimpFontDescToStringFunc font_desc_to_string = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_font_list_get_type (void)
|
||||
{
|
||||
static GType list_type = 0;
|
||||
|
||||
if (! list_type)
|
||||
{
|
||||
static const GTypeInfo list_info =
|
||||
{
|
||||
sizeof (GimpFontListClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_font_list_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_font */
|
||||
sizeof (GimpFontList),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_font_list_init,
|
||||
};
|
||||
|
||||
list_type = g_type_register_static (GIMP_TYPE_LIST,
|
||||
"GimpFontList",
|
||||
&list_info, 0);
|
||||
}
|
||||
|
||||
return list_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_font_list_class_init (GimpFontListClass *klass)
|
||||
{
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -67,74 +67,35 @@ enum
|
|||
PROP_BORDER
|
||||
};
|
||||
|
||||
static void gimp_text_class_init (GimpTextClass *klass);
|
||||
static void gimp_text_finalize (GObject *object);
|
||||
static void gimp_text_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_text_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gint64 gimp_text_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
static void gimp_text_finalize (GObject *object);
|
||||
static void gimp_text_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_text_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gint64 gimp_text_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpText, gimp_text, GIMP_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL));
|
||||
|
||||
#define parent_class gimp_text_parent_class
|
||||
|
||||
GType
|
||||
gimp_text_get_type (void)
|
||||
{
|
||||
static GType text_type = 0;
|
||||
|
||||
if (! text_type)
|
||||
{
|
||||
static const GTypeInfo text_info =
|
||||
{
|
||||
sizeof (GimpTextClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_text_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpText),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
static const GInterfaceInfo text_iface_info =
|
||||
{
|
||||
NULL, /* iface_init */
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
text_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpText", &text_info, 0);
|
||||
|
||||
g_type_add_interface_static (text_type, GIMP_TYPE_CONFIG,
|
||||
&text_iface_info);
|
||||
}
|
||||
|
||||
return text_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_class_init (GimpTextClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpObjectClass *gimp_object_class;
|
||||
GParamSpec *param_spec;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpRGB black;
|
||||
GimpMatrix2 identity;
|
||||
gchar *language;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_text_finalize;
|
||||
object_class->get_property = gimp_text_get_property;
|
||||
object_class->set_property = gimp_text_set_property;
|
||||
|
@ -249,14 +210,20 @@ gimp_text_class_init (GimpTextClass *klass)
|
|||
GIMP_CONFIG_PARAM_DEFAULTS);
|
||||
|
||||
/* border does only exist to implement the old text API */
|
||||
param_spec = g_param_spec_int ("border", NULL, NULL,
|
||||
0, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
|
||||
g_object_class_install_property (object_class, PROP_BORDER, param_spec);
|
||||
g_object_class_install_property (object_class, PROP_BORDER,
|
||||
g_param_spec_int ("border", NULL, NULL,
|
||||
0, GIMP_MAX_IMAGE_SIZE, 0,
|
||||
G_PARAM_CONSTRUCT |
|
||||
G_PARAM_WRITABLE));
|
||||
|
||||
g_free (language);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_init (GimpText *text)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_finalize (GObject *object)
|
||||
{
|
||||
|
@ -465,11 +432,9 @@ static gint64
|
|||
gimp_text_get_memsize (GimpObject *object,
|
||||
gint64 *gui_size)
|
||||
{
|
||||
GimpText *text;
|
||||
GimpText *text = GIMP_TEXT (object);
|
||||
gint64 memsize = 0;
|
||||
|
||||
text = GIMP_TEXT (object);
|
||||
|
||||
if (text->text)
|
||||
memsize += strlen (text->text) + 1;
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@ enum
|
|||
PROP_MODIFIED
|
||||
};
|
||||
|
||||
static void gimp_text_layer_class_init (GimpTextLayerClass *klass);
|
||||
static void gimp_text_layer_init (GimpTextLayer *layer);
|
||||
static void gimp_text_layer_finalize (GObject *object);
|
||||
static void gimp_text_layer_get_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -105,36 +103,10 @@ static void gimp_text_layer_render_layout (GimpTextLayer *layer,
|
|||
GimpTextLayout *layout);
|
||||
|
||||
|
||||
static GimpLayerClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpTextLayer, gimp_text_layer, GIMP_TYPE_LAYER);
|
||||
|
||||
#define parent_class gimp_text_layer_parent_class
|
||||
|
||||
GType
|
||||
gimp_text_layer_get_type (void)
|
||||
{
|
||||
static GType layer_type = 0;
|
||||
|
||||
if (! layer_type)
|
||||
{
|
||||
static const GTypeInfo layer_info =
|
||||
{
|
||||
sizeof (GimpTextLayerClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_text_layer_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpTextLayer),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_text_layer_init,
|
||||
};
|
||||
|
||||
layer_type = g_type_register_static (GIMP_TYPE_LAYER,
|
||||
"GimpTextLayer",
|
||||
&layer_info, 0);
|
||||
}
|
||||
|
||||
return layer_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_layer_class_init (GimpTextLayerClass *klass)
|
||||
|
@ -145,8 +117,6 @@ gimp_text_layer_class_init (GimpTextLayerClass *klass)
|
|||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
GimpDrawableClass *drawable_class = GIMP_DRAWABLE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_text_layer_finalize;
|
||||
object_class->get_property = gimp_text_layer_get_property;
|
||||
object_class->set_property = gimp_text_layer_set_property;
|
||||
|
|
|
@ -34,65 +34,33 @@
|
|||
#include "gimptextlayout.h"
|
||||
|
||||
|
||||
static void gimp_text_layout_class_init (GimpTextLayoutClass *klass);
|
||||
static void gimp_text_layout_init (GimpTextLayout *layout);
|
||||
static void gimp_text_layout_finalize (GObject *object);
|
||||
static void gimp_text_layout_finalize (GObject *object);
|
||||
|
||||
static void gimp_text_layout_position (GimpTextLayout *layout);
|
||||
static void gimp_text_layout_position (GimpTextLayout *layout);
|
||||
|
||||
static PangoContext * gimp_text_get_pango_context (GimpText *text,
|
||||
gdouble xres,
|
||||
gdouble yres);
|
||||
static PangoContext * gimp_text_get_pango_context (GimpText *text,
|
||||
gdouble xres,
|
||||
gdouble yres);
|
||||
|
||||
static gint gimp_text_layout_pixel_size (Gimp *gimp,
|
||||
gdouble value,
|
||||
GimpUnit unit,
|
||||
gdouble res);
|
||||
static gint gimp_text_layout_point_size (Gimp *gimp,
|
||||
gdouble value,
|
||||
GimpUnit unit,
|
||||
gdouble res);
|
||||
static gint gimp_text_layout_pixel_size (Gimp *gimp,
|
||||
gdouble value,
|
||||
GimpUnit unit,
|
||||
gdouble res);
|
||||
static gint gimp_text_layout_point_size (Gimp *gimp,
|
||||
gdouble value,
|
||||
GimpUnit unit,
|
||||
gdouble res);
|
||||
|
||||
|
||||
static GObjectClass * parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpTextLayout, gimp_text_layout, G_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_text_layout_parent_class
|
||||
|
||||
GType
|
||||
gimp_text_layout_get_type (void)
|
||||
{
|
||||
static GType layout_type = 0;
|
||||
|
||||
if (! layout_type)
|
||||
{
|
||||
static const GTypeInfo layout_info =
|
||||
{
|
||||
sizeof (GimpTextLayoutClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_text_layout_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpTextLayout),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_text_layout_init,
|
||||
};
|
||||
|
||||
layout_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GimpTextLayout",
|
||||
&layout_info, 0);
|
||||
}
|
||||
|
||||
return layout_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_layout_class_init (GimpTextLayoutClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_text_layout_finalize;
|
||||
}
|
||||
|
@ -107,9 +75,7 @@ gimp_text_layout_init (GimpTextLayout *layout)
|
|||
static void
|
||||
gimp_text_layout_finalize (GObject *object)
|
||||
{
|
||||
GimpTextLayout *layout;
|
||||
|
||||
layout = GIMP_TEXT_LAYOUT (object);
|
||||
GimpTextLayout *layout = GIMP_TEXT_LAYOUT (object);
|
||||
|
||||
if (layout->text)
|
||||
{
|
||||
|
|
|
@ -40,8 +40,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_text_undo_class_init (GimpTextUndoClass *klass);
|
||||
|
||||
static GObject * gimp_text_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params);
|
||||
|
@ -64,35 +62,10 @@ static void gimp_text_undo_free (GimpUndo *undo,
|
|||
GimpUndoMode undo_mode);
|
||||
|
||||
|
||||
static GimpUndoClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpTextUndo, gimp_text_undo, GIMP_TYPE_ITEM_UNDO);
|
||||
|
||||
#define parent_class gimp_text_undo_parent_class
|
||||
|
||||
GType
|
||||
gimp_text_undo_get_type (void)
|
||||
{
|
||||
static GType undo_type = 0;
|
||||
|
||||
if (! undo_type)
|
||||
{
|
||||
static const GTypeInfo undo_info =
|
||||
{
|
||||
sizeof (GimpTextUndoClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_text_undo_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpTextUndo),
|
||||
0, /* n_preallocs */
|
||||
NULL /* instance_init */
|
||||
};
|
||||
|
||||
undo_type = g_type_register_static (GIMP_TYPE_ITEM_UNDO, "GimpTextUndo",
|
||||
&undo_info, 0);
|
||||
}
|
||||
|
||||
return undo_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_undo_class_init (GimpTextUndoClass *klass)
|
||||
|
@ -101,8 +74,6 @@ gimp_text_undo_class_init (GimpTextUndoClass *klass)
|
|||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->constructor = gimp_text_undo_constructor;
|
||||
object_class->set_property = gimp_text_undo_set_property;
|
||||
object_class->get_property = gimp_text_undo_get_property;
|
||||
|
@ -119,6 +90,11 @@ gimp_text_undo_class_init (GimpTextUndoClass *klass)
|
|||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_text_undo_init (GimpTextUndo *undo)
|
||||
{
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gimp_text_undo_constructor (GType type,
|
||||
guint n_params,
|
||||
|
|
|
@ -33,10 +33,8 @@
|
|||
#include "gimpbezierstroke.h"
|
||||
|
||||
|
||||
/* local prototypes */
|
||||
/* local prototypes */
|
||||
|
||||
static void gimp_bezier_stroke_class_init (GimpBezierStrokeClass *klass);
|
||||
static void gimp_bezier_stroke_init (GimpBezierStroke *bezier_stroke);
|
||||
static gdouble
|
||||
gimp_bezier_stroke_nearest_point_get (const GimpStroke *stroke,
|
||||
const GimpCoords *coord,
|
||||
|
@ -156,49 +154,16 @@ static gboolean gimp_bezier_coords_is_straight
|
|||
const gdouble precision);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpBezierStroke, gimp_bezier_stroke, GIMP_TYPE_STROKE);
|
||||
|
||||
static GimpStrokeClass *parent_class = NULL;
|
||||
#define parent_class gimp_bezier_stroke_parent_class
|
||||
|
||||
|
||||
GType
|
||||
gimp_bezier_stroke_get_type (void)
|
||||
{
|
||||
static GType bezier_stroke_type = 0;
|
||||
|
||||
if (! bezier_stroke_type)
|
||||
{
|
||||
static const GTypeInfo bezier_stroke_info =
|
||||
{
|
||||
sizeof (GimpBezierStrokeClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_bezier_stroke_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpBezierStroke),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_bezier_stroke_init,
|
||||
};
|
||||
|
||||
bezier_stroke_type = g_type_register_static (GIMP_TYPE_STROKE,
|
||||
"GimpBezierStroke",
|
||||
&bezier_stroke_info, 0);
|
||||
}
|
||||
|
||||
return bezier_stroke_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_bezier_stroke_class_init (GimpBezierStrokeClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpStrokeClass *stroke_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
stroke_class = GIMP_STROKE_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpStrokeClass *stroke_class = GIMP_STROKE_CLASS (klass);
|
||||
|
||||
object_class->finalize = gimp_bezier_stroke_finalize;
|
||||
|
||||
|
@ -223,9 +188,8 @@ gimp_bezier_stroke_class_init (GimpBezierStrokeClass *klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gimp_bezier_stroke_init (GimpBezierStroke *bezier_stroke)
|
||||
gimp_bezier_stroke_init (GimpBezierStroke *stroke)
|
||||
{
|
||||
/* pass */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2210,4 +2174,3 @@ gimp_bezier_coords_subdivide2 (const GimpCoords *beziercoords,
|
|||
ret_coords, ret_params, depth-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,6 @@ enum
|
|||
|
||||
/* Prototypes */
|
||||
|
||||
static void gimp_stroke_class_init (GimpStrokeClass *klass);
|
||||
static void gimp_stroke_init (GimpStroke *stroke);
|
||||
static void gimp_stroke_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
|
@ -150,53 +148,21 @@ static gboolean gimp_stroke_real_get_point_at_dist (const GimpStroke *stroke,
|
|||
GimpCoords *position,
|
||||
gdouble *slope);
|
||||
|
||||
/* private variables */
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
G_DEFINE_TYPE (GimpStroke, gimp_stroke, GIMP_TYPE_OBJECT);
|
||||
|
||||
#define parent_class gimp_stroke_parent_class
|
||||
|
||||
GType
|
||||
gimp_stroke_get_type (void)
|
||||
{
|
||||
static GType stroke_type = 0;
|
||||
|
||||
if (! stroke_type)
|
||||
{
|
||||
static const GTypeInfo stroke_info =
|
||||
{
|
||||
sizeof (GimpStrokeClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_stroke_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpStroke),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_stroke_init,
|
||||
};
|
||||
|
||||
stroke_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpStroke",
|
||||
&stroke_info, 0);
|
||||
}
|
||||
|
||||
return stroke_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_stroke_class_init (GimpStrokeClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpObjectClass *gimp_object_class;
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GParamSpec *anchor_param_spec;
|
||||
GParamSpec *control_points_param_spec;
|
||||
GParamSpec *close_param_spec;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_stroke_finalize;
|
||||
object_class->get_property = gimp_stroke_get_property;
|
||||
object_class->set_property = gimp_stroke_set_property;
|
||||
|
|
|
@ -58,9 +58,6 @@ enum
|
|||
};
|
||||
|
||||
|
||||
static void gimp_vectors_class_init (GimpVectorsClass *klass);
|
||||
static void gimp_vectors_init (GimpVectors *vectors);
|
||||
|
||||
static void gimp_vectors_finalize (GObject *object);
|
||||
|
||||
static gint64 gimp_vectors_get_memsize (GimpObject *object,
|
||||
|
@ -141,55 +138,20 @@ static gint gimp_vectors_real_interpolate (const GimpVectors *vectors,
|
|||
static GimpVectors * gimp_vectors_real_make_bezier (const GimpVectors *vectors);
|
||||
|
||||
|
||||
/* private variables */
|
||||
G_DEFINE_TYPE (GimpVectors, gimp_vectors, GIMP_TYPE_ITEM);
|
||||
|
||||
#define parent_class gimp_vectors_parent_class
|
||||
|
||||
static guint gimp_vectors_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GimpItemClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gimp_vectors_get_type (void)
|
||||
{
|
||||
static GType vectors_type = 0;
|
||||
|
||||
if (! vectors_type)
|
||||
{
|
||||
static const GTypeInfo vectors_info =
|
||||
{
|
||||
sizeof (GimpVectorsClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gimp_vectors_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GimpVectors),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gimp_vectors_init,
|
||||
};
|
||||
|
||||
vectors_type = g_type_register_static (GIMP_TYPE_ITEM,
|
||||
"GimpVectors",
|
||||
&vectors_info, 0);
|
||||
}
|
||||
|
||||
return vectors_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_vectors_class_init (GimpVectorsClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GimpObjectClass *gimp_object_class;
|
||||
GimpViewableClass *viewable_class;
|
||||
GimpItemClass *item_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
item_class = GIMP_ITEM_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
|
||||
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
|
||||
GimpItemClass *item_class = GIMP_ITEM_CLASS (klass);
|
||||
|
||||
gimp_vectors_signals[FREEZE] =
|
||||
g_signal_new ("freeze",
|
||||
|
|
Loading…
Reference in New Issue