Gdk.Visual - Classes - Gdk 3.0 (original) (raw)
g GObject.Object GObject.Object Gdk.Visual Gdk.Visual GObject.Object->Gdk.Visual
Subclasses:
None
Methods¶
Inherited:
Structs:
class | get_best () |
---|---|
class | get_best_depth () |
class | get_best_type () |
class | get_best_with_both (depth, visual_type) |
class | get_best_with_depth (depth) |
class | get_best_with_type (visual_type) |
class | get_system () |
get_bits_per_rgb () | |
get_blue_pixel_details () | |
get_byte_order () | |
get_colormap_size () | |
get_depth () | |
get_green_pixel_details () | |
get_red_pixel_details () | |
get_screen () | |
get_visual_type () |
Virtual Methods¶
Inherited:
Properties¶
None
Signals¶
Inherited:
Fields¶
Inherited:
Class Details¶
class Gdk.Visual(**kwargs)¶
Bases:
Abstract:
No
A Gdk.Visual contains information about a particular visual.
classmethod get_best()[source]¶
Returns:
best visual
Return type:
Get the visual with the most available colors for the default GDK screen. The return value should not be freed.
classmethod get_best_depth()[source]¶
Returns:
best available depth
Return type:
Get the best available depth for the default GDK screen. “Best” means “largest,” i.e. 32 preferred over 24 preferred over 8 bits per pixel.
classmethod get_best_type()[source]¶
Returns:
best visual type
Return type:
Return the best available visual type for the default GDK screen.
classmethod get_best_with_both(depth, visual_type)[source]¶
Parameters:
- depth (int) – a bit depth
- visual_type (Gdk.VisualType) – a visual type
Returns:
best visual with both depthand visual_type, or None if none
Return type:
Gdk.Visual or None
Combines Gdk.Visual.get_best_with_depth() andGdk.Visual.get_best_with_type().
classmethod get_best_with_depth(depth)[source]¶
Parameters:
depth (int) – a bit depth
Returns:
best visual for the given depth
Return type:
Get the best visual with depth depth for the default GDK screen. Color visuals and visuals with mutable colormaps are preferred over grayscale or fixed-colormap visuals. The return value should not be freed. None may be returned if no visual supports depth.
classmethod get_best_with_type(visual_type)[source]¶
Parameters:
visual_type (Gdk.VisualType) – a visual type
Returns:
best visual of the given type
Return type:
Get the best visual of the given visual_type for the default GDK screen. Visuals with higher color depths are considered better. The return value should not be freed. None may be returned if no visual has typevisual_type.
classmethod get_system()[source]¶
Returns:
system visual
Return type:
Get the system’s default visual for the default GDK screen. This is the visual for the root window of the display. The return value should not be freed.
Returns:
The number of significant bits per color value for self.
Return type:
Returns the number of significant bits per red, green and blue value.
Not all GDK backend provide a meaningful value for this function.
New in version 2.22.
Deprecated since version 3.22.: Use Gdk.Visual.get_red_pixel_details() and its variants to learn about the pixel layout of TrueColor and DirectColor visuals
get_blue_pixel_details()[source]¶
Returns:
mask:
A pointer to a #guint32 to be filled in, or None
shift:
A pointer to a int to be filled in, or None
precision:
A pointer to a int to be filled in, or None
Return type:
(mask: int, shift: int, precision: int)
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.
New in version 2.22.
Returns:
A Gdk.ByteOrder stating the byte order of self.
Return type:
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.
New in version 2.22.
Deprecated since version 3.22: This information is not useful
Returns:
The size of a colormap that is suitable for self.
Return type:
Returns the size of a colormap for this visual.
You have to use platform-specific APIs to manipulate colormaps.
New in version 2.22.
Deprecated since version 3.22: This information is not useful, since GDK does not provide APIs to operate on colormaps.
Returns:
The bit depth of this visual.
Return type:
Returns the bit depth of this visual.
New in version 2.22.
get_green_pixel_details()[source]¶
Returns:
mask:
A pointer to a #guint32 to be filled in, or None
shift:
A pointer to a int to be filled in, or None
precision:
A pointer to a int to be filled in, or None
Return type:
(mask: int, shift: int, precision: int)
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.
New in version 2.22.
get_red_pixel_details()[source]¶
Returns:
mask:
A pointer to a #guint32 to be filled in, or None
shift:
A pointer to a int to be filled in, or None
precision:
A pointer to a int to be filled in, or None
Return type:
(mask: int, shift: int, precision: int)
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.
New in version 2.22.
Returns:
the screen to which this visual belongs.
Return type:
Gets the screen to which this visual belongs
New in version 2.2.
Returns:
A Gdk.VisualType stating the type of self.
Return type:
Returns the type of visual this is (PseudoColor, TrueColor, etc).
New in version 2.22.