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 |
- 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
- Signals
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, IsDescendantOf Screen 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 :: MonadIO m => ScreenCompositedChangedCallback -> m (GClosure C_ScreenCompositedChangedCallback)
- 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 :: MonadIO m => ScreenMonitorsChangedCallback -> m (GClosure C_ScreenMonitorsChangedCallback)
- 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 :: MonadIO m => ScreenSizeChangedCallback -> m (GClosure C_ScreenSizeChangedCallback)
- 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
Memory-managed wrapper type.
Instances
GObject Screen Source # | |
Defined in GI.Gdk.Objects.Screen gobjectType :: IO GType # | |
HasParentTypes Screen Source # | |
Defined in GI.Gdk.Objects.Screen | |
type ParentTypes Screen Source # | |
Defined in GI.Gdk.Objects.Screen |
class (GObject o, IsDescendantOf Screen o) => IsScreen o Source #
Instances
(GObject o, IsDescendantOf Screen o) => IsScreen o Source # | |
Defined in GI.Gdk.Objects.Screen |
Methods
getActiveWindow
screenGetActiveWindow Source #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m (Maybe Window) | Returns: the currently active window,
or |
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
:: (HasCallStack, MonadIO m) | |
=> m (Maybe Screen) | Returns: a |
Gets the default screen for the default display. (See gdk_display_get_default ()).
Since: 2.2
getDisplay
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Display | Returns: the display to which |
Gets the display to which the screen
belongs.
Since: 2.2
getFontOptions
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m (Maybe FontOptions) | Returns: the current font options, or |
Gets any options previously set with screenSetFontOptions
.
Since: 2.10
getHeight
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Int32 | Returns: the height of |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Int32 | Returns: the heigth of |
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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Int32 | Returns: the monitor number in which the point ( |
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 #
:: (HasCallStack, MonadIO m, IsScreen a, IsWindow b) | |
=> a |
|
-> b |
|
-> m Int32 | Returns: the monitor number in which most of |
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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> m (Maybe Text) | Returns: a newly-allocated string containing the name
of the monitor, or |
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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Int32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Int32 | Returns: number of monitors which |
Deprecated: (Since version 3.22)Use displayGetNMonitors
instead
Returns the number of monitors which screen
consists of.
Since: 2.2
getNumber
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m (Maybe Visual) | Returns: a visual to use for windows
with an alpha channel or |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Window | Returns: the root window |
Gets the root window of screen
.
Since: 2.2
getSetting
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Text |
|
-> GValue |
|
-> m Bool | Returns: |
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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m [Window] | Returns:
list of toplevel windows, free with |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Int32 | Returns: the width of |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Int32 | Returns: the width of |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m [Window] | Returns: a
list of |
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
:: (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
:: (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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Text | Returns: a newly allocated string, free with |
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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Maybe FontOptions |
|
-> 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
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> Double |
|
-> 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
:: (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
:: (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 :: MonadIO m => ScreenCompositedChangedCallback -> m (GClosure C_ScreenCompositedChangedCallback) Source #
Wrap the callback into a GClosure
.
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 :: MonadIO m => ScreenMonitorsChangedCallback -> m (GClosure C_ScreenMonitorsChangedCallback) Source #
Wrap the callback into a GClosure
.
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 :: MonadIO m => ScreenSizeChangedCallback -> m (GClosure C_ScreenSizeChangedCallback) Source #
Wrap the callback into a GClosure
.
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