gi-gdk-3.0.21: Gdk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.Visual

Contents

Description

A Visual contains information about a particular visual.

Synopsis

Exported types

newtype Visual Source #

Memory-managed wrapper type.

Constructors

Visual (ManagedPtr Visual) 
Instances
GObject Visual Source # 
Instance details

Defined in GI.Gdk.Objects.Visual

Methods

gobjectType :: IO GType #

HasParentTypes Visual Source # 
Instance details

Defined in GI.Gdk.Objects.Visual

type ParentTypes Visual Source # 
Instance details

Defined in GI.Gdk.Objects.Visual

type ParentTypes Visual = Object ': ([] :: [Type])

class (GObject o, IsDescendantOf Visual o) => IsVisual o Source #

Type class for types which can be safely cast to Visual, for instance with toVisual.

Instances
(GObject o, IsDescendantOf Visual o) => IsVisual o Source # 
Instance details

Defined in GI.Gdk.Objects.Visual

toVisual :: (MonadIO m, IsVisual o) => o -> m Visual Source #

Cast to Visual, for types for which this is known to be safe. For general casts, use castTo.

noVisual :: Maybe Visual Source #

A convenience alias for Nothing :: Maybe Visual.

Methods

getBest

visualGetBest Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Visual

Returns: best visual

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

Get the visual with the most available colors for the default GDK screen. The return value should not be freed.

getBestDepth

visualGetBestDepth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Int32

Returns: best available depth

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

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.

getBestType

visualGetBestType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m VisualType

Returns: best visual type

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

Return the best available visual type for the default GDK screen.

getBestWithBoth

visualGetBestWithBoth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

depth: a bit depth

-> VisualType

visualType: a visual type

-> m (Maybe Visual)

Returns: best visual with both depth and visualType, or Nothing if none

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

Combines visualGetBestWithDepth and visualGetBestWithType.

getBestWithDepth

visualGetBestWithDepth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

depth: a bit depth

-> m Visual

Returns: best visual for the given depth

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

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. Nothing may be returned if no visual supports depth.

getBestWithType

visualGetBestWithType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> VisualType

visualType: a visual type

-> m Visual

Returns: best visual of the given type

Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual and screenGetRgbaVisual

Get the best visual of the given visualType for the default GDK screen. Visuals with higher color depths are considered better. The return value should not be freed. Nothing may be returned if no visual has type visualType.

getBitsPerRgb

visualGetBitsPerRgb Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: a Visual

-> m Int32

Returns: The number of significant bits per color value for visual.

Deprecated: (Since version 3.22.)Use visualGetRedPixelDetails and its variants to learn about the pixel layout of TrueColor and DirectColor visuals

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

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

Since: 2.22

getBluePixelDetails

visualGetBluePixelDetails Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: a Visual

-> m (Word32, Int32, Int32) 

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.

Since: 2.22

getByteOrder

visualGetByteOrder Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: A Visual.

-> m ByteOrder

Returns: A ByteOrder stating the byte order of visual.

Deprecated: (Since version 3.22)This information is not useful

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.

Since: 2.22

getColormapSize

visualGetColormapSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: A Visual.

-> m Int32

Returns: The size of a colormap that is suitable for visual.

Deprecated: (Since version 3.22)This information is not useful, since GDK does not provide APIs to operate on colormaps.

Returns the size of a colormap for this visual.

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

Since: 2.22

getDepth

visualGetDepth Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: A Visual.

-> m Int32

Returns: The bit depth of this visual.

Returns the bit depth of this visual.

Since: 2.22

getGreenPixelDetails

visualGetGreenPixelDetails Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: a Visual

-> m (Word32, Int32, Int32) 

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.

Since: 2.22

getRedPixelDetails

visualGetRedPixelDetails Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: A Visual

-> m (Word32, Int32, Int32) 

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.

Since: 2.22

getScreen

visualGetScreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: a Visual

-> m Screen

Returns: the screen to which this visual belongs.

Gets the screen to which this visual belongs

Since: 2.2

getSystem

visualGetSystem Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Visual

Returns: system visual

Deprecated: (Since version 3.22)Use gdk_screen_get_system_visual (gdk_screen_get_default ()).

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.

getVisualType

visualGetVisualType Source #

Arguments

:: (HasCallStack, MonadIO m, IsVisual a) 
=> a

visual: A Visual.

-> m VisualType

Returns: A VisualType stating the type of visual.

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

Since: 2.22