Skip to content

Commit

Permalink
libgimpwidgets: Convert more widgets to FINAL/DERIVABLE TYPE
Browse files Browse the repository at this point in the history
These were missed earlier as they did not
have private structs in the .h file
  • Loading branch information
cmyk-student committed Oct 12, 2024
1 parent 0f0b3a6 commit 4698c67
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 49 deletions.
12 changes: 0 additions & 12 deletions libgimpwidgets/gimpcolorscales.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ struct _ColorScale
};


#define GIMP_COLOR_SCALES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_SCALES, GimpColorScalesClass))
#define GIMP_IS_COLOR_SCALES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_SCALES))
#define GIMP_COLOR_SCALES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SCALES, GimpColorScalesClass))


typedef struct _GimpColorScalesClass GimpColorScalesClass;

struct _GimpColorScales
{
GimpColorSelector parent_instance;
Expand All @@ -115,11 +108,6 @@ struct _GimpColorScales
GList *profile_labels;
};

struct _GimpColorScalesClass
{
GimpColorSelectorClass parent_class;
};


static void gimp_color_scales_dispose (GObject *object);
static void gimp_color_scales_get_property (GObject *object,
Expand Down
9 changes: 4 additions & 5 deletions libgimpwidgets/gimpcolorscales.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@
#ifndef __GIMP_COLOR_SCALES_H__
#define __GIMP_COLOR_SCALES_H__

G_BEGIN_DECLS
#include <libgimpwidgets/gimpcolorselector.h>

G_BEGIN_DECLS

#define GIMP_TYPE_COLOR_SCALES (gimp_color_scales_get_type ())
#define GIMP_COLOR_SCALES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_SCALES, GimpColorScales))
#define GIMP_IS_COLOR_SCALES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_SCALES))

#define GIMP_TYPE_COLOR_SCALES (gimp_color_scales_get_type ())
G_DECLARE_FINAL_TYPE (GimpColorScales, gimp_color_scales, GIMP, COLOR_SCALES, GimpColorSelector)

GType gimp_color_scales_get_type (void) G_GNUC_CONST;

void gimp_color_scales_set_show_rgb_u8 (GimpColorScales *scales,
gboolean show_rgb_u8);
Expand Down
7 changes: 0 additions & 7 deletions libgimpwidgets/gimpcolorselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@ struct _GimpLCH
};


#define GIMP_COLOR_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_SELECT, GimpColorSelectClass))
#define GIMP_IS_COLOR_SELECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_SELECT))
#define GIMP_COLOR_SELECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SELECT, GimpColorSelectClass))


typedef struct _GimpColorSelectClass GimpColorSelectClass;

struct _GimpColorSelect
{
GimpColorSelector parent_instance;
Expand Down
8 changes: 2 additions & 6 deletions libgimpwidgets/gimpcolorselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@
G_BEGIN_DECLS


#define GIMP_TYPE_COLOR_SELECT (gimp_color_select_get_type ())
#define GIMP_COLOR_SELECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_SELECT, GimpColorSelect))
#define GIMP_IS_COLOR_SELECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_SELECT))


GType gimp_color_select_get_type (void) G_GNUC_CONST;
#define GIMP_TYPE_COLOR_SELECT (gimp_color_select_get_type ())
G_DECLARE_FINAL_TYPE (GimpColorSelect, gimp_color_select, GIMP, COLOR_SELECT, GimpColorSelector)


G_END_DECLS
Expand Down
6 changes: 2 additions & 4 deletions libgimpwidgets/gimpintradioframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ enum
};


typedef struct _GimpIntRadioFramePrivate GimpIntRadioFramePrivate;

struct _GimpIntRadioFramePrivate
typedef struct _GimpIntRadioFramePrivate
{
gchar *label;
GimpIntStore *store;
Expand All @@ -66,7 +64,7 @@ struct _GimpIntRadioFramePrivate
GimpIntRadioFrameSensitivityFunc sensitivity_func;
gpointer sensitivity_data;
GDestroyNotify sensitivity_destroy;
};
} GimpIntRadioFramePrivate;

#define GET_PRIVATE(obj) ((GimpIntRadioFramePrivate *) gimp_int_radio_frame_get_instance_private ((GimpIntRadioFrame *) obj))

Expand Down
17 changes: 2 additions & 15 deletions libgimpwidgets/gimpintradioframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,10 @@
G_BEGIN_DECLS


#define GIMP_TYPE_INT_RADIO_FRAME (gimp_int_radio_frame_get_type ())
#define GIMP_INT_RADIO_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_INT_RADIO_FRAME, GimpIntRadioFrame))
#define GIMP_INT_RADIO_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_INT_RADIO_FRAME, GimpIntRadioFrameClass))
#define GIMP_IS_INT_RADIO_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_INT_RADIO_FRAME))
#define GIMP_IS_INT_RADIO_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_INT_RADIO_FRAME))
#define GIMP_INT_RADIO_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_INT_RADIO_FRAME, GimpIntRadioFrameClass))
#define GIMP_TYPE_INT_RADIO_FRAME (gimp_int_radio_frame_get_type ())
G_DECLARE_DERIVABLE_TYPE (GimpIntRadioFrame, gimp_int_radio_frame, GIMP, INT_RADIO_FRAME, GimpFrame)


typedef struct _GimpIntRadioFrameClass GimpIntRadioFrameClass;

struct _GimpIntRadioFrame
{
GimpFrame parent_instance;
};

struct _GimpIntRadioFrameClass
{
GimpFrameClass parent_class;
Expand Down Expand Up @@ -88,8 +77,6 @@ typedef gboolean (* GimpIntRadioFrameSensitivityFunc) (gint value,



GType gimp_int_radio_frame_get_type (void) G_GNUC_CONST;

GtkWidget * gimp_int_radio_frame_new_from_store (const gchar *title,
GimpIntStore *store);
GtkWidget * gimp_int_radio_frame_new (const gchar *first_label,
Expand Down

0 comments on commit 4698c67

Please sign in to comment.