DragSurface

class DragSurface(*args, **kwargs)

A GdkDragSurface is an interface for surfaces used during DND.

Methods

class DragSurface
present(width: int, height: int) bool

Present drag_surface.

Parameters:
  • width – the unconstrained drag_surface width to layout

  • height – the unconstrained drag_surface height to layout

Signals

class DragSurface.signals
compute_size(size: DragSurfaceSize) None

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 set_size.

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

Added in version 4.12.

Parameters:

size – the size of the drag surface