It derives from <GObject>.
Constructs <GdkTexture> objects from system memory
provided via <GBytes>.
The operation is quite simple: Create a texture builder, set all the
necessary properties - keep in mind that the properties
memory-texture-builder:bytes, memory-texture-builder:stride,
memory-texture-builder:width, and
memory-texture-builder:height are mandatory - and then call
memory-texture-builder:build to
create the new texture.
<GdkMemoryTextureBuilder> can be used
for quick one-shot construction of textures as well as kept around and
reused to construct multiple textures.
The bytes holding the data.
Its value is a <GBytes>, or #f.
Set it with (set! (memory-texture-builder:bytes self) value).
The colorstate describing the data.
Its value is a <GdkColorState>, or #f.
Set it with (set! (memory-texture-builder:color-state self)
value).
The format of the data.
Its value is a <GdkMemoryFormat> (or, to set
it, one of its symbols).
Set it with (set! (memory-texture-builder:format self) value).
The height of the texture.
Its value is a 32-bit integer.
Set it with (set! (memory-texture-builder:height self) value).
The rowstride of the texture.
The rowstride is the number of bytes between the first pixel in a row of image data, and the first pixel in the next row.
Its value is an unsigned 64-bit integer.
Set it with (set! (memory-texture-builder:stride self) value).
The update region for memory-texture-builder:update-texture.
Its value is a <CairoRegion>, or #f.
Set it with (set! (memory-texture-builder:update-region self)
value).
The texture memory-texture-builder:update-region is an update for.
Its value is a <GdkTexture>, or #f.
Set it with (set! (memory-texture-builder:update-texture self)
value).
The width of the texture.
Its value is a 32-bit integer.
Set it with (set! (memory-texture-builder:width self) value).
Builds a new <GdkTexture> with the values set up
in the builder.
Note that it is a programming error to call this function if any mandatory property has not been set.
It is possible to call this function multiple times to create multiple textures, possibly with changing properties in between.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <GdkTexture>.
a newly built <GdkTexture>
Gets the bytes previously set via memory-texture-builder:set-bytes or #f if none was
set.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <GBytes>, or #f.
The bytes
Gets the colorstate previously set via memory-texture-builder:set-color-state.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <GdkColorState>.
The colorstate
Gets the format previously set via memory-texture-builder:set-format.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <GdkMemoryFormat>.
The format
Gets the height previously set via memory-texture-builder:set-height or 0 if the height
wasn’t set.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a 32-bit integer.
The height
Gets the offset previously set via memory-texture-builder:set-offset.
Passed: a <GdkMemoryTextureBuilder>.
Passed: an unsigned 32-bit integer.
a plane
Returned: an unsigned 64-bit integer.
The offset associated to a plane
Gets the stride previously set via memory-texture-builder:set-stride.
Passed: a <GdkMemoryTextureBuilder>.
Returned: an unsigned 64-bit integer.
the stride
Gets the stride previously set via memory-texture-builder:set-stride-for-plane.
Passed: a <GdkMemoryTextureBuilder>.
Passed: an unsigned 32-bit integer.
a plane
Returned: an unsigned 64-bit integer.
The stride associated to a plane
Gets the region previously set via memory-texture-builder:set-update-region or
#f if none was set.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <CairoRegion>, or #f.
The update region
Gets the texture previously set via memory-texture-builder:set-update-texture or
#f if none was set.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a <GdkTexture>, or #f.
The update texture
Gets the width previously set via memory-texture-builder:set-width or 0 if the width wasn’t
set.
Passed: a <GdkMemoryTextureBuilder>.
Returned: a 32-bit integer.
The width
Creates a new texture builder.
Returned: a
<GdkMemoryTextureBuilder>.
the new GdkTextureBuilder
Sets the data to be shown but the texture.
The bytes must be set before calling memory-texture-builder:build.
Passed: a <GdkMemoryTextureBuilder>.
Passed, or left out: a <GBytes>, or #f.
The bytes the texture shows or #f to unset
Sets the colorstate describing the data.
By default, the sRGB colorstate is used. If you don’t know what colorstates are, this is probably the right thing.
Passed: a <GdkMemoryTextureBuilder>.
Passed: a <GdkColorState>.
The colorstate describing the data
Sets the format of the bytes.
The default is r8g8b8a8-premultiplied.
Passed: a <GdkMemoryTextureBuilder>.
Passed: a <GdkMemoryFormat>, or one of its
symbols.
The texture’s format
Sets the height of the texture.
The height must be set before calling memory-texture-builder:build and conform to size requirements
of the provided format.
Passed: a <GdkMemoryTextureBuilder>.
Passed: a 32-bit integer.
The texture’s height or 0 to unset
Sets the offset of the texture for plane.
Passed: a <GdkMemoryTextureBuilder>.
Passed: an unsigned 32-bit integer.
a plane
Passed: an unsigned 64-bit integer.
the texture’s offset for plane
Sets the rowstride of the bytes used.
The rowstride must be set before calling memory-texture-builder:build.
Passed: a <GdkMemoryTextureBuilder>.
Passed: an unsigned 64-bit integer.
the stride or 0 to unset
Sets the stride of the texture for plane.
Passed: a <GdkMemoryTextureBuilder>.
Passed: an unsigned 32-bit integer.
a plane
Passed: an unsigned 64-bit integer.
the texture’s stride for plane
Sets the region to be updated by this texture.
Together with memory-texture-builder:update-texture, this describes
an update of a previous texture.
When rendering animations of large textures, it is possible that consecutive textures are only updating contents in parts of the texture. It is then possible to describe this update via these two properties, so that GTK can avoid rerendering parts that did not change.
An example would be a screen recording where only the mouse pointer moves.
Passed: a <GdkMemoryTextureBuilder>.
Passed, or left out: a <CairoRegion>, or
#f.
the region to update
Sets the texture to be updated by this texture.
See memory-texture-builder:set-update-region for an
explanation.
Passed: a <GdkMemoryTextureBuilder>.
Passed, or left out: a <GdkTexture>, or #f.
the texture to update
Sets the width of the texture.
The width must be set before calling memory-texture-builder:build and conform to size requirements
of the provided format.
Passed: a <GdkMemoryTextureBuilder>.
Passed: a 32-bit integer.
The texture’s width or 0 to unset