diff options
author | Benjamin Otte <otte@redhat.com> | 2010-08-29 01:51:54 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:33 +0200 |
commit | ffed0768918fd95d7e80aba61513f99d54617f4c (patch) | |
tree | 511d303e0ad8ba9889a6d7a8325e38bdf47c8780 /gdk/quartz | |
parent | a6e936788a7fbf9c492a3160c6213e88b84b269e (diff) | |
download | gtk+-ffed0768918fd95d7e80aba61513f99d54617f4c.tar.gz |
quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel()
Diffstat (limited to 'gdk/quartz')
-rw-r--r-- | gdk/quartz/gdkcolor-quartz.c | 49 | ||||
-rw-r--r-- | 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 9a7884d2be..c0addafb93 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 9dc090e60b..ca9eae30b1 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); |