Gdk.DragSurface

g GObject.GInterface GObject.GInterface Gdk.DragSurface Gdk.DragSurface GObject.GInterface->Gdk.DragSurface

Implementations:

None

Methods

present (width, height)

Virtual Methods

None

Properties

None

Signals

Name

Short Description

compute-size

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

Fields

None

Class Details

class Gdk.DragSurface
Bases:

GObject.GInterface

Structure:

Gdk.DragSurfaceInterface

A GdkDragSurface is an interface for surfaces used during DND.

present(width, height)[source]
Parameters:
  • width (int) – the unconstrained drag_surface width to layout

  • height (int) – the unconstrained drag_surface height to layout

Returns:

False if it failed to be presented, otherwise True.

Return type:

bool

Present self.

Signal Details

Gdk.DragSurface.signals.compute_size(drag_surface, size)
Signal Name:

compute-size

Flags:

RUN_LAST

Parameters:

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 [struct`Gdk`.DragSurfaceSize] object that is passed to the signal handler, using [method`Gdk`.DragSurfaceSize.set_size].

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

New in version 4.12.