1
<refentry id="gdk-pixbuf-gdk-pixbuf-xlib-rgb">
3
<refentrytitle>XlibRGB</refentrytitle>
4
<manvolnum>3</manvolnum>
5
<refmiscinfo>GDK-PIXBUF Library</refmiscinfo>
9
<refname>XlibRGB</refname><refpurpose>Functions for rendering RGB buffers to X drawables.</refpurpose>
12
<refsynopsisdiv><title>Synopsis</title>
15
#include <gdk-pixbuf/gdk-pixbuf.h>
18
struct <link linkend="XlibRgbCmap">XlibRgbCmap</link>;
19
enum <link linkend="XlibRgbDither">XlibRgbDither</link>;
20
void <link linkend="xlib-rgb-init">xlib_rgb_init</link> (<link linkend="Display">Display</link> *display,
21
<link linkend="Screen">Screen</link> *screen);
22
void <link linkend="xlib-rgb-init-with-depth">xlib_rgb_init_with_depth</link> (<link linkend="Display">Display</link> *display,
23
<link linkend="Screen">Screen</link> *screen,
25
void <link linkend="xlib-rgb-gc-set-foreground">xlib_rgb_gc_set_foreground</link> (<link linkend="GC-CAPS">GC</link> gc,
26
<link linkend="guint32">guint32</link> rgb);
27
void <link linkend="xlib-rgb-gc-set-background">xlib_rgb_gc_set_background</link> (<link linkend="GC-CAPS">GC</link> gc,
28
<link linkend="guint32">guint32</link> rgb);
29
void <link linkend="xlib-draw-rgb-image">xlib_draw_rgb_image</link> (<link linkend="Drawable">Drawable</link> drawable,
30
<link linkend="GC-CAPS">GC</link> gc,
35
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
36
unsigned char *rgb_buf,
38
void <link linkend="xlib-draw-rgb-image-dithalign">xlib_draw_rgb_image_dithalign</link> (<link linkend="Drawable">Drawable</link> drawable,
39
<link linkend="GC-CAPS">GC</link> gc,
44
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
45
unsigned char *rgb_buf,
49
void <link linkend="xlib-draw-rgb-32-image">xlib_draw_rgb_32_image</link> (<link linkend="Drawable">Drawable</link> drawable,
50
<link linkend="GC-CAPS">GC</link> gc,
55
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
58
void <link linkend="xlib-draw-gray-image">xlib_draw_gray_image</link> (<link linkend="Drawable">Drawable</link> drawable,
59
<link linkend="GC-CAPS">GC</link> gc,
64
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
67
<link linkend="XlibRgbCmap">XlibRgbCmap</link>* <link linkend="xlib-rgb-cmap-new">xlib_rgb_cmap_new</link> (<link linkend="guint32">guint32</link> *colors,
69
void <link linkend="xlib-rgb-cmap-free">xlib_rgb_cmap_free</link> (<link linkend="XlibRgbCmap">XlibRgbCmap</link> *cmap);
70
void <link linkend="xlib-draw-indexed-image">xlib_draw_indexed_image</link> (<link linkend="Drawable">Drawable</link> drawable,
71
<link linkend="GC-CAPS">GC</link> gc,
76
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
79
<link linkend="XlibRgbCmap">XlibRgbCmap</link> *cmap);
80
<link linkend="Bool">Bool</link> <link linkend="xlib-rgb-ditherable">xlib_rgb_ditherable</link> (void);
81
void <link linkend="xlib-rgb-set-verbose">xlib_rgb_set_verbose</link> (<link linkend="Bool">Bool</link> verbose);
82
void <link linkend="xlib-rgb-set-install">xlib_rgb_set_install</link> (<link linkend="Bool">Bool</link> install);
83
void <link linkend="xlib-rgb-set-min-colors">xlib_rgb_set_min_colors</link> (int min_colors);
84
<link linkend="Colormap">Colormap</link> <link linkend="xlib-rgb-get-cmap">xlib_rgb_get_cmap</link> (void);
85
<link linkend="Visual">Visual</link>* <link linkend="xlib-rgb-get-visual">xlib_rgb_get_visual</link> (void);
86
<link linkend="XVisualInfo">XVisualInfo</link>* <link linkend="xlib-rgb-get-visual-info">xlib_rgb_get_visual_info</link> (void);
87
int <link linkend="xlib-rgb-get-depth">xlib_rgb_get_depth</link> (void);
88
<link linkend="Display">Display</link>* <link linkend="xlib-rgb-get-display">xlib_rgb_get_display</link> (void);
89
<link linkend="Screen">Screen</link>* <link linkend="xlib-rgb-get-screen">xlib_rgb_get_screen</link> (void);
98
<title>Description</title>
100
The XlibRGB set of functions is a port of the GdkRGB library to
101
use plain Xlib and X drawables. You can use these functions to
102
render RGB buffers into drawables very quickly with high-quality
108
<title>Details</title>
110
<title><anchor id="XlibRgbCmap">struct XlibRgbCmap</title>
111
<programlisting>struct XlibRgbCmap {
112
unsigned int colors[256];
113
unsigned char lut[256]; /* for 8-bit modes */
117
FIXME: Describe this.
118
</para><informaltable pgwide=1 frame="none" role="struct">
120
<colspec colwidth="2*">
121
<colspec colwidth="8*">
124
<entry>unsigned int <structfield>colors</structfield>[256]</entry>
129
<entry>unsigned char <structfield>lut</structfield>[256]</entry>
134
</tbody></tgroup></informaltable></refsect2>
136
<title><anchor id="XlibRgbDither">enum XlibRgbDither</title>
137
<programlisting>typedef enum
139
XLIB_RGB_DITHER_NONE,
140
XLIB_RGB_DITHER_NORMAL,
145
These values are used to specify which dithering method should be
146
used. <symbol>XLIB_RGB_DITHER_NONE</symbol> will use no dithering
147
and simply map the colors in an RGB buffer to the closest colors
148
that the display can provide.
149
<symbol>XLIB_RGB_DITHER_NORMAL</symbol> will provide dithering
150
only on pseudocolor displays.
151
<symbol>XLIB_RGB_DITHER_MAX</symbol> will provide dithering on
152
pseudocolor and 16-bit truecolor or “high color”
154
</para><informaltable pgwide=1 frame="none" role="enum">
156
<colspec colwidth="2*">
157
<colspec colwidth="8*">
160
<entry><literal>XLIB_RGB_DITHER_NONE</literal></entry>
161
<entry>Specifies no dithering.
165
<entry><literal>XLIB_RGB_DITHER_NORMAL</literal></entry>
166
<entry>Specifies dithering only on pseudocolor
171
<entry><literal>XLIB_RGB_DITHER_MAX</literal></entry>
172
<entry>Specifies dithering on high color displays.
176
</tbody></tgroup></informaltable></refsect2>
178
<title><anchor id="xlib-rgb-init">xlib_rgb_init ()</title>
179
<programlisting>void xlib_rgb_init (<link linkend="Display">Display</link> *display,
180
<link linkend="Screen">Screen</link> *screen);</programlisting>
182
Initializes the XlibRGB machinery with the default depth. If you use this
183
function XlibRGB will automatically pick the best visual available on your
184
display. This function or <link linkend="xlib-rgb-init-with-depth">xlib_rgb_init_with_depth</link>() must be called before
185
using any of the other functions in XlibRGB.</para>
188
</para><informaltable pgwide=1 frame="none" role="params">
190
<colspec colwidth="2*">
191
<colspec colwidth="8*">
193
<row><entry align="right"><parameter>display</parameter> :</entry>
194
<entry> X Display to use.
196
<row><entry align="right"><parameter>screen</parameter> :</entry>
197
<entry> Screen to use.
199
</tbody></tgroup></informaltable></refsect2>
201
<title><anchor id="xlib-rgb-init-with-depth">xlib_rgb_init_with_depth ()</title>
202
<programlisting>void xlib_rgb_init_with_depth (<link linkend="Display">Display</link> *display,
203
<link linkend="Screen">Screen</link> *screen,
204
int prefDepth);</programlisting>
206
Initializes the XlibRGB machinery with a particular depth you specify,
207
instead of automatically picking the best depth in the display. This
208
function or <link linkend="xlib-rgb-init">xlib_rgb_init</link>() must be called before using any of the other
209
functions in XlibRGB.</para>
212
</para><informaltable pgwide=1 frame="none" role="params">
214
<colspec colwidth="2*">
215
<colspec colwidth="8*">
217
<row><entry align="right"><parameter>display</parameter> :</entry>
218
<entry> X display to use.
220
<row><entry align="right"><parameter>screen</parameter> :</entry>
221
<entry> Screen to use.
223
<row><entry align="right"><parameter>prefDepth</parameter> :</entry>
224
<entry> Visual depth to use for color substitution tables. This must
225
be one of the supported visual depths in the specified <parameter>display</parameter>.
227
</tbody></tgroup></informaltable></refsect2>
229
<title><anchor id="xlib-rgb-gc-set-foreground">xlib_rgb_gc_set_foreground ()</title>
230
<programlisting>void xlib_rgb_gc_set_foreground (<link linkend="GC-CAPS">GC</link> gc,
231
<link linkend="guint32">guint32</link> rgb);</programlisting>
233
This is a convenience function to set the foreground of a GC from an RGB
234
triplet. It calls <link linkend="xlib-rgb-xpixel-from-rgb">xlib_rgb_xpixel_from_rgb</link>() internally and uses the
235
returned pixel value to set the GC's foreground.</para>
238
</para><informaltable pgwide=1 frame="none" role="params">
240
<colspec colwidth="2*">
241
<colspec colwidth="8*">
243
<row><entry align="right"><parameter>gc</parameter> :</entry>
244
<entry> A graphic context.
246
<row><entry align="right"><parameter>rgb</parameter> :</entry>
247
<entry> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
249
</tbody></tgroup></informaltable></refsect2>
251
<title><anchor id="xlib-rgb-gc-set-background">xlib_rgb_gc_set_background ()</title>
252
<programlisting>void xlib_rgb_gc_set_background (<link linkend="GC-CAPS">GC</link> gc,
253
<link linkend="guint32">guint32</link> rgb);</programlisting>
255
This is a convenience function to set the background of a GC from an RGB
256
triplet. It calls <link linkend="xlib-rgb-xpixel-from-rgb">xlib_rgb_xpixel_from_rgb</link>() internally and uses the
257
returned pixel value to set the GC's background.</para>
260
</para><informaltable pgwide=1 frame="none" role="params">
262
<colspec colwidth="2*">
263
<colspec colwidth="8*">
265
<row><entry align="right"><parameter>gc</parameter> :</entry>
266
<entry> A graphic context.
268
<row><entry align="right"><parameter>rgb</parameter> :</entry>
269
<entry> 32-bit representation of an RGB value, specified as 0x00RRGGBB.
271
</tbody></tgroup></informaltable></refsect2>
273
<title><anchor id="xlib-draw-rgb-image">xlib_draw_rgb_image ()</title>
274
<programlisting>void xlib_draw_rgb_image (<link linkend="Drawable">Drawable</link> drawable,
275
<link linkend="GC-CAPS">GC</link> gc,
280
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
281
unsigned char *rgb_buf,
282
int rowstride);</programlisting>
284
Renders an RGB buffer to a drawable. Pixels are specified as RGB triplets
285
with 8 bits per channel. An image will thus look like an RGBRGBRGBRGB
286
sequence of 8-bit values. This function does not let you specify dither
287
offsets; applications that need to render partial regions of a buffer to
288
build the final image should use <link linkend="xlib-draw-rgb-image-dithalign">xlib_draw_rgb_image_dithalign</link>() instead.</para>
291
</para><informaltable pgwide=1 frame="none" role="params">
293
<colspec colwidth="2*">
294
<colspec colwidth="8*">
296
<row><entry align="right"><parameter>drawable</parameter> :</entry>
297
<entry> Destination drawable.
299
<row><entry align="right"><parameter>gc</parameter> :</entry>
300
<entry> A graphic context.
302
<row><entry align="right"><parameter>x</parameter> :</entry>
303
<entry> Leftmost coordinate of the destination rectangle.
305
<row><entry align="right"><parameter>y</parameter> :</entry>
306
<entry> Upper coordinate of the destination rectangle.
308
<row><entry align="right"><parameter>width</parameter> :</entry>
309
<entry> Width of the destination rectangle, in pixels.
311
<row><entry align="right"><parameter>height</parameter> :</entry>
312
<entry> Height of the destination rectangle, in pixels.
314
<row><entry align="right"><parameter>dith</parameter> :</entry>
315
<entry> Dithering method to use.
317
<row><entry align="right"><parameter>rgb_buf</parameter> :</entry>
318
<entry> Pointer to the pixel in the RGB buffer that corresponds to the
319
upper-left corner of the rectangular region to render.
321
<row><entry align="right"><parameter>rowstride</parameter> :</entry>
322
<entry> Offset between pixel rows in the RGB buffer, in bytes.
324
</tbody></tgroup></informaltable></refsect2>
326
<title><anchor id="xlib-draw-rgb-image-dithalign">xlib_draw_rgb_image_dithalign ()</title>
327
<programlisting>void xlib_draw_rgb_image_dithalign (<link linkend="Drawable">Drawable</link> drawable,
328
<link linkend="GC-CAPS">GC</link> gc,
333
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
334
unsigned char *rgb_buf,
337
int ydith);</programlisting>
339
Renders an RGB buffer to a drawable. Pixels are specified as RGB triplets
340
with 8 bits per channel. An image will thus look like an RGBRGBRGBRGB
341
sequence of 8-bit values. This function lets you specify a pair of dither
342
offsets. It should be used when you need to render regions of an RGB buffer
343
separately to form the final image; the dither offsets let you align the
344
dither mask appropriately.</para>
347
</para><informaltable pgwide=1 frame="none" role="params">
349
<colspec colwidth="2*">
350
<colspec colwidth="8*">
352
<row><entry align="right"><parameter>drawable</parameter> :</entry>
353
<entry> Destination drawable.
355
<row><entry align="right"><parameter>gc</parameter> :</entry>
356
<entry> A graphic context.
358
<row><entry align="right"><parameter>x</parameter> :</entry>
359
<entry> Leftmost coordinate of the destination rectangle.
361
<row><entry align="right"><parameter>y</parameter> :</entry>
362
<entry> Upper coordinate of the destination rectangle.
364
<row><entry align="right"><parameter>width</parameter> :</entry>
365
<entry> Width of the destination rectangle, in pixels.
367
<row><entry align="right"><parameter>height</parameter> :</entry>
368
<entry> Height of the destination rectangle, in pixels.
370
<row><entry align="right"><parameter>dith</parameter> :</entry>
371
<entry> Dithering method to use.
373
<row><entry align="right"><parameter>rgb_buf</parameter> :</entry>
374
<entry> Pointer to the pixel in the RGB buffer that corresponds to the
375
upper-left corner of the rectangular region to render.
377
<row><entry align="right"><parameter>rowstride</parameter> :</entry>
378
<entry> Offset between pixel rows in the RGB buffer, in bytes.
380
<row><entry align="right"><parameter>xdith</parameter> :</entry>
381
<entry> X offset for the dither mask.
383
<row><entry align="right"><parameter>ydith</parameter> :</entry>
384
<entry> Y offset for the dither mask.
386
</tbody></tgroup></informaltable></refsect2>
388
<title><anchor id="xlib-draw-rgb-32-image">xlib_draw_rgb_32_image ()</title>
389
<programlisting>void xlib_draw_rgb_32_image (<link linkend="Drawable">Drawable</link> drawable,
390
<link linkend="GC-CAPS">GC</link> gc,
395
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
397
int rowstride);</programlisting>
399
This function is analogous to <link linkend="xlib-draw-rgb-image">xlib_draw_rgb_image</link>(), but it lets you use
400
32-bit RGB buffers with pixels specified as 0xRRGGBB00. The
401
least-significant 8 bits are actually discarded. This function can lead to
402
faster results than <link linkend="xlib-draw-rgb-image">xlib_draw_rgb_image</link>() since the pixels are aligned on
403
32-bit boundaries.</para>
406
</para><informaltable pgwide=1 frame="none" role="params">
408
<colspec colwidth="2*">
409
<colspec colwidth="8*">
411
<row><entry align="right"><parameter>drawable</parameter> :</entry>
412
<entry> Destination drawable.
414
<row><entry align="right"><parameter>gc</parameter> :</entry>
415
<entry> A graphic context.
417
<row><entry align="right"><parameter>x</parameter> :</entry>
418
<entry> Leftmost coordinate of the destination rectangle.
420
<row><entry align="right"><parameter>y</parameter> :</entry>
421
<entry> Upper coordinate of the destination rectangle.
423
<row><entry align="right"><parameter>width</parameter> :</entry>
424
<entry> Width of the destination rectangle, in pixels.
426
<row><entry align="right"><parameter>height</parameter> :</entry>
427
<entry> Height of the destination rectangle, in pixels.
429
<row><entry align="right"><parameter>dith</parameter> :</entry>
430
<entry> Dithering method to use.
432
<row><entry align="right"><parameter>buf</parameter> :</entry>
433
<entry> Pointer to the pixel in the RGB buffer that corresponds to the
434
upper-left corner of the rectangular region to render.
436
<row><entry align="right"><parameter>rowstride</parameter> :</entry>
437
<entry> Offset between pixel rows in the RGB buffer, in bytes.
439
</tbody></tgroup></informaltable></refsect2>
441
<title><anchor id="xlib-draw-gray-image">xlib_draw_gray_image ()</title>
442
<programlisting>void xlib_draw_gray_image (<link linkend="Drawable">Drawable</link> drawable,
443
<link linkend="GC-CAPS">GC</link> gc,
448
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
450
int rowstride);</programlisting>
452
Renders a grayscale buffer to a drawable. Pixels are specified as 8-bit
453
intensity values. An image will thus look as a GGGGGG sequence of 8-bit
457
</para><informaltable pgwide=1 frame="none" role="params">
459
<colspec colwidth="2*">
460
<colspec colwidth="8*">
462
<row><entry align="right"><parameter>drawable</parameter> :</entry>
463
<entry> Destination drawable.
465
<row><entry align="right"><parameter>gc</parameter> :</entry>
466
<entry> A graphic context.
468
<row><entry align="right"><parameter>x</parameter> :</entry>
469
<entry> Leftmost coordinate of the destination rectangle.
471
<row><entry align="right"><parameter>y</parameter> :</entry>
472
<entry> Upper coordinate of the destination rectangle.
474
<row><entry align="right"><parameter>width</parameter> :</entry>
475
<entry> Width of the destination rectangle, in pixels.
477
<row><entry align="right"><parameter>height</parameter> :</entry>
478
<entry> Height of thd destination rectangle, in pixels.
480
<row><entry align="right"><parameter>dith</parameter> :</entry>
481
<entry> Dithering method to use.
483
<row><entry align="right"><parameter>buf</parameter> :</entry>
484
<entry> Pointer to the pixel in the grayscale buffer that corresponds to the
485
upper-left corner of the rectangular region to render.
487
<row><entry align="right"><parameter>rowstride</parameter> :</entry>
488
<entry> Offset between pixel rows in the grayscale buffer, in pixels.
490
</tbody></tgroup></informaltable></refsect2>
492
<title><anchor id="xlib-rgb-cmap-new">xlib_rgb_cmap_new ()</title>
493
<programlisting><link linkend="XlibRgbCmap">XlibRgbCmap</link>* xlib_rgb_cmap_new (<link linkend="guint32">guint32</link> *colors,
494
int n_colors);</programlisting>
499
</para><informaltable pgwide=1 frame="none" role="params">
501
<colspec colwidth="2*">
502
<colspec colwidth="8*">
504
<row><entry align="right"><parameter>colors</parameter> :</entry>
507
<row><entry align="right"><parameter>n_colors</parameter> :</entry>
510
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> FIXME
512
</tbody></tgroup></informaltable></refsect2>
514
<title><anchor id="xlib-rgb-cmap-free">xlib_rgb_cmap_free ()</title>
515
<programlisting>void xlib_rgb_cmap_free (<link linkend="XlibRgbCmap">XlibRgbCmap</link> *cmap);</programlisting>
517
Frees an XlibRGB colormap.</para>
520
</para><informaltable pgwide=1 frame="none" role="params">
522
<colspec colwidth="2*">
523
<colspec colwidth="8*">
525
<row><entry align="right"><parameter>cmap</parameter> :</entry>
526
<entry> An XlibRGB colormap.
528
</tbody></tgroup></informaltable></refsect2>
530
<title><anchor id="xlib-draw-indexed-image">xlib_draw_indexed_image ()</title>
531
<programlisting>void xlib_draw_indexed_image (<link linkend="Drawable">Drawable</link> drawable,
532
<link linkend="GC-CAPS">GC</link> gc,
537
<link linkend="XlibRgbDither">XlibRgbDither</link> dith,
540
<link linkend="XlibRgbCmap">XlibRgbCmap</link> *cmap);</programlisting>
545
</para><informaltable pgwide=1 frame="none" role="params">
547
<colspec colwidth="2*">
548
<colspec colwidth="8*">
550
<row><entry align="right"><parameter>drawable</parameter> :</entry>
553
<row><entry align="right"><parameter>gc</parameter> :</entry>
556
<row><entry align="right"><parameter>x</parameter> :</entry>
559
<row><entry align="right"><parameter>y</parameter> :</entry>
562
<row><entry align="right"><parameter>width</parameter> :</entry>
565
<row><entry align="right"><parameter>height</parameter> :</entry>
568
<row><entry align="right"><parameter>dith</parameter> :</entry>
571
<row><entry align="right"><parameter>buf</parameter> :</entry>
574
<row><entry align="right"><parameter>rowstride</parameter> :</entry>
577
<row><entry align="right"><parameter>cmap</parameter> :</entry>
580
</tbody></tgroup></informaltable></refsect2>
582
<title><anchor id="xlib-rgb-ditherable">xlib_rgb_ditherable ()</title>
583
<programlisting><link linkend="Bool">Bool</link> xlib_rgb_ditherable (void);</programlisting>
585
Queries whether XlibRGB supports dithering for its chosen visual.</para>
588
</para><informaltable pgwide=1 frame="none" role="params">
590
<colspec colwidth="2*">
591
<colspec colwidth="8*">
593
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE if dithering can be performed for the visual that XlibRGB
594
is using, FALSE otherwise.
596
</tbody></tgroup></informaltable></refsect2>
598
<title><anchor id="xlib-rgb-set-verbose">xlib_rgb_set_verbose ()</title>
599
<programlisting>void xlib_rgb_set_verbose (<link linkend="Bool">Bool</link> verbose);</programlisting>
601
This is primarily a debugging function. Sets whether you want XlibRGB to
602
print information about the visual and colormap it chooses. You normally do
603
not need to use this function.</para>
606
</para><informaltable pgwide=1 frame="none" role="params">
608
<colspec colwidth="2*">
609
<colspec colwidth="8*">
611
<row><entry align="right"><parameter>verbose</parameter> :</entry>
612
<entry> Whether to print visual/colormap debugging information.
614
</tbody></tgroup></informaltable></refsect2>
616
<title><anchor id="xlib-rgb-set-install">xlib_rgb_set_install ()</title>
617
<programlisting>void xlib_rgb_set_install (<link linkend="Bool">Bool</link> install);</programlisting>
619
Sets whether XlibRGB should install its own private colormap instead of
620
trying to allocate color cells from the system colormap. This should be
621
called before initializing XlibRGB.</para>
624
</para><informaltable pgwide=1 frame="none" role="params">
626
<colspec colwidth="2*">
627
<colspec colwidth="8*">
629
<row><entry align="right"><parameter>install</parameter> :</entry>
630
<entry> Whether to install a private colormap.
632
</tbody></tgroup></informaltable></refsect2>
634
<title><anchor id="xlib-rgb-set-min-colors">xlib_rgb_set_min_colors ()</title>
635
<programlisting>void xlib_rgb_set_min_colors (int min_colors);</programlisting>
637
Sets the minimum number of free color cells that must be available in the
638
system color map for XlibRGB to use it. If the specified number of colors is
639
not available, XlibRGB will install its own private colormap.</para>
642
</para><informaltable pgwide=1 frame="none" role="params">
644
<colspec colwidth="2*">
645
<colspec colwidth="8*">
647
<row><entry align="right"><parameter>min_colors</parameter> :</entry>
648
<entry> Minimum number of colors to look for in the system colormap.
650
</tbody></tgroup></informaltable></refsect2>
652
<title><anchor id="xlib-rgb-get-cmap">xlib_rgb_get_cmap ()</title>
653
<programlisting><link linkend="Colormap">Colormap</link> xlib_rgb_get_cmap (void);</programlisting>
655
Queries the X colormap that XlibRGB is using.</para>
658
</para><informaltable pgwide=1 frame="none" role="params">
660
<colspec colwidth="2*">
661
<colspec colwidth="8*">
663
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> An X colormap.
665
</tbody></tgroup></informaltable></refsect2>
667
<title><anchor id="xlib-rgb-get-visual">xlib_rgb_get_visual ()</title>
668
<programlisting><link linkend="Visual">Visual</link>* xlib_rgb_get_visual (void);</programlisting>
670
Queries the visual that XlibRGB is using.</para>
673
</para><informaltable pgwide=1 frame="none" role="params">
675
<colspec colwidth="2*">
676
<colspec colwidth="8*">
678
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> An X visual.
680
</tbody></tgroup></informaltable></refsect2>
682
<title><anchor id="xlib-rgb-get-visual-info">xlib_rgb_get_visual_info ()</title>
683
<programlisting><link linkend="XVisualInfo">XVisualInfo</link>* xlib_rgb_get_visual_info (void);</programlisting>
685
Queries the visual info structure for the visual that XlibRGB is using.</para>
688
</para><informaltable pgwide=1 frame="none" role="params">
690
<colspec colwidth="2*">
691
<colspec colwidth="8*">
693
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> An XVisualInfo structure.
695
</tbody></tgroup></informaltable></refsect2>
697
<title><anchor id="xlib-rgb-get-depth">xlib_rgb_get_depth ()</title>
698
<programlisting>int xlib_rgb_get_depth (void);</programlisting>
700
Queries the depth of the visual that XlibRGB is using.</para>
703
</para><informaltable pgwide=1 frame="none" role="params">
705
<colspec colwidth="2*">
706
<colspec colwidth="8*">
708
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Bit depth.
710
</tbody></tgroup></informaltable></refsect2>
712
<title><anchor id="xlib-rgb-get-display">xlib_rgb_get_display ()</title>
713
<programlisting><link linkend="Display">Display</link>* xlib_rgb_get_display (void);</programlisting>
715
Queries the X display that XlibRGB is using.</para>
718
</para><informaltable pgwide=1 frame="none" role="params">
720
<colspec colwidth="2*">
721
<colspec colwidth="8*">
723
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> An X display.
725
</tbody></tgroup></informaltable></refsect2>
727
<title><anchor id="xlib-rgb-get-screen">xlib_rgb_get_screen ()</title>
728
<programlisting><link linkend="Screen">Screen</link>* xlib_rgb_get_screen (void);</programlisting>
730
Queries the screen that XlibRGB is using.</para>
733
</para><informaltable pgwide=1 frame="none" role="params">
735
<colspec colwidth="2*">
736
<colspec colwidth="8*">
738
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> An X screen.
740
</tbody></tgroup></informaltable></refsect2>
747
<title>See Also</title>