gi-gdk-4.0.7: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gdk.Objects.CairoContext

Description

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

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

Synopsis

Exported types

newtype CairoContext Source #

Memory-managed wrapper type.

Constructors

CairoContext (ManagedPtr CairoContext) 

Instances

Instances details
Eq CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

GObject CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

ManagedPtrNewtype CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

Methods

toManagedPtr :: CairoContext -> ManagedPtr CairoContext

TypedObject CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

Methods

glibType :: IO GType

HasParentTypes CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

IsGValue (Maybe CairoContext) Source #

Convert CairoContext to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Objects.CairoContext

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CairoContext -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CairoContext)

type ParentTypes CairoContext Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

type ParentTypes CairoContext = '[DrawContext, Object]

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

cairoCreate

cairoContextCairoCreate Source #

Arguments

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

self: a GdkCairoContext that is currently drawing

-> m (Maybe Context)

Returns: a Cairo context to draw on `GdkSurface

Retrieves a Cairo context to be used to draw on the GdkSurface 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.