Gtk2HsContentsIndex
Graphics.UI.Gtk.Gdk.Screen
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
Class Hierarchy
Types
Methods
Attributes
Signals
Description

Object representing a physical screen

  • Module available since Gdk version 2.2
Synopsis
data Screen
class GObjectClass o => ScreenClass o
castToScreen :: GObjectClass obj => obj -> Screen
toScreen :: ScreenClass o => o -> Screen
screenGetDefault :: IO (Maybe Screen)
screenGetSystemColormap :: Screen -> IO Colormap
screenGetRGBColormap :: Screen -> IO Colormap
screenGetRGBAColormap :: Screen -> IO (Maybe Colormap)
screenIsComposited :: Screen -> IO Bool
screenGetRootWindow :: Screen -> IO DrawWindow
screenGetDisplay :: Screen -> IO Display
screenGetNumber :: Screen -> IO Int
screenGetWidth :: Screen -> IO Int
screenGetHeight :: Screen -> IO Int
screenGetWidthMM :: Screen -> IO Int
screenGetHeightMM :: Screen -> IO Int
screenMakeDisplayName :: Screen -> IO String
screenGetNMonitors :: Screen -> IO Int
screenGetMonitorAtPoint :: Screen -> Int -> Int -> IO Int
screenGetMonitorAtWindow :: Screen -> DrawWindow -> IO Int
screenGetActiveWindow :: Screen -> IO (Maybe DrawWindow)
screenResolution :: Attr Screen Double
screenDefaultColormap :: Attr Screen Colormap
screenSizeChanged :: ScreenClass self => Signal self (IO ())
screenCompositedChanged :: ScreenClass self => Signal self (IO ())
Detail

Screen objects are the GDK representation of a physical screen. It 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 colormap (screenGetDefaultColormap), the screen width (screenGetWidth), etc.

Note that a screen may consist of multiple monitors which are merged to form a large screen area.

Class Hierarchy
 |  GObject
 |   +----Screen
 
Types
data Screen
show/hide Instances
class GObjectClass o => ScreenClass o
show/hide Instances
castToScreen :: GObjectClass obj => obj -> Screen
toScreen :: ScreenClass o => o -> Screen
Methods
screenGetDefault
:: IO (Maybe Screen)returns a Screen, or Nothing if there is no default display.
Gets the default screen for the default display. (See displayGetDefault).
screenGetSystemColormap
:: Screen
-> IO Colormapreturns the default colormap for screen.
Gets the system's default colormap for screen
screenGetRGBColormap
:: Screen
-> IO Colormapreturns the preferred colormap
Gets the preferred colormap for rendering image data on screen. Not a very useful function; historically, GDK could only render RGB image data to one colormap and visual, but in the current version it can render to any colormap and visual. So there's no need to call this function.
screenGetRGBAColormap
:: Screen
-> IO (Maybe Colormap)returns a colormap to use for windows with an alpha channel or Nothing if the capability is not available.

Gets a colormap to use for creating windows or pixmaps 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.

  • Available since Gdk version 2.8
screenIsComposited
:: Screen
-> IO Boolreturns 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.

  • Available since Gdk version 2.10
screenGetRootWindow
:: Screen
-> IO DrawWindowreturns the root window
Gets the root window of screen.
screenGetDisplay
:: Screen
-> IO Displayreturns the display to which screen belongs
Gets the display to which the screen belongs.
screenGetNumber
:: Screen
-> IO Intreturns the index
Gets the index of screen among the screens in the display to which it belongs. (See screenGetDisplay)
screenGetWidth
:: Screen
-> IO Intreturns the width of screen in pixels.
Gets the width of screen in pixels
screenGetHeight
:: Screen
-> IO Intreturns the height of screen in pixels.
Gets the height of screen in pixels
screenGetWidthMM
:: Screen
-> IO Intreturns the width of screen in millimeters.
Gets the width of screen in millimeters. Note that on some X servers this value will not be correct.
screenGetHeightMM
:: Screen
-> IO Intreturns the heigth of screen in millimeters.
Returns the height of screen in millimeters. Note that on some X servers this value will not be correct.
screenMakeDisplayName
:: Screen
-> IO Stringreturns a newly allocated string, free with gFree
Determines the name to pass to displayOpen to get a Display with this screen as the default screen.
screenGetNMonitors
:: Screen
-> IO Intreturns number of monitors which screen consists of.
Returns the number of monitors which screen consists of.
screenGetMonitorAtPoint
:: Screen
-> Intx - the x coordinate in the virtual screen.
-> Inty - the y coordinate in the virtual screen.
-> IO Intreturns 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.
Returns the monitor number in which the point (x,y) is located.
screenGetMonitorAtWindow
:: Screen
-> DrawWindowwindow - a DrawWindow
-> IO Intreturns the monitor number in which most of window is located, or if window does not intersect any monitors, a monitor, close to window.
Returns the number of the monitor in which the largest area of the bounding rectangle of window resides.
screenGetActiveWindow
:: Screen
-> IO (Maybe DrawWindow)returns the currently active window, or Nothing.

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.

  • Available since Gdk version 2.10
Attributes
screenResolution :: Attr Screen Double

The resolution for fonts on the screen.

Default value: -1

screenDefaultColormap :: Attr Screen Colormap

Sets the default colormap for screen.

Gets the default colormap for screen.

Signals
screenSizeChanged :: ScreenClass self => Signal self (IO ())
The ::size_changed signal is emitted when the pixel width or height of a screen changes.
screenCompositedChanged :: ScreenClass self => Signal self (IO ())

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

  • Available since Gdk version 2.10
Produced by Haddock version 0.8