libgimpcolor: colormanaged: Use G_DECLARE_INTERFACE()

This cuts aways a little of the GObject boilerplate.
This commit is contained in:
Niels De Graef 2019-07-18 19:14:52 +02:00 committed by Jehan
parent aefb40c82a
commit a0ba37649d
3 changed files with 5 additions and 12 deletions

View file

@ -110,7 +110,7 @@ gimp_color_managed_profile_changed
GIMP_COLOR_MANAGED GIMP_COLOR_MANAGED
GIMP_IS_COLOR_MANAGED GIMP_IS_COLOR_MANAGED
GIMP_TYPE_COLOR_MANAGED GIMP_TYPE_COLOR_MANAGED
GIMP_COLOR_MANAGED_GET_INTERFACE GIMP_COLOR_MANAGED_GET_IFACE
gimp_color_managed_get_type gimp_color_managed_get_type
gimp_color_managed_interface_get_type gimp_color_managed_interface_get_type
</SECTION> </SECTION>

View file

@ -94,7 +94,7 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
*len = 0; *len = 0;
iface = GIMP_COLOR_MANAGED_GET_INTERFACE (managed); iface = GIMP_COLOR_MANAGED_GET_IFACE (managed);
if (iface->get_icc_profile) if (iface->get_icc_profile)
return iface->get_icc_profile (managed, len); return iface->get_icc_profile (managed, len);
@ -120,7 +120,7 @@ gimp_color_managed_get_color_profile (GimpColorManaged *managed)
g_return_val_if_fail (GIMP_IS_COLOR_MANAGED (managed), NULL); g_return_val_if_fail (GIMP_IS_COLOR_MANAGED (managed), NULL);
iface = GIMP_COLOR_MANAGED_GET_INTERFACE (managed); iface = GIMP_COLOR_MANAGED_GET_IFACE (managed);
if (iface->get_color_profile) if (iface->get_color_profile)
return iface->get_color_profile (managed); return iface->get_color_profile (managed);

View file

@ -31,13 +31,8 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
#define GIMP_TYPE_COLOR_MANAGED (gimp_color_managed_get_type ()) #define GIMP_TYPE_COLOR_MANAGED (gimp_color_managed_get_type ())
#define GIMP_IS_COLOR_MANAGED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_MANAGED)) G_DECLARE_INTERFACE (GimpColorManaged, gimp_color_managed, GIMP, COLOR_MANAGED, GObject)
#define GIMP_COLOR_MANAGED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_MANAGED, GimpColorManaged))
#define GIMP_COLOR_MANAGED_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_COLOR_MANAGED, GimpColorManagedInterface))
typedef struct _GimpColorManagedInterface GimpColorManagedInterface;
/** /**
* GimpColorManagedInterface: * GimpColorManagedInterface:
@ -65,8 +60,6 @@ struct _GimpColorManagedInterface
}; };
GType gimp_color_managed_get_type (void) G_GNUC_CONST;
const guint8 * gimp_color_managed_get_icc_profile (GimpColorManaged *managed, const guint8 * gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
gsize *len); gsize *len);
GimpColorProfile * gimp_color_managed_get_color_profile (GimpColorManaged *managed); GimpColorProfile * gimp_color_managed_get_color_profile (GimpColorManaged *managed);