Class: Gdk::Visual

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

A Gdk::Visual contains information about a particular visual.

Instance Method Summary collapse

Instance Method Details

#bits_per_rgbInteger

Returns the number of significant bits per red, green and blue value.

Not all GDK backend provide a meaningful value for this function.

Returns:

  • (Integer)

    The number of significant bits per color value for visual.

#byte_orderGdk::ByteOrder

Returns the byte order of this visual.

The information returned by this function is only relevant when working with XImages, and not all backends return meaningful information for this.

Returns:

  • (Gdk::ByteOrder)

    A Gdk::ByteOrder stating the byte order of visual.

#colormap_sizeInteger

Returns the size of a colormap for this visual.

You have to use platform-specific APIs to manipulate colormaps.

Returns:

  • (Integer)

    The size of a colormap that is suitable for visual.

#depthInteger

Returns the bit depth of this visual.

Returns:

  • (Integer)

    The bit depth of this visual.

#get_blue_pixel_details(mask, shift, precision) ⇒ nil

Obtains values that are needed to calculate blue pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the “mask”). Finally, “precision” refers to how much precision the pixel value contains for a particular primary.

Parameters:

  • mask (Integer)

    A pointer to a #guint32 to be filled in, or nil

  • shift (Integer)

    A pointer to a #gint to be filled in, or nil

  • precision (Integer)

    A pointer to a #gint to be filled in, or nil

Returns:

  • (nil)

#get_green_pixel_details(mask, shift, precision) ⇒ nil

Obtains values that are needed to calculate green pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the “mask”). Finally, “precision” refers to how much precision the pixel value contains for a particular primary.

Parameters:

  • mask (Integer)

    A pointer to a #guint32 to be filled in, or nil

  • shift (Integer)

    A pointer to a #gint to be filled in, or nil

  • precision (Integer)

    A pointer to a #gint to be filled in, or nil

Returns:

  • (nil)

#get_red_pixel_details(mask, shift, precision) ⇒ nil

Obtains values that are needed to calculate red pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the “mask”). Finally, “precision” refers to how much precision the pixel value contains for a particular primary.

Parameters:

  • mask (Integer)

    A pointer to a #guint32 to be filled in, or nil

  • shift (Integer)

    A pointer to a #gint to be filled in, or nil

  • precision (Integer)

    A pointer to a #gint to be filled in, or nil

Returns:

  • (nil)

#screenGdk::Screen

Gets the screen to which this visual belongs

Returns:

  • (Gdk::Screen)

    the screen to which this visual belongs.

#visual_typeGdk::VisualType

Returns the type of visual this is (PseudoColor, TrueColor, etc).

Returns: