source: trunk/third/gtk/gdk/gdkrgb.h @ 14482

Revision 14482, 3.2 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14481, which included commits to RCS files with non-trunk default branches.
Line 
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
31extern "C" {
32#endif /* __cplusplus */
33
34typedef struct _GdkRgbCmap GdkRgbCmap;
35
36struct _GdkRgbCmap {
37  guint32 colors[256];
38  guchar lut[256]; /* for 8-bit modes */
39};
40
41void
42gdk_rgb_init (void);
43
44gulong
45gdk_rgb_xpixel_from_rgb (guint32 rgb);
46
47void
48gdk_rgb_gc_set_foreground (GdkGC *gc, guint32 rgb);
49
50void
51gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb);
52
53typedef enum
54{
55  GDK_RGB_DITHER_NONE,
56  GDK_RGB_DITHER_NORMAL,
57  GDK_RGB_DITHER_MAX
58} GdkRgbDither;
59
60void
61gdk_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
71void
72gdk_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
84void
85gdk_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
95void
96gdk_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
106GdkRgbCmap *
107gdk_rgb_cmap_new (guint32 *colors, gint n_colors);
108
109void
110gdk_rgb_cmap_free (GdkRgbCmap *cmap);
111
112void
113gdk_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. */
127gboolean
128gdk_rgb_ditherable (void);
129
130void
131gdk_rgb_set_verbose (gboolean verbose);
132
133/* experimental colormap stuff */
134void
135gdk_rgb_set_install (gboolean install);
136
137void
138gdk_rgb_set_min_colors (gint min_colors);
139
140GdkColormap *
141gdk_rgb_get_cmap (void);
142
143GdkVisual *
144gdk_rgb_get_visual (void);
145
146#ifdef __cplusplus
147}
148#endif /* __cplusplus */
149
150
151#endif /* __GDK_RGB_H__ */
Note: See TracBrowser for help on using the repository browser.