gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Structs.IconSet

Description

No description available in the introspection data.

Synopsis

Exported types

newtype IconSet Source #

Memory-managed wrapper type.

Constructors

IconSet (ManagedPtr IconSet) 

Instances

Instances details
Eq IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

Methods

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

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

GBoxed IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

ManagedPtrNewtype IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

Methods

toManagedPtr :: IconSet -> ManagedPtr IconSet

TypedObject IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

Methods

glibType :: IO GType

HasParentTypes IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

IsGValue (Maybe IconSet) Source #

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

Instance details

Defined in GI.Gtk.Structs.IconSet

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes IconSet Source # 
Instance details

Defined in GI.Gtk.Structs.IconSet

type ParentTypes IconSet = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

addSource, copy, ref, renderIcon, renderIconPixbuf, renderIconSurface, unref.

Getters

getSizes.

Setters

None.

addSource

iconSetAddSource Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSet

iconSet: a IconSet

-> IconSource

source: a IconSource

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Icon sets have a list of IconSource, which they use as base icons for rendering icons in different states and sizes. Icons are scaled, made to look insensitive, etc. in iconSetRenderIcon, but IconSet needs base images to work with. The base images and when to use them are described by a IconSource.

This function copies source, so you can reuse the same source immediately without affecting the icon set.

An example of when you’d use this function: 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, and you might add a separate source for each one.

You should nearly always add a “default” icon source with all fields wildcarded, which will be used as a fallback if no more specific source matches. IconSet always prefers more specific icon sources to more generic icon sources. The order in which you add the sources to the icon set does not matter.

iconSetNewFromPixbuf creates a new icon set with a default icon source based on the given pixbuf.

copy

iconSetCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSet

iconSet: a IconSet

-> m IconSet

Returns: a new IconSet identical to the first.

Deprecated: (Since version 3.10)Use IconTheme instead.

Copies iconSet by value.

getSizes

iconSetGetSizes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSet

iconSet: a IconSet

-> m [Int32] 

Deprecated: (Since version 3.10)Use IconTheme instead.

Obtains a list of icon sizes this icon set can render. The returned array must be freed with free.

new

iconSetNew Source #

Arguments

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

Returns: a new IconSet

Deprecated: (Since version 3.10)Use IconTheme instead.

Creates a new IconSet. A IconSet represents a single icon in various sizes and widget states. It can provide a Pixbuf for a given size and state on request, and automatically caches some of the rendered Pixbuf objects.

Normally you would use widgetRenderIconPixbuf instead of using IconSet directly. The one case where you’d use IconSet is to create application-specific icon sets to place in a IconFactory.

newFromPixbuf

iconSetNewFromPixbuf Source #

Arguments

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

pixbuf: a Pixbuf

-> m IconSet

Returns: a new IconSet

Deprecated: (Since version 3.10)Use IconTheme instead.

Creates a new IconSet with pixbuf as the default/fallback source image. If you don’t add any additional IconSource to the icon set, all variants of the icon will be created from pixbuf, using scaling, pixelation, etc. as required to adjust the icon size or make the icon look insensitive/prelighted.

ref

iconSetRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSet

iconSet: a IconSet.

-> m IconSet

Returns: iconSet.

Deprecated: (Since version 3.10)Use IconTheme instead.

Increments the reference count on iconSet.

renderIcon

iconSetRenderIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyle a, IsWidget b) 
=> IconSet

iconSet: a IconSet

-> Maybe a

style: a Style associated with widget, or Nothing

-> TextDirection

direction: text direction

-> StateType

state: widget state

-> Int32

size: icon size (tIconSize). A size of (GtkIconSize)-1 means render at the size of the source and don’t scale.

-> Maybe b

widget: widget that will display the icon, or Nothing. The only use that is typically made of this is to determine the appropriate Screen.

-> Maybe Text

detail: detail to pass to the theme engine, or Nothing. Note that passing a detail of anything but Nothing will disable caching.

-> m Pixbuf

Returns: a Pixbuf to be displayed

Deprecated: (Since version 3.0)Use iconSetRenderIconPixbuf instead

Renders an icon using styleRenderIcon. In most cases, widgetRenderIcon is better, since it automatically provides most of the arguments from the current widget settings. This function never returns Nothing; if the icon can’t be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead.

renderIconPixbuf

iconSetRenderIconPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleContext a) 
=> IconSet

iconSet: a IconSet

-> a

context: a StyleContext

-> Int32

size: icon size (tIconSize). A size of (GtkIconSize)-1 means render at the size of the source and don’t scale.

-> m Pixbuf

Returns: a Pixbuf to be displayed

Deprecated: (Since version 3.10)Use IconTheme instead.

Renders an icon using renderIconPixbuf. In most cases, widgetRenderIconPixbuf is better, since it automatically provides most of the arguments from the current widget settings. This function never returns Nothing; if the icon can’t be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead.

Since: 3.0

renderIconSurface

iconSetRenderIconSurface Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleContext a, IsWindow b) 
=> IconSet

iconSet: a IconSet

-> a

context: a StyleContext

-> Int32

size: icon size (tIconSize). A size of (GtkIconSize)-1 means render at the size of the source and don’t scale.

-> Int32

scale: the window scale to render for

-> Maybe b

forWindow: Window to optimize drawing for, or Nothing

-> m Surface

Returns: a Surface to be displayed

Deprecated: (Since version 3.10)Use IconTheme instead.

Renders an icon using renderIconPixbuf and converts it to a cairo surface.

This function never returns Nothing; if the icon can’t be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead.

Since: 3.10

unref

iconSetUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> IconSet

iconSet: a IconSet

-> m () 

Deprecated: (Since version 3.10)Use IconTheme instead.

Decrements the reference count on iconSet, and frees memory if the reference count reaches 0.