gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Structs.IconSource

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

newtype IconSource Source #

Memory-managed wrapper type.

Instances
BoxedObject IconSource Source # 
Instance details

Defined in GI.Gtk.Structs.IconSource

Methods

copy

iconSourceCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m IconSource

Returns: a new IconSource

Deprecated: (Since version 3.10)Use IconTheme instead.

Creates a copy of source; mostly useful for language bindings.

free

iconSourceFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Frees a dynamically-allocated icon source, along with its filename, size, and pixbuf fields if those are not Nothing.

getDirection

iconSourceGetDirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m TextDirection

Returns: text direction this source matches

Deprecated: (Since version 3.10)Use IconTheme instead.

Obtains the text direction this icon source applies to. The return value is only useful/meaningful if the text direction is not wildcarded.

getDirectionWildcarded

iconSourceGetDirectionWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Bool

Returns: True if this icon source is a base for any text direction variant

Deprecated: (Since version 3.10)Use IconTheme instead.

Gets the value set by iconSourceSetDirectionWildcarded.

getFilename

iconSourceGetFilename Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m [Char]

Returns: image filename. This string must not be modified or freed.

Deprecated: (Since version 3.10)Use IconTheme instead.

Retrieves the source filename, or Nothing if none is set. The filename is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

getIconName

iconSourceGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Text

Returns: icon name. This string must not be modified or freed.

Deprecated: (Since version 3.10)Use IconTheme instead.

Retrieves the source icon name, or Nothing if none is set. The icon_name is not a copy, and should not be modified or expected to persist beyond the lifetime of the icon source.

getPixbuf

iconSourceGetPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Pixbuf

Returns: source pixbuf

Deprecated: (Since version 3.10)Use IconTheme instead.

Retrieves the source pixbuf, or Nothing if none is set. In addition, if a filename source is in use, this function in some cases will return the pixbuf from loaded from the filename. This is, for example, true for the GtkIconSource passed to the Style render_icon() virtual function. The reference count on the pixbuf is not incremented.

getSize

iconSourceGetSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Int32

Returns: icon size (IconSize) this source matches.

Deprecated: (Since version 3.10)Use IconTheme instead.

Obtains the icon size this source applies to. The return value is only useful/meaningful if the icon size is not wildcarded.

getSizeWildcarded

iconSourceGetSizeWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Bool

Returns: True if this icon source is a base for any icon size variant

Deprecated: (Since version 3.10)Use IconTheme instead.

Gets the value set by iconSourceSetSizeWildcarded.

getState

iconSourceGetState Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m StateType

Returns: widget state this source matches

Deprecated: (Since version 3.10)Use IconTheme instead.

Obtains the widget state this icon source applies to. The return value is only useful/meaningful if the widget state is not wildcarded.

getStateWildcarded

iconSourceGetStateWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> m Bool

Returns: True if this icon source is a base for any widget state variant

Deprecated: (Since version 3.10)Use IconTheme instead.

Gets the value set by iconSourceSetStateWildcarded.

new

iconSourceNew Source #

Arguments

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

Returns: a new IconSource

Deprecated: (Since version 3.10)Use IconTheme instead.

Creates a new IconSource. A IconSource contains a Pixbuf (or image filename) that serves as the base image for one or more of the icons in a IconSet, along with a specification for which icons in the icon set will be based on that pixbuf or image file. An icon set contains a set of icons that represent “the same” logical concept in different states, different global text directions, and different sizes.

So for example a web browser’s “Back to Previous Page” icon might point in a different direction in Hebrew and in English; it might look different when insensitive; and it might change size depending on toolbar mode (small/large icons). So a single icon set would contain all those variants of the icon. IconSet contains a list of IconSource from which it can derive specific icon variants in the set.

In the simplest case, IconSet contains one source pixbuf from which it derives all variants. The convenience function iconSetNewFromPixbuf handles this case; if you only have one source pixbuf, just use that function.

If you want to use a different base pixbuf for different icon variants, you create multiple icon sources, mark which variants they’ll be used to create, and add them to the icon set with iconSetAddSource.

By default, the icon source has all parameters wildcarded. That is, the icon source will be used as the base icon for any desired text direction, widget state, or icon size.

setDirection

iconSourceSetDirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> TextDirection

direction: text direction this source applies to

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets the text direction this icon source is intended to be used with.

Setting the text direction on an icon source makes no difference if the text direction is wildcarded. Therefore, you should usually call iconSourceSetDirectionWildcarded to un-wildcard it in addition to calling this function.

setDirectionWildcarded

iconSourceSetDirectionWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> Bool

setting: True to wildcard the text direction

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

If the text direction is wildcarded, this source can be used as the base image for an icon in any TextDirection. If the text direction is not wildcarded, then the text direction the icon source applies to should be set with iconSourceSetDirection, and the icon source will only be used with that text direction.

IconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

setFilename

iconSourceSetFilename Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> [Char]

filename: image file to use

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets the name of an image file to use as a base image when creating icon variants for IconSet. The filename must be absolute.

setIconName

iconSourceSetIconName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> Maybe Text

iconName: name of icon to use

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets the name of an icon to look up in the current icon theme to use as a base image when creating icon variants for IconSet.

setPixbuf

iconSourceSetPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsPixbuf a) 
=> IconSource

source: a IconSource

-> a

pixbuf: pixbuf to use as a source

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets a pixbuf to use as a base image when creating icon variants for IconSet.

setSize

iconSourceSetSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> Int32

size: icon size (IconSize) this source applies to

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets the icon size this icon source is intended to be used with.

Setting the icon size on an icon source makes no difference if the size is wildcarded. Therefore, you should usually call iconSourceSetSizeWildcarded to un-wildcard it in addition to calling this function.

setSizeWildcarded

iconSourceSetSizeWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> Bool

setting: True to wildcard the widget state

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

If the icon size is wildcarded, this source can be used as the base image for an icon of any size. If the size is not wildcarded, then the size the source applies to should be set with iconSourceSetSize and the icon source will only be used with that specific size.

IconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

IconSet will normally scale wildcarded source images to produce an appropriate icon at a given size, but will not change the size of source images that match exactly.

setState

iconSourceSetState Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> StateType

state: widget state this source applies to

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Sets the widget state this icon source is intended to be used with.

Setting the widget state on an icon source makes no difference if the state is wildcarded. Therefore, you should usually call iconSourceSetStateWildcarded to un-wildcard it in addition to calling this function.

setStateWildcarded

iconSourceSetStateWildcarded Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSource

source: a IconSource

-> Bool

setting: True to wildcard the widget state

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

If the widget state is wildcarded, this source can be used as the base image for an icon in any StateType. If the widget state is not wildcarded, then the state the source applies to should be set with iconSourceSetState and the icon source will only be used with that specific state.

IconSet prefers non-wildcarded sources (exact matches) over wildcarded sources, and will use an exact match when possible.

IconSet will normally transform wildcarded source images to produce an appropriate icon for a given state, for example lightening an image on prelight, but will not modify source images that match exactly.