KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/gtk-doc/html/gtk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/gtk-doc/html/gtk/GtkImage.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkImage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="DisplayWidgets.html" title="Display Widgets">
<link rel="prev" href="GtkAccelLabel.html" title="GtkAccelLabel">
<link rel="next" href="GtkLabel.html" title="GtkLabel">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and 
         GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkAccelLabel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkLabel.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2852724" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2853974" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2853680" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id2853733" class="shortcut">Implemented Interfaces</a>
                  &#160;|&#160;
                  <a href="#id2853756" class="shortcut">Properties</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkImage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2852724"></a><span class="refentrytitle">GtkImage</span>
</h2>
<p>GtkImage &#8212; A widget displaying an image</p>
</td>
<td valign="top" align="right"><img src="image.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;


            <a href="GtkImage.html#GtkImage-struct">GtkImage</a>;
enum        <a href="GtkImage.html#GtkImageType">GtkImageType</a>;
void        <a href="GtkImage.html#gtk-image-get-icon-set">gtk_image_get_icon_set</a>          (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> **icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);
void        <a href="GtkImage.html#gtk-image-get-image">gtk_image_get_image</a>             (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> **gdk_image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  <a href="GtkImage.html#gtk-image-get-pixbuf">gtk_image_get_pixbuf</a>            (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);
void        <a href="GtkImage.html#gtk-image-get-pixmap">gtk_image_get_pixmap</a>            (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> **pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);
void        <a href="GtkImage.html#gtk-image-get-stock">gtk_image_get_stock</a>             (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);
<a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a>* <a href="GtkImage.html#gtk-image-get-animation">gtk_image_get_animation</a> (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);
void        <a href="GtkImage.html#gtk-image-get-icon-name">gtk_image_get_icon_name</a>         (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             G_CONST_RETURN <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);
<a href="GtkImage.html#GtkImageType">GtkImageType</a> <a href="GtkImage.html#gtk-image-get-storage-type">gtk_image_get_storage_type</a>     (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-file">gtk_image_new_from_file</a>         (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-icon-set">gtk_image_new_from_icon_set</a>     (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-image">gtk_image_new_from_image</a>        (<a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-pixbuf">gtk_image_new_from_pixbuf</a>       (<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-pixmap">gtk_image_new_from_pixmap</a>       (<a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> *pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-stock">gtk_image_new_from_stock</a>        (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-animation">gtk_image_new_from_animation</a>    (<a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a> *animation);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new-from-icon-name">gtk_image_new_from_icon_name</a>    (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void        <a href="GtkImage.html#gtk-image-set-from-file">gtk_image_set_from_file</a>         (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);
void        <a href="GtkImage.html#gtk-image-set-from-icon-set">gtk_image_set_from_icon_set</a>     (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void        <a href="GtkImage.html#gtk-image-set-from-image">gtk_image_set_from_image</a>        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *gdk_image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);
void        <a href="GtkImage.html#gtk-image-set-from-pixbuf">gtk_image_set_from_pixbuf</a>       (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);
void        <a href="GtkImage.html#gtk-image-set-from-pixmap">gtk_image_set_from_pixmap</a>       (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> *pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);
void        <a href="GtkImage.html#gtk-image-set-from-stock">gtk_image_set_from_stock</a>        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void        <a href="GtkImage.html#gtk-image-set-from-animation">gtk_image_set_from_animation</a>    (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a> *animation);
void        <a href="GtkImage.html#gtk-image-set-from-icon-name">gtk_image_set_from_icon_name</a>    (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);
void        <a href="GtkImage.html#gtk-image-clear">gtk_image_clear</a>                 (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkImage.html#gtk-image-new">gtk_image_new</a>                   (void);
void        <a href="GtkImage.html#gtk-image-set">gtk_image_set</a>                   (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *val,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);
void        <a href="GtkImage.html#gtk-image-get">gtk_image_get</a>                   (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> **val,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);
void        <a href="GtkImage.html#gtk-image-set-pixel-size">gtk_image_set_pixel_size</a>        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pixel_size);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>        <a href="GtkImage.html#gtk-image-get-pixel-size">gtk_image_get_pixel_size</a>        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2853680"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
         +----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a href="GtkMisc.html" title="GtkMisc">GtkMisc</a>
                           +----GtkImage
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2853733"></a><h2>Implemented Interfaces</h2>
<p>
GtkImage implements
 AtkImplementorIface.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2853756"></a><h2>Properties</h2>
<pre class="synopsis">

  "<a href="GtkImage.html#GtkImage--file">file</a>"                 <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write
  "<a href="GtkImage.html#GtkImage--icon-name">icon-name</a>"            <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write
  "<a href="GtkImage.html#GtkImage--icon-set">icon-set</a>"             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>            : Read / Write
  "<a href="GtkImage.html#GtkImage--icon-size">icon-size</a>"            <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a href="GtkImage.html#GtkImage--image">image</a>"                <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a>              : Read / Write
  "<a href="GtkImage.html#GtkImage--mask">mask</a>"                 <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a>             : Read / Write
  "<a href="GtkImage.html#GtkImage--pixbuf">pixbuf</a>"               <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>             : Read / Write
  "<a href="GtkImage.html#GtkImage--pixbuf-animation">pixbuf-animation</a>"     <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a>    : Read / Write
  "<a href="GtkImage.html#GtkImage--pixel-size">pixel-size</a>"           <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write
  "<a href="GtkImage.html#GtkImage--pixmap">pixmap</a>"               <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a>             : Read / Write
  "<a href="GtkImage.html#GtkImage--stock">stock</a>"                <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write
  "<a href="GtkImage.html#GtkImage--storage-type">storage-type</a>"         <a href="GtkImage.html#GtkImageType">GtkImageType</a>          : Read
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2853974"></a><h2>Description</h2>
<p>
The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget displays an image. Various kinds of object 
can be displayed as an image; most typically, you would load a 
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> ("pixel buffer") from a file, and then display that. 
There's a convenience function to do this, <a href="GtkImage.html#gtk-image-new-from-file"><code class="function">gtk_image_new_from_file()</code></a>,
used as follows:
</p>
<div class="informalexample"><pre class="programlisting">
  GtkWidget *image;
  image = gtk_image_new_from_file ("myfile.png");
</pre></div>
<p>
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
<a
href="../gdk-pixbuf/gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file"
><code class="function">gdk_pixbuf_new_from_file()</code></a>, then create the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> with 
<a href="GtkImage.html#gtk-image-new-from-pixbuf"><code class="function">gtk_image_new_from_pixbuf()</code></a>.
</p>
<p>
The image file may contain an animation, if so the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will 
display an animation (<a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
><span class="type">GdkPixbufAnimation</span></a>) instead of a static image.
</p>
<p>
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> is a subclass of <a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a>, which implies that you can 
align it (center, left, right) and add padding to it, using 
<a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> methods.
</p>
<p>
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> is a "no window" widget (has no <a
href="../gdk/gdk-Windows.html#GdkWindow"
><span class="type">GdkWindow</span></a> 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 
<a href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>, then connect to the event signals on the event box.
</p>
<div class="example">
<a name="id2854140"></a><p class="title"><b>Example&#160;2.&#160;Handling button press events on a 
<span class="structname">GtkImage</span>.</b></p>
<pre class="programlisting">
  static gboolean
  button_press_callback (GtkWidget      *event_box, 
                         GdkEventButton *event,
                         gpointer        data)
  {
    g_print ("Event box clicked at coordinates %f,%f\n", 
             event-&gt;x, event-&gt;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;
  }
</pre>
</div>
<p>
</p>
<p>
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 <a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a>). 
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.
</p>
<p>
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 <span class="application">gdk-pixbuf-csource</span>. This program
allows you to convert an image into a C variable declaration, which
can then be loaded into a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> using
<a
href="../gdk-pixbuf/gdk-pixbuf-creating.html#gdk-pixbuf-new-from-inline"
><code class="function">gdk_pixbuf_new_from_inline()</code></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2854228"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2854238"></a><h3>
<a name="GtkImage-struct"></a>GtkImage</h3>
<a class="indexterm" name="id2854250"></a><pre class="programlisting">typedef struct _GtkImage GtkImage;</pre>
<p>
This struct contain private data only and should be accessed by the functions
below.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2854266"></a><h3>
<a name="GtkImageType"></a>enum GtkImageType</h3>
<a class="indexterm" name="id2854279"></a><pre class="programlisting">typedef enum
{
  GTK_IMAGE_EMPTY,
  GTK_IMAGE_PIXMAP,
  GTK_IMAGE_IMAGE,
  GTK_IMAGE_PIXBUF,
  GTK_IMAGE_STOCK,
  GTK_IMAGE_ICON_SET,
  GTK_IMAGE_ANIMATION,
  GTK_IMAGE_ICON_NAME
} GtkImageType;
</pre>
<p>
Describes the image data representation used by a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>. If you
want to get the image from the widget, you can only get the
currently-stored representation. e.g.  if the
<a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a> returns <a href="GtkImage.html#GTK-IMAGE-PIXBUF:CAPS"><span class="type">GTK_IMAGE_PIXBUF</span></a>, then you can
call <a href="GtkImage.html#gtk-image-get-pixbuf"><code class="function">gtk_image_get_pixbuf()</code></a> but not <a href="GtkImage.html#gtk-image-get-stock"><code class="function">gtk_image_get_stock()</code></a>.  For empty
images, you can request any storage type (call any of the "get"
functions), but they will all return <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-EMPTY:CAPS"></a><code class="literal">GTK_IMAGE_EMPTY</code></span></td>
<td>there is no image displayed by the widget
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-PIXMAP:CAPS"></a><code class="literal">GTK_IMAGE_PIXMAP</code></span></td>
<td>the widget contains a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
><span class="type">GdkPixmap</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-IMAGE:CAPS"></a><code class="literal">GTK_IMAGE_IMAGE</code></span></td>
<td>the widget contains a <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-PIXBUF:CAPS"></a><code class="literal">GTK_IMAGE_PIXBUF</code></span></td>
<td>the widget contains a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-STOCK:CAPS"></a><code class="literal">GTK_IMAGE_STOCK</code></span></td>
<td>the widget contains a stock icon name (see <a href="gtk-Stock-Items.html" title="Stock Items"><a name="id2630871"></a><span class="refentrytitle">Stock Items</span>(3)</a>)
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-ICON-SET:CAPS"></a><code class="literal">GTK_IMAGE_ICON_SET</code></span></td>
<td>the widget contains a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-ANIMATION:CAPS"></a><code class="literal">GTK_IMAGE_ANIMATION</code></span></td>
<td>the widget contains a <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
><span class="type">GdkPixbufAnimation</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-IMAGE-ICON-NAME:CAPS"></a><code class="literal">GTK_IMAGE_ICON_NAME</code></span></td>
<td>the widget contains a named icon. 
  This image type was added in GTK+ 2.6

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2854592"></a><h3>
<a name="gtk-image-get-icon-set"></a>gtk_image_get_icon_set ()</h3>
<a class="indexterm" name="id2854604"></a><pre class="programlisting">void        gtk_image_get_icon_set          (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> **icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);</pre>
<p>
Gets the icon set and size being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-ICON-SET:CAPS"><code class="literal">GTK_IMAGE_ICON_SET</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em>&#160;:</span></td>
<td> location to store a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> location to store a stock icon size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2854756"></a><h3>
<a name="gtk-image-get-image"></a>gtk_image_get_image ()</h3>
<a class="indexterm" name="id2854769"></a><pre class="programlisting">void        gtk_image_get_image             (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> **gdk_image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);</pre>
<p>
Gets the <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a> and mask being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-IMAGE:CAPS"><code class="literal">GTK_IMAGE_IMAGE</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned image and mask.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gdk_image</code></em>&#160;:</span></td>
<td> return location for a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> return location for a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2854937"></a><h3>
<a name="gtk-image-get-pixbuf"></a>gtk_image_get_pixbuf ()</h3>
<a class="indexterm" name="id2854950"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>*  gtk_image_get_pixbuf            (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);</pre>
<p>
Gets the <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-PIXBUF:CAPS"><code class="literal">GTK_IMAGE_PIXBUF</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned pixbuf.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the displayed pixbuf, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the image is empty
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855080"></a><h3>
<a name="gtk-image-get-pixmap"></a>gtk_image_get_pixmap ()</h3>
<a class="indexterm" name="id2855092"></a><pre class="programlisting">void        gtk_image_get_pixmap            (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> **pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);</pre>
<p>
Gets the pixmap and mask being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-PIXMAP:CAPS"><code class="literal">GTK_IMAGE_PIXMAP</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned pixmap and mask.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixmap</code></em>&#160;:</span></td>
<td> location to store the pixmap, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> location to store the mask, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855258"></a><h3>
<a name="gtk-image-get-stock"></a>gtk_image_get_stock ()</h3>
<a class="indexterm" name="id2855270"></a><pre class="programlisting">void        gtk_image_get_stock             (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);</pre>
<p>
Gets the stock icon name and size being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-STOCK:CAPS"><code class="literal">GTK_IMAGE_STOCK</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The returned string is owned by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> and should not
be freed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em>&#160;:</span></td>
<td> place to store a stock icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> place to store a stock icon size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855423"></a><h3>
<a name="gtk-image-get-animation"></a>gtk_image_get_animation ()</h3>
<a class="indexterm" name="id2855435"></a><pre class="programlisting"><a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a>* gtk_image_get_animation (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);</pre>
<p>
Gets the <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
><span class="type">GdkPixbufAnimation</span></a> being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-ANIMATION:CAPS"><code class="literal">GTK_IMAGE_ANIMATION</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned animation.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the displayed animation, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the image is empty
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855567"></a><h3>
<a name="gtk-image-get-icon-name"></a>gtk_image_get_icon_name ()</h3>
<a class="indexterm" name="id2855582"></a><pre class="programlisting">void        gtk_image_get_icon_name         (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             G_CONST_RETURN <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> *size);</pre>
<p>
Gets the icon name and size being displayed by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a href="GtkImage.html#GTK-IMAGE-ICON-NAME:CAPS"><code class="literal">GTK_IMAGE_ICON_NAME</code></a> (see <a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>).
The returned string is owned by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> and should not
be freed.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></td>
<td> place to store an icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> place to store an icon size
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855740"></a><h3>
<a name="gtk-image-get-storage-type"></a>gtk_image_get_storage_type ()</h3>
<a class="indexterm" name="id2855753"></a><pre class="programlisting"><a href="GtkImage.html#GtkImageType">GtkImageType</a> gtk_image_get_storage_type     (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);</pre>
<p>
Gets the type of representation being used by the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
to store image data. If the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> has no image data,
the return value will be <a href="GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> image representation being used
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2855850"></a><h3>
<a name="gtk-image-new-from-file"></a>gtk_image_new_from_file ()</h3>
<a class="indexterm" name="id2855862"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_file         (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
Creates a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying the file <em class="parameter"><code>filename</code></em>. If the file
isn't found or can't be loaded, the resulting <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will
display a "broken image" icon. This function never returns <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>,
it always returns a valid <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget.
</p>
<p>
If the file contains an animation, the image will contain an
animation.
</p>
<p>
If you need to detect failures to load the file, use
<a
href="../gdk-pixbuf/gdk-pixbuf-file-loading.html#gdk-pixbuf-new-from-file"
><code class="function">gdk_pixbuf_new_from_file()</code></a> to load the file yourself, then create
the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> from the pixbuf. (Or for animations, use
<a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#gdk-pixbuf-animation-new-from-file"
><code class="function">gdk_pixbuf_animation_new_from_file()</code></a>).
</p>
<p>
The storage type (<a href="GtkImage.html#gtk-image-get-storage-type"><code class="function">gtk_image_get_storage_type()</code></a>) of the returned
image is not defined, it will be whatever is appropriate for
displaying the file.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> a filename
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856030"></a><h3>
<a name="gtk-image-new-from-icon-set"></a>gtk_image_new_from_icon_set ()</h3>
<a class="indexterm" name="id2856043"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_icon_set     (<a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying an icon set. Sample stock sizes are
<span class="type">GTK_ICON_SIZE_MENU</span>, <span class="type">GTK_ICON_SIZE_SMALL_TOOLBAR</span>. Instead of using
this function, usually it's better to create a <a href="gtk-Themeable-Stock-Images.html#GtkIconFactory"><span class="type">GtkIconFactory</span></a>, put
your icon sets in the icon factory, add the icon factory to the
list of default factories with <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a>, and
then use <a href="GtkImage.html#gtk-image-new-from-stock"><code class="function">gtk_image_new_from_stock()</code></a>. This will allow themes to
override the icon you ship with your application.
</p>
<p>
The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
icon set; you still need to unref it if you own references.
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em>&#160;:</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> a stock icon size
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856224"></a><h3>
<a name="gtk-image-new-from-image"></a>gtk_image_new_from_image ()</h3>
<a class="indexterm" name="id2856236"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_image        (<a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget displaying a <em class="parameter"><code>image</code></em> with a <em class="parameter"><code>mask</code></em>.
A <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a> is a client-side image buffer in the pixel format of the
current display.
The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
image or mask; you still need to unref them if you own references.
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> 
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856409"></a><h3>
<a name="gtk-image-new-from-pixbuf"></a>gtk_image_new_from_pixbuf ()</h3>
<a class="indexterm" name="id2856423"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_pixbuf       (<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);</pre>
<p>
Creates a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying <em class="parameter"><code>pixbuf</code></em>.
The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
pixbuf; you still need to unref it if you own references.
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.
</p>
<p>
Note that this function just creates an <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> from the pixbuf.  The
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> created will not react to state changes.  Should you want that, you
should use <a href="GtkImage.html#gtk-image-new-from-icon-set"><code class="function">gtk_image_new_from_icon_set()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856573"></a><h3>
<a name="gtk-image-new-from-pixmap"></a>gtk_image_new_from_pixmap ()</h3>
<a class="indexterm" name="id2856587"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_pixmap       (<a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> *pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget displaying <em class="parameter"><code>pixmap</code></em> with a <em class="parameter"><code>mask</code></em>.
A <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
><span class="type">GdkPixmap</span></a> is a server-side image buffer in the pixel format of the
current display. The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
pixmap or mask; you still need to unref them if you own references.
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixmap</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
><span class="type">GdkPixmap</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856759"></a><h3>
<a name="gtk-image-new-from-stock"></a>gtk_image_new_from_stock ()</h3>
<a class="indexterm" name="id2856772"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_stock        (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying a stock icon. Sample stock icon
names are <a href="gtk-Stock-Items.html#GTK-STOCK-OPEN:CAPS"><span class="type">GTK_STOCK_OPEN</span></a>, <a href="gtk-Stock-Items.html#GTK-STOCK-QUIT:CAPS"><span class="type">GTK_STOCK_QUIT</span></a>. Sample stock sizes
are <span class="type">GTK_ICON_SIZE_MENU</span>, <span class="type">GTK_ICON_SIZE_SMALL_TOOLBAR</span>. If the stock
icon name isn't known, the image will be empty.
You can register your own stock icon names, see
<a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add-default"><code class="function">gtk_icon_factory_add_default()</code></a> and <a href="gtk-Themeable-Stock-Images.html#gtk-icon-factory-add"><code class="function">gtk_icon_factory_add()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em>&#160;:</span></td>
<td> a stock icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> a stock icon size
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying the stock icon
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2856929"></a><h3>
<a name="gtk-image-new-from-animation"></a>gtk_image_new_from_animation ()</h3>
<a class="indexterm" name="id2856942"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_animation    (<a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a> *animation);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying the given animation.
The <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
animation; you still need to unref it if you own references.
<a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.
</p>
<p>
Note that the animation frames are shown using a timeout with
<a
href="../glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"
><span class="type">G_PRIORITY_DEFAULT</span></a>. 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.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>animation</code></em>&#160;:</span></td>
<td> an animation
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857055"></a><h3>
<a name="gtk-image-new-from-icon-name"></a>gtk_image_new_from_icon_name ()</h3>
<a class="indexterm" name="id2857070"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new_from_icon_name    (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
Creates a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> 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.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></td>
<td> an icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> a stock icon size
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> displaying the themed icon

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857176"></a><h3>
<a name="gtk-image-set-from-file"></a>gtk_image_set_from_file ()</h3>
<a class="indexterm" name="id2857189"></a><pre class="programlisting">void        gtk_image_set_from_file         (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-file"><code class="function">gtk_image_new_from_file()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> a filename or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857289"></a><h3>
<a name="gtk-image-set-from-icon-set"></a>gtk_image_set_from_icon_set ()</h3>
<a class="indexterm" name="id2857303"></a><pre class="programlisting">void        gtk_image_set_from_icon_set     (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a> *icon_set,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-icon-set"><code class="function">gtk_image_new_from_icon_set()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_set</code></em>&#160;:</span></td>
<td> a <a href="gtk-Themeable-Stock-Images.html#GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> a stock icon size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857422"></a><h3>
<a name="gtk-image-set-from-image"></a>gtk_image_set_from_image ()</h3>
<a class="indexterm" name="id2857435"></a><pre class="programlisting">void        gtk_image_set_from_image        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *gdk_image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-image"><code class="function">gtk_image_new_from_image()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>gdk_image</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857582"></a><h3>
<a name="gtk-image-set-from-pixbuf"></a>gtk_image_set_from_pixbuf ()</h3>
<a class="indexterm" name="id2857595"></a><pre class="programlisting">void        gtk_image_set_from_pixbuf       (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a> *pixbuf);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-pixbuf"><code class="function">gtk_image_new_from_pixbuf()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixbuf</code></em>&#160;:</span></td>
<td> a <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857702"></a><h3>
<a name="gtk-image-set-from-pixmap"></a>gtk_image_set_from_pixmap ()</h3>
<a class="indexterm" name="id2857716"></a><pre class="programlisting">void        gtk_image_set_from_pixmap       (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a> *pixmap,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-pixmap"><code class="function">gtk_image_new_from_pixmap()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixmap</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
><span class="type">GdkPixmap</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td> a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857862"></a><h3>
<a name="gtk-image-set-from-stock"></a>gtk_image_set_from_stock ()</h3>
<a class="indexterm" name="id2857875"></a><pre class="programlisting">void        gtk_image_set_from_stock        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-stock"><code class="function">gtk_image_new_from_stock()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em>&#160;:</span></td>
<td> a stock icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> a stock icon size
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857986"></a><h3>
<a name="gtk-image-set-from-animation"></a>gtk_image_set_from_animation ()</h3>
<a class="indexterm" name="id2858000"></a><pre class="programlisting">void        gtk_image_set_from_animation    (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a> *animation);</pre>
<p>
Causes the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> to display the given animation (or display
nothing, if you set the animation to <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>animation</code></em>&#160;:</span></td>
<td> the <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
><span class="type">GdkPixbufAnimation</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858106"></a><h3>
<a name="gtk-image-set-from-icon-name"></a>gtk_image_set_from_icon_name ()</h3>
<a class="indexterm" name="id2858122"></a><pre class="programlisting">void        gtk_image_set_from_icon_name    (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *icon_name,
                                             <a href="gtk-Themeable-Stock-Images.html#GtkIconSize">GtkIconSize</a> size);</pre>
<p>
See <a href="GtkImage.html#gtk-image-new-from-icon-name"><code class="function">gtk_image_new_from_icon_name()</code></a> for details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>icon_name</code></em>&#160;:</span></td>
<td> an icon name
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> an icon size
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858238"></a><h3>
<a name="gtk-image-clear"></a>gtk_image_clear ()</h3>
<a class="indexterm" name="id2858254"></a><pre class="programlisting">void        gtk_image_clear                 (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);</pre>
<p>
Resets the image to be empty.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr></tbody>
</table></div>
<p>Since  2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858316"></a><h3>
<a name="gtk-image-new"></a>gtk_image_new ()</h3>
<a class="indexterm" name="id2858328"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_image_new                   (void);</pre>
<p>
Creates a new empty <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a newly created <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget. 
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858384"></a><h3>
<a name="gtk-image-set"></a>gtk_image_set ()</h3>
<a class="indexterm" name="id2858399"></a><pre class="programlisting">void        gtk_image_set                   (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> *val,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> *mask);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_image_set</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Sets the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td>a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>val</code></em>&#160;:</span></td>
<td>a <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a> that indicates which parts of the image should be transparent.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858533"></a><h3>
<a name="gtk-image-get"></a>gtk_image_get ()</h3>
<a class="indexterm" name="id2858548"></a><pre class="programlisting">void        gtk_image_get                   (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a> **val,
                                             <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
>GdkBitmap</a> **mask);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_image_get</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td>a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>val</code></em>&#160;:</span></td>
<td>return location for a <a
href="../gdk/gdk-Images.html#GdkImage"
><span class="type">GdkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mask</code></em>&#160;:</span></td>
<td>a <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkBitmap"
><span class="type">GdkBitmap</span></a> that indicates which parts of the image should be transparent.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858681"></a><h3>
<a name="gtk-image-set-pixel-size"></a>gtk_image_set_pixel_size ()</h3>
<a class="indexterm" name="id2858697"></a><pre class="programlisting">void        gtk_image_set_pixel_size        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pixel_size);</pre>
<p>
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
<a href="GtkImage.html#gtk-image-set-from-icon-name"><code class="function">gtk_image_set_from_icon_name()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pixel_size</code></em>&#160;:</span></td>
<td> the new pixel size
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858794"></a><h3>
<a name="gtk-image-get-pixel-size"></a>gtk_image_get_pixel_size ()</h3>
<a class="indexterm" name="id2858809"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>        gtk_image_get_pixel_size        (<a href="GtkImage.html" title="GtkImage">GtkImage</a> *image);</pre>
<p>
Gets the pixel size used for named icons.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a <a href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the pixel size used for named icons.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2858883"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2858894"></a><h3>
<a name="GtkImage--file"></a>The "<code class="literal">file</code>" property</h3>
<a class="indexterm" name="id2858910"></a><pre class="programlisting">  "file"                 <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write</pre>
<p>Filename to load and display.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858937"></a><h3>
<a name="GtkImage--icon-name"></a>The "<code class="literal">icon-name</code>" property</h3>
<a class="indexterm" name="id2858953"></a><pre class="programlisting">  "icon-name"            <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write</pre>
<p>
The name of the icon in the icon theme.  If the icon theme is
changed, the image will be updated automatically.</p>
<p>

</p>
<p>Default value: NULL</p>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858989"></a><h3>
<a name="GtkImage--icon-set"></a>The "<code class="literal">icon-set</code>" property</h3>
<a class="indexterm" name="id2859005"></a><pre class="programlisting">  "icon-set"             <a href="gtk-Themeable-Stock-Images.html#GtkIconSet">GtkIconSet</a>            : Read / Write</pre>
<p>Icon set to display.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859028"></a><h3>
<a name="GtkImage--icon-size"></a>The "<code class="literal">icon-size</code>" property</h3>
<a class="indexterm" name="id2859044"></a><pre class="programlisting">  "icon-size"            <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>Symbolic size to use for stock icon, icon set or named icon.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859075"></a><h3>
<a name="GtkImage--image"></a>The "<code class="literal">image</code>" property</h3>
<a class="indexterm" name="id2859091"></a><pre class="programlisting">  "image"                <a
href="../gdk/gdk-Images.html#GdkImage"
>GdkImage</a>              : Read / Write</pre>
<p>A GdkImage to display.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859113"></a><h3>
<a name="GtkImage--mask"></a>The "<code class="literal">mask</code>" property</h3>
<a class="indexterm" name="id2859129"></a><pre class="programlisting">  "mask"                 <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a>             : Read / Write</pre>
<p>Mask bitmap to use with GdkImage or GdkPixmap.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859153"></a><h3>
<a name="GtkImage--pixbuf"></a>The "<code class="literal">pixbuf</code>" property</h3>
<a class="indexterm" name="id2859169"></a><pre class="programlisting">  "pixbuf"               <a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
>GdkPixbuf</a>             : Read / Write</pre>
<p>A GdkPixbuf to display.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859191"></a><h3>
<a name="GtkImage--pixbuf-animation"></a>The "<code class="literal">pixbuf-animation</code>" property</h3>
<a class="indexterm" name="id2859208"></a><pre class="programlisting">  "pixbuf-animation"     <a
href="../gdk-pixbuf/gdk-pixbuf-animation.html#GdkPixbufAnimation"
>GdkPixbufAnimation</a>    : Read / Write</pre>
<p>GdkPixbufAnimation to display.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859231"></a><h3>
<a name="GtkImage--pixel-size"></a>The "<code class="literal">pixel-size</code>" property</h3>
<a class="indexterm" name="id2859248"></a><pre class="programlisting">  "pixel-size"           <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read / Write</pre>
<p>
The :pixel-size property can be used to specify a fixed size
overriding the :icon-size property for images of type 
<a href="GtkImage.html#GTK-IMAGE-ICON-NAME:CAPS"><code class="literal">GTK_IMAGE_ICON_NAME</code></a>.</p>
<p>

</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859300"></a><h3>
<a name="GtkImage--pixmap"></a>The "<code class="literal">pixmap</code>" property</h3>
<a class="indexterm" name="id2859315"></a><pre class="programlisting">  "pixmap"               <a
href="../gdk/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"
>GdkPixmap</a>             : Read / Write</pre>
<p>A GdkPixmap to display.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859337"></a><h3>
<a name="GtkImage--stock"></a>The "<code class="literal">stock</code>" property</h3>
<a class="indexterm" name="id2859353"></a><pre class="programlisting">  "stock"                <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write</pre>
<p>Stock ID for a stock image to display.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859380"></a><h3>
<a name="GtkImage--storage-type"></a>The "<code class="literal">storage-type</code>" property</h3>
<a class="indexterm" name="id2859396"></a><pre class="programlisting">  "storage-type"         <a href="GtkImage.html#GtkImageType">GtkImageType</a>          : Read</pre>
<p>The representation being used for image data.</p>
<p>Default value: GTK_IMAGE_EMPTY</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2859425"></a><h2>See Also</h2>
<p>
<a
href="../gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"
><span class="type">GdkPixbuf</span></a>
</p>
</div>
</div>
</body>
</html>

Anon7 - 2021