[gtk+] quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel()



commit ffed0768918fd95d7e80aba61513f99d54617f4c
Author: Benjamin Otte <otte redhat com>
Date:   Sun Aug 29 01:51:54 2010 +0200

    quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel()

 gdk/quartz/gdkcolor-quartz.c   |   49 ----------------------------------------
 gdk/quartz/gdkprivate-quartz.h |    4 ---
 2 files changed, 0 insertions(+), 53 deletions(-)
---
diff --git a/gdk/quartz/gdkcolor-quartz.c b/gdk/quartz/gdkcolor-quartz.c
index 9a7884d..c0addaf 100644
--- a/gdk/quartz/gdkcolor-quartz.c
+++ b/gdk/quartz/gdkcolor-quartz.c
@@ -148,52 +148,3 @@ gdk_colormap_get_screen (GdkColormap *cmap)
   return gdk_screen_get_default ();
 }
 
-CGColorRef
-_gdk_quartz_colormap_get_cgcolor_from_pixel (GdkDrawable *drawable,
-                                             guint32      pixel)
-{
-  CGFloat components[4] = { 0.0f, };
-  CGColorRef color;
-  CGColorSpaceRef colorspace;
-  const GdkVisual *visual;
-  GdkColormap *colormap;
-
-  colormap = gdk_drawable_get_colormap (drawable);
-  if (colormap)
-    visual = gdk_colormap_get_visual (colormap);
-  else
-    visual = gdk_visual_get_best_with_depth (gdk_drawable_get_depth (drawable));
-
-  switch (visual->type)
-    {
-      case GDK_VISUAL_STATIC_GRAY:
-      case GDK_VISUAL_GRAYSCALE:
-        components[0] = (pixel & 0xff) / 255.0f;
-
-        if (visual->depth == 1)
-          components[0] = components[0] == 0.0f ? 0.0f : 1.0f;
-        components[1] = 1.0f;
-
-        colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericGray);
-        color = CGColorCreate (colorspace, components);
-        CGColorSpaceRelease (colorspace);
-        break;
-
-      default:
-        components[0] = (pixel >> 16 & 0xff) / 255.0;
-        components[1] = (pixel >> 8  & 0xff) / 255.0;
-        components[2] = (pixel       & 0xff) / 255.0;
-
-        if (visual->depth == 32)
-          components[3] = (pixel >> 24 & 0xff) / 255.0;
-        else
-          components[3] = 1.0;
-
-        colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
-        color = CGColorCreate (colorspace, components);
-        CGColorSpaceRelease (colorspace);
-        break;
-    }
-
-  return color;
-}
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 9dc090e..ca9eae3 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -79,10 +79,6 @@ typedef enum {
   GDK_QUARTZ_CONTEXT_TEXT   = 1 << 2
 } GdkQuartzContextValuesMask;
 
-/* Colormap */
-CGColorRef _gdk_quartz_colormap_get_cgcolor_from_pixel (GdkDrawable *drawable,
-                                                        guint32      pixel);
-
 /* Window */
 gboolean    _gdk_quartz_window_is_ancestor          (GdkWindow *ancestor,
                                                      GdkWindow *window);



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