Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Gdk general functions.
- flush :: IO ()
- screenWidth :: IO Int
- screenHeight :: IO Int
- screenWidthMM :: IO Int
- screenHeightMM :: IO Int
- data GrabStatus
- pointerGrab :: (DrawWindowClass window, DrawWindowClass confine_to) => window -> Bool -> [EventMask] -> Maybe confine_to -> Maybe Cursor -> TimeStamp -> IO GrabStatus
- pointerUngrab :: TimeStamp -> IO ()
- pointerIsGrabbed :: IO Bool
- keyboardGrab :: DrawWindowClass window => window -> Bool -> TimeStamp -> IO GrabStatus
- keyboardUngrab :: TimeStamp -> IO ()
- beep :: IO ()
Documentation
Flushes the X output buffer and waits until all requests have been processed by the server. This is rarely needed by applications.
screenWidth :: IO Int Source
Returns the width of the default screen in pixels.
screenHeight :: IO Int Source
Returns the height of the default screen in pixels.
screenWidthMM :: IO Int Source
Returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct.
screenHeightMM :: IO Int Source
Returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct.
data GrabStatus Source
Enum GrabStatus Source | Specifies why a selection ownership was changed.
|
Eq GrabStatus Source | |
Show GrabStatus Source |
:: (DrawWindowClass window, DrawWindowClass confine_to) | |
=> window |
|
-> Bool |
|
-> [EventMask] |
|
-> Maybe confine_to |
|
-> Maybe Cursor |
|
-> TimeStamp |
|
-> IO GrabStatus |
|
Grabs the pointer (usually a mouse) so that all events are passed to this
application until the pointer is ungrabbed with pointerUngrab
, or the grab
window becomes unviewable. This overrides any previous pointer grab by this
client.
Pointer grabs are used for operations which need complete control over mouse events, even if the mouse leaves the application. For example in GTK+ it is used for Drag and Drop, for dragging the handle in the GtkHPaned and GtkVPaned widgets, and for resizing columns in GtkCList widgets.
Note that if the event mask of an X window has selected both button press
and button release events, then a button press event will cause an automatic
pointer grab until the button is released. X does this automatically since
most applications expect to receive button press and release events in
pairs. It is equivalent to a pointer grab on the window with owner_events
set to True
.
If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the GdkEventGrabBroken events that are emitted when the grab ends unvoluntarily.
:: TimeStamp |
|
-> IO () |
Ungrabs the pointer on the default display, if it is grabbed by this application.
pointerIsGrabbed :: IO Bool Source
Returns True
if the pointer on the default display is currently grabbed
by this application.
Note that this does not take the inmplicit pointer grab on button presses into account.
:: DrawWindowClass window | |
=> window |
|
-> Bool |
|
-> TimeStamp |
|
-> IO GrabStatus |
|
Grabs the keyboard so that all events are passed to this application until
the keyboard is ungrabbed with keyboardUngrab
. This overrides any previous
keyboard grab by this client.
If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the GdkEventGrabBroken events that are emitted when the grab ends unvoluntarily.
:: TimeStamp |
|
-> IO () |
Ungrabs the keyboard on the default display, if it is grabbed by this application.