Package ch.bailu.gtk.gdk
Klasse TextureDownloader
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gdk.TextureDownloader
- Alle implementierten Schnittstellen:
PointerInterface
Used to download the contents of a [class@Gdk.Texture].
It is intended to be created as a short-term object for a single download,
but can be used for multiple downloads of different textures or with different
settings.
`GdkTextureDownloader` can be used to convert data between different formats.
Create a `GdkTexture` for the existing format and then download it in a
different format.
It is intended to be created as a short-term object for a single download,
but can be used for multiple downloads of different textures or with different
settings.
`GdkTextureDownloader` can be used to convert data between different formats.
Create a `GdkTexture` for the existing format and then download it in a
different format.
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTextureDownloader
(Texture texture) Creates a new texture downloader for @texture.TextureDownloader
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcopy()
Creates a copy of the downloader.downloadBytes
(Int64 out_stride) Downloads the given texture pixels into a `GBytes`.void
free()
Frees the given downloader and all its associated resources.static ClassHandler
Gets the color state that the data will be downloaded in.int
Gets the format that the data will be downloaded in.static int
static long
static TypeSystem.TypeSize
Gets the texture that the downloader will download.static long
static TypeSystem.TypeSize
void
setColorState
(ColorState color_state) Sets the color state the downloader will convert the data to.void
setFormat
(int format) Sets the format the downloader will download.void
setTexture
(Texture texture) Changes the texture the downloader will download.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
TextureDownloader
-
TextureDownloader
Creates a new texture downloader for @texture.
By default, the downloader will convert the data to
the default memory format, and to the sRGB color state.- Parameter:
texture
- texture to download
-
-
Methodendetails
-
getClassHandler
-
copy
Creates a copy of the downloader.
This function is meant for language bindings.- Gibt zurück:
- A copy of the downloader
-
downloadBytes
Downloads the given texture pixels into a `GBytes`. The rowstride will
be stored in the stride value.
This function will abort if it tries to download a large texture and
fails to allocate memory. If you think that may happen, you should handle
memory allocation yourself and use [method@Gdk.TextureDownloader.download_into]
once allocation succeeded.- Parameter:
out_stride
- The stride of the resulting data in bytes- Gibt zurück:
- The downloaded pixels
-
free
public void free()Frees the given downloader and all its associated resources. -
getColorState
Gets the color state that the data will be downloaded in.- Gibt zurück:
- The color state of the download
-
getFormat
public int getFormat()Gets the format that the data will be downloaded in.- Gibt zurück:
- The format of the download
-
getTexture
Gets the texture that the downloader will download.- Gibt zurück:
- The texture to download
-
setColorState
Sets the color state the downloader will convert the data to.
By default, the sRGB colorstate returned by [func@ColorState.get_srgb]
is used.- Parameter:
color_state
- the color state to use
-
setFormat
public void setFormat(int format) Sets the format the downloader will download.
By default, GDK_MEMORY_DEFAULT is set.- Parameter:
format
- the format to use
-
setTexture
Changes the texture the downloader will download.- Parameter:
texture
- the new texture to download
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-