Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
A Visual
contains information about
a particular visual.
Synopsis
- newtype Visual = Visual (ManagedPtr Visual)
- class (GObject o, IsDescendantOf Visual o) => IsVisual o
- toVisual :: (MonadIO m, IsVisual o) => o -> m Visual
- noVisual :: Maybe Visual
- visualGetBest :: (HasCallStack, MonadIO m) => m Visual
- visualGetBestDepth :: (HasCallStack, MonadIO m) => m Int32
- visualGetBestType :: (HasCallStack, MonadIO m) => m VisualType
- visualGetBestWithBoth :: (HasCallStack, MonadIO m) => Int32 -> VisualType -> m (Maybe Visual)
- visualGetBestWithDepth :: (HasCallStack, MonadIO m) => Int32 -> m Visual
- visualGetBestWithType :: (HasCallStack, MonadIO m) => VisualType -> m Visual
- visualGetBitsPerRgb :: (HasCallStack, MonadIO m, IsVisual a) => a -> m Int32
- visualGetBluePixelDetails :: (HasCallStack, MonadIO m, IsVisual a) => a -> m (Word32, Int32, Int32)
- visualGetByteOrder :: (HasCallStack, MonadIO m, IsVisual a) => a -> m ByteOrder
- visualGetColormapSize :: (HasCallStack, MonadIO m, IsVisual a) => a -> m Int32
- visualGetDepth :: (HasCallStack, MonadIO m, IsVisual a) => a -> m Int32
- visualGetGreenPixelDetails :: (HasCallStack, MonadIO m, IsVisual a) => a -> m (Word32, Int32, Int32)
- visualGetRedPixelDetails :: (HasCallStack, MonadIO m, IsVisual a) => a -> m (Word32, Int32, Int32)
- visualGetScreen :: (HasCallStack, MonadIO m, IsVisual a) => a -> m Screen
- visualGetSystem :: (HasCallStack, MonadIO m) => m Visual
- visualGetVisualType :: (HasCallStack, MonadIO m, IsVisual a) => a -> m VisualType
Exported types
Memory-managed wrapper type.
Instances
GObject Visual Source # | |
Defined in GI.Gdk.Objects.Visual gobjectType :: IO GType # | |
HasParentTypes Visual Source # | |
Defined in GI.Gdk.Objects.Visual | |
type ParentTypes Visual Source # | |
Defined in GI.Gdk.Objects.Visual |
class (GObject o, IsDescendantOf Visual o) => IsVisual o Source #
Instances
(GObject o, IsDescendantOf Visual o) => IsVisual o Source # | |
Defined in GI.Gdk.Objects.Visual |
Methods
getBest
:: (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
:: (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
:: (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 #
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> VisualType |
|
-> m (Maybe Visual) | Returns: best visual with both |
Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual
and screenGetRgbaVisual
Combines visualGetBestWithDepth
and
visualGetBestWithType
.
getBestWithDepth
visualGetBestWithDepth Source #
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m) | |
=> VisualType |
|
-> 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
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m Int32 | Returns: The number of significant bits per color value for |
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 #
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
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m ByteOrder | Returns: A |
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 #
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m Int32 | Returns: The size of a colormap that is suitable for |
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
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m Int32 | Returns: The bit depth of this visual. |
Returns the bit depth of this visual.
Since: 2.22
getGreenPixelDetails
visualGetGreenPixelDetails Source #
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 #
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
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m Screen | Returns: the screen to which this visual belongs. |
Gets the screen to which this visual belongs
Since: 2.2
getSystem
:: (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
:: (HasCallStack, MonadIO m, IsVisual a) | |
=> a |
|
-> m VisualType | Returns: A |
Returns the type of visual this is (PseudoColor, TrueColor, etc).
Since: 2.22