Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- clear
- getAnimation
- getGicon
- getIconName
- getIconSet
- getPixbuf
- getPixelSize
- getStock
- getStorageType
- new
- newFromAnimation
- newFromFile
- newFromGicon
- newFromIconName
- newFromIconSet
- newFromPixbuf
- newFromResource
- newFromStock
- newFromSurface
- setFromAnimation
- setFromFile
- setFromGicon
- setFromIconName
- setFromIconSet
- setFromPixbuf
- setFromResource
- setFromStock
- setFromSurface
- setPixelSize
- Properties
The Image
widget displays an image. Various kinds of object
can be displayed as an image; most typically, you would load a
Pixbuf
("pixel buffer") from a file, and then display that.
There’s a convenience function to do this, imageNewFromFile
,
used as follows:
C code
GtkWidget *image; image = gtk_image_new_from_file ("myfile.png");
If the file isn’t loaded successfully, the image will contain a
“broken image” icon similar to that used in many web browsers.
If you want to handle errors in loading the file yourself,
for example by displaying an error message, then load the image with
pixbufNewFromFile
, then create the Image
with
imageNewFromPixbuf
.
The image file may contain an animation, if so the Image
will
display an animation (PixbufAnimation
) instead of a static image.
Image
is a subclass of Misc
, which implies that you can
align it (center, left, right) and add padding to it, using
Misc
methods.
Image
is a “no window” widget (has no Window
of its own),
so by default does not receive events. If you want to receive events
on the image, such as button clicks, place the image inside a
EventBox
, then connect to the event signals on the event box.
## Handling button press events on a Image
.
C code
static gboolean button_press_callback (GtkWidget *event_box, GdkEventButton *event, gpointer data) { g_print ("Event box clicked at coordinates %f,%f\n", event->x, event->y); // Returning TRUE means we handled the event, so the signal // emission should be stopped (don’t call any further callbacks // that may be connected). Return FALSE to continue invoking callbacks. return TRUE; } static GtkWidget* create_image (void) { GtkWidget *image; GtkWidget *event_box; image = gtk_image_new_from_file ("myfile.png"); event_box = gtk_event_box_new (); gtk_container_add (GTK_CONTAINER (event_box), image); g_signal_connect (G_OBJECT (event_box), "button_press_event", G_CALLBACK (button_press_callback), image); return image; }
When handling events on the event box, keep in mind that coordinates
in the image may be different from event box coordinates due to
the alignment and padding settings on the image (see Misc
).
The simplest way to solve this is to set the alignment to 0.0
(left/top), and set the padding to zero. Then the origin of
the image will be the same as the origin of the event box.
Sometimes an application will want to avoid depending on external data
files, such as image files. GTK+ comes with a program to avoid this,
called “gdk-pixbuf-csource”. This library
allows you to convert an image into a C variable declaration, which
can then be loaded into a Pixbuf
using
pixbufNewFromInline
.
CSS nodes
GtkImage has a single CSS node with the name image.
- newtype Image = Image (ManagedPtr Image)
- class GObject o => IsImage o
- toImage :: IsImage o => o -> IO Image
- noImage :: Maybe Image
- data ImageClearMethodInfo
- imageClear :: (HasCallStack, MonadIO m, IsImage a) => a -> m ()
- data ImageGetAnimationMethodInfo
- imageGetAnimation :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe PixbufAnimation)
- data ImageGetGiconMethodInfo
- imageGetGicon :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Icon, Int32)
- data ImageGetIconNameMethodInfo
- imageGetIconName :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Text, Int32)
- data ImageGetIconSetMethodInfo
- imageGetIconSet :: (HasCallStack, MonadIO m, IsImage a) => a -> m (IconSet, Int32)
- data ImageGetPixbufMethodInfo
- imageGetPixbuf :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Maybe Pixbuf)
- data ImageGetPixelSizeMethodInfo
- imageGetPixelSize :: (HasCallStack, MonadIO m, IsImage a) => a -> m Int32
- data ImageGetStockMethodInfo
- imageGetStock :: (HasCallStack, MonadIO m, IsImage a) => a -> m (Text, Int32)
- data ImageGetStorageTypeMethodInfo
- imageGetStorageType :: (HasCallStack, MonadIO m, IsImage a) => a -> m ImageType
- imageNew :: (HasCallStack, MonadIO m) => m Image
- imageNewFromAnimation :: (HasCallStack, MonadIO m, IsPixbufAnimation a) => a -> m Image
- imageNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m Image
- imageNewFromGicon :: (HasCallStack, MonadIO m, IsIcon a) => a -> Int32 -> m Image
- imageNewFromIconName :: (HasCallStack, MonadIO m) => Maybe Text -> Int32 -> m Image
- imageNewFromIconSet :: (HasCallStack, MonadIO m) => IconSet -> Int32 -> m Image
- imageNewFromPixbuf :: (HasCallStack, MonadIO m, IsPixbuf a) => Maybe a -> m Image
- imageNewFromResource :: (HasCallStack, MonadIO m) => Text -> m Image
- imageNewFromStock :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Image
- imageNewFromSurface :: (HasCallStack, MonadIO m) => Maybe Surface -> m Image
- data ImageSetFromAnimationMethodInfo
- imageSetFromAnimation :: (HasCallStack, MonadIO m, IsImage a, IsPixbufAnimation b) => a -> b -> m ()
- data ImageSetFromFileMethodInfo
- imageSetFromFile :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe [Char] -> m ()
- data ImageSetFromGiconMethodInfo
- imageSetFromGicon :: (HasCallStack, MonadIO m, IsImage a, IsIcon b) => a -> b -> Int32 -> m ()
- data ImageSetFromIconNameMethodInfo
- imageSetFromIconName :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe Text -> Int32 -> m ()
- data ImageSetFromIconSetMethodInfo
- imageSetFromIconSet :: (HasCallStack, MonadIO m, IsImage a) => a -> IconSet -> Int32 -> m ()
- data ImageSetFromPixbufMethodInfo
- imageSetFromPixbuf :: (HasCallStack, MonadIO m, IsImage a, IsPixbuf b) => a -> Maybe b -> m ()
- data ImageSetFromResourceMethodInfo
- imageSetFromResource :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe Text -> m ()
- data ImageSetFromStockMethodInfo
- imageSetFromStock :: (HasCallStack, MonadIO m, IsImage a) => a -> Text -> Int32 -> m ()
- data ImageSetFromSurfaceMethodInfo
- imageSetFromSurface :: (HasCallStack, MonadIO m, IsImage a) => a -> Maybe Surface -> m ()
- data ImageSetPixelSizeMethodInfo
- imageSetPixelSize :: (HasCallStack, MonadIO m, IsImage a) => a -> Int32 -> m ()
- data ImageFilePropertyInfo
- clearImageFile :: (MonadIO m, IsImage o) => o -> m ()
- constructImageFile :: IsImage o => Text -> IO (GValueConstruct o)
- getImageFile :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- imageFile :: AttrLabelProxy "file"
- setImageFile :: (MonadIO m, IsImage o) => o -> Text -> m ()
- data ImageGiconPropertyInfo
- clearImageGicon :: (MonadIO m, IsImage o) => o -> m ()
- constructImageGicon :: (IsImage o, IsIcon a) => a -> IO (GValueConstruct o)
- getImageGicon :: (MonadIO m, IsImage o) => o -> m (Maybe Icon)
- imageGicon :: AttrLabelProxy "gicon"
- setImageGicon :: (MonadIO m, IsImage o, IsIcon a) => o -> a -> m ()
- data ImageIconNamePropertyInfo
- clearImageIconName :: (MonadIO m, IsImage o) => o -> m ()
- constructImageIconName :: IsImage o => Text -> IO (GValueConstruct o)
- getImageIconName :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- imageIconName :: AttrLabelProxy "iconName"
- setImageIconName :: (MonadIO m, IsImage o) => o -> Text -> m ()
- data ImageIconSetPropertyInfo
- clearImageIconSet :: (MonadIO m, IsImage o) => o -> m ()
- constructImageIconSet :: IsImage o => IconSet -> IO (GValueConstruct o)
- getImageIconSet :: (MonadIO m, IsImage o) => o -> m (Maybe IconSet)
- imageIconSet :: AttrLabelProxy "iconSet"
- setImageIconSet :: (MonadIO m, IsImage o) => o -> IconSet -> m ()
- data ImageIconSizePropertyInfo
- constructImageIconSize :: IsImage o => Int32 -> IO (GValueConstruct o)
- getImageIconSize :: (MonadIO m, IsImage o) => o -> m Int32
- imageIconSize :: AttrLabelProxy "iconSize"
- setImageIconSize :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- data ImagePixbufPropertyInfo
- clearImagePixbuf :: (MonadIO m, IsImage o) => o -> m ()
- constructImagePixbuf :: (IsImage o, IsPixbuf a) => a -> IO (GValueConstruct o)
- getImagePixbuf :: (MonadIO m, IsImage o) => o -> m (Maybe Pixbuf)
- imagePixbuf :: AttrLabelProxy "pixbuf"
- setImagePixbuf :: (MonadIO m, IsImage o, IsPixbuf a) => o -> a -> m ()
- data ImagePixbufAnimationPropertyInfo
- clearImagePixbufAnimation :: (MonadIO m, IsImage o) => o -> m ()
- constructImagePixbufAnimation :: (IsImage o, IsPixbufAnimation a) => a -> IO (GValueConstruct o)
- getImagePixbufAnimation :: (MonadIO m, IsImage o) => o -> m (Maybe PixbufAnimation)
- imagePixbufAnimation :: AttrLabelProxy "pixbufAnimation"
- setImagePixbufAnimation :: (MonadIO m, IsImage o, IsPixbufAnimation a) => o -> a -> m ()
- data ImagePixelSizePropertyInfo
- constructImagePixelSize :: IsImage o => Int32 -> IO (GValueConstruct o)
- getImagePixelSize :: (MonadIO m, IsImage o) => o -> m Int32
- imagePixelSize :: AttrLabelProxy "pixelSize"
- setImagePixelSize :: (MonadIO m, IsImage o) => o -> Int32 -> m ()
- data ImageResourcePropertyInfo
- clearImageResource :: (MonadIO m, IsImage o) => o -> m ()
- constructImageResource :: IsImage o => Text -> IO (GValueConstruct o)
- getImageResource :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- imageResource :: AttrLabelProxy "resource"
- setImageResource :: (MonadIO m, IsImage o) => o -> Text -> m ()
- data ImageStockPropertyInfo
- clearImageStock :: (MonadIO m, IsImage o) => o -> m ()
- constructImageStock :: IsImage o => Text -> IO (GValueConstruct o)
- getImageStock :: (MonadIO m, IsImage o) => o -> m (Maybe Text)
- imageStock :: AttrLabelProxy "stock"
- setImageStock :: (MonadIO m, IsImage o) => o -> Text -> m ()
- data ImageStorageTypePropertyInfo
- getImageStorageType :: (MonadIO m, IsImage o) => o -> m ImageType
- imageStorageType :: AttrLabelProxy "storageType"
- data ImageSurfacePropertyInfo
- clearImageSurface :: (MonadIO m, IsImage o) => o -> m ()
- constructImageSurface :: IsImage o => Surface -> IO (GValueConstruct o)
- getImageSurface :: (MonadIO m, IsImage o) => o -> m (Maybe Surface)
- imageSurface :: AttrLabelProxy "surface"
- setImageSurface :: (MonadIO m, IsImage o) => o -> Surface -> m ()
- data ImageUseFallbackPropertyInfo
- constructImageUseFallback :: IsImage o => Bool -> IO (GValueConstruct o)
- getImageUseFallback :: (MonadIO m, IsImage o) => o -> m Bool
- imageUseFallback :: AttrLabelProxy "useFallback"
- setImageUseFallback :: (MonadIO m, IsImage o) => o -> Bool -> m ()
Exported types
GObject Image Source # | |
IsImplementorIface Image Source # | |
IsObject Image Source # | |
IsWidget Image Source # | |
IsMisc Image Source # | |
IsBuildable Image Source # | |
IsImage Image Source # | |
((~) * info (ResolveImageMethod t Image), MethodInfo * info Image p) => IsLabel t (Image -> p) Source # | |
((~) * info (ResolveImageMethod t Image), MethodInfo * info Image p) => IsLabelProxy t (Image -> p) Source # | |
HasAttributeList * Image Source # | |
type AttributeList Image Source # | |
type SignalList Image Source # | |
Methods
clear
data ImageClearMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsImage a) => MethodInfo * ImageClearMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m () |
Resets the image to be empty.
Since: 2.8
getAnimation
data ImageGetAnimationMethodInfo Source #
((~) * signature (m (Maybe PixbufAnimation)), MonadIO m, IsImage a) => MethodInfo * ImageGetAnimationMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Maybe PixbufAnimation) | Returns: the displayed animation, or |
Gets the PixbufAnimation
being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypeAnimation
(see imageGetStorageType
).
The caller of this function does not own a reference to the
returned animation.
getGicon
data ImageGetGiconMethodInfo Source #
((~) * signature (m (Icon, Int32)), MonadIO m, IsImage a) => MethodInfo * ImageGetGiconMethodInfo a signature Source # | |
Gets the Icon
and size being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypeGicon
(see imageGetStorageType
).
The caller of this function does not own a reference to the
returned Icon
.
Since: 2.14
getIconName
data ImageGetIconNameMethodInfo Source #
((~) * signature (m (Text, Int32)), MonadIO m, IsImage a) => MethodInfo * ImageGetIconNameMethodInfo a signature Source # | |
Gets the icon name and size being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypeIconName
(see imageGetStorageType
).
The returned string is owned by the Image
and should not
be freed.
Since: 2.6
getIconSet
data ImageGetIconSetMethodInfo Source #
((~) * signature (m (IconSet, Int32)), MonadIO m, IsImage a) => MethodInfo * ImageGetIconSetMethodInfo a signature Source # | |
Deprecated: (Since version 3.10)Use imageGetIconName
instead.
Gets the icon set and size being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypeIconSet
(see imageGetStorageType
).
getPixbuf
data ImageGetPixbufMethodInfo Source #
((~) * signature (m (Maybe Pixbuf)), MonadIO m, IsImage a) => MethodInfo * ImageGetPixbufMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m (Maybe Pixbuf) | Returns: the displayed pixbuf, or |
Gets the Pixbuf
being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypePixbuf
(see imageGetStorageType
).
The caller of this function does not own a reference to the
returned pixbuf.
getPixelSize
data ImageGetPixelSizeMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsImage a) => MethodInfo * ImageGetPixelSizeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m Int32 | Returns: the pixel size used for named icons. |
Gets the pixel size used for named icons.
Since: 2.6
getStock
data ImageGetStockMethodInfo Source #
((~) * signature (m (Text, Int32)), MonadIO m, IsImage a) => MethodInfo * ImageGetStockMethodInfo a signature Source # | |
Deprecated: (Since version 3.10)Use imageGetIconName
instead.
Gets the stock icon name and size being displayed by the Image
.
The storage type of the image must be ImageTypeEmpty
or
ImageTypeStock
(see imageGetStorageType
).
The returned string is owned by the Image
and should not
be freed.
getStorageType
data ImageGetStorageTypeMethodInfo Source #
((~) * signature (m ImageType), MonadIO m, IsImage a) => MethodInfo * ImageGetStorageTypeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> m ImageType | Returns: image representation being used |
Gets the type of representation being used by the Image
to store image data. If the Image
has no image data,
the return value will be ImageTypeEmpty
.
new
:: (HasCallStack, MonadIO m) | |
=> m Image | Returns: a newly created |
Creates a new empty Image
widget.
newFromAnimation
imageNewFromAnimation Source #
:: (HasCallStack, MonadIO m, IsPixbufAnimation a) | |
=> a |
|
-> m Image | Returns: a new |
Creates a Image
displaying the given animation.
The Image
does not assume a reference to the
animation; you still need to unref it if you own references.
Image
will add its own reference rather than adopting yours.
Note that the animation frames are shown using a timeout with
PRIORITY_DEFAULT
. When using animations to indicate busyness,
keep in mind that the animation will only be shown if the main loop
is not busy with something that has a higher priority.
newFromFile
:: (HasCallStack, MonadIO m) | |
=> [Char] |
|
-> m Image | Returns: a new |
Creates a new Image
displaying the file filename
. If the file
isn’t found or can’t be loaded, the resulting Image
will
display a “broken image” icon. This function never returns Nothing
,
it always returns a valid Image
widget.
If the file contains an animation, the image will contain an animation.
If you need to detect failures to load the file, use
pixbufNewFromFile
to load the file yourself, then create
the Image
from the pixbuf. (Or for animations, use
pixbufAnimationNewFromFile
).
The storage type (imageGetStorageType
) of the returned
image is not defined, it will be whatever is appropriate for
displaying the file.
newFromGicon
:: (HasCallStack, MonadIO m, IsIcon a) | |
=> a |
|
-> Int32 |
|
-> m Image | Returns: a new |
Creates a Image
displaying an icon from the current icon theme.
If the icon name isn’t known, a “broken image” icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.
Since: 2.14
newFromIconName
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> Int32 |
|
-> m Image | Returns: a new |
Creates a Image
displaying an icon from the current icon theme.
If the icon name isn’t known, a “broken image” icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.
Since: 2.6
newFromIconSet
:: (HasCallStack, MonadIO m) | |
=> IconSet |
|
-> Int32 |
|
-> m Image | Returns: a new |
Deprecated: (Since version 3.10)Use imageNewFromIconName
instead.
Creates a Image
displaying an icon set. Sample stock sizes are
GTK_ICON_SIZE_MENU
, GTK_ICON_SIZE_SMALL_TOOLBAR
. Instead of using
this function, usually it’s better to create a IconFactory
, put
your icon sets in the icon factory, add the icon factory to the
list of default factories with iconFactoryAddDefault
, and
then use imageNewFromStock
. This will allow themes to
override the icon you ship with your application.
The Image
does not assume a reference to the
icon set; you still need to unref it if you own references.
Image
will add its own reference rather than adopting yours.
newFromPixbuf
Creates a new Image
displaying pixbuf
.
The Image
does not assume a reference to the
pixbuf; you still need to unref it if you own references.
Image
will add its own reference rather than adopting yours.
Note that this function just creates an Image
from the pixbuf. The
Image
created will not react to state changes. Should you want that,
you should use imageNewFromIconName
.
newFromResource
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Image | Returns: a new |
Creates a new Image
displaying the resource file resourcePath
. If the file
isn’t found or can’t be loaded, the resulting Image
will
display a “broken image” icon. This function never returns Nothing
,
it always returns a valid Image
widget.
If the file contains an animation, the image will contain an animation.
If you need to detect failures to load the file, use
pixbufNewFromFile
to load the file yourself, then create
the Image
from the pixbuf. (Or for animations, use
pixbufAnimationNewFromFile
).
The storage type (imageGetStorageType
) of the returned
image is not defined, it will be whatever is appropriate for
displaying the file.
Since: 3.4
newFromStock
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Int32 |
|
-> m Image | Returns: a new |
Deprecated: (Since version 3.10)Use imageNewFromIconName
instead.
Creates a Image
displaying a stock icon. Sample stock icon
names are STOCK_OPEN
, STOCK_QUIT
. Sample stock sizes
are GTK_ICON_SIZE_MENU
, GTK_ICON_SIZE_SMALL_TOOLBAR
. If the stock
icon name isn’t known, the image will be empty.
You can register your own stock icon names, see
iconFactoryAddDefault
and iconFactoryAdd
.
newFromSurface
setFromAnimation
data ImageSetFromAnimationMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsImage a, IsPixbufAnimation b) => MethodInfo * ImageSetFromAnimationMethodInfo a signature Source # | |
imageSetFromAnimation Source #
:: (HasCallStack, MonadIO m, IsImage a, IsPixbufAnimation b) | |
=> a |
|
-> b |
|
-> m () |
setFromFile
data ImageSetFromFileMethodInfo Source #
((~) * signature (Maybe [Char] -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetFromFileMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Maybe [Char] |
|
-> m () |
See imageNewFromFile
for details.
setFromGicon
data ImageSetFromGiconMethodInfo Source #
((~) * signature (b -> Int32 -> m ()), MonadIO m, IsImage a, IsIcon b) => MethodInfo * ImageSetFromGiconMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a, IsIcon b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
See imageNewFromGicon
for details.
Since: 2.14
setFromIconName
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Maybe Text |
|
-> Int32 |
|
-> m () |
See imageNewFromIconName
for details.
Since: 2.6
setFromIconSet
data ImageSetFromIconSetMethodInfo Source #
((~) * signature (IconSet -> Int32 -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetFromIconSetMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> IconSet |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.10)Use imageSetFromIconName
instead.
See imageNewFromIconSet
for details.
setFromPixbuf
data ImageSetFromPixbufMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsImage a, IsPixbuf b) => MethodInfo * ImageSetFromPixbufMethodInfo a signature Source # | |
See imageNewFromPixbuf
for details.
setFromResource
data ImageSetFromResourceMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetFromResourceMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
See imageNewFromResource
for details.
setFromStock
data ImageSetFromStockMethodInfo Source #
((~) * signature (Text -> Int32 -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetFromStockMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.10)Use imageSetFromIconName
instead.
See imageNewFromStock
for details.
setFromSurface
data ImageSetFromSurfaceMethodInfo Source #
((~) * signature (Maybe Surface -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetFromSurfaceMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Maybe Surface |
|
-> m () |
See imageNewFromSurface
for details.
Since: 3.10
setPixelSize
data ImageSetPixelSizeMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsImage a) => MethodInfo * ImageSetPixelSizeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsImage a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the pixel size to use for named icons. If the pixel size is set
to a value != -1, it is used instead of the icon size set by
imageSetFromIconName
.
Since: 2.6
Properties
file
data ImageFilePropertyInfo Source #
clearImageFile :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageFile :: IsImage o => Text -> IO (GValueConstruct o) Source #
imageFile :: AttrLabelProxy "file" Source #
gicon
data ImageGiconPropertyInfo Source #
clearImageGicon :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageGicon :: (IsImage o, IsIcon a) => a -> IO (GValueConstruct o) Source #
imageGicon :: AttrLabelProxy "gicon" Source #
iconName
data ImageIconNamePropertyInfo Source #
clearImageIconName :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageIconName :: IsImage o => Text -> IO (GValueConstruct o) Source #
imageIconName :: AttrLabelProxy "iconName" Source #
iconSet
data ImageIconSetPropertyInfo Source #
clearImageIconSet :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageIconSet :: IsImage o => IconSet -> IO (GValueConstruct o) Source #
imageIconSet :: AttrLabelProxy "iconSet" Source #
iconSize
data ImageIconSizePropertyInfo Source #
constructImageIconSize :: IsImage o => Int32 -> IO (GValueConstruct o) Source #
imageIconSize :: AttrLabelProxy "iconSize" Source #
pixbuf
data ImagePixbufPropertyInfo Source #
clearImagePixbuf :: (MonadIO m, IsImage o) => o -> m () Source #
constructImagePixbuf :: (IsImage o, IsPixbuf a) => a -> IO (GValueConstruct o) Source #
imagePixbuf :: AttrLabelProxy "pixbuf" Source #
pixbufAnimation
data ImagePixbufAnimationPropertyInfo Source #
clearImagePixbufAnimation :: (MonadIO m, IsImage o) => o -> m () Source #
constructImagePixbufAnimation :: (IsImage o, IsPixbufAnimation a) => a -> IO (GValueConstruct o) Source #
getImagePixbufAnimation :: (MonadIO m, IsImage o) => o -> m (Maybe PixbufAnimation) Source #
imagePixbufAnimation :: AttrLabelProxy "pixbufAnimation" Source #
setImagePixbufAnimation :: (MonadIO m, IsImage o, IsPixbufAnimation a) => o -> a -> m () Source #
pixelSize
data ImagePixelSizePropertyInfo Source #
constructImagePixelSize :: IsImage o => Int32 -> IO (GValueConstruct o) Source #
imagePixelSize :: AttrLabelProxy "pixelSize" Source #
resource
data ImageResourcePropertyInfo Source #
clearImageResource :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageResource :: IsImage o => Text -> IO (GValueConstruct o) Source #
imageResource :: AttrLabelProxy "resource" Source #
stock
data ImageStockPropertyInfo Source #
clearImageStock :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageStock :: IsImage o => Text -> IO (GValueConstruct o) Source #
imageStock :: AttrLabelProxy "stock" Source #
storageType
data ImageStorageTypePropertyInfo Source #
imageStorageType :: AttrLabelProxy "storageType" Source #
surface
data ImageSurfacePropertyInfo Source #
clearImageSurface :: (MonadIO m, IsImage o) => o -> m () Source #
constructImageSurface :: IsImage o => Surface -> IO (GValueConstruct o) Source #
imageSurface :: AttrLabelProxy "surface" Source #
useFallback
data ImageUseFallbackPropertyInfo Source #
constructImageUseFallback :: IsImage o => Bool -> IO (GValueConstruct o) Source #
imageUseFallback :: AttrLabelProxy "useFallback" Source #