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 |
- Exported types
- Methods
- Overloaded methods
- beep
- createCairoContext
- createGlContext
- createSimilarSurface
- createVulkanContext
- destroy
- freezeUpdates
- getCursor
- getDeviceCursor
- getDevicePosition
- getDisplay
- getFrameClock
- getHeight
- getMapped
- getScaleFactor
- getSupportMultidevice
- getWidth
- hide
- isDestroyed
- newPopup
- newToplevel
- queueExpose
- setCursor
- setDeviceCursor
- setInputRegion
- setOpaqueRegion
- setShadowWidth
- setSupportMultidevice
- thawUpdates
- translateCoordinates
- Properties
- Signals
A Surface
is a (usually) rectangular region on the screen.
It’s a low-level object, used to implement high-level objects such as
GtkWindow
on the GTK level.
Synopsis
- newtype Surface = Surface (ManagedPtr Surface)
- class (GObject o, IsDescendantOf Surface o) => IsSurface o
- toSurface :: (MonadIO m, IsSurface o) => o -> m Surface
- surfaceBeep :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceCreateCairoContext :: (HasCallStack, MonadIO m, IsSurface a) => a -> m CairoContext
- surfaceCreateGlContext :: (HasCallStack, MonadIO m, IsSurface a) => a -> m GLContext
- surfaceCreateSimilarSurface :: (HasCallStack, MonadIO m, IsSurface a) => a -> Content -> Int32 -> Int32 -> m Surface
- surfaceCreateVulkanContext :: (HasCallStack, MonadIO m, IsSurface a) => a -> m VulkanContext
- surfaceDestroy :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceFreezeUpdates :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceGetCursor :: (HasCallStack, MonadIO m, IsSurface a) => a -> m (Maybe Cursor)
- surfaceGetDeviceCursor :: (HasCallStack, MonadIO m, IsSurface a, IsDevice b) => a -> b -> m (Maybe Cursor)
- surfaceGetDevicePosition :: (HasCallStack, MonadIO m, IsSurface a, IsDevice b) => a -> b -> m (Double, Double, [ModifierType])
- surfaceGetDisplay :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Display
- surfaceGetFrameClock :: (HasCallStack, MonadIO m, IsSurface a) => a -> m FrameClock
- surfaceGetHeight :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Int32
- surfaceGetMapped :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Bool
- surfaceGetScaleFactor :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Int32
- surfaceGetSupportMultidevice :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Bool
- surfaceGetWidth :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Int32
- surfaceHide :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceIsDestroyed :: (HasCallStack, MonadIO m, IsSurface a) => a -> m Bool
- surfaceNewPopup :: (HasCallStack, MonadIO m, IsSurface a) => a -> Bool -> m Surface
- surfaceNewToplevel :: (HasCallStack, MonadIO m, IsDisplay a) => a -> Int32 -> Int32 -> m Surface
- surfaceQueueExpose :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceSetCursor :: (HasCallStack, MonadIO m, IsSurface a, IsCursor b) => a -> Maybe b -> m ()
- surfaceSetDeviceCursor :: (HasCallStack, MonadIO m, IsSurface a, IsDevice b, IsCursor c) => a -> b -> c -> m ()
- surfaceSetInputRegion :: (HasCallStack, MonadIO m, IsSurface a) => a -> Region -> m ()
- surfaceSetOpaqueRegion :: (HasCallStack, MonadIO m, IsSurface a) => a -> Maybe Region -> m ()
- surfaceSetShadowWidth :: (HasCallStack, MonadIO m, IsSurface a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
- surfaceSetSupportMultidevice :: (HasCallStack, MonadIO m, IsSurface a) => a -> Bool -> m ()
- surfaceThawUpdates :: (HasCallStack, MonadIO m, IsSurface a) => a -> m ()
- surfaceTranslateCoordinates :: (HasCallStack, MonadIO m, IsSurface a, IsSurface b) => a -> b -> Double -> Double -> m Bool
- clearSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m ()
- constructSurfaceCursor :: (IsSurface o, MonadIO m, IsCursor a) => a -> m (GValueConstruct o)
- getSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m (Maybe Cursor)
- setSurfaceCursor :: (MonadIO m, IsSurface o, IsCursor a) => o -> a -> m ()
- constructSurfaceDisplay :: (IsSurface o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getSurfaceDisplay :: (MonadIO m, IsSurface o) => o -> m Display
- constructSurfaceFrameClock :: (IsSurface o, MonadIO m, IsFrameClock a) => a -> m (GValueConstruct o)
- getSurfaceFrameClock :: (MonadIO m, IsSurface o) => o -> m FrameClock
- getSurfaceMapped :: (MonadIO m, IsSurface o) => o -> m Bool
- type C_SurfaceEnterMonitorCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO ()
- type SurfaceEnterMonitorCallback = Monitor -> IO ()
- afterSurfaceEnterMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceEnterMonitorCallback -> m SignalHandlerId
- genClosure_SurfaceEnterMonitor :: MonadIO m => SurfaceEnterMonitorCallback -> m (GClosure C_SurfaceEnterMonitorCallback)
- mk_SurfaceEnterMonitorCallback :: C_SurfaceEnterMonitorCallback -> IO (FunPtr C_SurfaceEnterMonitorCallback)
- noSurfaceEnterMonitorCallback :: Maybe SurfaceEnterMonitorCallback
- onSurfaceEnterMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceEnterMonitorCallback -> m SignalHandlerId
- wrap_SurfaceEnterMonitorCallback :: SurfaceEnterMonitorCallback -> C_SurfaceEnterMonitorCallback
- type C_SurfaceEventCallback = Ptr () -> Ptr Event -> Ptr () -> IO CInt
- type SurfaceEventCallback = Event -> IO Bool
- afterSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId
- genClosure_SurfaceEvent :: MonadIO m => SurfaceEventCallback -> m (GClosure C_SurfaceEventCallback)
- mk_SurfaceEventCallback :: C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback)
- noSurfaceEventCallback :: Maybe SurfaceEventCallback
- onSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId
- wrap_SurfaceEventCallback :: SurfaceEventCallback -> C_SurfaceEventCallback
- type C_SurfaceLeaveMonitorCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO ()
- type SurfaceLeaveMonitorCallback = Monitor -> IO ()
- afterSurfaceLeaveMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceLeaveMonitorCallback -> m SignalHandlerId
- genClosure_SurfaceLeaveMonitor :: MonadIO m => SurfaceLeaveMonitorCallback -> m (GClosure C_SurfaceLeaveMonitorCallback)
- mk_SurfaceLeaveMonitorCallback :: C_SurfaceLeaveMonitorCallback -> IO (FunPtr C_SurfaceLeaveMonitorCallback)
- noSurfaceLeaveMonitorCallback :: Maybe SurfaceLeaveMonitorCallback
- onSurfaceLeaveMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceLeaveMonitorCallback -> m SignalHandlerId
- wrap_SurfaceLeaveMonitorCallback :: SurfaceLeaveMonitorCallback -> C_SurfaceLeaveMonitorCallback
- type C_SurfacePopupLayoutChangedCallback = Ptr () -> Ptr () -> IO ()
- type SurfacePopupLayoutChangedCallback = IO ()
- afterSurfacePopupLayoutChanged :: (IsSurface a, MonadIO m) => a -> SurfacePopupLayoutChangedCallback -> m SignalHandlerId
- genClosure_SurfacePopupLayoutChanged :: MonadIO m => SurfacePopupLayoutChangedCallback -> m (GClosure C_SurfacePopupLayoutChangedCallback)
- mk_SurfacePopupLayoutChangedCallback :: C_SurfacePopupLayoutChangedCallback -> IO (FunPtr C_SurfacePopupLayoutChangedCallback)
- noSurfacePopupLayoutChangedCallback :: Maybe SurfacePopupLayoutChangedCallback
- onSurfacePopupLayoutChanged :: (IsSurface a, MonadIO m) => a -> SurfacePopupLayoutChangedCallback -> m SignalHandlerId
- wrap_SurfacePopupLayoutChangedCallback :: SurfacePopupLayoutChangedCallback -> C_SurfacePopupLayoutChangedCallback
- type C_SurfaceRenderCallback = Ptr () -> Ptr Region -> Ptr () -> IO CInt
- type SurfaceRenderCallback = Region -> IO Bool
- afterSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId
- genClosure_SurfaceRender :: MonadIO m => SurfaceRenderCallback -> m (GClosure C_SurfaceRenderCallback)
- mk_SurfaceRenderCallback :: C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback)
- noSurfaceRenderCallback :: Maybe SurfaceRenderCallback
- onSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId
- wrap_SurfaceRenderCallback :: SurfaceRenderCallback -> C_SurfaceRenderCallback
- type C_SurfaceSizeChangedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO ()
- type SurfaceSizeChangedCallback = Int32 -> Int32 -> IO ()
- afterSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId
- genClosure_SurfaceSizeChanged :: MonadIO m => SurfaceSizeChangedCallback -> m (GClosure C_SurfaceSizeChangedCallback)
- mk_SurfaceSizeChangedCallback :: C_SurfaceSizeChangedCallback -> IO (FunPtr C_SurfaceSizeChangedCallback)
- noSurfaceSizeChangedCallback :: Maybe SurfaceSizeChangedCallback
- onSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId
- wrap_SurfaceSizeChangedCallback :: SurfaceSizeChangedCallback -> C_SurfaceSizeChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Surface Source # | |
IsGValue Surface Source # | Convert |
ManagedPtrNewtype Surface Source # | |
Defined in GI.Gdk.Objects.Surface toManagedPtr :: Surface -> ManagedPtr Surface # | |
TypedObject Surface Source # | |
Defined in GI.Gdk.Objects.Surface | |
GObject Surface Source # | |
Defined in GI.Gdk.Objects.Surface | |
HasParentTypes Surface Source # | |
Defined in GI.Gdk.Objects.Surface | |
type ParentTypes Surface Source # | |
Defined in GI.Gdk.Objects.Surface |
class (GObject o, IsDescendantOf Surface o) => IsSurface o Source #
Instances
(GObject o, IsDescendantOf Surface o) => IsSurface o Source # | |
Defined in GI.Gdk.Objects.Surface |
Methods
Overloaded methods
beep
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
Emits a short beep associated to surface
in the appropriate
display, if supported. Otherwise, emits a short beep on
the display just as displayBeep
.
createCairoContext
surfaceCreateCairoContext Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m CairoContext | Returns: the newly created |
Creates a new CairoContext
for rendering on surface
.
createGlContext
surfaceCreateGlContext Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m GLContext | Returns: the newly created |
Creates a new GLContext
matching the
framebuffer format to the visual of the Surface
. The context
is disconnected from any particular surface or surface.
If the creation of the GLContext
failed, error
will be set.
Before using the returned GLContext
, you will need to
call gLContextMakeCurrent
or gLContextRealize
.
createSimilarSurface
surfaceCreateSimilarSurface Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Content |
|
-> Int32 |
|
-> Int32 |
|
-> m Surface | Returns: a pointer to the newly allocated surface. The caller
owns the surface and should call This function always returns a valid pointer, but it will return a
pointer to a “nil” surface if |
Create a new surface that is as compatible as possible with the
given surface
. For example the new surface will have the same
fallback resolution and font options as surface
. Generally, the new
surface will also use the same backend as surface
, unless that is
not possible for some reason. The type of the returned surface may
be examined with cairo_surface_get_type()
.
Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)
createVulkanContext
surfaceCreateVulkanContext Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m VulkanContext | Returns: the newly created |
Creates a new VulkanContext
for rendering on surface
.
If the creation of the VulkanContext
failed, error
will be set.
destroy
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
Destroys the window system resources associated with surface
and decrements surface
's
reference count. The window system resources for all children of surface
are also
destroyed, but the children’s reference counts are not decremented.
Note that a surface will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.
freezeUpdates
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
Temporarily freezes a surface such that it won’t receive expose
events. The surface will begin receiving expose events again when
surfaceThawUpdates
is called. If surfaceFreezeUpdates
has been called more than once, surfaceThawUpdates
must be called
an equal number of times to begin processing exposes.
getCursor
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m (Maybe Cursor) | Returns: a |
getDeviceCursor
surfaceGetDeviceCursor Source #
:: (HasCallStack, MonadIO m, IsSurface a, IsDevice b) | |
=> a |
|
-> b |
|
-> m (Maybe Cursor) | Returns: a |
getDevicePosition
surfaceGetDevicePosition Source #
:: (HasCallStack, MonadIO m, IsSurface a, IsDevice b) | |
=> a |
|
-> b |
|
-> m (Double, Double, [ModifierType]) |
Obtains the current device position in doubles and modifier state.
The position is given in coordinates relative to the upper left
corner of surface
.
getDisplay
getFrameClock
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m FrameClock | Returns: the frame clock |
Gets the frame clock for the surface. The frame clock for a surface never changes unless the surface is reparented to a new toplevel surface.
getHeight
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Int32 | Returns: The height of |
Returns the height of the given surface
.
Surface size is reported in ”application pixels”, not
”device pixels” (see surfaceGetScaleFactor
).
getMapped
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Bool | Returns: |
Checks whether the surface has been mapped (with gdk_surface_show()
or
gdk_surface_show_unraised()
).
getScaleFactor
surfaceGetScaleFactor Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Int32 | Returns: the scale factor |
Returns the internal scale factor that maps from surface coordiantes 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).
A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data.
The scale of a surface may change during runtime, if this happens a configure event will be sent to the toplevel surface.
getSupportMultidevice
surfaceGetSupportMultidevice Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if the surface is aware of the existence of multiple
devices.
getWidth
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Int32 | Returns: The width of |
Returns the width of the given surface
.
Surface size is reported in ”application pixels”, not
”device pixels” (see surfaceGetScaleFactor
).
hide
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
For toplevel surfaces, withdraws them, so they will no longer be
known to the window manager; for all surfaces, unmaps them, so
they won’t be displayed. Normally done automatically as
part of gtk_widget_hide()
.
isDestroyed
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m Bool | Returns: |
Check to see if a surface is destroyed..
newPopup
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Bool |
|
-> m Surface | Returns: a new |
Create a new popup surface.
The surface will be attached to parent
and can be positioned relative to it
using gdk_surface_show_popup()
or later using gdk_surface_layout_popup()
.
newToplevel
:: (HasCallStack, MonadIO m, IsDisplay a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m Surface | Returns: the new |
Creates a new toplevel surface.
queueExpose
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
Forces an expose event for surface
to be scheduled.
If the invalid area of surface
is empty, an expose event will
still be emitted. Its invalid region will be empty.
This function is useful for implementations that track invalid regions on their own.
setCursor
:: (HasCallStack, MonadIO m, IsSurface a, IsCursor b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the default mouse pointer for a Surface
.
Note that cursor
must be for the same display as surface
.
Use cursorNewFromName
or cursorNewFromTexture
to
create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR
.
Passing Nothing
for the cursor
argument to surfaceSetCursor
means
that surface
will use the cursor of its parent surface. Most surfaces
should use this default.
setDeviceCursor
surfaceSetDeviceCursor Source #
:: (HasCallStack, MonadIO m, IsSurface a, IsDevice b, IsCursor c) | |
=> a |
|
-> b |
|
-> c |
|
-> m () |
Sets a specific Cursor
for a given device when it gets inside surface
.
Use cursorNewFromName
or cursorNewFromTexture
to create
the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR
. Passing
Nothing
for the cursor
argument to surfaceSetCursor
means that
surface
will use the cursor of its parent surface. Most surfaces should
use this default.
setInputRegion
surfaceSetInputRegion Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Region |
|
-> m () |
Apply the region to the surface for the purpose of event
handling. Mouse events which happen while the pointer position
corresponds to an unset bit in the mask will be passed on the
surface below surface
.
An input region is typically used with RGBA surfaces. The alpha channel of the surface defines which pixels are invisible and allows for nicely antialiased borders, and the input region controls where the surface is “clickable”.
Use gdk_display_support_input_shapes()
to find out if
a particular backend supports input regions.
setOpaqueRegion
surfaceSetOpaqueRegion Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Maybe Region |
|
-> m () |
For optimisation purposes, compositing window managers may like to not draw obscured regions of surfaces, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not.
This function only works for toplevel surfaces.
GTK will update this property automatically if
the surface
background is opaque, as we know where the opaque regions
are. If your surface background is not opaque, please update this
property in your GtkWidgetClass.css_changed()
handler.
setShadowWidth
surfaceSetShadowWidth Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Newer GTK windows using client-side decorations use extra geometry around their frames for effects like shadows and invisible borders. Window managers that want to maximize windows or snap to edges need to know where the extents of the actual frame lie, so that users don’t feel like windows are snapping against random invisible edges.
Note that this property is automatically updated by GTK, so this function should only be used by applications which do not use GTK to create toplevel surfaces.
setSupportMultidevice
surfaceSetSupportMultidevice Source #
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> Bool |
|
-> m () |
This function will enable multidevice features in surface
.
Multidevice aware surfaces will need to handle properly multiple, per device enter/leave events, device grabs and grab ownerships.
thawUpdates
:: (HasCallStack, MonadIO m, IsSurface a) | |
=> a |
|
-> m () |
Thaws a surface frozen with surfaceFreezeUpdates
. Note that this
will not necessarily schedule updates if the surface freeze count reaches
zero.
translateCoordinates
surfaceTranslateCoordinates Source #
:: (HasCallStack, MonadIO m, IsSurface a, IsSurface b) | |
=> a |
|
-> b |
|
-> Double |
|
-> Double |
|
-> m Bool | Returns: |
Translates the given coordinates from being
relative to the from
surface to being relative
to the to
surface.
Note that this only works if to
and from
are
popups or transient-for to the same toplevel
(directly or indirectly).
Properties
cursor
The mouse pointer for a Surface
. See surfaceSetCursor
and
surfaceGetCursor
for details.
clearSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m () Source #
Set the value of the “cursor
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#cursor
constructSurfaceCursor :: (IsSurface o, MonadIO m, IsCursor a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “cursor
” property. This is rarely needed directly, but it is used by new
.
getSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m (Maybe Cursor) Source #
Get the value of the “cursor
” property.
When overloading is enabled, this is equivalent to
get
surface #cursor
setSurfaceCursor :: (MonadIO m, IsSurface o, IsCursor a) => o -> a -> m () Source #
Set the value of the “cursor
” property.
When overloading is enabled, this is equivalent to
set
surface [ #cursor:=
value ]
display
The Display
connection of the surface. See surfaceGetDisplay
for details.
constructSurfaceDisplay :: (IsSurface o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “display
” property. This is rarely needed directly, but it is used by new
.
getSurfaceDisplay :: (MonadIO m, IsSurface o) => o -> m Display Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
surface #display
frameClock
No description available in the introspection data.
constructSurfaceFrameClock :: (IsSurface o, MonadIO m, IsFrameClock a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “frame-clock
” property. This is rarely needed directly, but it is used by new
.
getSurfaceFrameClock :: (MonadIO m, IsSurface o) => o -> m FrameClock Source #
Get the value of the “frame-clock
” property.
When overloading is enabled, this is equivalent to
get
surface #frameClock
mapped
No description available in the introspection data.
getSurfaceMapped :: (MonadIO m, IsSurface o) => o -> m Bool Source #
Get the value of the “mapped
” property.
When overloading is enabled, this is equivalent to
get
surface #mapped
Signals
enterMonitor
type C_SurfaceEnterMonitorCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SurfaceEnterMonitorCallback = Monitor -> IO () Source #
No description available in the introspection data.
afterSurfaceEnterMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceEnterMonitorCallback -> m SignalHandlerId Source #
Connect a signal handler for the enterMonitor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #enterMonitor callback
genClosure_SurfaceEnterMonitor :: MonadIO m => SurfaceEnterMonitorCallback -> m (GClosure C_SurfaceEnterMonitorCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfaceEnterMonitorCallback :: C_SurfaceEnterMonitorCallback -> IO (FunPtr C_SurfaceEnterMonitorCallback) Source #
Generate a function pointer callable from C code, from a C_SurfaceEnterMonitorCallback
.
noSurfaceEnterMonitorCallback :: Maybe SurfaceEnterMonitorCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfaceEnterMonitorCallback
onSurfaceEnterMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceEnterMonitorCallback -> m SignalHandlerId Source #
Connect a signal handler for the enterMonitor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #enterMonitor callback
wrap_SurfaceEnterMonitorCallback :: SurfaceEnterMonitorCallback -> C_SurfaceEnterMonitorCallback Source #
Wrap a SurfaceEnterMonitorCallback
into a C_SurfaceEnterMonitorCallback
.
event
type C_SurfaceEventCallback = Ptr () -> Ptr Event -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type SurfaceEventCallback Source #
Emitted when GDK receives an input event for surface
.
afterSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #event callback
genClosure_SurfaceEvent :: MonadIO m => SurfaceEventCallback -> m (GClosure C_SurfaceEventCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfaceEventCallback :: C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback) Source #
Generate a function pointer callable from C code, from a C_SurfaceEventCallback
.
noSurfaceEventCallback :: Maybe SurfaceEventCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfaceEventCallback
onSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #event callback
wrap_SurfaceEventCallback :: SurfaceEventCallback -> C_SurfaceEventCallback Source #
Wrap a SurfaceEventCallback
into a C_SurfaceEventCallback
.
leaveMonitor
type C_SurfaceLeaveMonitorCallback = Ptr () -> Ptr Monitor -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SurfaceLeaveMonitorCallback = Monitor -> IO () Source #
No description available in the introspection data.
afterSurfaceLeaveMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceLeaveMonitorCallback -> m SignalHandlerId Source #
Connect a signal handler for the leaveMonitor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #leaveMonitor callback
genClosure_SurfaceLeaveMonitor :: MonadIO m => SurfaceLeaveMonitorCallback -> m (GClosure C_SurfaceLeaveMonitorCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfaceLeaveMonitorCallback :: C_SurfaceLeaveMonitorCallback -> IO (FunPtr C_SurfaceLeaveMonitorCallback) Source #
Generate a function pointer callable from C code, from a C_SurfaceLeaveMonitorCallback
.
noSurfaceLeaveMonitorCallback :: Maybe SurfaceLeaveMonitorCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfaceLeaveMonitorCallback
onSurfaceLeaveMonitor :: (IsSurface a, MonadIO m) => a -> SurfaceLeaveMonitorCallback -> m SignalHandlerId Source #
Connect a signal handler for the leaveMonitor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #leaveMonitor callback
wrap_SurfaceLeaveMonitorCallback :: SurfaceLeaveMonitorCallback -> C_SurfaceLeaveMonitorCallback Source #
Wrap a SurfaceLeaveMonitorCallback
into a C_SurfaceLeaveMonitorCallback
.
popupLayoutChanged
type C_SurfacePopupLayoutChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SurfacePopupLayoutChangedCallback = IO () Source #
Emitted when the layout of a popup surface
has changed, e.g. if the popup
layout was reactive and after the parent moved causing the popover to end
up partially off-screen.
afterSurfacePopupLayoutChanged :: (IsSurface a, MonadIO m) => a -> SurfacePopupLayoutChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the popupLayoutChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #popupLayoutChanged callback
genClosure_SurfacePopupLayoutChanged :: MonadIO m => SurfacePopupLayoutChangedCallback -> m (GClosure C_SurfacePopupLayoutChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfacePopupLayoutChangedCallback :: C_SurfacePopupLayoutChangedCallback -> IO (FunPtr C_SurfacePopupLayoutChangedCallback) Source #
Generate a function pointer callable from C code, from a C_SurfacePopupLayoutChangedCallback
.
noSurfacePopupLayoutChangedCallback :: Maybe SurfacePopupLayoutChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfacePopupLayoutChangedCallback
onSurfacePopupLayoutChanged :: (IsSurface a, MonadIO m) => a -> SurfacePopupLayoutChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the popupLayoutChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #popupLayoutChanged callback
wrap_SurfacePopupLayoutChangedCallback :: SurfacePopupLayoutChangedCallback -> C_SurfacePopupLayoutChangedCallback Source #
render
type C_SurfaceRenderCallback = Ptr () -> Ptr Region -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type SurfaceRenderCallback Source #
= Region |
|
-> IO Bool | Returns: |
Emitted when part of the surface needs to be redrawn.
afterSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId Source #
Connect a signal handler for the render signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #render callback
genClosure_SurfaceRender :: MonadIO m => SurfaceRenderCallback -> m (GClosure C_SurfaceRenderCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfaceRenderCallback :: C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback) Source #
Generate a function pointer callable from C code, from a C_SurfaceRenderCallback
.
noSurfaceRenderCallback :: Maybe SurfaceRenderCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfaceRenderCallback
onSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId Source #
Connect a signal handler for the render signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #render callback
wrap_SurfaceRenderCallback :: SurfaceRenderCallback -> C_SurfaceRenderCallback Source #
Wrap a SurfaceRenderCallback
into a C_SurfaceRenderCallback
.
sizeChanged
type C_SurfaceSizeChangedCallback = Ptr () -> Int32 -> Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SurfaceSizeChangedCallback Source #
Emitted when the size of surface
is changed.
Surface size is reported in ”application pixels”, not
”device pixels” (see surfaceGetScaleFactor
).
afterSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the sizeChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
surface #sizeChanged callback
genClosure_SurfaceSizeChanged :: MonadIO m => SurfaceSizeChangedCallback -> m (GClosure C_SurfaceSizeChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_SurfaceSizeChangedCallback :: C_SurfaceSizeChangedCallback -> IO (FunPtr C_SurfaceSizeChangedCallback) Source #
Generate a function pointer callable from C code, from a C_SurfaceSizeChangedCallback
.
noSurfaceSizeChangedCallback :: Maybe SurfaceSizeChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SurfaceSizeChangedCallback
onSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the sizeChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
surface #sizeChanged callback