[gimp] libgimp: move gimp_plugin_icon_register() to gimplegacy.[ch]
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: move gimp_plugin_icon_register() to gimplegacy.[ch]
- Date: Tue, 30 Jul 2019 21:59:42 +0000 (UTC)
commit 7dec3aa792809614bd66bb84344eef357665499e
Author: Michael Natterer <mitch gimp org>
Date: Tue Jul 30 23:59:13 2019 +0200
libgimp: move gimp_plugin_icon_register() to gimplegacy.[ch]
libgimp/gimplegacy.c | 35 +++++++++++++++++++++++++++++++++++
libgimp/gimplegacy.h | 9 +++++++++
libgimp/gimpplugin.c | 35 -----------------------------------
libgimp/gimpplugin.h | 7 -------
4 files changed, 44 insertions(+), 42 deletions(-)
---
diff --git a/libgimp/gimplegacy.c b/libgimp/gimplegacy.c
index e550a41630..5fa6dae17f 100644
--- a/libgimp/gimplegacy.c
+++ b/libgimp/gimplegacy.c
@@ -880,3 +880,38 @@ gimp_param_free (gpointer boxed)
G_DEFINE_BOXED_TYPE (GimpParam, gimp_param,
gimp_param_copy,
gimp_param_free)
+
+
+/* old gimp_plugin cruft */
+
+gboolean
+gimp_plugin_icon_register (const gchar *procedure_name,
+ GimpIconType icon_type,
+ const guint8 *icon_data)
+{
+ gint icon_data_length;
+
+ g_return_val_if_fail (procedure_name != NULL, FALSE);
+ g_return_val_if_fail (icon_data != NULL, FALSE);
+
+ switch (icon_type)
+ {
+ case GIMP_ICON_TYPE_ICON_NAME:
+ case GIMP_ICON_TYPE_IMAGE_FILE:
+ icon_data_length = strlen ((const gchar *) icon_data) + 1;
+ break;
+
+ case GIMP_ICON_TYPE_INLINE_PIXBUF:
+ g_return_val_if_fail (g_ntohl (*((gint32 *) icon_data)) == 0x47646b50,
+ FALSE);
+
+ icon_data_length = g_ntohl (*((gint32 *) (icon_data + 4)));
+ break;
+
+ default:
+ g_return_val_if_reached (FALSE);
+ }
+
+ return _gimp_plugin_icon_register (procedure_name,
+ icon_type, icon_data_length, icon_data);
+}
diff --git a/libgimp/gimplegacy.h b/libgimp/gimplegacy.h
index b46239d951..f44319d2aa 100644
--- a/libgimp/gimplegacy.h
+++ b/libgimp/gimplegacy.h
@@ -293,6 +293,15 @@ void gimp_destroy_paramdefs (GimpParamDef *paramdefs,
gint n_params);
+/* gimp_plugin API that should now be done by using GimpPlugIn and
+ * GimpProcedure
+ */
+
+gboolean gimp_plugin_icon_register (const gchar *procedure_name,
+ GimpIconType icon_type,
+ const guint8 *icon_data);
+
+
G_END_DECLS
#endif /* __GIMP_LEGACY_H__ */
diff --git a/libgimp/gimpplugin.c b/libgimp/gimpplugin.c
index b3c888c30d..ea19065b0b 100644
--- a/libgimp/gimpplugin.c
+++ b/libgimp/gimpplugin.c
@@ -221,38 +221,3 @@ gimp_plug_in_get_temp_procedure (GimpPlugIn *plug_in,
return NULL;
}
-
-
-/* unrelated old API */
-
-gboolean
-gimp_plugin_icon_register (const gchar *procedure_name,
- GimpIconType icon_type,
- const guint8 *icon_data)
-{
- gint icon_data_length;
-
- g_return_val_if_fail (procedure_name != NULL, FALSE);
- g_return_val_if_fail (icon_data != NULL, FALSE);
-
- switch (icon_type)
- {
- case GIMP_ICON_TYPE_ICON_NAME:
- case GIMP_ICON_TYPE_IMAGE_FILE:
- icon_data_length = strlen ((const gchar *) icon_data) + 1;
- break;
-
- case GIMP_ICON_TYPE_INLINE_PIXBUF:
- g_return_val_if_fail (g_ntohl (*((gint32 *) icon_data)) == 0x47646b50,
- FALSE);
-
- icon_data_length = g_ntohl (*((gint32 *) (icon_data + 4)));
- break;
-
- default:
- g_return_val_if_reached (FALSE);
- }
-
- return _gimp_plugin_icon_register (procedure_name,
- icon_type, icon_data_length, icon_data);
-}
diff --git a/libgimp/gimpplugin.h b/libgimp/gimpplugin.h
index 2e61501836..73883dc34a 100644
--- a/libgimp/gimpplugin.h
+++ b/libgimp/gimpplugin.h
@@ -100,13 +100,6 @@ GimpProcedure * gimp_plug_in_get_temp_procedure (GimpPlugIn *plug_in,
const gchar *name);
-/* unrelated old API */
-
-gboolean gimp_plugin_icon_register (const gchar *procedure_name,
- GimpIconType icon_type,
- const guint8 *icon_data);
-
-
G_END_DECLS
#endif /* __GIMP_PLUG_IN_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]