## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Rgb

- Goto spec source

# Description

    package Gdk.Rgb is

Binding from C File version 1.3.6

# Types

### Rgb_Record

- Goto declaration in source

    type Rgb_Record is record
          Red, Green, Blue : Glib.Guchar;
       end record;

### Rgb_Buffer

- Goto declaration in source

    type Rgb_Buffer is array (Glib.Guint range <>) of Rgb_Record;

### Unchecked_Rgb_Buffer

- Goto declaration in source

    type Unchecked_Rgb_Buffer is array (Glib.Guint) of Rgb_Record;

### Rgb_Buffer_Access

- Goto declaration in source

    type Rgb_Buffer_Access is access all Unchecked_Rgb_Buffer;

### Gdk_Rgb_Dither

- Goto declaration in source

    type Gdk_Rgb_Dither is (Dither_None, Dither_Normal, Dither_Max);

The three kinds of dithering that are implemented in this package: - Dither_None: No dithering will be done - Dither_Normal: Specifies dithering on 8 bit displays, but not 16-bit. Usually the best choice. - Dither_Max: Specifies dithering on every kind of display

### Rgb_Item

- Goto declaration in source

    subtype Rgb_Item is Glib.Guint32;

This represents the coding for a rbg value. The exact encoding depends on the visual used and its depth (pseudo-color, true-color, ...)

### Gdk_Rgb_Cmap

- Goto declaration in source

    type Gdk_Rgb_Cmap is new Gdk.C_Proxy;

This is the full colormap, ie a set of 256 Rgb items. You can extract values using the functions Get or Set below.

### Rgb_Cmap_Index

- Goto declaration in source

    type Rgb_Cmap_Index is new Natural range 0 .. 255;

# Subprograms & Entries

### Get_Visual

- Goto spec in source
- Goto body in source

    function Get_Visual return Gdk.Visual.Gdk_Visual;

See Get_Cmap.

### Get_Cmap

- Goto spec in source
- Goto body in source

    function Get_Cmap return Gdk.Color.Gdk_Colormap;

Return the visual and the color map used internally in this package. Note that these are not the same as returned by Gtk.Widget or Gdk.Window, and you should use these if you are using this package. The drawable you intend to copy the RGB buffer to must use this visual and this colormap. Therefore, before creating the widget, you need to do the following: - Gtk.Widget.Push_Colormap (Gdk.Rgb.Get_Cmap); - Gtk_New (....) - Gtk.Widget.Pop_Colormap;

### Xpixel_From_Rgb

- Goto spec in source
- Goto body in source

    function Xpixel_From_Rgb (Value: in Rgb_Item) return Glib.Gulong;

Convert the Rgb representation to the usual one found in Gdk.Color. pragma Deprecated (Xpixel_From_Rgb);

### GC_Set_Foreground

- Goto spec in source
- Goto body in source

    procedure GC_Set_Foreground (GC: Gdk.GC.Gdk_GC;Value: Rgb_Item);

See GC_Set_Background. pragma Deprecated (GC_Set_Foreground);

### GC_Set_Background

- Goto spec in source
- Goto body in source

    procedure GC_Set_Background (GC: Gdk.GC.Gdk_GC;Value: Rgb_Item);

Modify the foreground and the background of a graphic context with a value. These are exactly the same functions has found in Gdk.Gc, but do not use the same parameters. pragma Deprecated (GC_Set_Background);

### Get

- Goto spec in source
- Goto body in source

    function Get (Cmap: Gdk_Rgb_Cmap;Index: Rgb_Cmap_Index) return Rgb_Item;

Access an item in a colormap.

### Set

- Goto spec in source
- Goto body in source

    procedure Set (Cmap: Gdk_Rgb_Cmap;Index: Rgb_Cmap_Index;Value: Rgb_Item);

Set an item in Cmap.

### Gdk_New

- Goto spec in source

    procedure Gdk_New (Cmap: out Gdk_Rgb_Cmap;Colors: Glib.Guint32_Array);

Create a colormap.

### Free

- Goto spec in source
- Goto body in source

    procedure Free (Cmap: Gdk_Rgb_Cmap);

Free a colormap.

### Draw_Rgb_Image

- Goto spec in source

    procedure Draw_Rgb_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint);

### Draw_Rgb_Image

- Goto spec in source

    procedure Draw_Rgb_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint);

Render a Gdk buffer with 24 bit Data. Such a buffer is a one dimensional array of bytes, where every byte triplet makes up a pixel (byte 0 is red, byte 1 is green and byte 2 is blue). - Width: Number of pixels (byte triplets) per row of the image. - Height: Number of rows in the image. - RowStride: Number of bytes between rows... (row n+1 will start at byte row n + Rowstride). Gdk.Rgb is faster if both the source pointer and the rowstride are aligned to a 4 byte boundary. - (X, Y, Width, Height): Define a region in the target to copy the buffer to.

### Draw_Rgb_Image_Dithalign

- Goto spec in source

    procedure Draw_Rgb_Image_Dithalign (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint;Xdith, Ydith: Glib.Gint);

### Draw_Rgb_Image_Dithalign

- Goto spec in source

    procedure Draw_Rgb_Image_Dithalign (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint;Xdith, Ydith: Glib.Gint);

Same kind of function as above, but for different buffer types (???).

### Draw_Rgb_32_Image

- Goto spec in source

    procedure Draw_Rgb_32_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint);

### Draw_Rgb_32_Image

- Goto spec in source

    procedure Draw_Rgb_32_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint);

Same kind of function as above, but for different buffer types (???).

### Draw_Rgb_32_Image_Dithalign

- Goto spec in source

    procedure Draw_Rgb_32_Image_Dithalign (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint;Xdith, Ydith: Glib.Gint);

### Draw_Rgb_32_Image_Dithalign

- Goto spec in source

    procedure Draw_Rgb_32_Image_Dithalign (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint;Xdith, Ydith: Glib.Gint);

Same kind of function as above, but for different buffer types (???).

### Draw_Gray_Image

- Goto spec in source

    procedure Draw_Gray_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint);

### Draw_Gray_Image

- Goto spec in source

    procedure Draw_Gray_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint);

Same kind of function as above, but for different buffer types (???).

### Draw_Indexed_Image

- Goto spec in source

    procedure Draw_Indexed_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Rgb_Buffer;Rowstride: Glib.Gint;Cmap: Gdk_Rgb_Cmap);

### Draw_Indexed_Image

- Goto spec in source

    procedure Draw_Indexed_Image (Drawable: Gdk.Drawable.Gdk_Drawable;GC: Gdk.GC.Gdk_GC;X, Y: Glib.Gint;Width, Height: Glib.Gint;Dith: Gdk_Rgb_Dither;Rgb_Buf: Unchecked_Rgb_Buffer;Rowstride: Glib.Gint;Cmap: Gdk_Rgb_Cmap);

Same kind of function as above, but for different buffer types (???).