gi-gdk-4.0.1: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.CairoContext

Description

CairoContext is an object representing the platform-specific draw context.

GdkCairoContexts are created for a Display using surfaceCreateCairoContext, and the context can then be used to draw on that Surface.

Synopsis

Exported types

newtype CairoContext Source #

Memory-managed wrapper type.

class (GObject o, IsDescendantOf CairoContext o) => IsCairoContext o Source #

Type class for types which can be safely cast to CairoContext, for instance with toCairoContext.

Instances

Instances details
(GObject o, IsDescendantOf CairoContext o) => IsCairoContext o Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

toCairoContext :: (MonadIO m, IsCairoContext o) => o -> m CairoContext Source #

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

Methods

Overloaded methods

cairoCreate

cairoContextCairoCreate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCairoContext a) 
=> a

self: a CairoContext that is currently drawing

-> m (Maybe Context)

Returns: a Cairo context to be used to draw the contents of the Surface. Nothing is returned when contet is not drawing.

Retrieves a Cairo context to be used to draw on the Surface of context. A call to drawContextBeginFrame with this context must have been done or this function will return Nothing.

The returned context is guaranteed to be valid until drawContextEndFrame is called.