gi-gdk-3.0.11: Gdk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.DrawingContext

Contents

Description

DrawingContext is an object that represents the current drawing state of a Window.

It's possible to use a DrawingContext to draw on a Window via rendering API like Cairo or OpenGL.

A DrawingContext can only be created by calling windowBeginDrawFrame and will be valid until a call to windowEndDrawFrame.

DrawingContext is available since GDK 3.22

Synopsis

Exported types

Methods

getCairoContext

drawingContextGetCairoContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsDrawingContext a) 
=> a 
-> m Context

Returns: a Cairo context to be used to draw the contents of the Window. The context is owned by the DrawingContext and should not be destroyed

Retrieves a Cairo context to be used to draw on the Window that created the DrawingContext.

The returned context is guaranteed to be valid as long as the DrawingContext is valid, that is between a call to windowBeginDrawFrame and windowEndDrawFrame.

Since: 3.22

getClip

drawingContextGetClip Source #

Arguments

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

context: a DrawingContext

-> m (Maybe Region)

Returns: a Cairo region

Retrieves a copy of the clip region used when creating the context.

Since: 3.22

getWindow

drawingContextGetWindow Source #

Arguments

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

context: a DrawingContext

-> m Window

Returns: a Window

Retrieves the window that created the drawing context.

Since: 3.22

isValid

drawingContextIsValid Source #

Arguments

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

context: a DrawingContext

-> m Bool

Returns: True if the context is valid

Checks whether the given DrawingContext is valid.

Since: 3.22

Properties

clip

data DrawingContextClipPropertyInfo Source #

Instances

AttrInfo DrawingContextClipPropertyInfo Source # 
type AttrOrigin DrawingContextClipPropertyInfo Source # 
type AttrLabel DrawingContextClipPropertyInfo Source # 
type AttrGetType DrawingContextClipPropertyInfo Source # 
type AttrBaseTypeConstraint DrawingContextClipPropertyInfo Source # 
type AttrSetTypeConstraint DrawingContextClipPropertyInfo Source # 
type AttrAllowedOps DrawingContextClipPropertyInfo Source # 

window

data DrawingContextWindowPropertyInfo Source #

Instances

AttrInfo DrawingContextWindowPropertyInfo Source # 
type AttrOrigin DrawingContextWindowPropertyInfo Source # 
type AttrLabel DrawingContextWindowPropertyInfo Source # 
type AttrGetType DrawingContextWindowPropertyInfo Source # 
type AttrBaseTypeConstraint DrawingContextWindowPropertyInfo Source # 
type AttrSetTypeConstraint DrawingContextWindowPropertyInfo Source # 
type AttrAllowedOps DrawingContextWindowPropertyInfo Source #