[gimp] app: add gimp_data_factory_get_data_type()



commit 59c0c96921edead605bc6bfe45e316a86dc37a6d
Author: Michael Natterer <mitch gimp org>
Date:   Sun Oct 7 00:17:01 2012 +0200

    app: add gimp_data_factory_get_data_type()

 app/core/gimpdatafactory.c |    8 ++++++++
 app/core/gimpdatafactory.h |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index 62cba4f..c5ed93d 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -651,6 +651,14 @@ gimp_data_factory_data_save_single (GimpDataFactory  *factory,
   return TRUE;
 }
 
+GType
+gimp_data_factory_get_data_type (GimpDataFactory *factory)
+{
+  g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), G_TYPE_NONE);
+
+  return gimp_container_get_children_type (factory->priv->container);
+}
+
 GimpContainer *
 gimp_data_factory_get_container (GimpDataFactory *factory)
 {
diff --git a/app/core/gimpdatafactory.h b/app/core/gimpdatafactory.h
index 6ca395f..8460c13 100644
--- a/app/core/gimpdatafactory.h
+++ b/app/core/gimpdatafactory.h
@@ -100,6 +100,7 @@ GimpData      * gimp_data_factory_data_get_standard (GimpDataFactory  *factory,
 gboolean        gimp_data_factory_data_save_single  (GimpDataFactory  *factory,
                                                      GimpData         *data,
                                                      GError          **error);
+GType           gimp_data_factory_get_data_type     (GimpDataFactory  *factory);
 GimpContainer * gimp_data_factory_get_container     (GimpDataFactory  *factory);
 GimpContainer * gimp_data_factory_get_container_obsolete
                                                     (GimpDataFactory  *factory);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]