modules: turn GimpColorWheel into a proper dynamically loaded type

So it works with all GObject versions, until we determine how useful
it is generally, and what API it should get for possible
libgimpwidgets inclusion.
This commit is contained in:
Michael Natterer
2013-07-14 13:41:29 +02:00
parent a2334b0b15
commit 2cd25ec863
3 changed files with 15 additions and 1 deletions

View File

@ -88,6 +88,7 @@ gimp_module_query (GTypeModule *module)
G_MODULE_EXPORT gboolean
gimp_module_register (GTypeModule *module)
{
color_wheel_register_type (module);
colorsel_wheel_register_type (module);
return TRUE;

View File

@ -115,11 +115,17 @@ static void gimp_color_wheel_move (GimpColorWheel *wheel,
static guint wheel_signals[LAST_SIGNAL];
G_DEFINE_TYPE (GimpColorWheel, gimp_color_wheel, GTK_TYPE_WIDGET)
G_DEFINE_DYNAMIC_TYPE (GimpColorWheel, gimp_color_wheel, GTK_TYPE_WIDGET)
#define parent_class gimp_color_wheel_parent_class
void
color_wheel_register_type (GTypeModule *module)
{
gimp_color_wheel_register_type (module);
}
static void
gimp_color_wheel_class_init (GimpColorWheelClass *class)
{
@ -196,6 +202,11 @@ gimp_color_wheel_class_init (GimpColorWheelClass *class)
g_type_class_add_private (object_class, sizeof (GimpColorWheelPrivate));
}
static void
gimp_color_wheel_class_finalize (GimpColorWheelClass *klass)
{
}
static void
gimp_color_wheel_init (GimpColorWheel *wheel)
{

View File

@ -72,6 +72,8 @@ struct _GimpColorWheelClass
};
void color_wheel_register_type (GTypeModule *module);
GType gimp_color_wheel_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_color_wheel_new (void);