1 | /* GTK - The GIMP Toolkit |
---|
2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
---|
3 | * |
---|
4 | * This library is free software; you can redistribute it and/or |
---|
5 | * modify it under the terms of the GNU Library General Public |
---|
6 | * License as published by the Free Software Foundation; either |
---|
7 | * version 2 of the License, or (at your option) any later version. |
---|
8 | * |
---|
9 | * This library is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
12 | * Library General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU Library General Public |
---|
15 | * License along with this library; if not, write to the |
---|
16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
17 | * Boston, MA 02111-1307, USA. |
---|
18 | */ |
---|
19 | |
---|
20 | /* |
---|
21 | * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS |
---|
22 | * file for a list of people on the GTK+ Team. See the ChangeLog |
---|
23 | * files for a list of changes. These files are distributed with |
---|
24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
---|
25 | */ |
---|
26 | |
---|
27 | #ifndef __GDK_RGB_H__ |
---|
28 | #define __GDK_RGB_H__ |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif /* __cplusplus */ |
---|
33 | |
---|
34 | typedef struct _GdkRgbCmap GdkRgbCmap; |
---|
35 | |
---|
36 | struct _GdkRgbCmap { |
---|
37 | guint32 colors[256]; |
---|
38 | guchar lut[256]; /* for 8-bit modes */ |
---|
39 | }; |
---|
40 | |
---|
41 | void |
---|
42 | gdk_rgb_init (void); |
---|
43 | |
---|
44 | gulong |
---|
45 | gdk_rgb_xpixel_from_rgb (guint32 rgb); |
---|
46 | |
---|
47 | void |
---|
48 | gdk_rgb_gc_set_foreground (GdkGC *gc, guint32 rgb); |
---|
49 | |
---|
50 | void |
---|
51 | gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb); |
---|
52 | |
---|
53 | typedef enum |
---|
54 | { |
---|
55 | GDK_RGB_DITHER_NONE, |
---|
56 | GDK_RGB_DITHER_NORMAL, |
---|
57 | GDK_RGB_DITHER_MAX |
---|
58 | } GdkRgbDither; |
---|
59 | |
---|
60 | void |
---|
61 | gdk_draw_rgb_image (GdkDrawable *drawable, |
---|
62 | GdkGC *gc, |
---|
63 | gint x, |
---|
64 | gint y, |
---|
65 | gint width, |
---|
66 | gint height, |
---|
67 | GdkRgbDither dith, |
---|
68 | guchar *rgb_buf, |
---|
69 | gint rowstride); |
---|
70 | |
---|
71 | void |
---|
72 | gdk_draw_rgb_image_dithalign (GdkDrawable *drawable, |
---|
73 | GdkGC *gc, |
---|
74 | gint x, |
---|
75 | gint y, |
---|
76 | gint width, |
---|
77 | gint height, |
---|
78 | GdkRgbDither dith, |
---|
79 | guchar *rgb_buf, |
---|
80 | gint rowstride, |
---|
81 | gint xdith, |
---|
82 | gint ydith); |
---|
83 | |
---|
84 | void |
---|
85 | gdk_draw_rgb_32_image (GdkDrawable *drawable, |
---|
86 | GdkGC *gc, |
---|
87 | gint x, |
---|
88 | gint y, |
---|
89 | gint width, |
---|
90 | gint height, |
---|
91 | GdkRgbDither dith, |
---|
92 | guchar *buf, |
---|
93 | gint rowstride); |
---|
94 | |
---|
95 | void |
---|
96 | gdk_draw_gray_image (GdkDrawable *drawable, |
---|
97 | GdkGC *gc, |
---|
98 | gint x, |
---|
99 | gint y, |
---|
100 | gint width, |
---|
101 | gint height, |
---|
102 | GdkRgbDither dith, |
---|
103 | guchar *buf, |
---|
104 | gint rowstride); |
---|
105 | |
---|
106 | GdkRgbCmap * |
---|
107 | gdk_rgb_cmap_new (guint32 *colors, gint n_colors); |
---|
108 | |
---|
109 | void |
---|
110 | gdk_rgb_cmap_free (GdkRgbCmap *cmap); |
---|
111 | |
---|
112 | void |
---|
113 | gdk_draw_indexed_image (GdkDrawable *drawable, |
---|
114 | GdkGC *gc, |
---|
115 | gint x, |
---|
116 | gint y, |
---|
117 | gint width, |
---|
118 | gint height, |
---|
119 | GdkRgbDither dith, |
---|
120 | guchar *buf, |
---|
121 | gint rowstride, |
---|
122 | GdkRgbCmap *cmap); |
---|
123 | |
---|
124 | |
---|
125 | /* Below are some functions which are primarily useful for debugging |
---|
126 | and experimentation. */ |
---|
127 | gboolean |
---|
128 | gdk_rgb_ditherable (void); |
---|
129 | |
---|
130 | void |
---|
131 | gdk_rgb_set_verbose (gboolean verbose); |
---|
132 | |
---|
133 | /* experimental colormap stuff */ |
---|
134 | void |
---|
135 | gdk_rgb_set_install (gboolean install); |
---|
136 | |
---|
137 | void |
---|
138 | gdk_rgb_set_min_colors (gint min_colors); |
---|
139 | |
---|
140 | GdkColormap * |
---|
141 | gdk_rgb_get_cmap (void); |
---|
142 | |
---|
143 | GdkVisual * |
---|
144 | gdk_rgb_get_visual (void); |
---|
145 | |
---|
146 | #ifdef __cplusplus |
---|
147 | } |
---|
148 | #endif /* __cplusplus */ |
---|
149 | |
---|
150 | |
---|
151 | #endif /* __GDK_RGB_H__ */ |
---|