[gtk+/color-management: 3/6] Add GtkColorEngine which is a singleton to create GtkColorProfile and GtkColorTransform objects



commit ed64e4f41f2c0e09773ce3cb6326c0067b10071e
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 2 14:09:26 2010 +0000

    Add GtkColorEngine which is a singleton to create GtkColorProfile and GtkColorTransform objects
    
    GtkColorEngine is an object that manages the default color management system
    (CMS) which may or may not be installed as plugins.
    The GtkColorEngine object automatically loads the default CMS the first time
    that it is required.
    
    If no CMM is available then a fallback is used, which does no color
    correction to the image whatsoever.

 gtk/Makefile.am              |    4 +
 gtk/gtk.h                    |    1 +
 gtk/gtkcolorengine.c         |  227 ++++++++++++++++++++++++++++++++++++++++++
 gtk/gtkcolorengine.h         |   92 +++++++++++++++++
 gtk/gtkcolorenginefallback.c |  138 +++++++++++++++++++++++++
 gtk/gtkcolorenginefallback.h |   88 ++++++++++++++++
 6 files changed, 550 insertions(+), 0 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 5238e22..2b8dbaf 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -196,6 +196,7 @@ gtk_public_h_sources =          \
 	gtkcheckmenuitem.h	\
 	gtkclipboard.h		\
 	gtkcolorbutton.h	\
+	gtkcolorengine.h	\
 	gtkcolorprofile.h	\
 	gtkcolorsel.h		\
 	gtkcolorseldialog.h	\
@@ -382,6 +383,7 @@ gtk_private_h_sources =		\
 	gtkfilesystem.h		\
 	gtkfilesystemmodel.h	\
 	gtkiconcache.h		\
+	gtkcolorenginefallback.h \
 	gtkintl.h		\
 	gtkkeyhash.h		\
 	gtkmnemonichash.h	\
@@ -455,6 +457,8 @@ gtk_base_c_sources =            \
 	gtkcheckbutton.c	\
 	gtkcheckmenuitem.c	\
 	gtkcolorbutton.c	\
+	gtkcolorengine.c	\
+	gtkcolorenginefallback.c \
 	gtkcolorprofile.c	\
 	gtkcolorsel.c		\
 	gtkcolorseldialog.c	\
diff --git a/gtk/gtk.h b/gtk/gtk.h
index f2137f8..fb42782 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -67,6 +67,7 @@
 #include <gtk/gtkcheckmenuitem.h>
 #include <gtk/gtkclipboard.h>
 #include <gtk/gtkcolorbutton.h>
+#include <gtk/gtkcolorengine.h>
 #include <gtk/gtkcolorprofile.h>
 #include <gtk/gtkcolorsel.h>
 #include <gtk/gtkcolorseldialog.h>
diff --git a/gtk/gtkcolorengine.c b/gtk/gtkcolorengine.c
new file mode 100644
index 0000000..d1fc29b
--- /dev/null
+++ b/gtk/gtkcolorengine.c
@@ -0,0 +1,227 @@
+/* GTK - The GIMP Toolkit
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:gtk-color-engine
+ * @short_description: Creates #GtkColorProfile and #GtkColorTransform objects
+ * @include: gtk/gtk.h
+ * @title: GtkColorEngine
+ * @see_also: #GtkColorProfile, #GtkColorTransform
+ *
+ * Color management is an important part of a modern desktop experience.
+ * It is basically the transformation of images between the color
+ * representations of various devices, such as cameras, scanners, displays
+ * and printers.
+ *
+ * The goal of a color management system is to obtain the best match across
+ * these different devices.
+ * This means that photgraphs taken on a digital camera should match as closely
+ * as possible what is observed on the computer screen and what is printed out
+ * on paper.
+ *
+ * Output devices may be capable of representing more or less colors than
+ * the input device, and part of the color management system is to define a
+ * rendering intent when mapping one device gamut to another.
+ *
+ * #GtkColorEngine is an object that manages the default color management system
+ * (CMS) which may or may not be installed as plugins.
+ * The #GtkColorEngine object automatically loads the default CMS the first time
+ * that it is required.
+ * If no CMM is available then a fallback is used, which does no color
+ * correction to the image whatsoever.
+ *
+ * A #GtkColorEngine allows the user to create a #GtkColorProfile objects using
+ * gtk_color_engine_create_profile(). Profiles are used to represent device
+ * colorspaces.
+ *
+ * A #GtkColorEngine also allows creation of #GtkColorTransform objects by using
+ * either gtk_color_engine_create_transform() or
+ * gtk_color_engine_create_transform_from_profiles().
+ * Transforms are used to represent the mapping of one colorspace to another.
+ *
+ * On way you can use #GtkColorEngine is the following code snippet, where a
+ * #GtkImage is being converted from one defined colorspace into the internal
+ * sRGB space.
+ * |[
+ *  GdkPixbuf *pixbuf;
+ *  GtkColorEngine *engine;
+ *  GtkColorProfile *profile;
+ *  GtkColorTransform *transform;
+ *  engine = gtk_color_engine_get_default ();
+ *  profile = gtk_color_engine_create_profile (engine, icc_profile, len, error);
+ *  transform = gtk_color_engine_create_transform_from_profiles (engine, profile, NULL);
+ *  pixbuf = gtk_image_get_pixbuf (image);
+ *  ret = gtk_color_transform_apply_pixbuf_in_place (transform, pixbuf, error);
+ *  g_object_unref (transform);
+ *  g_object_unref (profile);
+ * ]|
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+
+#include "gtkprivate.h"
+#include "gtkcolorengine.h"
+#include "gtkcolorenginefallback.h"
+
+G_DEFINE_INTERFACE (GtkColorEngine, gtk_color_engine, G_TYPE_OBJECT)
+
+/**
+ * gtk_color_engine_error_quark:
+ *
+ * Gets the error quark for #GtkColorEngine.
+ *
+ * Return value: an error quark
+ *
+ * Since: 2.20
+ **/
+GQuark
+gtk_color_engine_error_quark (void)
+{
+  return g_quark_from_static_string ("gtk-color-error-quark");
+}
+
+static void
+gtk_color_engine_default_init (GtkColorEngineInterface *iface)
+{
+}
+
+/**
+ * gtk_color_engine_create_transform:
+ * @color_engine: a #GtkColorEngine
+ *
+ * Gets a new transform from the engine, which allows you to modify an image.
+ * You will still need to call gtk_color_transform_set_input_profile() and/or
+ * gtk_color_transform_set_output_profile() before the transform will be useful.
+ *
+ * Return value: a new #GtkColorTransform instance, free with g_object_unref()
+ *
+ * Since: 2.20
+ **/
+GtkColorTransform *
+gtk_color_engine_create_transform (GtkColorEngine *color_engine)
+{
+  GtkColorEngineInterface *iface = GTK_COLOR_ENGINE_GET_IFACE (color_engine);
+
+  g_return_val_if_fail (GTK_IS_COLOR_ENGINE (color_engine), NULL);
+  g_return_val_if_fail ((*iface->create_transform) != NULL, NULL);
+
+  return (*iface->create_transform) (color_engine);
+}
+
+/**
+ * gtk_color_engine_create_transform_from_profiles:
+ * @color_engine: a #GtkColorEngine
+ * @input_profile: a #GtkColorProfile, or %NULL
+ * @output_profile: a #GtkColorProfile, or %NULL
+ *
+ * Gets a new transform from the engine which is preset with two profiles.
+ * This saves you calling gtk_color_engine_create_transform() and then
+ * gtk_color_transform_set_input_profile() and/or
+ * gtk_color_transform_set_output_profile().
+ *
+ * Return value: a new #GtkColorTransform instance, free with g_object_unref()
+ *
+ * Since: 2.20
+ **/
+GtkColorTransform *
+gtk_color_engine_create_transform_from_profiles (GtkColorEngine  *color_engine,
+                                                 GtkColorProfile *input_profile,
+                                                 GtkColorProfile *output_profile)
+{
+  GtkColorTransform *color_transform;
+
+  g_return_val_if_fail (GTK_IS_COLOR_ENGINE (color_engine), NULL);
+  g_return_val_if_fail (GTK_IS_COLOR_PROFILE (input_profile) || input_profile == NULL, NULL);
+  g_return_val_if_fail (GTK_IS_COLOR_PROFILE (output_profile) || output_profile == NULL, NULL);
+
+  color_transform = gtk_color_engine_create_transform (color_engine);
+  gtk_color_transform_set_input_profile (color_transform, input_profile);
+  gtk_color_transform_set_output_profile (color_transform, output_profile);
+  return color_transform;
+}
+
+/**
+ * gtk_color_engine_create_profile:
+ * @color_engine: a #GtkColorEngine
+ * @data: the COLOR engine data
+ * @length: the COLOR engine data
+ * @error: a %GError, or %NULL
+ *
+ * Creates a profile and loads ICC data.
+ *
+ * Return value: a #GtkColorProfile object, otherwise %NULL and @error is set.
+ *
+ * Since: 2.20
+ **/
+GtkColorProfile *
+gtk_color_engine_create_profile (GtkColorEngine *color_engine,
+                                 const guint8   *data,
+                                 gsize           length,
+                                 GError        **error)
+{
+  GtkColorProfile *color_profile;
+  GtkColorEngineInterface *iface = GTK_COLOR_ENGINE_GET_IFACE (color_engine);
+
+  g_return_val_if_fail (GTK_IS_COLOR_ENGINE (color_engine), FALSE);
+  g_return_val_if_fail (data != NULL, FALSE);
+  g_return_val_if_fail ((*iface->create_profile) != NULL, NULL);
+
+  color_profile = (*iface->create_profile) (color_engine, data, length, error);
+  return color_profile;
+}
+
+static gpointer
+gtk_color_engine_get_default_cb (gpointer data)
+{
+  GIOExtensionPoint *ep;
+  GList *extensions;
+
+  _gtk_io_modules_ensure_loaded ();
+  ep = g_io_extension_point_lookup (GTK_COLOR_ENGINE_EXTENSION_POINT_NAME);
+  extensions = g_io_extension_point_get_extensions (ep);
+  if (extensions != NULL)
+    return g_object_new (g_io_extension_get_type (extensions->data), NULL);
+  return g_object_new (GTK_TYPE_COLOR_ENGINE_FALLBACK, NULL);
+}
+
+/**
+ * gtk_color_engine_get_default:
+ *
+ * Gets the default color engine. If no engines are installed then a fallback
+ * engine is used which just copies the image data without modification.
+ *
+ * Return value: a #GtkColorEngine
+ *
+ * Since: 2.20
+ **/
+GtkColorEngine *
+gtk_color_engine_get_default (void)
+{
+  static GOnce once_init = G_ONCE_INIT;
+  return g_once (&once_init, gtk_color_engine_get_default_cb, NULL);
+}
+
+
+#define __GTK_COLOR_ENGINE_C__
+#include "gtkaliasdef.c"
diff --git a/gtk/gtkcolorengine.h b/gtk/gtkcolorengine.h
new file mode 100644
index 0000000..ef5f54d
--- /dev/null
+++ b/gtk/gtkcolorengine.h
@@ -0,0 +1,92 @@
+/* GTK - The GIMP Toolkit
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
+#error "Only <gtk/gtk.h> can be included directly."
+#endif
+
+#ifndef __GTK_COLOR_ENGINE_H
+#define __GTK_COLOR_ENGINE_H
+
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "gtkcolorprofile.h"
+#include "gtkcolortransform.h"
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_COLOR_ENGINE               (gtk_color_engine_get_type ())
+#define GTK_COLOR_ENGINE(o)                 (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_ENGINE, GtkColorEngine))
+#define GTK_IS_COLOR_ENGINE(o)              (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_ENGINE))
+#define GTK_COLOR_ENGINE_GET_IFACE(obj)     (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_COLOR_ENGINE, GtkColorEngineInterface))
+
+#define GTK_COLOR_ENGINE_ERROR              (gtk_color_engine_error_quark ())
+
+typedef struct _GtkColorEngine            GtkColorEngine;
+typedef struct _GtkColorEngineInterface   GtkColorEngineInterface;
+
+typedef enum
+{
+  GTK_COLOR_ENGINE_ERROR_IMAGE_FORMAT_NOT_SUPPORTED
+} GtkColorEngineError;
+
+#define GTK_COLOR_ENGINE_EXTENSION_POINT_NAME "gtk-color-engine"
+
+/**
+ * GtkColorEngineInterface:
+ * @g_iface: The parent interface.
+ * @create_profile: Creates a #GtkColorProfile.
+ * @create_transform: Creates a #GtkColorTransform.
+ *
+ * An interface for creating color profiles and transforms.
+ **/
+struct _GtkColorEngineInterface
+{
+  GTypeInterface g_iface;
+  /* Virtual Table */
+  GtkColorProfile     *(*create_profile)    (GtkColorEngine *color_engine,
+                                             const guint8   *data,
+                                             gsize           length,
+                                             GError        **error);
+  GtkColorTransform   *(*create_transform)  (GtkColorEngine *color_engine);
+
+};
+
+GQuark                  gtk_color_engine_error_quark        (void);
+GType                   gtk_color_engine_get_type           (void) G_GNUC_CONST;
+GtkColorEngine         *gtk_color_engine_get_default        (void);
+
+/* new profile */
+GtkColorProfile        *gtk_color_engine_create_profile (GtkColorEngine    *color_engine,
+                                                         const guint8      *data,
+                                                         gsize              length,
+                                                         GError           **error);
+
+/* new transform */
+GtkColorTransform      *gtk_color_engine_create_transform                (GtkColorEngine    *color_engine);
+GtkColorTransform      *gtk_color_engine_create_transform_from_profiles  (GtkColorEngine    *color_engine,
+                                                                          GtkColorProfile   *input_profile,
+                                                                          GtkColorProfile   *output_profile);
+
+G_END_DECLS
+
+#endif /* __GTK_COLOR_ENGINE_H */
+
diff --git a/gtk/gtkcolorenginefallback.c b/gtk/gtkcolorenginefallback.c
new file mode 100644
index 0000000..649fa21
--- /dev/null
+++ b/gtk/gtkcolorenginefallback.c
@@ -0,0 +1,138 @@
+/* GTK - The GIMP Toolkit
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <string.h>
+
+#include "gtkcolorenginefallback.h"
+
+static void gtk_color_engine_fallback_iface_init (GtkColorEngineInterface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (GtkColorEngineFallback, gtk_color_engine_fallback, G_TYPE_OBJECT,
+                         G_IMPLEMENT_INTERFACE (GTK_TYPE_COLOR_ENGINE,
+                                                gtk_color_engine_fallback_iface_init))
+
+G_DEFINE_TYPE (GtkColorProfileFallback, gtk_color_profile_fallback, GTK_TYPE_COLOR_PROFILE)
+G_DEFINE_TYPE (GtkColorTransformFallback, gtk_color_transform_fallback, GTK_TYPE_COLOR_TRANSFORM)
+
+static void
+gtk_color_engine_fallback_init (GtkColorEngineFallback *color_engine_fallback)
+{
+}
+
+static void
+gtk_color_engine_fallback_class_init (GtkColorEngineFallbackClass *klass)
+{
+}
+
+static GtkColorTransform *
+gtk_color_transform_fallback_create_profile (GtkColorEngine *color_engine)
+{
+  GtkColorTransformFallback *color_transform;
+  color_transform = g_object_new (GTK_TYPE_COLOR_TRANSFORM_FALLBACK, NULL);
+  return GTK_COLOR_TRANSFORM (color_transform);
+}
+
+/**
+ * gtk_color_profile_fallback_create_profile:
+ **/
+GtkColorProfile *
+gtk_color_profile_fallback_create_profile (GtkColorEngine *color_engine,
+                                           const guint8   *data,
+                                           gsize           length,
+                                           GError        **error)
+{
+  GtkColorProfileFallback *color_profile;
+  color_profile = g_object_new (GTK_TYPE_COLOR_PROFILE_FALLBACK, NULL);
+  return GTK_COLOR_PROFILE (color_profile);
+}
+
+static void
+gtk_color_engine_fallback_iface_init (GtkColorEngineInterface *iface)
+{
+  iface->create_profile = gtk_color_profile_fallback_create_profile;
+  iface->create_transform = gtk_color_transform_fallback_create_profile;
+}
+
+static void
+gtk_color_profile_fallback_class_init (GtkColorProfileFallbackClass *klass)
+{
+}
+
+static void
+gtk_color_profile_fallback_init (GtkColorProfileFallback *color_profile_fallback)
+{
+}
+
+static GdkPixbuf *
+gtk_color_transform_fallback_apply_pixbuf (GtkColorTransform *color_transform,
+                                           GdkPixbuf         *pixbuf,
+                                           GError           **error)
+{
+  return gdk_pixbuf_copy (pixbuf);
+}
+
+static gboolean
+gtk_color_transform_fallback_apply_pixbuf_in_place (GtkColorTransform *color_transform,
+                                                    GdkPixbuf         *pixbuf,
+                                                    GError           **error)
+{
+  /* this is a NOP */
+  return TRUE;
+}
+
+static cairo_surface_t *
+gtk_color_transform_fallback_apply_surface (GtkColorTransform *color_transform,
+                                            cairo_surface_t   *surface,
+                                            GError           **error)
+{
+  return cairo_surface_create_similar (surface,
+                                       cairo_surface_get_content (surface),
+                                       cairo_image_surface_get_width (surface),
+                                       cairo_image_surface_get_height (surface));
+}
+
+static gboolean
+gtk_color_transform_fallback_apply_surface_in_place (GtkColorTransform *color_transform,
+                                                     cairo_surface_t   *surface,
+                                                     GError           **error)
+{
+  /* this is a NOP */
+  return TRUE;
+}
+
+static void
+gtk_color_transform_fallback_class_init (GtkColorTransformFallbackClass *klass)
+{
+  GtkColorTransformClass *parent_class = GTK_COLOR_TRANSFORM_CLASS (klass);
+  parent_class->apply_pixbuf_in_place = gtk_color_transform_fallback_apply_pixbuf_in_place;
+  parent_class->apply_pixbuf = gtk_color_transform_fallback_apply_pixbuf;
+  parent_class->apply_surface_in_place = gtk_color_transform_fallback_apply_surface_in_place;
+  parent_class->apply_surface = gtk_color_transform_fallback_apply_surface;
+}
+
+static void
+gtk_color_transform_fallback_init (GtkColorTransformFallback *color_transform_fallback)
+{
+}
+
diff --git a/gtk/gtkcolorenginefallback.h b/gtk/gtkcolorenginefallback.h
new file mode 100644
index 0000000..e570a7a
--- /dev/null
+++ b/gtk/gtkcolorenginefallback.h
@@ -0,0 +1,88 @@
+/* GTK - The GIMP Toolkit
+ *
+ * Copyright (C) 2010 Richard Hughes <richard hughsie com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTK_COLOR_ENGINE_FALLBACK_H
+#define __GTK_COLOR_ENGINE_FALLBACK_H
+
+#include <glib-object.h>
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_COLOR_ENGINE_FALLBACK          (gtk_color_engine_fallback_get_type ())
+#define GTK_COLOR_ENGINE_FALLBACK(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_ENGINE_FALLBACK, GtkColorEngineFallback))
+#define GTK_IS_COLOR_ENGINE_FALLBACK(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_ENGINE_FALLBACK))
+
+#define GTK_TYPE_COLOR_PROFILE_FALLBACK         (gtk_color_profile_fallback_get_type ())
+#define GTK_COLOR_PROFILE_FALLBACK(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_PROFILE_FALLBACK, GtkColorProfileFallback))
+#define GTK_IS_COLOR_PROFILE_FALLBACK(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_PROFILE_FALLBACK))
+
+#define GTK_TYPE_COLOR_TRANSFORM_FALLBACK       (gtk_color_transform_fallback_get_type ())
+#define GTK_COLOR_TRANSFORM_FALLBACK(o)         (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLOR_TRANSFORM_FALLBACK, GtkColorTransformFallback))
+#define GTK_IS_COLOR_TRANSFORM_FALLBACK(o)      (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLOR_TRANSFORM_FALLBACK))
+
+typedef struct _GtkColorEngineFallback          GtkColorEngineFallback;
+typedef struct _GtkColorEngineFallbackClass     GtkColorEngineFallbackClass;
+
+typedef struct _GtkColorTransformFallback       GtkColorTransformFallback;
+typedef struct _GtkColorTransformFallbackClass  GtkColorTransformFallbackClass;
+
+typedef struct _GtkColorProfileFallback         GtkColorProfileFallback;
+typedef struct _GtkColorProfileFallbackClass    GtkColorProfileFallbackClass;
+
+struct _GtkColorEngineFallback
+{
+   GObject parent;
+};
+
+struct _GtkColorEngineFallbackClass
+{
+  GObjectClass parent_class;
+};
+
+struct _GtkColorTransformFallback
+{
+   GtkColorTransform parent;
+};
+
+struct _GtkColorTransformFallbackClass
+{
+  GtkColorTransformClass parent_class;
+};
+
+struct _GtkColorProfileFallback
+{
+   GtkColorProfile parent;
+};
+
+struct _GtkColorProfileFallbackClass
+{
+  GtkColorProfileClass parent_class;
+};
+
+GType      gtk_color_engine_fallback_get_type    (void) G_GNUC_CONST;
+GType      gtk_color_transform_fallback_get_type (void) G_GNUC_CONST;
+GType      gtk_color_profile_fallback_get_type   (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* __GTK_COLOR_ENGINE_FALLBACK_H */
+



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