gi-gdk4-4.0.10: Gdk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Objects.CairoContext

Contents

- Exported types
- Methods
  - cairoCreate

Description

Represents the platform-specific draw context.

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

Synopsis

- newtype CairoContext = CairoContext (ManagedPtr CairoContext)
- class (GObject o, IsDescendantOf CairoContext o) => IsCairoContext o
- toCairoContext :: (MonadIO m, IsCairoContext o) => o -> m CairoContext
- cairoContextCairoCreate :: (HasCallStack, MonadIO m, IsCairoContext a) => a -> m (Maybe Context)

# 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 Methods (==) :: CairoContext -> CairoContext -> Bool Source # (/=) :: CairoContext -> CairoContext -> Bool Source #
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 Source #
TypedObject CairoContext Source # |
Instance details Defined in GI.Gdk.Objects.CairoContext Methods glibType :: IO GType Source #
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 Source # gvalueSet_ :: Ptr GValue -> Maybe CairoContext -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe CairoContext) Source #
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

### Click to display all available methods, including inherited ones

Expand

#### Methods

beginFrame, bindProperty, bindPropertyFull, cairoCreate, endFrame, forceFloating, freezeNotify, getv, isFloating, isInFrame, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getDisplay, getFrameRegion, getProperty, getQdata, getSurface.

#### Setters

setData, setDataFull, setProperty.

## 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

Deprecated: (Since version 4.18)Drawing content with Cairo should be done viaCairo rendernodes, not by using renderers.

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.