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.MemoryTexture

Contents

- Exported types
- Methods
  - new

Description

A `GdkTexture` representing image data in memory.

Synopsis

- newtype MemoryTexture = MemoryTexture (ManagedPtr MemoryTexture)
- class (GObject o, IsDescendantOf MemoryTexture o) => IsMemoryTexture o
- toMemoryTexture :: (MonadIO m, IsMemoryTexture o) => o -> m MemoryTexture
- memoryTextureNew :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> MemoryFormat -> Bytes -> CSize -> m MemoryTexture

# Exported types

newtype MemoryTexture Source #

Memory-managed wrapper type.

Constructors

MemoryTexture (ManagedPtr MemoryTexture) |

#### Instances

Instances details

Eq MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture Methods (==) :: MemoryTexture -> MemoryTexture -> Bool Source # (/=) :: MemoryTexture -> MemoryTexture -> Bool Source #
GObject MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture
ManagedPtrNewtype MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture Methods toManagedPtr :: MemoryTexture -> ManagedPtr MemoryTexture Source #
TypedObject MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture Methods glibType :: IO GType Source #
HasParentTypes MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture
IsGValue (Maybe MemoryTexture) Source # | Convert `MemoryTexture` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gdk.Objects.MemoryTexture Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe MemoryTexture -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe MemoryTexture) Source #
type ParentTypes MemoryTexture Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture type ParentTypes MemoryTexture = '[Texture, Object, Paintable, Icon, LoadableIcon]

class (GObject o, IsDescendantOf MemoryTexture o) => IsMemoryTexture o Source #

Type class for types which can be safely cast to `MemoryTexture`, for instance with `toMemoryTexture`.

#### Instances

Instances details

(GObject o, IsDescendantOf MemoryTexture o) => IsMemoryTexture o Source # |
Instance details Defined in GI.Gdk.Objects.MemoryTexture

toMemoryTexture :: (MonadIO m, IsMemoryTexture o) => o -> m MemoryTexture Source #

Cast to `MemoryTexture`, 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

bindProperty, bindPropertyFull, computeConcreteSize, download, equal, forceFloating, freezeNotify, getv, hash, invalidateContents, invalidateSize, isFloating, load, loadAsync, loadFinish, notify, notifyByPspec, ref, refSink, runDispose, saveToPng, saveToPngBytes, saveToTiff, saveToTiffBytes, serialize, snapshot, stealData, stealQdata, thawNotify, toString, unref, watchClosure.

#### Getters

getColorState, getCurrentImage, getData, getFlags, getFormat, getHeight, getIntrinsicAspectRatio, getIntrinsicHeight, getIntrinsicWidth, getProperty, getQdata, getWidth.

#### Setters

setData, setDataFull, setProperty.

## new

memoryTextureNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Int32 | `width`: the width of the texture
-> Int32 | `height`: the height of the texture
-> MemoryFormat | `format`: the format of the data
-> Bytes | `bytes`: the `GBytes` containing the pixel data
-> CSize | `stride`: rowstride for the data
-> m MemoryTexture | Returns: A newly-created `GdkTexture`

Creates a new texture for a blob of image data.

The `GBytes` must contain `stride` × `height` pixels in the given format.