gdkrgb.h

Go to the documentation of this file.
00001 /* GTK - The GIMP Toolkit
00002  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the
00016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  * Boston, MA 02111-1307, USA.
00018  */
00019 
00020 /*
00021  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
00022  * file for a list of people on the GTK+ Team.  See the ChangeLog
00023  * files for a list of changes.  These files are distributed with
00024  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
00025  */
00026 
00027 #ifndef __GDK_RGB_H__
00028 #define __GDK_RGB_H__
00029 
00030 #include <gdk/gdktypes.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif                          /* __cplusplus */
00035 
00036    typedef struct _GdkRgbCmap GdkRgbCmap;
00037 
00038    struct _GdkRgbCmap {
00039       guint32 colors[256];
00040       guchar lut[256];          /* for 8-bit modes */
00041    };
00042 
00043    void
00044     gdk_rgb_init(void);
00045 
00046     gulong gdk_rgb_xpixel_from_rgb(guint32 rgb);
00047 
00048    void
00049     gdk_rgb_gc_set_foreground(GdkGC * gc, guint32 rgb);
00050 
00051    void
00052     gdk_rgb_gc_set_background(GdkGC * gc, guint32 rgb);
00053 
00054    typedef enum {
00055       GDK_RGB_DITHER_NONE,
00056       GDK_RGB_DITHER_NORMAL,
00057       GDK_RGB_DITHER_MAX
00058    } GdkRgbDither;
00059 
00060    void
00061     gdk_draw_rgb_image(GdkDrawable * drawable,
00062                        GdkGC * gc,
00063                        gint x,
00064                        gint y,
00065                        gint width,
00066                        gint height,
00067                        GdkRgbDither dith,
00068                        guchar * rgb_buf, gint rowstride);
00069 
00070    void
00071     gdk_draw_rgb_image_dithalign(GdkDrawable * drawable,
00072                                  GdkGC * gc,
00073                                  gint x,
00074                                  gint y,
00075                                  gint width,
00076                                  gint height,
00077                                  GdkRgbDither dith,
00078                                  guchar * rgb_buf,
00079                                  gint rowstride, gint xdith, gint ydith);
00080 
00081    void
00082     gdk_draw_rgb_32_image(GdkDrawable * drawable,
00083                           GdkGC * gc,
00084                           gint x,
00085                           gint y,
00086                           gint width,
00087                           gint height,
00088                           GdkRgbDither dith, guchar * buf, gint rowstride);
00089 
00090    void
00091     gdk_draw_gray_image(GdkDrawable * drawable,
00092                         GdkGC * gc,
00093                         gint x,
00094                         gint y,
00095                         gint width,
00096                         gint height,
00097                         GdkRgbDither dith, guchar * buf, gint rowstride);
00098 
00099    GdkRgbCmap *gdk_rgb_cmap_new(guint32 * colors, gint n_colors);
00100 
00101    void
00102     gdk_rgb_cmap_free(GdkRgbCmap * cmap);
00103 
00104    void
00105     gdk_draw_indexed_image(GdkDrawable * drawable,
00106                            GdkGC * gc,
00107                            gint x,
00108                            gint y,
00109                            gint width,
00110                            gint height,
00111                            GdkRgbDither dith,
00112                            guchar * buf,
00113                            gint rowstride, GdkRgbCmap * cmap);
00114 
00115 
00116 /* Below are some functions which are primarily useful for debugging
00117    and experimentation. */
00118     gboolean gdk_rgb_ditherable(void);
00119 
00120    void
00121     gdk_rgb_set_verbose(gboolean verbose);
00122 
00123 /* experimental colormap stuff */
00124    void
00125     gdk_rgb_set_install(gboolean install);
00126 
00127    void
00128     gdk_rgb_set_min_colors(gint min_colors);
00129 
00130    GdkColormap *gdk_rgb_get_cmap(void);
00131 
00132    GdkVisual *gdk_rgb_get_visual(void);
00133 
00134 #ifdef __cplusplus
00135 }
00136 #endif                          /* __cplusplus */
00137 #endif                          /* __GDK_RGB_H__ */

Generated on Tue Jul 5 14:14:38 2011 for ROOT_528-00b_version by  doxygen 1.5.1