summaryrefslogtreecommitdiff
path: root/gdk/gdkprivate.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/gdkprivate.h
parentad5083714e45a676886b8289516db40bb0397056 (diff)
downloadgdk-pixbuf-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/gdkprivate.h')
-rw-r--r--gdk/gdkprivate.h72
1 files changed, 63 insertions, 9 deletions
diff --git a/gdk/gdkprivate.h b/gdk/gdkprivate.h
index 9c0e9918d..e15ef6a23 100644
--- a/gdk/gdkprivate.h
+++ b/gdk/gdkprivate.h
@@ -35,14 +35,15 @@ extern "C" {
#endif /* __cplusplus */
-typedef struct _GdkWindowPrivate GdkWindowPrivate;
-typedef struct _GdkWindowPrivate GdkPixmapPrivate;
-typedef struct _GdkImagePrivate GdkImagePrivate;
-typedef struct _GdkGCPrivate GdkGCPrivate;
-typedef struct _GdkColormapPrivate GdkColormapPrivate;
-typedef struct _GdkVisualPrivate GdkVisualPrivate;
-typedef struct _GdkFontPrivate GdkFontPrivate;
-typedef struct _GdkCursorPrivate GdkCursorPrivate;
+typedef struct _GdkWindowPrivate GdkWindowPrivate;
+typedef struct _GdkWindowPrivate GdkPixmapPrivate;
+typedef struct _GdkImagePrivate GdkImagePrivate;
+typedef struct _GdkGCPrivate GdkGCPrivate;
+typedef struct _GdkColormapPrivate GdkColormapPrivate;
+typedef struct _GdkVisualPrivate GdkVisualPrivate;
+typedef struct _GdkFontPrivate GdkFontPrivate;
+typedef struct _GdkCursorPrivate GdkCursorPrivate;
+typedef struct _GdkColorContextPrivate GdkColorContextPrivate;
struct _GdkWindowPrivate
@@ -151,7 +152,7 @@ typedef struct _GdkDndGlobals GdkDndGlobals;
#ifdef USE_XIM
-struct _GdkICPrivate
+struct _GdkICPrivate
{
XIC xic;
GdkIMStyle style;
@@ -161,6 +162,59 @@ typedef struct _GdkICPrivate GdkICPrivate;
#endif /* USE_XIM */
+struct _GdkColorContextPrivate
+{
+ GdkColorContext color_context;
+ Display *xdisplay;
+ GdkVisual *visual;
+ GdkColormap *colormap;
+
+ gint num_colors; /* available no. of colors in colormap */
+ gint max_colors; /* maximum no. of colors */
+ gint num_allocated; /* no. of allocated colors */
+
+ GdkColorContextMode mode;
+ gint need_to_free_colormap;
+ GdkAtom std_cmap_atom;
+
+ XStandardColormap std_cmap;
+ gulong *clut; /* color look-up table */
+ GdkColor *cmap; /* colormap */
+
+ GHashTable *color_hash; /* hash table of allocated colors */
+ GdkColor *palette; /* preallocated palette */
+ gint num_palette; /* size of palette */
+
+ GdkColorContextDither *fast_dither; /* fast dither matrix */
+
+ struct
+ {
+ gint red;
+ gint green;
+ gint blue;
+ } shifts;
+
+ struct
+ {
+ gulong red;
+ gulong green;
+ gulong blue;
+ } masks;
+
+
+ struct {
+ gint red;
+ gint green;
+ gint blue;
+ } bits;
+
+ gulong max_entry;
+
+ gulong black_pixel;
+ gulong white_pixel;
+};
+
+
void gdk_window_init (void);
void gdk_visual_init (void);