mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimpcolor: colormanaged: Use G_DECLARE_INTERFACE()
This cuts aways a little of the GObject boilerplate.
This commit is contained in:
parent
aefb40c82a
commit
a0ba37649d
3 changed files with 5 additions and 12 deletions
|
@ -110,7 +110,7 @@ gimp_color_managed_profile_changed
|
|||
GIMP_COLOR_MANAGED
|
||||
GIMP_IS_COLOR_MANAGED
|
||||
GIMP_TYPE_COLOR_MANAGED
|
||||
GIMP_COLOR_MANAGED_GET_INTERFACE
|
||||
GIMP_COLOR_MANAGED_GET_IFACE
|
||||
gimp_color_managed_get_type
|
||||
gimp_color_managed_interface_get_type
|
||||
</SECTION>
|
||||
|
|
|
@ -94,7 +94,7 @@ gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
|
|||
|
||||
*len = 0;
|
||||
|
||||
iface = GIMP_COLOR_MANAGED_GET_INTERFACE (managed);
|
||||
iface = GIMP_COLOR_MANAGED_GET_IFACE (managed);
|
||||
|
||||
if (iface->get_icc_profile)
|
||||
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);
|
||||
|
||||
iface = GIMP_COLOR_MANAGED_GET_INTERFACE (managed);
|
||||
iface = GIMP_COLOR_MANAGED_GET_IFACE (managed);
|
||||
|
||||
if (iface->get_color_profile)
|
||||
return iface->get_color_profile (managed);
|
||||
|
|
|
@ -32,12 +32,7 @@ G_BEGIN_DECLS
|
|||
|
||||
|
||||
#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))
|
||||
#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;
|
||||
G_DECLARE_INTERFACE (GimpColorManaged, gimp_color_managed, GIMP, COLOR_MANAGED, GObject)
|
||||
|
||||
/**
|
||||
* 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,
|
||||
gsize *len);
|
||||
GimpColorProfile * gimp_color_managed_get_color_profile (GimpColorManaged *managed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue