Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- 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.
CairoContext (ManagedPtr CairoContext) |
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 toManagedPtr :: CairoContext -> ManagedPtr 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 be used
to draw the contents of the |
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.