summaryrefslogtreecommitdiff
path: root/gdk/gdk.h
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1997-12-17 00:14:36 +0000
committerArturo Espinosa <unammx@src.gnome.org>1997-12-17 00:14:36 +0000
commit585dc6d78179c7eea1b62d5cd746d69e8aec4a32 (patch)
treef0f48dac72f730c93f25ba8df7e6b95bb06bdc08 /gdk/gdk.h
parentad5083714e45a676886b8289516db40bb0397056 (diff)
downloadgtk+-585dc6d78179c7eea1b62d5cd746d69e8aec4a32.tar.gz
New GdkColorContext object, ported from the XColorContext in XmHTML.
It compiles and links, but is *completely* untested. Feel free to pound on it. The idea is to do all color management (allocation, etc.) via a GdkColorContext so that apps will be friendly to 8-bit displays. GdkColorContext is supposed to work on all visual/depth combinations. This support, however, is lacking from the rest of Gdk/Gtk. I will try to work on that. - Federico
Diffstat (limited to 'gdk/gdk.h')
-rw-r--r--gdk/gdk.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/gdk/gdk.h b/gdk/gdk.h
index fb7d61e1b7..33a2054a24 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -648,6 +648,63 @@ GdkEventMask gdk_ic_get_events (GdkIC ic);
/* Miscellaneous */
void gdk_event_send_clientmessage_toall(GdkEvent *event);
+/* Color Context */
+
+GdkColorContext *gdk_color_context_new (GdkVisual *visual,
+ GdkColormap *colormap);
+
+GdkColorContext *gdk_color_context_new_mono (GdkVisual *visual,
+ GdkColormap *colormap);
+
+void gdk_color_context_free (GdkColorContext *cc);
+
+gulong gdk_color_context_get_pixel (GdkColorContext *cc,
+ gushort red,
+ gushort green,
+ gushort blue,
+ gint *failed);
+void gdk_color_context_get_pixels (GdkColorContext *cc,
+ gushort *reds,
+ gushort *greens,
+ gushort *blues,
+ gint ncolors,
+ gulong *colors,
+ gint *nallocated);
+void gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
+ gushort *reds,
+ gushort *greens,
+ gushort *blues,
+ gint ncolors,
+ gint *used,
+ gulong *colors,
+ gint *nallocated);
+
+gint gdk_color_context_get_num_colors (GdkColorContext *cc);
+gint gdk_color_context_query_color (GdkColorContext *cc,
+ GdkColor *color);
+gint gdk_color_context_query_colors (GdkColorContext *cc,
+ GdkColor *colors,
+ gint num_colors);
+
+gint gdk_color_context_add_palette (GdkColorContext *cc,
+ GdkColor *palette,
+ gint num_palette);
+
+void gdk_color_context_init_dither (GdkColorContext *cc);
+void gdk_color_context_free_dither (GdkColorContext *cc);
+
+gulong gdk_color_context_get_pixel_from_palette (GdkColorContext *cc,
+ gushort *red,
+ gushort *green,
+ gushort *blue,
+ gint *failed);
+guchar gdk_color_context_get_index_from_palette (GdkColorContext *cc,
+ gint *red,
+ gint *green,
+ gint *blue,
+ gint *failed);
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */