Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
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
- noCairoContext :: Maybe 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 gobjectType :: IO GType # | |
IsGValue CairoContext Source # | Convert |
Defined in GI.Gdk.Objects.CairoContext toGValue :: CairoContext -> IO GValue # fromGValue :: GValue -> IO CairoContext # | |
HasParentTypes CairoContext Source # | |
Defined in GI.Gdk.Objects.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
.
noCairoContext :: Maybe CairoContext Source #
A convenience alias for Nothing
:: Maybe
CairoContext
.
Methods
Overloaded methods
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.