gtk3-0.14.5: Binding to the Gtk+ 3 graphical user interface library

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.Gdk.Display

Contents

Description

Controls the keyboard/mouse/monitors combination.

  • Module available since Gdk version 2.2

Synopsis

Detail

Display objects purpose are two fold:

  • To grab/ungrab keyboard focus and mouse pointer
  • To manage and provide information about the Screen(s) available for this Display

Display objects are the GDK representation of the X Display which can be described as /a workstation consisting of a keyboard a pointing device (such as a mouse) and one or more screens/. It is used to open and keep track of various Screen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.

Class Hierarchy

| GObject
| +----Display

Types

Methods

displayOpen Source #

Arguments

:: GlibString string 
=> string

displayName - the name of the display to open

-> IO (Maybe Display)

returns a Display, or Nothing if the display could not be opened.

Opens a display.

displayGetDefault Source #

Arguments

:: IO (Maybe Display)

returns a Display, or Nothing if there is no default display.

Gets the default Display. This is a convenience function for displayManagerGetDefaultDisplay displayManagerGet.

displayGetName Source #

Arguments

:: GlibString string 
=> Display 
-> IO string

returns a string representing the display name

Gets the name of the display.

displayGetNScreens Source #

Arguments

:: Display 
-> IO Int

returns number of screens.

Gets the number of screen managed by the display.

displayGetScreen Source #

Arguments

:: Display 
-> Int

screenNum - the screen number

-> IO Screen

returns the Screen object

Returns a screen object for one of the screens of the display.

displayGetDefaultScreen Source #

Arguments

:: Display 
-> IO Screen

returns the default Screen object for display

Get the default Screen for display.

displayPointerUngrab Source #

Arguments

:: Display 
-> TimeStamp

time - a timestap (e.g. currentTime).

-> IO () 

Release any pointer grab.

displayKeyboardUngrab Source #

Arguments

:: Display 
-> TimeStamp

time - a timestap (e.g currentTime).

-> IO () 

Release any keyboard grab

displayPointerIsGrabbed Source #

Arguments

:: Display 
-> IO Bool

returns True if an active X pointer grab is in effect

Test if the pointer is grabbed.

displayBeep :: Display -> IO () Source #

Emits a short beep on display

displaySync :: Display -> IO () Source #

Flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program. Calling displaySync before errorTrapPop makes sure that any errors generated from earlier requests are handled before the error trap is removed.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

displayFlush :: Display -> IO () Source #

Flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitely. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

  • Available since Gdk version 2.4

displayClose :: Display -> IO () Source #

Closes the connection to the windowing system for the given display, and cleans up associated resources.

displayListDevices Source #

Arguments

:: Display 
-> IO [Device]

returns a list of Device

Returns the list of available input devices attached to display.

displaySetDoubleClickTime Source #

Arguments

:: Display 
-> Int

msec - double click time in milliseconds (thousandths of a second)

-> IO () 

Sets the double click time (two clicks within this time interval count as a double click and result in an eventButton where eventClick is DoubleClick). Applications should not set this, it is a global user-configured setting.

displaySetDoubleClickDistance Source #

Arguments

:: Display 
-> Int

distance - distance in pixels

-> IO () 

Sets the double click distance (two clicks within this distance count as a double click and result in an eventButton where eventClick is DoubleClick). See also displaySetDoubleClickTime. Applications should not set this, it is a global user-configured setting.

  • Available since Gdk version 2.4

displayGetPointer Source #

Arguments

:: Display 
-> IO (Screen, [Modifier], Int, Int)

(s, m, x, y) - the screen s, the modifier mask m and the x and y coordinates of the pointer

Gets the current location of the pointer and the current modifier mask for a given display.

displayGetWindowAtPointer Source #

Arguments

:: Display 
-> IO (Maybe (DrawWindow, Int, Int))

(screen, winX, winY) returns the window under the mouse pointer, or Nothing. The winX and winY denote the pointer location relative to the window origin

Obtains the window underneath the mouse pointer, returning the location of the pointer in that window in winX, winY for screen. Returns Nothing if the window under the mouse pointer is not known to GDK (for example, belongs to another application).

displayWarpPointer Source #

Arguments

:: Display 
-> Screen

screen - the screen of display to warp the pointer to

-> Int

x - the x coordinate of the destination

-> Int

y - the y coordinate of the destination

-> IO () 

Moves the pointer of display to the point x,y on the screen screen, unless the pointer is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination.

Note that the pointer should normally be under the control of the user. This function was added to cover some rare use cases like keyboard navigation support for the color picker in the ColorSelectionDialog.

  • Available since Gdk version 2.8

displaySupportsCursorColor Source #

Arguments

:: Display 
-> IO Bool

returns whether cursors can have multiple colors.

Returns True if multicolored cursors are supported on display. Otherwise, cursors have only a forground and a background color.

  • Available since Gdk version 2.4

displaySupportsCursorAlpha Source #

Arguments

:: Display 
-> IO Bool

returns whether cursors can have alpha channels.

Returns True if cursors can use an 8bit alpha channel on display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).

  • Available since Gdk version 2.4

displayGetDefaultCursorSize Source #

Arguments

:: Display 
-> IO Int

returns the default cursor size.

Returns the default size to use for cursors on display.

  • Available since Gdk version 2.4

displayGetMaximalCursorSize Source #

Arguments

:: Display 
-> IO (Int, Int)

(width, height) maximal width and height of the cursor

Gets the maximal size to use for cursors on display.

  • Available since Gdk version 2.4

displayGetDefaultGroup Source #

Arguments

:: Display 
-> IO DrawWindow

returns The default group leader window for display

Returns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See windowSetGroup.

  • Available since Gdk version 2.4

displaySupportsSelectionNotification Source #

Arguments

:: Display 
-> IO Bool

returns whether EOwnerChange events will be sent.

Returns whether EOwnerChange events will be sent when the owner of a selection changes.

  • Available since Gdk version 2.6

displayRequestSelectionNotification Source #

Arguments

:: Display 
-> SelectionTag

selection - the Atom naming the selection for which ownership change notification is requested

-> IO Bool

returns whether EOwnerChange events will be sent.

Request EOwnerChange events for ownership changes of the selection named by the given atom.

  • Available since Gdk version 2.6

displaySupportsClipboardPersistence Source #

Arguments

:: Display 
-> IO Bool

returns True if the display supports clipboard persistance.

Returns whether the speicifed display supports clipboard persistance; i.e. if it's possible to store the clipboard data after an application has quit. On X11 this checks if a clipboard daemon is running.

  • Available since Gdk version 2.6

displayStoreClipboard Source #

Arguments

:: Display 
-> DrawWindow

clipboardWindow - a DrawWindow belonging to the clipboard owner

-> Word32

time - a timestamp

-> Maybe [TargetTag]

targets - an array of targets that should be saved, or Nothing if all available targets should be saved.

-> IO () 

Issues a request to the clipboard manager to store the clipboard data. On X11, this is a special program that works according to the freedesktop clipboard specification, available at http://www.freedesktop.org/Standards/clipboard-manager-spec.

  • Available since Gdk version 2.6

displaySupportsShapes Source #

Arguments

:: Display 
-> IO Bool

returns True if shaped windows are supported

Returns True if windowShapeCombineMask can be used to create shaped windows on display.

  • Available since Gdk version 2.10

displaySupportsInputShapes Source #

Arguments

:: Display 
-> IO Bool

returns True if windows with modified input shape are supported

Returns True if windowInputShapeCombineMask can be used to modify the input shape of windows on display.

  • Available since Gdk version 2.10

displaySupportsComposite Source #

Arguments

:: Display 
-> IO Bool

returns True if windows may be composited.

Returns True if windowSetComposited can be used to redirect drawing on the window using compositing.

Currently this only works on X11 with XComposite and XDamage extensions available.

  • Available since Gdk version 2.12

Signals

displayClosed :: DisplayClass self => Signal self (Bool -> IO ()) Source #

The displayClosed signal is emitted when the connection to the windowing system for display is closed.