gi-gdk-3.0.16: Gdk bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Objects.Screen

Contents

- Exported types
- Methods
  - getActiveWindow
  - getDefault
  - getDisplay
  - getFontOptions
  - getHeight
  - getHeightMm
  - getMonitorAtPoint
  - getMonitorAtWindow
  - getMonitorGeometry
  - getMonitorHeightMm
  - getMonitorPlugName
  - getMonitorScaleFactor
  - getMonitorWidthMm
  - getMonitorWorkarea
  - getNMonitors
  - getNumber
  - getPrimaryMonitor
  - getResolution
  - getRgbaVisual
  - getRootWindow
  - getSetting
  - getSystemVisual
  - getToplevelWindows
  - getWidth
  - getWidthMm
  - getWindowStack
  - height
  - heightMm
  - isComposited
  - listVisuals
  - makeDisplayName
  - setFontOptions
  - setResolution
  - width
  - widthMm
- Properties
  - fontOptions
  - resolution
- Signals
  - compositedChanged
  - monitorsChanged
  - sizeChanged

Description

`Screen` objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single `Screen` which combines several physical monitors (see `screenGetNMonitors`).

GdkScreen is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. it is also used to query the screen specification and default settings such as the default visual (`screenGetSystemVisual`), the dimensions of the physical monitors (`screenGetMonitorGeometry`), etc.

Synopsis

- newtype Screen = Screen (ManagedPtr Screen)
- class GObject o => IsScreen o
- toScreen :: (MonadIO m, IsScreen o) => o -> m Screen
- noScreen :: Maybe Screen
- screenGetActiveWindow :: (HasCallStack, MonadIO m, IsScreen a) => a -> m (Maybe Window)
- screenGetDefault :: (HasCallStack, MonadIO m) => m (Maybe Screen)
- screenGetDisplay :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Display
- screenGetFontOptions :: (HasCallStack, MonadIO m, IsScreen a) => a -> m (Maybe FontOptions)
- screenGetHeight :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetHeightMm :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetMonitorAtPoint :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> Int32 -> m Int32
- screenGetMonitorAtWindow :: (HasCallStack, MonadIO m, IsScreen a, IsWindow b) => a -> b -> m Int32
- screenGetMonitorGeometry :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m Rectangle
- screenGetMonitorHeightMm :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m Int32
- screenGetMonitorPlugName :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m (Maybe Text)
- screenGetMonitorScaleFactor :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m Int32
- screenGetMonitorWidthMm :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m Int32
- screenGetMonitorWorkarea :: (HasCallStack, MonadIO m, IsScreen a) => a -> Int32 -> m Rectangle
- screenGetNMonitors :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetNumber :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetPrimaryMonitor :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetResolution :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Double
- screenGetRgbaVisual :: (HasCallStack, MonadIO m, IsScreen a) => a -> m (Maybe Visual)
- screenGetRootWindow :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Window
- screenGetSetting :: (HasCallStack, MonadIO m, IsScreen a) => a -> Text -> GValue -> m Bool
- screenGetSystemVisual :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Visual
- screenGetToplevelWindows :: (HasCallStack, MonadIO m, IsScreen a) => a -> m [Window]
- screenGetWidth :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetWidthMm :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Int32
- screenGetWindowStack :: (HasCallStack, MonadIO m, IsScreen a) => a -> m [Window]
- screenHeight :: (HasCallStack, MonadIO m) => m Int32
- screenHeightMm :: (HasCallStack, MonadIO m) => m Int32
- screenIsComposited :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Bool
- screenListVisuals :: (HasCallStack, MonadIO m, IsScreen a) => a -> m [Visual]
- screenMakeDisplayName :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Text
- screenSetFontOptions :: (HasCallStack, MonadIO m, IsScreen a) => a -> Maybe FontOptions -> m ()
- screenSetResolution :: (HasCallStack, MonadIO m, IsScreen a) => a -> Double -> m ()
- screenWidth :: (HasCallStack, MonadIO m) => m Int32
- screenWidthMm :: (HasCallStack, MonadIO m) => m Int32
- constructScreenFontOptions :: IsScreen o => Ptr () -> IO (GValueConstruct o)
- getScreenFontOptions :: (MonadIO m, IsScreen o) => o -> m (Ptr ())
- setScreenFontOptions :: (MonadIO m, IsScreen o) => o -> Ptr () -> m ()
- constructScreenResolution :: IsScreen o => Double -> IO (GValueConstruct o)
- getScreenResolution :: (MonadIO m, IsScreen o) => o -> m Double
- setScreenResolution :: (MonadIO m, IsScreen o) => o -> Double -> m ()
- type C_ScreenCompositedChangedCallback = Ptr () -> Ptr () -> IO ()
- type ScreenCompositedChangedCallback = IO ()
- afterScreenCompositedChanged :: (IsScreen a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId
- genClosure_ScreenCompositedChanged :: ScreenCompositedChangedCallback -> IO Closure
- mk_ScreenCompositedChangedCallback :: C_ScreenCompositedChangedCallback -> IO (FunPtr C_ScreenCompositedChangedCallback)
- noScreenCompositedChangedCallback :: Maybe ScreenCompositedChangedCallback
- onScreenCompositedChanged :: (IsScreen a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId
- wrap_ScreenCompositedChangedCallback :: ScreenCompositedChangedCallback -> C_ScreenCompositedChangedCallback
- type C_ScreenMonitorsChangedCallback = Ptr () -> Ptr () -> IO ()
- type ScreenMonitorsChangedCallback = IO ()
- afterScreenMonitorsChanged :: (IsScreen a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId
- genClosure_ScreenMonitorsChanged :: ScreenMonitorsChangedCallback -> IO Closure
- mk_ScreenMonitorsChangedCallback :: C_ScreenMonitorsChangedCallback -> IO (FunPtr C_ScreenMonitorsChangedCallback)
- noScreenMonitorsChangedCallback :: Maybe ScreenMonitorsChangedCallback
- onScreenMonitorsChanged :: (IsScreen a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId
- wrap_ScreenMonitorsChangedCallback :: ScreenMonitorsChangedCallback -> C_ScreenMonitorsChangedCallback
- type C_ScreenSizeChangedCallback = Ptr () -> Ptr () -> IO ()
- type ScreenSizeChangedCallback = IO ()
- afterScreenSizeChanged :: (IsScreen a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId
- genClosure_ScreenSizeChanged :: ScreenSizeChangedCallback -> IO Closure
- mk_ScreenSizeChangedCallback :: C_ScreenSizeChangedCallback -> IO (FunPtr C_ScreenSizeChangedCallback)
- noScreenSizeChangedCallback :: Maybe ScreenSizeChangedCallback
- onScreenSizeChanged :: (IsScreen a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId
- wrap_ScreenSizeChangedCallback :: ScreenSizeChangedCallback -> C_ScreenSizeChangedCallback

# Exported types

newtype Screen Source #

Memory-managed wrapper type.

Constructors

Screen (ManagedPtr Screen) |

Instances

GObject Screen Source # |
Instance details Defined in GI.Gdk.Objects.Screen Methods gobjectType :: Screen -> IO GType Source #
IsObject Screen Source # |
Instance details Defined in GI.Gdk.Objects.Screen
IsScreen Screen Source # |
Instance details Defined in GI.Gdk.Objects.Screen

class GObject o => IsScreen o Source #

Type class for types which can be safely cast to `Screen`, for instance with `toScreen`.

Instances

(GObject a, (UnknownAncestorError Screen a :: Constraint)) => IsScreen a Source # |
Instance details Defined in GI.Gdk.Objects.Screen
IsScreen Screen Source # |
Instance details Defined in GI.Gdk.Objects.Screen

toScreen :: (MonadIO m, IsScreen o) => o -> m Screen Source #

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

noScreen :: Maybe Screen Source #

A convenience alias for `Nothing` :: `Maybe` `Screen`.

# Methods

## getActiveWindow

screenGetActiveWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m (Maybe Window) | Returns: the currently active window, or `Nothing`.

Deprecated: (Since version 3.22)

Returns the screen’s currently active window.

On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property on the root window, as described in the Extended Window Manager Hints. If there is no currently currently active window, or the window manager does not support the _NET_ACTIVE_WINDOW hint, this function returns `Nothing`.

On other platforms, this function may return `Nothing`, depending on whether it is implementable on that platform.

The returned window should be unrefed using `objectUnref` when no longer needed.

Since: 2.10

## getDefault

screenGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m (Maybe Screen) | Returns: a `Screen`, or `Nothing` if there is no default display.

Gets the default screen for the default display. (See gdk_display_get_default ()).

Since: 2.2

## getDisplay

screenGetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Display | Returns: the display to which `screen` belongs

Gets the display to which the `screen` belongs.

Since: 2.2

## getFontOptions

screenGetFontOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m (Maybe FontOptions) | Returns: the current font options, or `Nothing` if no default font options have been set.

Gets any options previously set with `screenSetFontOptions`.

Since: 2.10

## getHeight

screenGetHeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the height of `screen` in pixels.

Deprecated: (Since version 3.22)Use per-monitor information instead

Gets the height of `screen` in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

Since: 2.2

## getHeightMm

screenGetHeightMm Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the heigth of `screen` in millimeters.

Deprecated: (Since version 3.22)Use per-monitor information instead

Returns the height of `screen` in millimeters.

Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead.

Since: 2.2

## getMonitorAtPoint

screenGetMonitorAtPoint Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`.
-> Int32 | `x`: the x coordinate in the virtual screen.
-> Int32 | `y`: the y coordinate in the virtual screen.
-> m Int32 | Returns: the monitor number in which the point (`x`,`y`) lies, or a monitor close to (`x`,`y`) if the point is not in any monitor.

Deprecated: (Since version 3.22)Use `displayGetMonitorAtPoint` instead

Returns the monitor number in which the point (`x`,`y`) is located.

Since: 2.2

## getMonitorAtWindow

screenGetMonitorAtWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a, IsWindow b) |
=> a | `screen`: a `Screen`.
-> b | `window`: a `Window`
-> m Int32 | Returns: the monitor number in which most of `window` is located, or if `window` does not intersect any monitors, a monitor, close to `window`.

Deprecated: (Since version 3.22)Use `displayGetMonitorAtWindow` instead

Returns the number of the monitor in which the largest area of the bounding rectangle of `window` resides.

Since: 2.2

## getMonitorGeometry

screenGetMonitorGeometry Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: the monitor number
-> m Rectangle |

Deprecated: (Since version 3.22)Use `monitorGetGeometry` instead

Retrieves the `Rectangle` representing the size and position of the individual monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

Monitor numbers start at 0. To obtain the number of monitors of `screen`, use `screenGetNMonitors`.

Note that the size of the entire screen area can be retrieved via `screenGetWidth` and `screenGetHeight`.

Since: 2.2

## getMonitorHeightMm

screenGetMonitorHeightMm Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
-> m Int32 | Returns: the height of the monitor, or -1 if not available

Deprecated: (Since version 3.22)Use `monitorGetHeightMm` instead

Gets the height in millimeters of the specified monitor.

Since: 2.14

## getMonitorPlugName

screenGetMonitorPlugName Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
-> m (Maybe Text) | Returns: a newly-allocated string containing the name of the monitor, or `Nothing` if the name cannot be determined

Deprecated: (Since version 3.22)Use `monitorGetModel` instead

Returns the output name of the specified monitor. Usually something like VGA, DVI, or TV, not the actual product name of the display device.

Since: 2.14

## getMonitorScaleFactor

screenGetMonitorScaleFactor Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: screen to get scale factor for
-> Int32 | `monitorNum`: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
-> m Int32 | Returns: the scale factor

Deprecated: (Since version 3.22)Use `monitorGetScaleFactor` instead

Returns the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use `windowGetScaleFactor` instead.

Since: 3.10

## getMonitorWidthMm

screenGetMonitorWidthMm Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
-> m Int32 | Returns: the width of the monitor, or -1 if not available

Deprecated: (Since version 3.22)Use `monitorGetWidthMm` instead

Gets the width in millimeters of the specified monitor, if available.

Since: 2.14

## getMonitorWorkarea

screenGetMonitorWorkarea Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Int32 | `monitorNum`: the monitor number
-> m Rectangle |

Deprecated: (Since version 3.22)Use `monitorGetWorkarea` instead

Retrieves the `Rectangle` representing the size and position of the “work area” on a monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components.

Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply.

Monitor numbers start at 0. To obtain the number of monitors of `screen`, use `screenGetNMonitors`.

Since: 3.4

## getNMonitors

screenGetNMonitors Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: number of monitors which `screen` consists of

Deprecated: (Since version 3.22)Use `displayGetNMonitors` instead

Returns the number of monitors which `screen` consists of.

Since: 2.2

## getNumber

screenGetNumber Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the index

Deprecated: (Since version 3.22)

Gets the index of `screen` among the screens in the display to which it belongs. (See `screenGetDisplay`)

Since: 2.2

## getPrimaryMonitor

screenGetPrimaryMonitor Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`.
-> m Int32 | Returns: An integer index for the primary monitor, or 0 if none is configured.

Deprecated: (Since version 3.22)Use `displayGetPrimaryMonitor` instead

Gets the primary monitor for `screen`. The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor.

If no primary monitor is configured by the user, the return value will be 0, defaulting to the first monitor.

Since: 2.20

## getResolution

screenGetResolution Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Double | Returns: the current resolution, or -1 if no resolution has been set.

Gets the resolution for font handling on the screen; see `screenSetResolution` for full details.

Since: 2.10

## getRgbaVisual

screenGetRgbaVisual Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m (Maybe Visual) | Returns: a visual to use for windows with an alpha channel or `Nothing` if the capability is not available.

Gets a visual to use for creating windows with an alpha channel. The windowing system on which GTK+ is running may not support this capability, in which case `Nothing` will be returned. Even if a non-`Nothing` value is returned, its possible that the window’s alpha channel won’t be honored when displaying the window on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display.

This functionality is not implemented in the Windows backend.

For setting an overall opacity for a top-level window, see `windowSetOpacity`.

Since: 2.8

## getRootWindow

screenGetRootWindow Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Window | Returns: the root window

Gets the root window of `screen`.

Since: 2.2

## getSetting

screenGetSetting Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: the `Screen` where the setting is located
-> Text | `name`: the name of the setting
-> GValue | `value`: location to store the value of the setting
-> m Bool | Returns: `True` if the setting existed and a value was stored in `value`, `False` otherwise.

Retrieves a desktop-wide setting such as double-click time for the `Screen` `screen`.

FIXME needs a list of valid settings here, or a link to more information.

Since: 2.2

## getSystemVisual

screenGetSystemVisual Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`.
-> m Visual | Returns: the system visual

Get the system’s default visual for `screen`. This is the visual for the root window of the display. The return value should not be freed.

Since: 2.2

## getToplevelWindows

screenGetToplevelWindows Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: The `Screen` where the toplevels are located.
-> m [Window] | Returns: list of toplevel windows, free with `g_list_free()`

Obtains a list of all toplevel windows known to GDK on the screen `screen`. A toplevel window is a child of the root window (see `getDefaultRootWindow`).

The returned list should be freed with `g_list_free()`, but its elements need not be freed.

Since: 2.2

## getWidth

screenGetWidth Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the width of `screen` in pixels.

Deprecated: (Since version 3.22)Use per-monitor information instead

Gets the width of `screen` in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

Since: 2.2

## getWidthMm

screenGetWidthMm Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Int32 | Returns: the width of `screen` in millimeters.

Deprecated: (Since version 3.22)Use per-monitor information instead

Gets the width of `screen` in millimeters.

Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead.

Since: 2.2

## getWindowStack

screenGetWindowStack Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m [Window] | Returns: a list of `GdkWindows` for the current window stack, or `Nothing`.

Returns a `List` of `GdkWindows` representing the current window stack.

On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING property on the root window, as described in the Extended Window Manager Hints. If the window manager does not support the _NET_CLIENT_LIST_STACKING hint, this function returns `Nothing`.

On other platforms, this function may return `Nothing`, depending on whether it is implementable on that platform.

The returned list is newly allocated and owns references to the windows it contains, so it should be freed using `g_list_free()` and its windows unrefed using `objectUnref` when no longer needed.

Since: 2.10

## height

screenHeight Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Int32 | Returns: the height of the default screen in pixels.

Deprecated: (Since version 3.22)Use per-monitor information

Gets the height of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

## heightMm

screenHeightMm Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Int32 | Returns: the height of the default screen in millimeters, though it is not always correct.

Deprecated: (Since version 3.22)Use per-monitor information

Returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct.

## isComposited

screenIsComposited Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Bool | Returns: Whether windows with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen.

Returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen.

On X11 this function returns whether a compositing manager is compositing `screen`.

Since: 2.10

## listVisuals

screenListVisuals Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: the relevant `Screen`.
-> m [Visual] | Returns: a list of visuals; the list must be freed, but not its contents

Lists the available visuals for the specified `screen`. A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.

Call `g_list_free()` on the return value when you’re finished with it.

Since: 2.2

## makeDisplayName

screenMakeDisplayName Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> m Text | Returns: a newly allocated string, free with `free`

Deprecated: (Since version 3.22)

Determines the name to pass to `displayOpen` to get a `Display` with this screen as the default screen.

Since: 2.2

## setFontOptions

screenSetFontOptions Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Maybe FontOptions | `options`: a `FontOptions`, or `Nothing` to unset any previously set default font options.
-> m () |

Sets the default font options for the screen. These options will be set on any `Context`’s newly created with `pangoContextGetForScreen`. Changing the default set of font options does not affect contexts that have already been created.

Since: 2.10

## setResolution

screenSetResolution Source #

Arguments

:: (HasCallStack, MonadIO m, IsScreen a) |
=> a | `screen`: a `Screen`
-> Double | `dpi`: the resolution in “dots per inch”. (Physical inches aren’t actually involved; the terminology is conventional.)
-> m () |

Sets the resolution for font handling on the screen. This is a scale factor between points specified in a `FontDescription` and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

Since: 2.10

## width

screenWidth Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Int32 | Returns: the width of the default screen in pixels.

Deprecated: (Since version 3.22)Use per-monitor information

Gets the width of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see `screenGetMonitorScaleFactor`).

## widthMm

screenWidthMm Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Int32 | Returns: the width of the default screen in millimeters, though it is not always correct.

Deprecated: (Since version 3.22)Use per-monitor information

Returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct.

# Properties

## fontOptions

No description available in the introspection data.

constructScreenFontOptions :: IsScreen o => Ptr () -> IO (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`font-options`” property. This is rarely needed directly, but it is used by `new`.

getScreenFontOptions :: (MonadIO m, IsScreen o) => o -> m (Ptr ()) Source #

Get the value of the “`font-options`” property. When overloading is enabled, this is equivalent to

    get screen #fontOptions

setScreenFontOptions :: (MonadIO m, IsScreen o) => o -> Ptr () -> m () Source #

Set the value of the “`font-options`” property. When overloading is enabled, this is equivalent to

    set screen [ #fontOptions := value ]

## resolution

No description available in the introspection data.

constructScreenResolution :: IsScreen o => Double -> IO (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`resolution`” property. This is rarely needed directly, but it is used by `new`.

getScreenResolution :: (MonadIO m, IsScreen o) => o -> m Double Source #

Get the value of the “`resolution`” property. When overloading is enabled, this is equivalent to

    get screen #resolution

setScreenResolution :: (MonadIO m, IsScreen o) => o -> Double -> m () Source #

Set the value of the “`resolution`” property. When overloading is enabled, this is equivalent to

    set screen [ #resolution := value ]

# Signals

## compositedChanged

type C_ScreenCompositedChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type ScreenCompositedChangedCallback = IO () Source #

The ::composited-changed signal is emitted when the composited status of the screen changes

Since: 2.10

afterScreenCompositedChanged :: (IsScreen a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`composited-changed`” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after screen #compositedChanged callback

genClosure_ScreenCompositedChanged :: ScreenCompositedChangedCallback -> IO Closure Source #

Wrap the callback into a `Closure`.

mk_ScreenCompositedChangedCallback :: C_ScreenCompositedChangedCallback -> IO (FunPtr C_ScreenCompositedChangedCallback) Source #

Generate a function pointer callable from C code, from a `C_ScreenCompositedChangedCallback`.

noScreenCompositedChangedCallback :: Maybe ScreenCompositedChangedCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `ScreenCompositedChangedCallback``.

onScreenCompositedChanged :: (IsScreen a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`composited-changed`” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on screen #compositedChanged callback

wrap_ScreenCompositedChangedCallback :: ScreenCompositedChangedCallback -> C_ScreenCompositedChangedCallback Source #

Wrap a `ScreenCompositedChangedCallback` into a `C_ScreenCompositedChangedCallback`.

## monitorsChanged

type C_ScreenMonitorsChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type ScreenMonitorsChangedCallback = IO () Source #

The ::monitors-changed signal is emitted when the number, size or position of the monitors attached to the screen change.

Only for X11 and OS X for now. A future implementation for Win32 may be a possibility.

Since: 2.14

afterScreenMonitorsChanged :: (IsScreen a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`monitors-changed`” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after screen #monitorsChanged callback

genClosure_ScreenMonitorsChanged :: ScreenMonitorsChangedCallback -> IO Closure Source #

Wrap the callback into a `Closure`.

mk_ScreenMonitorsChangedCallback :: C_ScreenMonitorsChangedCallback -> IO (FunPtr C_ScreenMonitorsChangedCallback) Source #

Generate a function pointer callable from C code, from a `C_ScreenMonitorsChangedCallback`.

noScreenMonitorsChangedCallback :: Maybe ScreenMonitorsChangedCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `ScreenMonitorsChangedCallback``.

onScreenMonitorsChanged :: (IsScreen a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`monitors-changed`” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on screen #monitorsChanged callback

wrap_ScreenMonitorsChangedCallback :: ScreenMonitorsChangedCallback -> C_ScreenMonitorsChangedCallback Source #

Wrap a `ScreenMonitorsChangedCallback` into a `C_ScreenMonitorsChangedCallback`.

## sizeChanged

type C_ScreenSizeChangedCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type ScreenSizeChangedCallback = IO () Source #

The ::size-changed signal is emitted when the pixel width or height of a screen changes.

Since: 2.2

afterScreenSizeChanged :: (IsScreen a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`size-changed`” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after screen #sizeChanged callback

genClosure_ScreenSizeChanged :: ScreenSizeChangedCallback -> IO Closure Source #

Wrap the callback into a `Closure`.

mk_ScreenSizeChangedCallback :: C_ScreenSizeChangedCallback -> IO (FunPtr C_ScreenSizeChangedCallback) Source #

Generate a function pointer callable from C code, from a `C_ScreenSizeChangedCallback`.

noScreenSizeChangedCallback :: Maybe ScreenSizeChangedCallback Source #

A convenience synonym for ``Nothing` :: `Maybe` `ScreenSizeChangedCallback``.

onScreenSizeChanged :: (IsScreen a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the “`size-changed`” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on screen #sizeChanged callback

wrap_ScreenSizeChangedCallback :: ScreenSizeChangedCallback -> C_ScreenSizeChangedCallback Source #

Wrap a `ScreenSizeChangedCallback` into a `C_ScreenSizeChangedCallback`.