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

Contents

- Exported types
- Methods
  - new
  - release

Description

A `GdkTexture` representing a GL texture object.

Synopsis

- newtype GLTexture = GLTexture (ManagedPtr GLTexture)
- class (GObject o, IsDescendantOf GLTexture o) => IsGLTexture o
- toGLTexture :: (MonadIO m, IsGLTexture o) => o -> m GLTexture
- gLTextureNew :: (HasCallStack, MonadIO m, IsGLContext a) => a -> Word32 -> Int32 -> Int32 -> DestroyNotify -> Ptr () -> m GLTexture
- gLTextureRelease :: (HasCallStack, MonadIO m, IsGLTexture a) => a -> m ()

# Exported types

newtype GLTexture Source #

Memory-managed wrapper type.

Constructors

GLTexture (ManagedPtr GLTexture) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf GLTexture o) => IsGLTexture o Source #

Type class for types which can be safely cast to `GLTexture`, for instance with `toGLTexture`.

#### Instances

Instances details

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

toGLTexture :: (MonadIO m, IsGLTexture o) => o -> m GLTexture Source #

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

gLTextureNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsGLContext a) |
=> a | `context`: a `GdkGLContext`
-> Word32 | `id`: the ID of a texture that was created with `context`
-> Int32 | `width`: the nominal width of the texture
-> Int32 | `height`: the nominal height of the texture
-> DestroyNotify | `destroy`: a destroy notify that will be called when the GL resources are released
-> Ptr () | `data`: data that gets passed to `destroy`
-> m GLTexture | Returns: A newly-created `GdkTexture`

Deprecated: (Since version 4.12)`GLTextureBuilder` supersedes this functionand provides extended functionality for creating GL textures.

Creates a new texture for an existing GL texture.

Note that the GL texture must not be modified until `destroy` is called, which will happen when the GdkTexture object is finalized, or due to an explicit call of `gLTextureRelease`.

## release

gLTextureRelease Source #

Arguments

:: (HasCallStack, MonadIO m, IsGLTexture a) |
=> a | `self`: a `GdkTexture` wrapping a GL texture
-> m () |

Releases the GL resources held by a `GdkGLTexture`.

The texture contents are still available via the `textureDownload` function, after this function has been called.