gi-gdk4-4.0.10: Gdk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Interfaces.DragSurface

Contents

- Exported types
- Methods
  - present
- Signals
  - computeSize

Description

A surface that is used during DND.

Synopsis

- newtype DragSurface = DragSurface (ManagedPtr DragSurface)
- class (GObject o, IsDescendantOf DragSurface o) => IsDragSurface o
- toDragSurface :: (MonadIO m, IsDragSurface o) => o -> m DragSurface
- dragSurfacePresent :: (HasCallStack, MonadIO m, IsDragSurface a) => a -> Int32 -> Int32 -> m Bool
- type DragSurfaceComputeSizeCallback = DragSurfaceSize -> IO ()
- afterDragSurfaceComputeSize :: (IsDragSurface a, MonadIO m) => a -> ((?self :: a) => DragSurfaceComputeSizeCallback) -> m SignalHandlerId
- onDragSurfaceComputeSize :: (IsDragSurface a, MonadIO m) => a -> ((?self :: a) => DragSurfaceComputeSizeCallback) -> m SignalHandlerId

# Exported types

newtype DragSurface Source #

Memory-managed wrapper type.

Constructors

DragSurface (ManagedPtr DragSurface) |

#### Instances

Instances details

Eq DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface Methods (==) :: DragSurface -> DragSurface -> Bool Source # (/=) :: DragSurface -> DragSurface -> Bool Source #
GObject DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface
ManagedPtrNewtype DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface Methods toManagedPtr :: DragSurface -> ManagedPtr DragSurface Source #
TypedObject DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface Methods glibType :: IO GType Source #
HasParentTypes DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface
IsGValue (Maybe DragSurface) Source # | Convert `DragSurface` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gdk.Interfaces.DragSurface Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe DragSurface -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe DragSurface) Source #
type ParentTypes DragSurface Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface type ParentTypes DragSurface = '[Object, Surface]

class (GObject o, IsDescendantOf DragSurface o) => IsDragSurface o Source #

Type class for types which can be safely cast to `DragSurface`, for instance with `toDragSurface`.

#### Instances

Instances details

(GObject o, IsDescendantOf DragSurface o) => IsDragSurface o Source # |
Instance details Defined in GI.Gdk.Interfaces.DragSurface

toDragSurface :: (MonadIO m, IsDragSurface o) => o -> m DragSurface Source #

Cast to `DragSurface`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

beep, bindProperty, bindPropertyFull, createCairoContext, createGlContext, createSimilarSurface, createVulkanContext, destroy, forceFloating, freezeNotify, getv, hide, isDestroyed, isFloating, notify, notifyByPspec, present, queueRender, ref, refSink, requestLayout, runDispose, stealData, stealQdata, thawNotify, translateCoordinates, unref, watchClosure.

#### Getters

getCursor, getData, getDeviceCursor, getDevicePosition, getDisplay, getFrameClock, getHeight, getMapped, getProperty, getQdata, getScale, getScaleFactor, getWidth.

#### Setters

setCursor, setData, setDataFull, setDeviceCursor, setInputRegion, setOpaqueRegion, setProperty.

## present

dragSurfacePresent Source #

Arguments

:: (HasCallStack, MonadIO m, IsDragSurface a) |
=> a | `dragSurface`: the `GdkDragSurface` to show
-> Int32 | `width`: the unconstrained drag_surface width to layout
-> Int32 | `height`: the unconstrained drag_surface height to layout
-> m Bool | Returns: `False` if it failed to be presented, otherwise `True`.

Present `dragSurface`.

# Signals

## computeSize

type DragSurfaceComputeSizeCallback Source #

Arguments

= DragSurfaceSize | `size`: the size of the drag surface
-> IO () |

Emitted when the size for the surface needs to be computed, when it is present.

This signal will normally be emitted during the native surface layout cycle when the surface size needs to be recomputed.

It is the responsibility of the drag surface user to handle this signal and compute the desired size of the surface, storing the computed size in the `DragSurfaceSize` object that is passed to the signal handler, using `dragSurfaceSizeSetSize`.

Failing to set a size so will result in an arbitrary size being used as a result.

Since: 4.12

afterDragSurfaceComputeSize :: (IsDragSurface a, MonadIO m) => a -> ((?self :: a) => DragSurfaceComputeSizeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the computeSize signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after dragSurface #computeSize callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onDragSurfaceComputeSize :: (IsDragSurface a, MonadIO m) => a -> ((?self :: a) => DragSurfaceComputeSizeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the computeSize signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on dragSurface #computeSize callback