/usr/include/gdk-pixbuf-2.0/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h is in libgdk-pixbuf2.0-dev 2.36.5-2+deb9u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "MPL"); you may not use this file except in
* compliance with the MPL. You may obtain a copy of the MPL at
* http://www.mozilla.org/MPL/
*
* Software distributed under the MPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
* for the specific language governing rights and limitations under the
* MPL.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Library General Public License (the "LGPL"), in
* which case the provisions of the LGPL are applicable instead of
* those above. If you wish to allow use of your version of this file
* only under the terms of the LGPL and not to allow others to use
* your version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice and
* other provisions required by the LGPL. If you do not delete the
* provisions above, a recipient may use your version of this file
* under either the MPL or the LGPL.
*/
/*
* This code is derived from GdkRgb.
* For more information on GdkRgb, see http://www.levien.com/gdkrgb/
* Raph Levien <raph@acm.org>
*/
/* Ported by Christopher Blizzard to Xlib. With permission from the
* original authors of this file, the contents of this file are also
* redistributable under the terms of the Mozilla Public license. For
* information about the Mozilla Public License, please see the
* license information at http://www.mozilla.org/MPL/
*/
/* This code is copyright the following authors:
* Raph Levien <raph@acm.org>
* Manish Singh <manish@gtk.org>
* Tim Janik <timj@gtk.org>
* Peter Mattis <petm@xcf.berkeley.edu>
* Spencer Kimball <spencer@xcf.berkeley.edu>
* Josh MacDonald <jmacd@xcf.berkeley.edu>
* Christopher Blizzard <blizzard@redhat.com>
* Owen Taylor <otaylor@redhat.com>
* Shawn T. Amundson <amundson@gtk.org>
*/
#ifndef __XLIB_RGB_H__
#define __XLIB_RGB_H__
#include <glib.h>
G_BEGIN_DECLS
#include <X11/Xlib.h>
#include <X11/Xutil.h>
/**
* XlibRgbCmap:
* @colors: FIXME.
* @lut: FIXME.
*
* FIXME: Describe this.
*/
typedef struct _XlibRgbCmap XlibRgbCmap;
struct _XlibRgbCmap {
unsigned int colors[256];
unsigned char lut[256]; /* for 8-bit modes */
};
void
xlib_rgb_init (Display *display, Screen *screen);
void
xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth);
unsigned long
xlib_rgb_xpixel_from_rgb (guint32 rgb);
void
xlib_rgb_gc_set_foreground (GC gc, guint32 rgb);
void
xlib_rgb_gc_set_background (GC gc, guint32 rgb);
/**
* XlibRgbDither:
* @XLIB_RGB_DITHER_NONE: Specifies no dithering.
* @XLIB_RGB_DITHER_NORMAL: Specifies dithering only on pseudocolor
* displays.
* @XLIB_RGB_DITHER_MAX: Specifies dithering on high color displays.
*
* These values are used to specify which dithering method should be
* used. <symbol>XLIB_RGB_DITHER_NONE</symbol> will use no dithering
* and simply map the colors in an RGB buffer to the closest colors
* that the display can provide.
* <symbol>XLIB_RGB_DITHER_NORMAL</symbol> will provide dithering
* only on pseudocolor displays.
* <symbol>XLIB_RGB_DITHER_MAX</symbol> will provide dithering on
* pseudocolor and 16-bit truecolor or “high color”
* displays.
*/
typedef enum
{
XLIB_RGB_DITHER_NONE,
XLIB_RGB_DITHER_NORMAL,
XLIB_RGB_DITHER_MAX
} XlibRgbDither;
void
xlib_draw_rgb_image (Drawable drawable,
GC gc,
int x,
int y,
int width,
int height,
XlibRgbDither dith,
unsigned char *rgb_buf,
int rowstride);
void
xlib_draw_rgb_image_dithalign (Drawable drawable,
GC gc,
int x,
int y,
int width,
int height,
XlibRgbDither dith,
unsigned char *rgb_buf,
int rowstride,
int xdith,
int ydith);
void
xlib_draw_rgb_32_image (Drawable drawable,
GC gc,
int x,
int y,
int width,
int height,
XlibRgbDither dith,
unsigned char *buf,
int rowstride);
void
xlib_draw_gray_image (Drawable drawable,
GC gc,
int x,
int y,
int width,
int height,
XlibRgbDither dith,
unsigned char *buf,
int rowstride);
XlibRgbCmap *
xlib_rgb_cmap_new (guint32 *colors, int n_colors);
void
xlib_rgb_cmap_free (XlibRgbCmap *cmap);
void
xlib_draw_indexed_image (Drawable drawable,
GC gc,
int x,
int y,
int width,
int height,
XlibRgbDither dith,
unsigned char *buf,
int rowstride,
XlibRgbCmap *cmap);
/* Below are some functions which are primarily useful for debugging
and experimentation. */
Bool
xlib_rgb_ditherable (void);
void
xlib_rgb_set_verbose (Bool verbose);
/* experimental colormap stuff */
void
xlib_rgb_set_install (Bool install);
void
xlib_rgb_set_min_colors (int min_colors);
Colormap
xlib_rgb_get_cmap (void);
Visual *
xlib_rgb_get_visual (void);
XVisualInfo *
xlib_rgb_get_visual_info (void);
int
xlib_rgb_get_depth (void);
Display *
xlib_rgb_get_display (void);
Screen *
xlib_rgb_get_screen (void);
G_END_DECLS
#endif /* __XLIB_RGB_H__ */
|