[gimp/wip/nielsdg/g-declare-interface: 2/3] app/core: Use G_DECLARE_INTERFACE()
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/nielsdg/g-declare-interface: 2/3] app/core: Use G_DECLARE_INTERFACE()
- Date: Fri, 19 Jul 2019 05:45:52 +0000 (UTC)
commit e449a085659628ace85f1530273bcc98037d2352
Author: Niels De Graef <nielsdegraef gmail com>
Date: Thu Jul 18 19:19:01 2019 +0200
app/core: Use G_DECLARE_INTERFACE()
This cuts aways a little of the GObject boilerplate.
app/core/gimpcancelable.h | 10 ++--------
app/core/gimppickable.c | 20 ++++++++++----------
app/core/gimppickable.h | 11 ++---------
app/core/gimpprogress.c | 18 +++++++++---------
app/core/gimpprogress.h | 10 ++--------
app/core/gimpprojectable.c | 16 ++++++++--------
app/core/gimpprojectable.h | 10 ++--------
app/core/gimptagged.c | 10 +++++-----
app/core/gimptagged.h | 10 ++--------
app/core/gimpwaitable.c | 6 +++---
app/core/gimpwaitable.h | 10 ++--------
devel-docs/app/app-sections.txt | 8 ++++----
12 files changed, 51 insertions(+), 88 deletions(-)
---
diff --git a/app/core/gimpcancelable.h b/app/core/gimpcancelable.h
index dc2a655633..151c17103c 100644
--- a/app/core/gimpcancelable.h
+++ b/app/core/gimpcancelable.h
@@ -22,14 +22,10 @@
#define __GIMP_CANCELABLE_H__
-#define GIMP_TYPE_CANCELABLE (gimp_cancelable_get_type ())
-#define GIMP_IS_CANCELABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CANCELABLE))
-#define GIMP_CANCELABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CANCELABLE,
GimpCancelable))
-#define GIMP_CANCELABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_CANCELABLE,
GimpCancelableInterface))
+#define GIMP_TYPE_CANCELABLE (gimp_cancelable_get_type ())
+G_DECLARE_INTERFACE (GimpCancelable, gimp_cancelable, GIMP, CANCELABLE, GObject)
-typedef struct _GimpCancelableInterface GimpCancelableInterface;
-
struct _GimpCancelableInterface
{
GTypeInterface base_iface;
@@ -39,8 +35,6 @@ struct _GimpCancelableInterface
};
-GType gimp_cancelable_get_type (void) G_GNUC_CONST;
-
void gimp_cancelable_cancel (GimpCancelable *cancelable);
diff --git a/app/core/gimppickable.c b/app/core/gimppickable.c
index e47b37e486..2d6c517c37 100644
--- a/app/core/gimppickable.c
+++ b/app/core/gimppickable.c
@@ -121,7 +121,7 @@ gimp_pickable_flush (GimpPickable *pickable)
g_return_if_fail (GIMP_IS_PICKABLE (pickable));
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->flush)
pickable_iface->flush (pickable);
@@ -134,7 +134,7 @@ gimp_pickable_get_image (GimpPickable *pickable)
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_image)
return pickable_iface->get_image (pickable);
@@ -149,7 +149,7 @@ gimp_pickable_get_format (GimpPickable *pickable)
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_format)
return pickable_iface->get_format (pickable);
@@ -164,7 +164,7 @@ gimp_pickable_get_format_with_alpha (GimpPickable *pickable)
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_format_with_alpha)
return pickable_iface->get_format_with_alpha (pickable);
@@ -179,7 +179,7 @@ gimp_pickable_get_buffer (GimpPickable *pickable)
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), NULL);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_buffer)
return pickable_iface->get_buffer (pickable);
@@ -202,7 +202,7 @@ gimp_pickable_get_pixel_at (GimpPickable *pickable,
if (! format)
format = gimp_pickable_get_format (pickable);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_pixel_at)
return pickable_iface->get_pixel_at (pickable, x, y, format, pixel);
@@ -225,7 +225,7 @@ gimp_pickable_get_pixel_average (GimpPickable *pickable,
if (! format)
format = gimp_pickable_get_format (pickable);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_pixel_average)
pickable_iface->get_pixel_average (pickable, rect, format, pixel);
@@ -261,7 +261,7 @@ gimp_pickable_get_opacity_at (GimpPickable *pickable,
g_return_val_if_fail (GIMP_IS_PICKABLE (pickable), GIMP_OPACITY_TRANSPARENT);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->get_opacity_at)
return pickable_iface->get_opacity_at (pickable, x, y);
@@ -284,7 +284,7 @@ gimp_pickable_pixel_to_srgb (GimpPickable *pickable,
if (! format)
format = gimp_pickable_get_format (pickable);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->pixel_to_srgb)
{
@@ -311,7 +311,7 @@ gimp_pickable_srgb_to_pixel (GimpPickable *pickable,
if (! format)
format = gimp_pickable_get_format (pickable);
- pickable_iface = GIMP_PICKABLE_GET_INTERFACE (pickable);
+ pickable_iface = GIMP_PICKABLE_GET_IFACE (pickable);
if (pickable_iface->srgb_to_pixel)
{
diff --git a/app/core/gimppickable.h b/app/core/gimppickable.h
index c8c77c9949..e422abebff 100644
--- a/app/core/gimppickable.h
+++ b/app/core/gimppickable.h
@@ -22,13 +22,8 @@
#define __GIMP_PICKABLE_H__
-#define GIMP_TYPE_PICKABLE (gimp_pickable_get_type ())
-#define GIMP_IS_PICKABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PICKABLE))
-#define GIMP_PICKABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PICKABLE,
GimpPickable))
-#define GIMP_PICKABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_PICKABLE,
GimpPickableInterface))
-
-
-typedef struct _GimpPickableInterface GimpPickableInterface;
+#define GIMP_TYPE_PICKABLE (gimp_pickable_get_type ())
+G_DECLARE_INTERFACE (GimpPickable, gimp_pickable, GIMP, PICKABLE, GObject)
struct _GimpPickableInterface
{
@@ -63,8 +58,6 @@ struct _GimpPickableInterface
};
-GType gimp_pickable_get_type (void) G_GNUC_CONST;
-
void gimp_pickable_flush (GimpPickable *pickable);
GimpImage * gimp_pickable_get_image (GimpPickable *pickable);
const Babl * gimp_pickable_get_format (GimpPickable *pickable);
diff --git a/app/core/gimpprogress.c b/app/core/gimpprogress.c
index 6b8bf46b31..afc95fc16b 100644
--- a/app/core/gimpprogress.c
+++ b/app/core/gimpprogress.c
@@ -78,7 +78,7 @@ gimp_progress_start (GimpProgress *progress,
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
g_return_val_if_fail (format != NULL, NULL);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->start)
{
@@ -107,7 +107,7 @@ gimp_progress_end (GimpProgress *progress)
g_return_if_fail (GIMP_IS_PROGRESS (progress));
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->end)
progress_iface->end (progress);
@@ -120,7 +120,7 @@ gimp_progress_is_active (GimpProgress *progress)
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), FALSE);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->is_active)
return progress_iface->is_active (progress);
@@ -157,7 +157,7 @@ gimp_progress_set_text_literal (GimpProgress *progress,
g_return_if_fail (GIMP_IS_PROGRESS (progress));
g_return_if_fail (message != NULL);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->set_text)
progress_iface->set_text (progress, message);
@@ -173,7 +173,7 @@ gimp_progress_set_value (GimpProgress *progress,
percentage = CLAMP (percentage, 0.0, 1.0);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->set_value)
progress_iface->set_value (progress, percentage);
@@ -186,7 +186,7 @@ gimp_progress_get_value (GimpProgress *progress)
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0.0);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->get_value)
return progress_iface->get_value (progress);
@@ -201,7 +201,7 @@ gimp_progress_pulse (GimpProgress *progress)
g_return_if_fail (GIMP_IS_PROGRESS (progress));
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->pulse)
progress_iface->pulse (progress);
@@ -214,7 +214,7 @@ gimp_progress_get_window_id (GimpProgress *progress)
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->get_window_id)
return progress_iface->get_window_id (progress);
@@ -236,7 +236,7 @@ gimp_progress_message (GimpProgress *progress,
g_return_val_if_fail (domain != NULL, FALSE);
g_return_val_if_fail (message != NULL, FALSE);
- progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
+ progress_iface = GIMP_PROGRESS_GET_IFACE (progress);
if (progress_iface->message)
return progress_iface->message (progress, gimp, severity, domain, message);
diff --git a/app/core/gimpprogress.h b/app/core/gimpprogress.h
index 488f05073d..a7fad144a4 100644
--- a/app/core/gimpprogress.h
+++ b/app/core/gimpprogress.h
@@ -22,14 +22,10 @@
#define __GIMP_PROGRESS_H__
-#define GIMP_TYPE_PROGRESS (gimp_progress_get_type ())
-#define GIMP_IS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROGRESS))
-#define GIMP_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROGRESS,
GimpProgress))
-#define GIMP_PROGRESS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_PROGRESS,
GimpProgressInterface))
+#define GIMP_TYPE_PROGRESS (gimp_progress_get_type ())
+G_DECLARE_INTERFACE (GimpProgress, gimp_progress, GIMP, PROGRESS, GObject)
-typedef struct _GimpProgressInterface GimpProgressInterface;
-
struct _GimpProgressInterface
{
GTypeInterface base_iface;
@@ -61,8 +57,6 @@ struct _GimpProgressInterface
};
-GType gimp_progress_get_type (void) G_GNUC_CONST;
-
GimpProgress * gimp_progress_start (GimpProgress *progress,
gboolean cancellable,
const gchar *format,
diff --git a/app/core/gimpprojectable.c b/app/core/gimpprojectable.c
index e8ded97492..fe6aaa632f 100644
--- a/app/core/gimpprojectable.c
+++ b/app/core/gimpprojectable.c
@@ -152,7 +152,7 @@ gimp_projectable_get_image (GimpProjectable *projectable)
g_return_val_if_fail (GIMP_IS_PROJECTABLE (projectable), NULL);
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->get_image)
return iface->get_image (projectable);
@@ -167,7 +167,7 @@ gimp_projectable_get_format (GimpProjectable *projectable)
g_return_val_if_fail (GIMP_IS_PROJECTABLE (projectable), NULL);
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->get_format)
return iface->get_format (projectable);
@@ -186,7 +186,7 @@ gimp_projectable_get_offset (GimpProjectable *projectable,
g_return_if_fail (x != NULL);
g_return_if_fail (y != NULL);
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
*x = 0;
*y = 0;
@@ -206,7 +206,7 @@ gimp_projectable_get_size (GimpProjectable *projectable,
g_return_if_fail (width != NULL);
g_return_if_fail (height != NULL);
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
*width = 0;
*height = 0;
@@ -222,7 +222,7 @@ gimp_projectable_get_graph (GimpProjectable *projectable)
g_return_val_if_fail (GIMP_IS_PROJECTABLE (projectable), NULL);
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->get_graph)
return iface->get_graph (projectable);
@@ -237,7 +237,7 @@ gimp_projectable_begin_render (GimpProjectable *projectable)
g_return_if_fail (GIMP_IS_PROJECTABLE (projectable));
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->begin_render)
iface->begin_render (projectable);
@@ -250,7 +250,7 @@ gimp_projectable_end_render (GimpProjectable *projectable)
g_return_if_fail (GIMP_IS_PROJECTABLE (projectable));
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->end_render)
iface->end_render (projectable);
@@ -263,7 +263,7 @@ gimp_projectable_invalidate_preview (GimpProjectable *projectable)
g_return_if_fail (GIMP_IS_PROJECTABLE (projectable));
- iface = GIMP_PROJECTABLE_GET_INTERFACE (projectable);
+ iface = GIMP_PROJECTABLE_GET_IFACE (projectable);
if (iface->invalidate_preview)
iface->invalidate_preview (projectable);
diff --git a/app/core/gimpprojectable.h b/app/core/gimpprojectable.h
index 836017dabd..5f51aad465 100644
--- a/app/core/gimpprojectable.h
+++ b/app/core/gimpprojectable.h
@@ -22,14 +22,10 @@
#define __GIMP_PROJECTABLE_H__
-#define GIMP_TYPE_PROJECTABLE (gimp_projectable_get_type ())
-#define GIMP_IS_PROJECTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROJECTABLE))
-#define GIMP_PROJECTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROJECTABLE,
GimpProjectable))
-#define GIMP_PROJECTABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_PROJECTABLE,
GimpProjectableInterface))
+#define GIMP_TYPE_PROJECTABLE (gimp_projectable_get_type ())
+G_DECLARE_INTERFACE (GimpProjectable, gimp_projectable, GIMP, PROJECTABLE, GObject)
-typedef struct _GimpProjectableInterface GimpProjectableInterface;
-
struct _GimpProjectableInterface
{
GTypeInterface base_iface;
@@ -65,8 +61,6 @@ struct _GimpProjectableInterface
};
-GType gimp_projectable_get_type (void) G_GNUC_CONST;
-
void gimp_projectable_invalidate (GimpProjectable *projectable,
gint x,
gint y,
diff --git a/app/core/gimptagged.c b/app/core/gimptagged.c
index 7875f9afdb..12d289223d 100644
--- a/app/core/gimptagged.c
+++ b/app/core/gimptagged.c
@@ -90,7 +90,7 @@ gimp_tagged_add_tag (GimpTagged *tagged,
g_return_if_fail (GIMP_IS_TAGGED (tagged));
g_return_if_fail (GIMP_IS_TAG (tag));
- if (GIMP_TAGGED_GET_INTERFACE (tagged)->add_tag (tagged, tag))
+ if (GIMP_TAGGED_GET_IFACE (tagged)->add_tag (tagged, tag))
{
g_signal_emit (tagged, gimp_tagged_signals[TAG_ADDED], 0, tag);
}
@@ -124,7 +124,7 @@ gimp_tagged_remove_tag (GimpTagged *tagged,
{
g_object_ref (tag_ref);
- if (GIMP_TAGGED_GET_INTERFACE (tagged)->remove_tag (tagged, tag_ref))
+ if (GIMP_TAGGED_GET_IFACE (tagged)->remove_tag (tagged, tag_ref))
{
g_signal_emit (tagged, gimp_tagged_signals[TAG_REMOVED], 0,
tag_ref);
@@ -185,7 +185,7 @@ gimp_tagged_get_tags (GimpTagged *tagged)
{
g_return_val_if_fail (GIMP_IS_TAGGED (tagged), NULL);
- return GIMP_TAGGED_GET_INTERFACE (tagged)->get_tags (tagged);
+ return GIMP_TAGGED_GET_IFACE (tagged)->get_tags (tagged);
}
/**
@@ -207,7 +207,7 @@ gimp_tagged_get_identifier (GimpTagged *tagged)
{
g_return_val_if_fail (GIMP_IS_TAGGED (tagged), NULL);
- return GIMP_TAGGED_GET_INTERFACE (tagged)->get_identifier (tagged);
+ return GIMP_TAGGED_GET_IFACE (tagged)->get_identifier (tagged);
}
/**
@@ -229,7 +229,7 @@ gimp_tagged_get_checksum (GimpTagged *tagged)
{
g_return_val_if_fail (GIMP_IS_TAGGED (tagged), FALSE);
- return GIMP_TAGGED_GET_INTERFACE (tagged)->get_checksum (tagged);
+ return GIMP_TAGGED_GET_IFACE (tagged)->get_checksum (tagged);
}
/**
diff --git a/app/core/gimptagged.h b/app/core/gimptagged.h
index 32251e9c22..0518f3cc85 100644
--- a/app/core/gimptagged.h
+++ b/app/core/gimptagged.h
@@ -22,14 +22,10 @@
#define __GIMP_TAGGED_H__
-#define GIMP_TYPE_TAGGED (gimp_tagged_get_type ())
-#define GIMP_IS_TAGGED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TAGGED))
-#define GIMP_TAGGED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TAGGED, GimpTagged))
-#define GIMP_TAGGED_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_TAGGED,
GimpTaggedInterface))
+#define GIMP_TYPE_TAGGED (gimp_tagged_get_type ())
+G_DECLARE_INTERFACE (GimpTagged, gimp_tagged, GIMP, TAGGED, GObject)
-typedef struct _GimpTaggedInterface GimpTaggedInterface;
-
struct _GimpTaggedInterface
{
GTypeInterface base_iface;
@@ -51,8 +47,6 @@ struct _GimpTaggedInterface
};
-GType gimp_tagged_get_type (void) G_GNUC_CONST;
-
void gimp_tagged_add_tag (GimpTagged *tagged,
GimpTag *tag);
void gimp_tagged_remove_tag (GimpTagged *tagged,
diff --git a/app/core/gimpwaitable.c b/app/core/gimpwaitable.c
index 4607f744f8..325fd76eb0 100644
--- a/app/core/gimpwaitable.c
+++ b/app/core/gimpwaitable.c
@@ -51,7 +51,7 @@ gimp_waitable_wait (GimpWaitable *waitable)
g_return_if_fail (GIMP_IS_WAITABLE (waitable));
- iface = GIMP_WAITABLE_GET_INTERFACE (waitable);
+ iface = GIMP_WAITABLE_GET_IFACE (waitable);
if (iface->wait)
iface->wait (waitable);
@@ -64,7 +64,7 @@ gimp_waitable_try_wait (GimpWaitable *waitable)
g_return_val_if_fail (GIMP_IS_WAITABLE (waitable), FALSE);
- iface = GIMP_WAITABLE_GET_INTERFACE (waitable);
+ iface = GIMP_WAITABLE_GET_IFACE (waitable);
if (iface->try_wait)
{
@@ -86,7 +86,7 @@ gimp_waitable_wait_until (GimpWaitable *waitable,
g_return_val_if_fail (GIMP_IS_WAITABLE (waitable), FALSE);
- iface = GIMP_WAITABLE_GET_INTERFACE (waitable);
+ iface = GIMP_WAITABLE_GET_IFACE (waitable);
if (iface->wait_until)
{
diff --git a/app/core/gimpwaitable.h b/app/core/gimpwaitable.h
index b85bece260..72a44acff3 100644
--- a/app/core/gimpwaitable.h
+++ b/app/core/gimpwaitable.h
@@ -22,14 +22,10 @@
#define __GIMP_WAITABLE_H__
-#define GIMP_TYPE_WAITABLE (gimp_waitable_get_type ())
-#define GIMP_IS_WAITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_WAITABLE))
-#define GIMP_WAITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_WAITABLE,
GimpWaitable))
-#define GIMP_WAITABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_WAITABLE,
GimpWaitableInterface))
+#define GIMP_TYPE_WAITABLE (gimp_waitable_get_type ())
+G_DECLARE_INTERFACE (GimpWaitable, gimp_waitable, GIMP, WAITABLE, GObject)
-typedef struct _GimpWaitableInterface GimpWaitableInterface;
-
struct _GimpWaitableInterface
{
GTypeInterface base_iface;
@@ -42,8 +38,6 @@ struct _GimpWaitableInterface
};
-GType gimp_waitable_get_type (void) G_GNUC_CONST;
-
void gimp_waitable_wait (GimpWaitable *waitable);
gboolean gimp_waitable_try_wait (GimpWaitable *waitable);
gboolean gimp_waitable_wait_until (GimpWaitable *waitable,
diff --git a/devel-docs/app/app-sections.txt b/devel-docs/app/app-sections.txt
index 9540a73921..4eab07841c 100644
--- a/devel-docs/app/app-sections.txt
+++ b/devel-docs/app/app-sections.txt
@@ -2939,7 +2939,7 @@ GIMP_PROGRESS
GIMP_IS_PROGRESS
GIMP_TYPE_PROGRESS
gimp_progress_interface_get_type
-GIMP_PROGRESS_GET_INTERFACE
+GIMP_PROGRESS_GET_IFACE
</SECTION>
<SECTION>
@@ -3098,7 +3098,7 @@ GIMP_TAGGED
GIMP_IS_TAGGED
GIMP_TYPE_TAGGED
gimp_tagged_interface_get_type
-GIMP_TAGGED_GET_INTERFACE
+GIMP_TAGGED_GET_IFACE
</SECTION>
<SECTION>
@@ -11468,7 +11468,7 @@ GIMP_PICKABLE
GIMP_IS_PICKABLE
GIMP_TYPE_PICKABLE
gimp_pickable_interface_get_type
-GIMP_PICKABLE_GET_INTERFACE
+GIMP_PICKABLE_GET_IFACE
</SECTION>
<SECTION>
@@ -11484,7 +11484,7 @@ gimp_preview_cache_get_memsize
<SECTION>
<FILE>gimpprojectable</FILE>
<TITLE>GimpProjectable</TITLE>
-GIMP_PROJECTABLE_GET_INTERFACE
+GIMP_PROJECTABLE_GET_IFACE
GimpProjectable
gimp_projectable_invalidate
gimp_projectable_flush
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]