gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.Texture

Description

The Texture structure contains only private data and should be accessed using the provided API

Since: 0.2

Synopsis

Exported types

newtype Texture Source #

Memory-managed wrapper type.

Constructors

Texture (ManagedPtr Texture) 

Instances

Instances details
Eq Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

Methods

(==) :: Texture -> Texture -> Bool #

(/=) :: Texture -> Texture -> Bool #

GObject Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

ManagedPtrNewtype Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

Methods

toManagedPtr :: Texture -> ManagedPtr Texture

TypedObject Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

Methods

glibType :: IO GType

HasParentTypes Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

IsGValue (Maybe Texture) Source #

Convert Texture to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.Texture

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Texture -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Texture)

type ParentTypes Texture Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

type ParentTypes Texture = '[Actor, Object, ImplementorIface, Animatable, Container, Scriptable]

class (GObject o, IsDescendantOf Texture o) => IsTexture o Source #

Type class for types which can be safely cast to Texture, for instance with toTexture.

Instances

Instances details
(GObject o, IsDescendantOf Texture o) => IsTexture o Source # 
Instance details

Defined in GI.Clutter.Objects.Texture

toTexture :: (MonadIO m, IsTexture o) => o -> m Texture Source #

Cast to Texture, 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

addAction, addActionWithName, addActor, addChild, addConstraint, addConstraintWithName, addEffect, addEffectWithName, addTransition, allocate, allocateAlignFill, allocateAvailableSize, allocatePreferredSize, animateProperty, animateWithAlphav, animateWithTimelinev, animatev, applyRelativeTransformToPoint, applyTransformToPoint, bindModel, bindProperty, bindPropertyFull, childGetProperty, childNotify, childSetProperty, clearActions, clearConstraints, clearEffects, contains, continuePaint, createChildMeta, createPangoContext, createPangoLayout, destroy, destroyAllChildren, destroyChildMeta, detachAnimation, event, findChildByName, findProperty, forceFloating, foreach, foreachWithInternals, freezeNotify, getv, grabKeyFocus, hasActions, hasAllocation, hasClip, hasConstraints, hasEffects, hasKeyFocus, hasOverlaps, hasPointer, hide, hideAll, insertChildAbove, insertChildAtIndex, insertChildBelow, interpolateValue, isFloating, isInClonePaint, isMapped, isRealized, isRotated, isScaled, isVisible, lower, lowerBottom, lowerChild, map, moveAnchorPoint, moveAnchorPointFromGravity, moveBy, needsExpand, notify, notifyByPspec, paint, parseCustomNode, popInternal, pushInternal, queueRedraw, queueRedrawWithClip, queueRelayout, raise, raiseChild, raiseTop, realize, ref, refSink, removeAction, removeActionByName, removeActor, removeAllChildren, removeAllTransitions, removeChild, removeClip, removeConstraint, removeConstraintByName, removeEffect, removeEffectByName, removeTransition, reparent, replaceChild, restoreEasingState, runDispose, saveEasingState, shouldPickPaint, show, showAll, sortDepthOrder, stealData, stealQdata, thawNotify, transformStagePoint, unmap, unparent, unrealize, unref, unsetFlags, watchClosure.

Getters

getAbsAllocationVertices, getAccessible, getAction, getActions, getAllocationBox, getAllocationGeometry, getAllocationVertices, getAnchorPoint, getAnchorPointGravity, getAnimation, getBackgroundColor, getBaseSize, getChildAtIndex, getChildMeta, getChildTransform, getChildren, getClip, getClipToAllocation, getCoglMaterial, getCoglTexture, getConstraint, getConstraints, getContent, getContentBox, getContentGravity, getContentRepeat, getContentScalingFilters, getData, getDefaultPaintVolume, getDepth, getEasingDelay, getEasingDuration, getEasingMode, getEffect, getEffects, getFilterQuality, getFirstChild, getFixedPositionSet, getFlags, getGeometry, getGid, getHeight, getId, getInitialState, getKeepAspectRatio, getLastChild, getLayoutManager, getLoadAsync, getLoadDataAsync, getMargin, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxTileWaste, getNChildren, getName, getNextSibling, getOffscreenRedirect, getOpacity, getPaintBox, getPaintOpacity, getPaintVisibility, getPaintVolume, getPangoContext, getParent, getPickWithAlpha, getPivotPoint, getPivotPointZ, getPixelFormat, getPosition, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreviousSibling, getProperty, getQdata, getReactive, getRepeat, getRequestMode, getRotation, getRotationAngle, getScale, getScaleCenter, getScaleGravity, getScaleZ, getShader, getSize, getStage, getSyncSize, getTextDirection, getTransform, getTransformationMatrix, getTransformedPaintVolume, getTransformedPosition, getTransformedSize, getTransition, getTranslation, getWidth, getX, getXAlign, getXExpand, getY, getYAlign, getYExpand, getZPosition, getZRotationGravity.

Setters

setAllocation, setAnchorPoint, setAnchorPointFromGravity, setAreaFromRgbData, setBackgroundColor, setChildAboveSibling, setChildAtIndex, setChildBelowSibling, setChildTransform, setClip, setClipToAllocation, setCoglMaterial, setCoglTexture, setContent, setContentGravity, setContentRepeat, setContentScalingFilters, setCustomProperty, setData, setDataFull, setDepth, setEasingDelay, setEasingDuration, setEasingMode, setFilterQuality, setFinalState, setFixedPositionSet, setFlags, setFromFile, setFromRgbData, setFromYuvData, setGeometry, setHeight, setId, setKeepAspectRatio, setLayoutManager, setLoadAsync, setLoadDataAsync, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setName, setOffscreenRedirect, setOpacity, setParent, setPickWithAlpha, setPivotPoint, setPivotPointZ, setPosition, setProperty, setReactive, setRepeat, setRequestMode, setRotation, setRotationAngle, setScale, setScaleFull, setScaleWithGravity, setScaleZ, setShader, setShaderParam, setShaderParamFloat, setShaderParamInt, setSize, setSyncSize, setTextDirection, setTransform, setTranslation, setWidth, setX, setXAlign, setXExpand, setY, setYAlign, setYExpand, setZPosition, setZRotationFromGravity.

getBaseSize

textureGetBaseSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m (Int32, Int32) 

Deprecated: (Since version 1.12)Use Image and contentGetPreferredSize instead

Gets the size in pixels of the untransformed underlying image

getCoglMaterial

textureGetCoglMaterial Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> m (Ptr ())

Returns: a handle for a Material. The material is owned by the Texture and it should not be unreferenced

Deprecated: (Since version 1.12)No replacement is available; it's not advisable to modify the Cogl pipeline of an actor. Use a Content implementation and modify the pipeline during the paint sequence

Returns a handle to the underlying COGL material used for drawing the actor.

Since: 1.0

getCoglTexture

textureGetCoglTexture Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> m (Ptr ())

Returns: a CoglHandle for the texture. The returned handle is owned by the Texture and it should not be unreferenced

Deprecated: (Since version 1.12)No replacement available; it's not advisable to modify the Cogl pipeline of an actor. Use a Content implementation and set up the pipeline during the paint sequence instead.

Retrieves the handle to the underlying COGL texture used for drawing the actor. No extra reference is taken so if you need to keep the handle then you should call handleRef on it.

The texture handle returned is the first layer of the material handle used by the Texture. If you need to access the other layers you should use textureGetCoglMaterial instead and use the Material API.

Since: 0.8

getFilterQuality

textureGetFilterQuality Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> m TextureQuality

Returns: The filter quality value.

Deprecated: (Since version 1.12)Use Image and actorGetContentScalingFilters instead

Gets the filter quality used when scaling a texture.

Since: 0.8

getKeepAspectRatio

textureGetKeepAspectRatio Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m Bool

Returns: True if the Texture should maintain the aspect ratio of the underlying image

Deprecated: (Since version 1.12)Use Image and actorGetContentGravity instead

Retrieves the value set using textureSetKeepAspectRatio

Since: 1.0

getLoadAsync

textureGetLoadAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m Bool

Returns: True if the Texture should load the data from disk asynchronously

Deprecated: (Since version 1.12)There is no direct replacement for this function

Retrieves the value set using textureSetLoadAsync

Since: 1.0

getLoadDataAsync

textureGetLoadDataAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m Bool

Returns: True if the Texture should load the image data from a file asynchronously

Deprecated: (Since version 1.12)There is no direct replacement for this function

Retrieves the value set by textureSetLoadDataAsync

Since: 1.0

getMaxTileWaste

textureGetMaxTileWaste Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> m Int32

Returns: The maximum waste or -1 if the texture waste is unlimited.

Deprecated: (Since version 1.12)No replacement is available

Gets the maximum waste that will be used when creating a texture or -1 if slicing is disabled.

Since: 0.8

getPickWithAlpha

textureGetPickWithAlpha Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m Bool

Returns: True if the Texture should define its shape using the alpha channel when picking.

Deprecated: (Since version 1.12)There is no direct replacement for this function

Retrieves the value set by textureSetLoadDataAsync

Since: 1.4

getPixelFormat

textureGetPixelFormat Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m PixelFormat

Returns: a PixelFormat value

Deprecated: (Since version 1.12)There is no direct replacement for this function

Retrieves the pixel format used by texture. This is equivalent to:

 handle = clutter_texture_get_pixel_format (texture);

 if (handle != COGL_INVALID_HANDLE)
   format = cogl_texture_get_format (handle);

Since: 1.0

getRepeat

textureGetRepeat Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m (Bool, Bool) 

Deprecated: (Since version 1.12)Use Image and actorGetContentRepeat instead

Retrieves the horizontal and vertical repeat values set using textureSetRepeat

Since: 1.0

getSyncSize

textureGetSyncSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> m Bool

Returns: True if the Texture should have the same preferred size of the underlying image data

Deprecated: (Since version 1.12)There is no direct replacement

Retrieves the value set with textureSetSyncSize

Since: 1.0

new

textureNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Texture

Returns: A newly created Texture object.

Deprecated: (Since version 1.12)Use Image instead

Creates a new empty Texture object.

newFromActor

textureNewFromActor Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> a

actor: A source Actor

-> m Texture

Returns: A newly created Texture object, or Nothing on failure.

Deprecated: (Since version 1.8)Use the OffscreenEffect and ShaderEffect directly on the intended Actor to replace the functionality of this function.

Creates a new Texture object with its source a prexisting actor (and associated children). The textures content will contain 'live' redirected output of the actors scene.

Note this function is intented as a utility call for uniformly applying shaders to groups and other potential visual effects. It requires that the FeatureFlagsOffscreen feature is supported by the current backend and the target system.

Some tips on usage:

  • The source actor must be visible
  • The source actor must have a parent in order for it to be allocated a size from the layouting mechanism. If the source actor does not have a parent when this function is called then the ClutterTexture will adopt it and allocate it at its preferred size. Using this you can clone an actor that is otherwise not displayed. Because of this feature if you do intend to display the source actor then you must make sure that the actor is parented before calling textureNewFromActor or that you unparent it before adding it to a container.
  • When getting the image for the clone texture, Clutter will attempt to render the source actor exactly as it would appear if it was rendered on screen. The source actor's parent transformations are taken into account. Therefore if your source actor is rotated along the X or Y axes so that it has some depth, the texture will appear differently depending on the on-screen location of the source actor. While painting the source actor, Clutter will set up a temporary asymmetric perspective matrix as the projection matrix so that the source actor will be projected as if a small section of the screen was being viewed. Before version 0.8.2, an orthogonal identity projection was used which meant that the source actor would be clipped if any part of it was not on the zero Z-plane.
  • Avoid reparenting the source with the created texture.
  • A group can be padded with a transparent rectangle as to provide a border to contents for shader output (blurring text for example).
  • The texture will automatically resize to contain a further transformed source. However, this involves overhead and can be avoided by placing the source actor in a bounding group sized large enough to contain any child tranformations.
  • Uploading pixel data to the texture (e.g by using textureSetFromFile) will destroy the offscreen texture data and end redirection.
  • textureGetData with the handle returned by textureGetCoglTexture can be used to read the offscreen texture pixels into a pixbuf.

Since: 0.6

newFromFile

textureNewFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

filename: The name of an image file to load.

-> m Texture

Returns: A newly created Texture object or NULL on error. (Can throw GError)

Deprecated: (Since version 1.12)No direct replacement is available. Use Image and platform-specific image loading API, like GdkPixbuf, instead

Creates a new ClutterTexture actor to display the image contained a file. If the image failed to load then NULL is returned and error is set.

Since: 0.8

setAreaFromRgbData

textureSetAreaFromRgbData Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> Ptr Word8

data: Image data in RGB type colorspace.

-> Bool

hasAlpha: Set to TRUE if image data has an alpha channel.

-> Int32

x: X coordinate of upper left corner of region to update.

-> Int32

y: Y coordinate of upper left corner of region to update.

-> Int32

width: Width in pixels of region to update.

-> Int32

height: Height in pixels of region to update.

-> Int32

rowstride: Distance in bytes between row starts on source buffer.

-> Int32

bpp: bytes per pixel (Currently only 3 and 4 supported, depending on hasAlpha)

-> [TextureFlags]

flags: TextureFlags

-> m ()

(Can throw GError)

Deprecated: (Since version 1.12)Use Image and imageSetArea instead

Updates a sub-region of the pixel data in a Texture.

Since: 0.6

setCoglMaterial

textureSetCoglMaterial Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> Ptr ()

coglMaterial: A CoglHandle for a material

-> m () 

Deprecated: (Since version 1.12)No replacement is available; it's not advisable to modify the Cogl pipeline of an actor. Use a Content implementation and modify the pipeline during the paint sequence

Replaces the underlying Cogl material drawn by this actor with coglMaterial. A reference to the material is taken so if the handle is no longer needed it should be deref'd with cogl_handle_unref. Texture data is attached to the material so calling this function also replaces the Cogl texture. Texture requires that the material have a texture layer so you should set one on the material before calling this function.

Since: 0.8

setCoglTexture

textureSetCoglTexture Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> Ptr ()

coglTex: A CoglHandle for a texture

-> m () 

Deprecated: (Since version 1.12)No replacement available; it's not advisable to modify the Cogl pipeline of an actor. Use a Content implementation and set up the pipeline during the paint sequence instead.

Replaces the underlying COGL texture drawn by this actor with coglTex. A reference to the texture is taken so if the handle is no longer needed it should be deref'd with cogl_handle_unref.

Since: 0.8

setFilterQuality

textureSetFilterQuality Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> TextureQuality

filterQuality: new filter quality value

-> m () 

Deprecated: (Since version 1.12)Use Image and actorSetContentScalingFilters instead

Sets the filter quality when scaling a texture. The quality is an enumeration currently the following values are supported: TextureQualityLow which is fast but only uses nearest neighbour interpolation. TextureQualityMedium which is computationally a bit more expensive (bilinear interpolation), and TextureQualityHigh which uses extra texture memory resources to improve scaled down rendering as well (by using mipmaps). The default value is TextureQualityMedium.

Since: 0.8

setFromFile

textureSetFromFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> Text

filename: The filename of the image in GLib file name encoding

-> m ()

(Can throw GError)

Deprecated: (Since version 1.12)Use Image and platform-specific image loading API, like GdkPixbuf, instead

Sets the Texture image data from an image file. In case of failure, False is returned and error is set.

If Texture:loadAsync is set to True, this function will return as soon as possible, and the actual image loading from disk will be performed asynchronously. Texture::sizeChange will be emitten when the size of the texture is available and Texture::loadFinished will be emitted when the image has been loaded or if an error occurred.

Since: 0.8

setFromRgbData

textureSetFromRgbData Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Ptr Word8

data: image data in RGBA type colorspace.

-> Bool

hasAlpha: set to True if image data has an alpha channel.

-> Int32

width: width in pixels of image data.

-> Int32

height: height in pixels of image data

-> Int32

rowstride: distance in bytes between row starts.

-> Int32

bpp: bytes per pixel (currently only 3 and 4 supported, depending on the value of hasAlpha)

-> [TextureFlags]

flags: TextureFlags

-> m ()

(Can throw GError)

Deprecated: (Since version 1.12)Use Image and imageSetData instead

Sets Texture image data.

Since: 0.4

setFromYuvData

textureSetFromYuvData Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: A Texture

-> Ptr Word8

data: Image data in YUV type colorspace.

-> Int32

width: Width in pixels of image data.

-> Int32

height: Height in pixels of image data

-> [TextureFlags]

flags: TextureFlags

-> m ()

(Can throw GError)

Deprecated: (Since version 1.10)Use a custom Content implementation and set up the Cogl pipeline using a PipelineNode with a fragment shader instead.

Sets a Texture from YUV image data. If an error occurred, False is returned and error is set.

The YUV support depends on the driver; the format supported by the few drivers exposing this capability are not really useful.

The proper way to convert image data in any YUV colorspace to any RGB colorspace is to use a fragment shader associated with the Texture material.

Since: 0.4

setKeepAspectRatio

textureSetKeepAspectRatio Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

keepAspect: True to maintain aspect ratio

-> m () 

Deprecated: (Since version 1.12)Use Image and actorSetContentGravity with ContentGravityResizeAspect instead

Sets whether texture should have a preferred size maintaining the aspect ratio of the underlying image

Since: 1.0

setLoadAsync

textureSetLoadAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

loadAsync: True if the texture should asynchronously load data from a filename

-> m () 

Deprecated: (Since version 1.12)There is no direct replacement for this function. Use Image and platform-specific API for loading image data asynchronously, like GdkPixbuf

Sets whether texture should use a worker thread to load the data from disk asynchronously. Setting loadAsync to True will make textureSetFromFile return immediately.

See the Texture:loadAsync property documentation, and textureSetLoadDataAsync.

Since: 1.0

setLoadDataAsync

textureSetLoadDataAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

loadAsync: True if the texture should asynchronously load data from a filename

-> m () 

Deprecated: (Since version 1.12)There is no direct replacement for this function. Use Image and platform-specific API for loading image data asynchronously, like GdkPixbuf

Sets whether texture should use a worker thread to load the data from disk asynchronously. Setting loadAsync to True will make textureSetFromFile block until the Texture has determined the width and height of the image data.

See the Texture:loadAsync property documentation, and textureSetLoadAsync.

Since: 1.0

setPickWithAlpha

textureSetPickWithAlpha Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

pickWithAlpha: True if the alpha channel should affect the picking shape

-> m () 

Deprecated: (Since version 1.12)There is no direct replacement for this function

Sets whether texture should have it's shape defined by the alpha channel when picking.

Be aware that this is a bit more costly than the default picking due to the texture lookup, extra test against the alpha value and the fact that it will also interrupt the batching of geometry done internally.

Also there is currently no control over the threshold used to determine what value of alpha is considered pickable, and so only fully opaque parts of the texture will react to picking.

Since: 1.4

setRepeat

textureSetRepeat Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

repeatX: True if the texture should repeat horizontally

-> Bool

repeatY: True if the texture should repeat vertically

-> m () 

Deprecated: (Since version 1.12)Use Image and actorSetContentRepeat instead

Sets whether the texture should repeat horizontally or vertically when the actor size is bigger than the image size

Since: 1.0

setSyncSize

textureSetSyncSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsTexture a) 
=> a

texture: a Texture

-> Bool

syncSize: True if the texture should have the same size of the underlying image data

-> m () 

Deprecated: (Since version 1.12)No replacement is available. A Actor using Image with a RequestModeContentSize request mode will automatically bind the preferred size of the content to the preferred size of the actor

Sets whether texture should have the same preferred size as the underlying image data.

Since: 1.0

Properties

disableSlicing

No description available in the introspection data.

constructTextureDisableSlicing :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “disable-slicing” property. This is rarely needed directly, but it is used by new.

getTextureDisableSlicing :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “disable-slicing” property. When overloading is enabled, this is equivalent to

get texture #disableSlicing

filename

The path of the file containing the image data to be displayed by the texture.

This property is unset when using the clutter_texture_set_from_*_data() family of functions.

clearTextureFilename :: (MonadIO m, IsTexture o) => o -> m () Source #

Set the value of the “filename” property to Nothing. When overloading is enabled, this is equivalent to

clear #filename

constructTextureFilename :: (IsTexture o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “filename” property. This is rarely needed directly, but it is used by new.

getTextureFilename :: (MonadIO m, IsTexture o) => o -> m (Maybe Text) Source #

Get the value of the “filename” property. When overloading is enabled, this is equivalent to

get texture #filename

setTextureFilename :: (MonadIO m, IsTexture o) => o -> Text -> m () Source #

Set the value of the “filename” property. When overloading is enabled, this is equivalent to

set texture [ #filename := value ]

filterQuality

No description available in the introspection data.

constructTextureFilterQuality :: (IsTexture o, MonadIO m) => TextureQuality -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “filter-quality” property. This is rarely needed directly, but it is used by new.

getTextureFilterQuality :: (MonadIO m, IsTexture o) => o -> m TextureQuality Source #

Get the value of the “filter-quality” property. When overloading is enabled, this is equivalent to

get texture #filterQuality

setTextureFilterQuality :: (MonadIO m, IsTexture o) => o -> TextureQuality -> m () Source #

Set the value of the “filter-quality” property. When overloading is enabled, this is equivalent to

set texture [ #filterQuality := value ]

keepAspectRatio

No description available in the introspection data.

constructTextureKeepAspectRatio :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “keep-aspect-ratio” property. This is rarely needed directly, but it is used by new.

getTextureKeepAspectRatio :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “keep-aspect-ratio” property. When overloading is enabled, this is equivalent to

get texture #keepAspectRatio

setTextureKeepAspectRatio :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “keep-aspect-ratio” property. When overloading is enabled, this is equivalent to

set texture [ #keepAspectRatio := value ]

loadAsync

Tries to load a texture from a filename by using a local thread to perform the read operations. The initially created texture has dimensions 0x0 when the true size becomes available the Texture::sizeChange signal is emitted and when the image has completed loading the Texture::loadFinished signal is emitted.

Threading is only enabled if g_thread_init() has been called prior to init, otherwise Texture will use the main loop to load the image.

The upload of the texture data on the GL pipeline is not asynchronous, as it must be performed from within the same thread that called main.

Since: 1.0

constructTextureLoadAsync :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “load-async” property. This is rarely needed directly, but it is used by new.

setTextureLoadAsync :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “load-async” property. When overloading is enabled, this is equivalent to

set texture [ #loadAsync := value ]

loadDataAsync

Like Texture:loadAsync but loads the width and height synchronously causing some blocking.

Since: 1.0

constructTextureLoadDataAsync :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “load-data-async” property. This is rarely needed directly, but it is used by new.

setTextureLoadDataAsync :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “load-data-async” property. When overloading is enabled, this is equivalent to

set texture [ #loadDataAsync := value ]

pickWithAlpha

No description available in the introspection data.

constructTexturePickWithAlpha :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “pick-with-alpha” property. This is rarely needed directly, but it is used by new.

getTexturePickWithAlpha :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “pick-with-alpha” property. When overloading is enabled, this is equivalent to

get texture #pickWithAlpha

setTexturePickWithAlpha :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “pick-with-alpha” property. When overloading is enabled, this is equivalent to

set texture [ #pickWithAlpha := value ]

pixelFormat

No description available in the introspection data.

getTexturePixelFormat :: (MonadIO m, IsTexture o) => o -> m PixelFormat Source #

Get the value of the “pixel-format” property. When overloading is enabled, this is equivalent to

get texture #pixelFormat

repeatX

No description available in the introspection data.

constructTextureRepeatX :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “repeat-x” property. This is rarely needed directly, but it is used by new.

getTextureRepeatX :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “repeat-x” property. When overloading is enabled, this is equivalent to

get texture #repeatX

setTextureRepeatX :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “repeat-x” property. When overloading is enabled, this is equivalent to

set texture [ #repeatX := value ]

repeatY

No description available in the introspection data.

constructTextureRepeatY :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “repeat-y” property. This is rarely needed directly, but it is used by new.

getTextureRepeatY :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “repeat-y” property. When overloading is enabled, this is equivalent to

get texture #repeatY

setTextureRepeatY :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “repeat-y” property. When overloading is enabled, this is equivalent to

set texture [ #repeatY := value ]

syncSize

No description available in the introspection data.

constructTextureSyncSize :: (IsTexture o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “sync-size” property. This is rarely needed directly, but it is used by new.

getTextureSyncSize :: (MonadIO m, IsTexture o) => o -> m Bool Source #

Get the value of the “sync-size” property. When overloading is enabled, this is equivalent to

get texture #syncSize

setTextureSyncSize :: (MonadIO m, IsTexture o) => o -> Bool -> m () Source #

Set the value of the “sync-size” property. When overloading is enabled, this is equivalent to

set texture [ #syncSize := value ]

tileWaste

No description available in the introspection data.

getTextureTileWaste :: (MonadIO m, IsTexture o) => o -> m Int32 Source #

Get the value of the “tile-waste” property. When overloading is enabled, this is equivalent to

get texture #tileWaste

Signals

loadFinished

type TextureLoadFinishedCallback Source #

Arguments

 = GError

error: A set error, or Nothing

-> IO () 

Deprecated: (Since version 1.12)No replacement is available

The loadFinished signal is emitted when a texture load has completed. If there was an error during loading, error will be set, otherwise it will be Nothing

Since: 1.0

afterTextureLoadFinished :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TextureLoadFinishedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the loadFinished signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after texture #loadFinished callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextureLoadFinished :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TextureLoadFinishedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the loadFinished signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on texture #loadFinished callback

pixbufChange

type TexturePixbufChangeCallback = IO () Source #

Deprecated: (Since version 1.12)No replacement is available

The pixbufChange signal is emitted each time the pixbuf used by texture changes.

afterTexturePixbufChange :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TexturePixbufChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pixbufChange signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after texture #pixbufChange callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTexturePixbufChange :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TexturePixbufChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pixbufChange signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on texture #pixbufChange callback

sizeChange

type TextureSizeChangeCallback Source #

Arguments

 = Int32

width: the width of the new texture

-> Int32

height: the height of the new texture

-> IO () 

Deprecated: (Since version 1.12)No replacement is available

The sizeChange signal is emitted each time the size of the pixbuf used by texture changes. The new size is given as argument to the callback.

afterTextureSizeChange :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TextureSizeChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the sizeChange signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after texture #sizeChange callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onTextureSizeChange :: (IsTexture a, MonadIO m) => a -> ((?self :: a) => TextureSizeChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the sizeChange signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on texture #sizeChange callback