Gdk.Visual¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
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.
Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- 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.
Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- classmethod get_best_type()[source]¶
- Returns:
best visual type
- Return type:
Return the best available visual type for the default GDK screen.
Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- classmethod get_best_with_both(depth, visual_type)[source]¶
- Parameters:
depth (
int
) – a bit depthvisual_type (
Gdk.VisualType
) – a visual type
- Returns:
best visual with both depth and visual_type, or
None
if none- Return type:
Gdk.Visual
orNone
Combines
Gdk.Visual.get_best_with_depth
() andGdk.Visual.get_best_with_type
().Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- 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.Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- 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 type visual_type.Deprecated since version 3.22: Visual selection should be done using
Gdk.Screen.get_system_visual
() andGdk.Screen.get_rgba_visual
()
- 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.
Deprecated since version 3.22: Use
Gdk.Screen.get_system_visual
(Gdk.Screen.get_default
()).
- get_bits_per_rgb()[source]¶
- 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:
- Return type:
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.
- get_byte_order()[source]¶
- 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
- get_colormap_size()[source]¶
- 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.
- get_depth()[source]¶
- 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:
- Return type:
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:
- Return type:
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.
- get_screen()[source]¶
- Returns:
the screen to which this visual belongs.
- Return type:
Gets the screen to which this visual belongs
New in version 2.2.
- get_visual_type()[source]¶
- 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.