Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GdkCairoContext
is an object representing 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.
Instances
Eq CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext (==) :: CairoContext -> CairoContext -> Bool # (/=) :: CairoContext -> CairoContext -> Bool # | |
GObject CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext | |
ManagedPtrNewtype CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext | |
TypedObject CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext | |
HasParentTypes CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext | |
IsGValue (Maybe CairoContext) Source # | Convert |
Defined in GI.Gdk.Objects.CairoContext gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe CairoContext -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe CairoContext) # | |
type ParentTypes CairoContext Source # | |
Defined in GI.Gdk.Objects.CairoContext |
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
(GObject o, IsDescendantOf CairoContext o) => IsCairoContext o Source # | |
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
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
cairoCreate
cairoContextCairoCreate Source #
:: (HasCallStack, MonadIO m, IsCairoContext a) | |
=> a |
|
-> 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.