Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Methods
- addOptionEntriesLibgtkOnly
- beep
- cairoCreate
- cairoDrawFromGl
- cairoGetClipRectangle
- cairoGetDrawingContext
- cairoRectangle
- cairoRegion
- cairoRegionCreateFromSurface
- cairoSetSourceColor
- cairoSetSourcePixbuf
- cairoSetSourceRgba
- cairoSetSourceWindow
- cairoSurfaceCreateFromPixbuf
- disableMultidevice
- dragAbort
- dragBegin
- dragBeginForDevice
- dragBeginFromPoint
- dragDrop
- dragDropDone
- dragDropSucceeded
- dragFindWindowForScreen
- dragGetSelection
- dragMotion
- dragStatus
- dropFinish
- dropReply
- errorTrapPop
- errorTrapPopIgnored
- errorTrapPush
- eventsGetAngle
- eventsGetCenter
- eventsGetDistance
- eventsPending
- flush
- getDefaultRootWindow
- getDisplay
- getDisplayArgName
- getProgramClass
- getShowEvents
- init
- initCheck
- keyboardGrab
- keyboardUngrab
- keyvalConvertCase
- keyvalFromName
- keyvalIsLower
- keyvalIsUpper
- keyvalName
- keyvalToLower
- keyvalToUnicode
- keyvalToUpper
- listVisuals
- notifyStartupComplete
- notifyStartupCompleteWithId
- offscreenWindowGetEmbedder
- offscreenWindowGetSurface
- offscreenWindowSetEmbedder
- pangoContextGet
- pangoContextGetForDisplay
- pangoContextGetForScreen
- parseArgs
- pixbufGetFromSurface
- pixbufGetFromWindow
- pointerGrab
- pointerIsGrabbed
- pointerUngrab
- preParseLibgtkOnly
- propertyDelete
- queryDepths
- queryVisualTypes
- selectionConvert
- selectionOwnerGet
- selectionOwnerGetForDisplay
- selectionOwnerSet
- selectionOwnerSetForDisplay
- selectionSendNotify
- selectionSendNotifyForDisplay
- setAllowedBackends
- setDoubleClickTime
- setProgramClass
- setShowEvents
- settingGet
- synthesizeWindowState
- testRenderSync
- testSimulateButton
- testSimulateKey
- textPropertyToUtf8ListForDisplay
- threadsAddIdle
- threadsAddTimeout
- threadsAddTimeoutSeconds
- threadsEnter
- threadsInit
- threadsLeave
- unicodeToKeyval
- utf8ToStringTarget
Synopsis
- addOptionEntriesLibgtkOnly :: (HasCallStack, MonadIO m) => OptionGroup -> m ()
- beep :: (HasCallStack, MonadIO m) => m ()
- cairoCreate :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Context
- cairoDrawFromGl :: (HasCallStack, MonadIO m, IsWindow a) => Context -> a -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
- cairoGetClipRectangle :: (HasCallStack, MonadIO m) => Context -> m (Bool, Rectangle)
- cairoGetDrawingContext :: (HasCallStack, MonadIO m) => Context -> m (Maybe DrawingContext)
- cairoRectangle :: (HasCallStack, MonadIO m) => Context -> Rectangle -> m ()
- cairoRegion :: (HasCallStack, MonadIO m) => Context -> Region -> m ()
- cairoRegionCreateFromSurface :: (HasCallStack, MonadIO m) => Surface -> m Region
- cairoSetSourceColor :: (HasCallStack, MonadIO m) => Context -> Color -> m ()
- cairoSetSourcePixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => Context -> a -> Double -> Double -> m ()
- cairoSetSourceRgba :: (HasCallStack, MonadIO m) => Context -> RGBA -> m ()
- cairoSetSourceWindow :: (HasCallStack, MonadIO m, IsWindow a) => Context -> a -> Double -> Double -> m ()
- cairoSurfaceCreateFromPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a, IsWindow b) => a -> Int32 -> Maybe b -> m Surface
- disableMultidevice :: (HasCallStack, MonadIO m) => m ()
- dragAbort :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Word32 -> m ()
- dragBegin :: (HasCallStack, MonadIO m, IsWindow a) => a -> [Atom] -> m DragContext
- dragBeginForDevice :: (HasCallStack, MonadIO m, IsWindow a, IsDevice b) => a -> b -> [Atom] -> m DragContext
- dragBeginFromPoint :: (HasCallStack, MonadIO m, IsWindow a, IsDevice b) => a -> b -> [Atom] -> Int32 -> Int32 -> m DragContext
- dragDrop :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Word32 -> m ()
- dragDropDone :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Bool -> m ()
- dragDropSucceeded :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Bool
- dragFindWindowForScreen :: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b, IsScreen c) => a -> b -> c -> Int32 -> Int32 -> m (Window, DragProtocol)
- dragGetSelection :: (HasCallStack, MonadIO m, IsDragContext a) => a -> m Atom
- dragMotion :: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) => a -> b -> DragProtocol -> Int32 -> Int32 -> [DragAction] -> [DragAction] -> Word32 -> m Bool
- dragStatus :: (HasCallStack, MonadIO m, IsDragContext a) => a -> [DragAction] -> Word32 -> m ()
- dropFinish :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Bool -> Word32 -> m ()
- dropReply :: (HasCallStack, MonadIO m, IsDragContext a) => a -> Bool -> Word32 -> m ()
- errorTrapPop :: (HasCallStack, MonadIO m) => m Int32
- errorTrapPopIgnored :: (HasCallStack, MonadIO m) => m ()
- errorTrapPush :: (HasCallStack, MonadIO m) => m ()
- eventsGetAngle :: (HasCallStack, MonadIO m) => Event -> Event -> m (Bool, Double)
- eventsGetCenter :: (HasCallStack, MonadIO m) => Event -> Event -> m (Bool, Double, Double)
- eventsGetDistance :: (HasCallStack, MonadIO m) => Event -> Event -> m (Bool, Double)
- eventsPending :: (HasCallStack, MonadIO m) => m Bool
- flush :: (HasCallStack, MonadIO m) => m ()
- getDefaultRootWindow :: (HasCallStack, MonadIO m) => m Window
- getDisplay :: (HasCallStack, MonadIO m) => m Text
- getDisplayArgName :: (HasCallStack, MonadIO m) => m (Maybe Text)
- getProgramClass :: (HasCallStack, MonadIO m) => m Text
- getShowEvents :: (HasCallStack, MonadIO m) => m Bool
- init :: (HasCallStack, MonadIO m) => [Text] -> m [Text]
- initCheck :: (HasCallStack, MonadIO m) => [Text] -> m (Bool, [Text])
- keyboardGrab :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> Word32 -> m GrabStatus
- keyboardUngrab :: (HasCallStack, MonadIO m) => Word32 -> m ()
- keyvalConvertCase :: (HasCallStack, MonadIO m) => Word32 -> m (Word32, Word32)
- keyvalFromName :: (HasCallStack, MonadIO m) => Text -> m Word32
- keyvalIsLower :: (HasCallStack, MonadIO m) => Word32 -> m Bool
- keyvalIsUpper :: (HasCallStack, MonadIO m) => Word32 -> m Bool
- keyvalName :: (HasCallStack, MonadIO m) => Word32 -> m (Maybe Text)
- keyvalToLower :: (HasCallStack, MonadIO m) => Word32 -> m Word32
- keyvalToUnicode :: (HasCallStack, MonadIO m) => Word32 -> m Word32
- keyvalToUpper :: (HasCallStack, MonadIO m) => Word32 -> m Word32
- listVisuals :: (HasCallStack, MonadIO m) => m [Visual]
- notifyStartupComplete :: (HasCallStack, MonadIO m) => m ()
- notifyStartupCompleteWithId :: (HasCallStack, MonadIO m) => Text -> m ()
- offscreenWindowGetEmbedder :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Window)
- offscreenWindowGetSurface :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Surface)
- offscreenWindowSetEmbedder :: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) => a -> b -> m ()
- pangoContextGet :: (HasCallStack, MonadIO m) => m Context
- pangoContextGetForDisplay :: (HasCallStack, MonadIO m, IsDisplay a) => a -> m Context
- pangoContextGetForScreen :: (HasCallStack, MonadIO m, IsScreen a) => a -> m Context
- parseArgs :: (HasCallStack, MonadIO m) => [Text] -> m [Text]
- pixbufGetFromSurface :: (HasCallStack, MonadIO m) => Surface -> Int32 -> Int32 -> Int32 -> Int32 -> m (Maybe Pixbuf)
- pixbufGetFromWindow :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> m (Maybe Pixbuf)
- pointerGrab :: (HasCallStack, MonadIO m, IsWindow a, IsWindow b, IsCursor c) => a -> Bool -> [EventMask] -> Maybe b -> Maybe c -> Word32 -> m GrabStatus
- pointerIsGrabbed :: (HasCallStack, MonadIO m) => m Bool
- pointerUngrab :: (HasCallStack, MonadIO m) => Word32 -> m ()
- preParseLibgtkOnly :: (HasCallStack, MonadIO m) => m ()
- propertyDelete :: (HasCallStack, MonadIO m, IsWindow a) => a -> Atom -> m ()
- queryDepths :: (HasCallStack, MonadIO m) => m [Int32]
- queryVisualTypes :: (HasCallStack, MonadIO m) => m [VisualType]
- selectionConvert :: (HasCallStack, MonadIO m, IsWindow a) => a -> Atom -> Atom -> Word32 -> m ()
- selectionOwnerGet :: (HasCallStack, MonadIO m) => Atom -> m (Maybe Window)
- selectionOwnerGetForDisplay :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Atom -> m (Maybe Window)
- selectionOwnerSet :: (HasCallStack, MonadIO m, IsWindow a) => Maybe a -> Atom -> Word32 -> Bool -> m Bool
- selectionOwnerSetForDisplay :: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) => a -> Maybe b -> Atom -> Word32 -> Bool -> m Bool
- selectionSendNotify :: (HasCallStack, MonadIO m, IsWindow a) => a -> Atom -> Atom -> Atom -> Word32 -> m ()
- selectionSendNotifyForDisplay :: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) => a -> b -> Atom -> Atom -> Atom -> Word32 -> m ()
- setAllowedBackends :: (HasCallStack, MonadIO m) => Text -> m ()
- setDoubleClickTime :: (HasCallStack, MonadIO m) => Word32 -> m ()
- setProgramClass :: (HasCallStack, MonadIO m) => Text -> m ()
- setShowEvents :: (HasCallStack, MonadIO m) => Bool -> m ()
- settingGet :: (HasCallStack, MonadIO m) => Text -> GValue -> m Bool
- synthesizeWindowState :: (HasCallStack, MonadIO m, IsWindow a) => a -> [WindowState] -> [WindowState] -> m ()
- testRenderSync :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- testSimulateButton :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> Word32 -> [ModifierType] -> EventType -> m Bool
- testSimulateKey :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> Word32 -> [ModifierType] -> EventType -> m Bool
- textPropertyToUtf8ListForDisplay :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Atom -> Int32 -> ByteString -> m (Int32, [Text])
- threadsAddIdle :: (HasCallStack, MonadIO m) => Int32 -> SourceFunc -> m Word32
- threadsAddTimeout :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32
- threadsAddTimeoutSeconds :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32
- threadsEnter :: (HasCallStack, MonadIO m) => m ()
- threadsInit :: (HasCallStack, MonadIO m) => m ()
- threadsLeave :: (HasCallStack, MonadIO m) => m ()
- unicodeToKeyval :: (HasCallStack, MonadIO m) => Word32 -> m Word32
- utf8ToStringTarget :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)
Methods
addOptionEntriesLibgtkOnly
addOptionEntriesLibgtkOnly Source #
:: (HasCallStack, MonadIO m) | |
=> OptionGroup |
|
-> m () |
Deprecated: (Since version 3.16)This symbol was never meant to be used outside of GTK+
Appends gdk option entries to the passed in option group. This is not public API and must not be used by applications.
beep
cairoCreate
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Context | Returns: A newly created Cairo context. Free with
|
Deprecated: (Since version 3.22)Use windowBeginDrawFrame
and drawingContextGetCairoContext
instead
Creates a Cairo context for drawing to window
.
Note that calling cairo_reset_clip()
on the resulting Context
will
produce undefined results, so avoid it at all costs.
Typically, this function is used to draw on a Window
out of the paint
cycle of the toolkit; this should be avoided, as it breaks various assumptions
and optimizations.
If you are drawing on a native Window
in response to a EventTypeExpose
event
you should use windowBeginDrawFrame
and drawingContextGetCairoContext
instead. GTK will automatically do this for you when drawing a widget.
Since: 2.8
cairoDrawFromGl
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> Context |
|
-> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
This is the main way to draw GL content in GTK+. It takes a render buffer ID
(sourceType
== GL_RENDERBUFFER
) or a texture id (sourceType
== GL_TEXTURE
)
and draws it onto cr
with an OVER operation, respecting the current clip.
The top left corner of the rectangle specified by x
, y
, width
and height
will be drawn at the current (0,0) position of the cairo_t.
This will work for *all* cairo_t, as long as window
is realized, but the
fallback implementation that reads back the pixels from the buffer may be
used in the general case. In the case of direct drawing to a window with
no special effects applied to cr
it will however use a more efficient
approach.
For GL_RENDERBUFFER
the code will always fall back to software for buffers
with alpha components, so make sure you use GL_TEXTURE
if using alpha.
Calling this may change the current GL context.
Since: 3.16
cairoGetClipRectangle
cairoGetClipRectangle Source #
:: (HasCallStack, MonadIO m) | |
=> Context |
|
-> m (Bool, Rectangle) | Returns: |
This is a convenience function around cairo_clip_extents()
.
It rounds the clip extents to integer coordinates and returns
a boolean indicating if a clip area exists.
cairoGetDrawingContext
cairoGetDrawingContext Source #
:: (HasCallStack, MonadIO m) | |
=> Context |
|
-> m (Maybe DrawingContext) | Returns: a |
Retrieves the DrawingContext
that created the Cairo
context cr
.
Since: 3.22
cairoRectangle
Adds the given rectangle to the current path of cr
.
Since: 2.8
cairoRegion
Adds the given region to the current path of cr
.
Since: 2.8
cairoRegionCreateFromSurface
cairoRegionCreateFromSurface Source #
:: (HasCallStack, MonadIO m) | |
=> Surface |
|
-> m Region | Returns: A |
Creates region that describes covers the area where the given
surface
is more than 50% opaque.
This function takes into account device offsets that might be
set with cairo_surface_set_device_offset()
.
cairoSetSourceColor
Deprecated: (Since version 3.4)Use cairoSetSourceRgba
instead
Sets the specified Color
as the source color of cr
.
Since: 2.8
cairoSetSourcePixbuf
:: (HasCallStack, MonadIO m, IsPixbuf a) | |
=> Context |
|
-> a |
|
-> Double |
|
-> Double |
|
-> m () |
Sets the given pixbuf as the source pattern for cr
.
The pattern has an extend mode of ExtendNone
and is aligned
so that the origin of pixbuf
is pixbufX
, pixbufY
.
Since: 2.8
cairoSetSourceRgba
Sets the specified RGBA
as the source color of cr
.
Since: 3.0
cairoSetSourceWindow
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> Context |
|
-> a |
|
-> Double |
|
-> Double |
|
-> m () |
Sets the given window as the source pattern for cr
.
The pattern has an extend mode of ExtendNone
and is aligned
so that the origin of window
is x
, y
. The window contains all its
subwindows when rendering.
Note that the contents of window
are undefined outside of the
visible part of window
, so use this function with care.
Since: 2.24
cairoSurfaceCreateFromPixbuf
cairoSurfaceCreateFromPixbuf Source #
:: (HasCallStack, MonadIO m, IsPixbuf a, IsWindow b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> m Surface | Returns: a new cairo surface, must be freed with |
Creates an image surface with the same contents as the pixbuf.
Since: 3.10
disableMultidevice
disableMultidevice :: (HasCallStack, MonadIO m) => m () Source #
Disables multidevice support in GDK. This call must happen prior
to displayOpen
, gtk_init()
, gtk_init_with_args()
or
gtk_init_check()
in order to take effect.
Most common GTK+ applications won’t ever need to call this. Only applications that do mixed GDK/Xlib calls could want to disable multidevice support if such Xlib code deals with input devices in any way and doesn’t observe the presence of XInput 2.
Since: 3.0
dragAbort
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Word32 |
|
-> m () |
Aborts a drag without dropping.
This function is called by the drag source.
This function does not need to be called in managed drag and drop
operations. See dragContextManageDnd
for more information.
dragBegin
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> [Atom] |
|
-> m DragContext | Returns: a newly created |
Starts a drag and creates a new drag context for it.
This function assumes that the drag is controlled by the
client pointer device, use dragBeginForDevice
to
begin a drag with a different device.
This function is called by the drag source.
dragBeginForDevice
:: (HasCallStack, MonadIO m, IsWindow a, IsDevice b) | |
=> a |
|
-> b |
|
-> [Atom] |
|
-> m DragContext | Returns: a newly created |
Starts a drag and creates a new drag context for it.
This function is called by the drag source.
dragBeginFromPoint
:: (HasCallStack, MonadIO m, IsWindow a, IsDevice b) | |
=> a |
|
-> b |
|
-> [Atom] |
|
-> Int32 |
|
-> Int32 |
|
-> m DragContext | Returns: a newly created |
Starts a drag and creates a new drag context for it.
This function is called by the drag source.
Since: 3.20
dragDrop
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Word32 |
|
-> m () |
Drops on the current destination.
This function is called by the drag source.
This function does not need to be called in managed drag and drop
operations. See dragContextManageDnd
for more information.
dragDropDone
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Bool |
|
-> m () |
Inform GDK if the drop ended successfully. Passing False
for success
may trigger a drag cancellation animation.
This function is called by the drag source, and should
be the last call before dropping the reference to the
context
.
The DragContext
will only take the first dragDropDone
call as effective, if this function is called multiple times,
all subsequent calls will be ignored.
Since: 3.20
dragDropSucceeded
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the dropped data has been successfully
transferred. This function is intended to be used while
handling a EventTypeDropFinished
event, its return value is
meaningless at other times.
Since: 2.6
dragFindWindowForScreen
dragFindWindowForScreen Source #
:: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b, IsScreen c) | |
=> a |
|
-> b |
|
-> c |
|
-> Int32 |
|
-> Int32 |
|
-> m (Window, DragProtocol) |
Finds the destination window and DND protocol to use at the given pointer position.
This function is called by the drag source to obtain the
destWindow
and protocol
parameters for dragMotion
.
Since: 2.2
dragGetSelection
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> m Atom | Returns: the selection atom, or |
Returns the selection atom for the current source window.
dragMotion
:: (HasCallStack, MonadIO m, IsDragContext a, IsWindow b) | |
=> a |
|
-> b |
|
-> DragProtocol |
|
-> Int32 |
|
-> Int32 |
|
-> [DragAction] |
|
-> [DragAction] |
|
-> Word32 |
|
-> m Bool |
Updates the drag context when the pointer moves or the set of actions changes.
This function is called by the drag source.
This function does not need to be called in managed drag and drop
operations. See dragContextManageDnd
for more information.
dragStatus
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> [DragAction] |
|
-> Word32 |
|
-> m () |
Selects one of the actions offered by the drag source.
This function is called by the drag destination in response to
dragMotion
called by the drag source.
dropFinish
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Bool |
|
-> Word32 |
|
-> m () |
Ends the drag operation after a drop.
This function is called by the drag destination.
dropReply
:: (HasCallStack, MonadIO m, IsDragContext a) | |
=> a |
|
-> Bool |
|
-> Word32 |
|
-> m () |
Accepts or rejects a drop.
This function is called by the drag destination in response to a drop initiated by the drag source.
errorTrapPop
:: (HasCallStack, MonadIO m) | |
=> m Int32 | Returns: X error code or 0 on success |
Removes an error trap pushed with errorTrapPush
.
May block until an error has been definitively received
or not received from the X server. errorTrapPopIgnored
is preferred if you don’t need to know whether an error
occurred, because it never has to block. If you don't
need the return value of errorTrapPop
, use
errorTrapPopIgnored
.
Prior to GDK 3.0, this function would not automatically
sync for you, so you had to flush
if your last
call to Xlib was not a blocking round trip.
errorTrapPopIgnored
errorTrapPopIgnored :: (HasCallStack, MonadIO m) => m () Source #
Removes an error trap pushed with errorTrapPush
, but
without bothering to wait and see whether an error occurred. If an
error arrives later asynchronously that was triggered while the
trap was pushed, that error will be ignored.
Since: 3.0
errorTrapPush
errorTrapPush :: (HasCallStack, MonadIO m) => m () Source #
This function allows X errors to be trapped instead of the normal
behavior of exiting the application. It should only be used if it
is not possible to avoid the X error in any other way. Errors are
ignored on all Display
currently known to the
DisplayManager
. If you don’t care which error happens and just
want to ignore everything, pop with errorTrapPopIgnored
.
If you need the error code, use errorTrapPop
which may have
to block and wait for the error to arrive from the X server.
This API exists on all platforms but only does anything on X.
You can use gdk_x11_display_error_trap_push()
to ignore errors
on only a single display.
Trapping an X error
C code
gdk_error_trap_push (); // ... Call the X function which may cause an error here ... if (gdk_error_trap_pop ()) { // ... Handle the error here ... }
eventsGetAngle
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> Event |
|
-> m (Bool, Double) | Returns: |
If both events contain X/Y information, this function will return True
and return in angle
the relative angle from event1
to event2
. The rotation
direction for positive angles is from the positive X axis towards the positive
Y axis.
Since: 3.0
eventsGetCenter
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> Event |
|
-> m (Bool, Double, Double) | Returns: |
If both events contain X/Y information, the center of both coordinates
will be returned in x
and y
.
Since: 3.0
eventsGetDistance
:: (HasCallStack, MonadIO m) | |
=> Event |
|
-> Event |
|
-> m (Bool, Double) | Returns: |
If both events have X/Y information, the distance between both coordinates
(as in a straight line going from event1
to event2
) will be returned.
Since: 3.0
eventsPending
:: (HasCallStack, MonadIO m) | |
=> m Bool | Returns: |
Checks if any events are ready to be processed for any display.
flush
flush :: (HasCallStack, MonadIO m) => m () Source #
Flushes the output buffers of all display connections and waits until all requests have been processed. This is rarely needed by applications.
getDefaultRootWindow
Obtains the root window (parent all other windows are inside) for the default display and screen.
getDisplay
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: the name of the display. |
Deprecated: (Since version 3.8)Call gdk_display_get_name (gdk_display_get_default ())) instead.
Gets the name of the display, which usually comes from the
DISPLAY
environment variable or the
--display
command line option.
getDisplayArgName
:: (HasCallStack, MonadIO m) | |
=> m (Maybe Text) | Returns: the display name, if specified explicitly,
otherwise |
getProgramClass
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: the program class. |
Gets the program class. Unless the program class has explicitly
been set with setProgramClass
or with the --class
commandline option, the default value is the program name (determined
with getPrgname
) with the first character converted to uppercase.
getShowEvents
:: (HasCallStack, MonadIO m) | |
=> m Bool | Returns: |
Gets whether event debugging output is enabled.
init
:: (HasCallStack, MonadIO m) | |
=> [Text] |
|
-> m [Text] |
Initializes the GDK library and connects to the windowing system.
If initialization fails, a warning message is output and the application
terminates with a call to exit(1)
.
Any arguments used by GDK are removed from the array and argc
and argv
are updated accordingly.
GTK+ initializes GDK in gtk_init()
and so this function is not usually
needed by GTK+ applications.
initCheck
:: (HasCallStack, MonadIO m) | |
=> [Text] |
|
-> m (Bool, [Text]) | Returns: |
Initializes the GDK library and connects to the windowing system,
returning True
on success.
Any arguments used by GDK are removed from the array and argc
and argv
are updated accordingly.
GTK+ initializes GDK in gtk_init()
and so this function is not usually
needed by GTK+ applications.
keyboardGrab
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> Word32 |
|
-> m GrabStatus | Returns: |
Deprecated: (Since version 3.0)Use deviceGrab
instead.
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 EventGrabBroken
events that
are emitted when the grab ends unvoluntarily.
keyboardUngrab
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m () |
Deprecated: (Since version 3.0)Use deviceUngrab
, together with deviceGrab
instead.
Ungrabs the keyboard on the default display, if it is grabbed by this application.
keyvalConvertCase
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m (Word32, Word32) |
keyvalFromName
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Word32 | Returns: the corresponding key value, or |
Converts a key name to a key value.
The names are the same as those in the
gdk/gdkkeysyms.h
header file
but without the leading “GDK_KEY_”.
keyvalIsLower
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Bool | Returns: |
Returns True
if the given key value is in lower case.
keyvalIsUpper
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Bool | Returns: |
Returns True
if the given key value is in upper case.
keyvalName
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m (Maybe Text) | Returns: a string containing the name
of the key, or |
Converts a key value into a symbolic name.
The names are the same as those in the
gdk/gdkkeysyms.h
header file
but without the leading “GDK_KEY_”.
keyvalToLower
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Word32 | Returns: the lower case form of |
Converts a key value to lower case, if applicable.
keyvalToUnicode
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Word32 | Returns: the corresponding unicode character, or 0 if there is no corresponding character. |
Convert from a GDK key symbol to the corresponding ISO10646 (Unicode) character.
keyvalToUpper
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Word32 | Returns: the upper case form of |
Converts a key value to upper case, if applicable.
listVisuals
:: (HasCallStack, MonadIO m) | |
=> m [Visual] | Returns: a list of visuals; the list must be freed, but not its contents |
Deprecated: (Since version 3.22)Use gdk_screen_list_visuals (gdk_screen_get_default ()).
Lists the available visuals for the default screen.
(See screenListVisuals
)
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.
notifyStartupComplete
notifyStartupComplete :: (HasCallStack, MonadIO m) => m () Source #
Indicates to the GUI environment that the application has finished loading. If the applications opens windows, this function is normally called after opening the application’s initial set of windows.
GTK+ will call this function automatically after opening the first
GtkWindow
unless gtk_window_set_auto_startup_notification()
is called
to disable that feature.
Since: 2.2
notifyStartupCompleteWithId
notifyStartupCompleteWithId Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Indicates to the GUI environment that the application has finished loading, using a given identifier.
GTK+ will call this function automatically for GtkWindow
with custom startup-notification identifier unless
gtk_window_set_auto_startup_notification()
is called to
disable that feature.
Since: 2.12
offscreenWindowGetEmbedder
offscreenWindowGetEmbedder Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Window) | Returns: the embedding |
Gets the window that window
is embedded in.
Since: 2.18
offscreenWindowGetSurface
offscreenWindowGetSurface Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Surface) | Returns: The offscreen surface, or
|
Gets the offscreen surface that an offscreen window renders into. If you need to keep this around over window resizes, you need to add a reference to it.
offscreenWindowSetEmbedder
offscreenWindowSetEmbedder Source #
:: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) | |
=> a |
|
-> b |
|
-> m () |
Sets window
to be embedded in embedder
.
To fully embed an offscreen window, in addition to calling this
function, it is also necessary to handle the pickEmbeddedChild
signal on the embedder
and the toEmbedder and
fromEmbedder signals on window
.
Since: 2.18
pangoContextGet
Creates a Context
for the default GDK screen.
The context must be freed when you’re finished with it.
When using GTK+, normally you should use gtk_widget_get_pango_context()
instead of this function, to get the appropriate context for
the widget you intend to render text onto.
The newly created context will have the default font options (see
FontOptions
) for the default screen; if these options
change it will not be updated. Using gtk_widget_get_pango_context()
is more convenient if you want to keep a context around and track
changes to the screen’s font rendering settings.
pangoContextGetForDisplay
pangoContextGetForDisplay Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> m Context | Returns: a new |
Creates a Context
for display
.
The context must be freed when you’re finished with it.
When using GTK+, normally you should use gtk_widget_get_pango_context()
instead of this function, to get the appropriate context for
the widget you intend to render text onto.
The newly created context will have the default font options
(see FontOptions
) for the display; if these options
change it will not be updated. Using gtk_widget_get_pango_context()
is more convenient if you want to keep a context around and track
changes to the font rendering settings.
Since: 3.22
pangoContextGetForScreen
pangoContextGetForScreen Source #
:: (HasCallStack, MonadIO m, IsScreen a) | |
=> a |
|
-> m Context | Returns: a new |
Creates a Context
for screen
.
The context must be freed when you’re finished with it.
When using GTK+, normally you should use gtk_widget_get_pango_context()
instead of this function, to get the appropriate context for
the widget you intend to render text onto.
The newly created context will have the default font options
(see FontOptions
) for the screen; if these options
change it will not be updated. Using gtk_widget_get_pango_context()
is more convenient if you want to keep a context around and track
changes to the screen’s font rendering settings.
Since: 2.2
parseArgs
:: (HasCallStack, MonadIO m) | |
=> [Text] |
|
-> m [Text] |
Parse command line arguments, and store for future
use by calls to displayOpen
.
Any arguments used by GDK are removed from the array and argc
and argv
are
updated accordingly.
You shouldn’t call this function explicitly if you are using
gtk_init()
, gtk_init_check()
, init
, or initCheck
.
Since: 2.2
pixbufGetFromSurface
:: (HasCallStack, MonadIO m) | |
=> Surface |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m (Maybe Pixbuf) | Returns: A newly-created pixbuf with a
reference count of 1, or |
Transfers image data from a Surface
and converts it to an RGB(A)
representation inside a Pixbuf
. This allows you to efficiently read
individual pixels from cairo surfaces. For GdkWindows
, use
pixbufGetFromWindow
instead.
This function will create an RGB pixbuf with 8 bits per channel.
The pixbuf will contain an alpha channel if the surface
contains one.
pixbufGetFromWindow
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m (Maybe Pixbuf) | Returns: A newly-created pixbuf with a
reference count of 1, or |
Transfers image data from a Window
and converts it to an RGB(A)
representation inside a Pixbuf
. In other words, copies
image data from a server-side drawable to a client-side RGB(A) buffer.
This allows you to efficiently read individual pixels on the client side.
This function will create an RGB pixbuf with 8 bits per channel with
the size specified by the width
and height
arguments scaled by the
scale factor of window
. The pixbuf will contain an alpha channel if
the window
contains one.
If the window is off the screen, then there is no image data in the obscured/offscreen regions to be placed in the pixbuf. The contents of portions of the pixbuf corresponding to the offscreen region are undefined.
If the window you’re obtaining data from is partially obscured by other windows, then the contents of the pixbuf areas corresponding to the obscured regions are undefined.
If the window is not mapped (typically because it’s iconified/minimized
or not on the current workspace), then Nothing
will be returned.
If memory can’t be allocated for the return value, Nothing
will be returned
instead.
(In short, there are several ways this function can fail, and if it fails
it returns Nothing
; so check the return value.)
pointerGrab
:: (HasCallStack, MonadIO m, IsWindow a, IsWindow b, IsCursor c) | |
=> a |
|
-> Bool |
|
-> [EventMask] |
|
-> Maybe b |
|
-> Maybe c |
|
-> Word32 |
|
-> m GrabStatus | Returns: |
Deprecated: (Since version 3.0)Use deviceGrab
instead.
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.
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 ownerEvents
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 EventGrabBroken
events that
are emitted when the grab ends unvoluntarily.
pointerIsGrabbed
:: (HasCallStack, MonadIO m) | |
=> m Bool | Returns: |
Deprecated: (Since version 3.0)Use displayDeviceIsGrabbed
instead.
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.
pointerUngrab
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m () |
Deprecated: (Since version 3.0)Use deviceUngrab
, together with deviceGrab
instead.
Ungrabs the pointer on the default display, if it is grabbed by this application.
preParseLibgtkOnly
preParseLibgtkOnly :: (HasCallStack, MonadIO m) => m () Source #
Deprecated: (Since version 3.16)This symbol was never meant to be used outside of GTK+
Prepare for parsing command line arguments for GDK. This is not public API and should not be used in application code.
propertyDelete
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Atom |
|
-> m () |
Deletes a property from a window.
queryDepths
queryDepths :: (HasCallStack, MonadIO m) => m [Int32] Source #
Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual
and screenGetRgbaVisual
This function returns the available bit depths for the default
screen. It’s equivalent to listing the visuals
(listVisuals
) and then looking at the depth field in each
visual, removing duplicates.
The array returned by this function should not be freed.
queryVisualTypes
queryVisualTypes :: (HasCallStack, MonadIO m) => m [VisualType] Source #
Deprecated: (Since version 3.22)Visual selection should be done using screenGetSystemVisual
and screenGetRgbaVisual
This function returns the available visual types for the default
screen. It’s equivalent to listing the visuals
(listVisuals
) and then looking at the type field in each
visual, removing duplicates.
The array returned by this function should not be freed.
selectionConvert
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Atom |
|
-> Atom |
|
-> Word32 |
|
-> m () |
Retrieves the contents of a selection in a given form.
selectionOwnerGet
:: (HasCallStack, MonadIO m) | |
=> Atom |
|
-> m (Maybe Window) | Returns: if there is a selection owner
for this window, and it is a window known to the current process,
the |
Determines the owner of the given selection.
selectionOwnerGetForDisplay
selectionOwnerGetForDisplay Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Atom |
|
-> m (Maybe Window) | Returns: if there is a selection owner
for this window, and it is a window known to the current
process, the |
Determine the owner of the given selection.
Note that the return value may be owned by a different process if a foreign window was previously created for that window, but a new foreign window will never be created by this call.
Since: 2.2
selectionOwnerSet
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> Maybe a |
|
-> Atom |
|
-> Word32 |
|
-> Bool |
|
-> m Bool | Returns: |
Sets the owner of the given selection.
selectionOwnerSetForDisplay
selectionOwnerSetForDisplay Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) | |
=> a |
|
-> Maybe b |
|
-> Atom |
|
-> Word32 |
|
-> Bool |
|
-> m Bool | Returns: |
Sets the Window
owner
as the current owner of the selection selection
.
Since: 2.2
selectionSendNotify
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Atom |
|
-> Atom |
|
-> Atom |
|
-> Word32 |
|
-> m () |
Sends a response to SelectionRequest event.
selectionSendNotifyForDisplay
selectionSendNotifyForDisplay Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsWindow b) | |
=> a |
|
-> b |
|
-> Atom |
|
-> Atom |
|
-> Atom |
|
-> Word32 |
|
-> m () |
Send a response to SelectionRequest event.
Since: 2.2
setAllowedBackends
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Sets a list of backends that GDK should try to use.
This can be be useful if your application does not work with certain GDK backends.
By default, GDK tries all included backends.
For example,
C code
gdk_set_allowed_backends ("wayland,quartz,*");
instructs GDK to try the Wayland backend first, followed by the Quartz backend, and then all others.
If the GDK_BACKEND
environment variable
is set, it determines what backends are tried in what
order, while still respecting the set of allowed backends
that are specified by this function.
The possible backend names are x11, win32, quartz, broadway, wayland. You can also include a * in the list to try all remaining backends.
This call must happen prior to displayOpen
,
gtk_init()
, gtk_init_with_args()
or gtk_init_check()
in order to take effect.
Since: 3.10
setDoubleClickTime
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m () |
Set the double click time for the default display. See
displaySetDoubleClickTime
.
See also displaySetDoubleClickDistance
.
Applications should not set this, it is a
global user-configured setting.
setProgramClass
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Sets the program class. The X11 backend uses the program class to set
the class name part of the WM_CLASS
property on
toplevel windows; see the ICCCM.
The program class can still be overridden with the --class command line option.
setShowEvents
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the --enable-debug
option)
to use this option.
settingGet
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> GValue |
|
-> m Bool | Returns: |
Obtains a desktop-wide setting, such as the double-click time,
for the default screen. See screenGetSetting
.
synthesizeWindowState
synthesizeWindowState :: (HasCallStack, MonadIO m, IsWindow a) => a -> [WindowState] -> [WindowState] -> m () Source #
No description available in the introspection data.
testRenderSync
Retrieves a pixel from window
to force the windowing
system to carry out any pending rendering commands.
This function is intended to be used to synchronize with rendering pipelines, to benchmark windowing system rendering operations.
Since: 2.14
testSimulateButton
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Word32 |
|
-> [ModifierType] |
|
-> EventType |
|
-> m Bool | Returns: whether all actions necessary for a button event simulation were carried out successfully |
This function is intended to be used in GTK+ test programs.
It will warp the mouse pointer to the given (x
,y
) coordinates
within window
and simulate a button press or release event.
Because the mouse pointer needs to be warped to the target
location, use of this function outside of test programs that
run in their own virtual windowing system (e.g. Xvfb) is not
recommended.
Also, testSimulateButton
is a fairly low level function,
for most testing purposes, gtk_test_widget_click()
is the right
function to call which will generate a button press event followed
by its accompanying button release event.
Since: 2.14
testSimulateKey
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Word32 |
|
-> [ModifierType] |
|
-> EventType |
|
-> m Bool | Returns: whether all actions necessary for a key event simulation were carried out successfully |
This function is intended to be used in GTK+ test programs.
If (x
,y
) are > (-1,-1), it will warp the mouse pointer to
the given (x
,y
) coordinates within window
and simulate a
key press or release event.
When the mouse pointer is warped to the target location, use
of this function outside of test programs that run in their
own virtual windowing system (e.g. Xvfb) is not recommended.
If (x
,y
) are passed as (-1,-1), the mouse pointer will not
be warped and window
origin will be used as mouse pointer
location for the event.
Also, testSimulateKey
is a fairly low level function,
for most testing purposes, gtk_test_widget_send_key()
is the
right function to call which will generate a key press event
followed by its accompanying key release event.
Since: 2.14
textPropertyToUtf8ListForDisplay
textPropertyToUtf8ListForDisplay Source #
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Atom |
|
-> Int32 |
|
-> ByteString |
|
-> m (Int32, [Text]) | Returns: the number of strings in the resulting list |
Converts a text property in the given encoding to a list of UTF-8 strings.
Since: 2.2
threadsAddIdle
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> SourceFunc |
|
-> m Word32 | Returns: the ID (greater than 0) of the event source. |
Adds a function to be called whenever there are no higher priority
events pending. If the function returns False
it is automatically
removed from the list of event sources and will not be called again.
This variant of idleAdd
calls function
with the GDK lock
held. It can be thought of a MT-safe version for GTK+ widgets for the
following use case, where you have to worry about idle_callback()
running in thread A and accessing self
after it has been finalized
in thread B:
C code
static gboolean idle_callback (gpointer data) { // gdk_threads_enter(); would be needed for g_idle_add() SomeWidget *self = data; // do stuff with self self->idle_id = 0; // gdk_threads_leave(); would be needed for g_idle_add() return FALSE; } static void some_widget_do_stuff_later (SomeWidget *self) { self->idle_id = gdk_threads_add_idle (idle_callback, self) // using g_idle_add() here would require thread protection in the callback } static void some_widget_finalize (GObject *object) { SomeWidget *self = SOME_WIDGET (object); if (self->idle_id) g_source_remove (self->idle_id); G_OBJECT_CLASS (parent_class)->finalize (object); }
Since: 2.12
threadsAddTimeout
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Word32 |
|
-> SourceFunc |
|
-> m Word32 | Returns: the ID (greater than 0) of the event source. |
Sets a function to be called at regular intervals holding the GDK lock,
with the given priority. The function is called repeatedly until it
returns False
, at which point the timeout is automatically destroyed
and the function will not be called again. The notify
function is
called when the timeout is destroyed. The first call to the
function will be at the end of the first interval
.
Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to “catch up” time lost in delays).
This variant of timeoutAdd
can be thought of a MT-safe version
for GTK+ widgets for the following use case:
C code
static gboolean timeout_callback (gpointer data) { SomeWidget *self = data; // do stuff with self self->timeout_id = 0; return G_SOURCE_REMOVE; } static void some_widget_do_stuff_later (SomeWidget *self) { self->timeout_id = g_timeout_add (timeout_callback, self) } static void some_widget_finalize (GObject *object) { SomeWidget *self = SOME_WIDGET (object); if (self->timeout_id) g_source_remove (self->timeout_id); G_OBJECT_CLASS (parent_class)->finalize (object); }
Since: 2.12
threadsAddTimeoutSeconds
threadsAddTimeoutSeconds Source #
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Word32 |
|
-> SourceFunc |
|
-> m Word32 | Returns: the ID (greater than 0) of the event source. |
A variant of threadsAddTimeout
with second-granularity.
See timeoutAddSeconds
for a discussion of why it is
a good idea to use this function if you don’t need finer granularity.
Since: 2.14
threadsEnter
threadsEnter :: (HasCallStack, MonadIO m) => m () Source #
Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the main thread
This function marks the beginning of a critical section in which GDK and GTK+ functions can be called safely and without causing race conditions. Only one thread at a time can be in such a critial section.
threadsInit
threadsInit :: (HasCallStack, MonadIO m) => m () Source #
Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the main thread
Initializes GDK so that it can be used from multiple threads
in conjunction with threadsEnter
and threadsLeave
.
This call must be made before any use of the main loop from
GTK+; to be safe, call it before gtk_init()
.
threadsLeave
threadsLeave :: (HasCallStack, MonadIO m) => m () Source #
Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the main thread
Leaves a critical region begun with threadsEnter
.
unicodeToKeyval
:: (HasCallStack, MonadIO m) | |
=> Word32 |
|
-> m Word32 | Returns: the corresponding GDK key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000 |
Convert from a ISO10646 character to a key symbol.
utf8ToStringTarget
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe Text) | Returns: the newly-allocated string, or |
Converts an UTF-8 string into the best possible representation as a STRING. The representation of characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of approximation.