gtk2/gtk/gtkimage.h

134 lines
4.8 KiB
C
Raw Normal View History

/* GTK - The GIMP Toolkit
1997-11-24 22:37:52 +00:00
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
1997-11-24 22:37:52 +00:00
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
1997-11-24 22:37:52 +00:00
*
* You should have received a copy of the GNU Lesser General Public
2012-02-27 13:01:10 +00:00
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
1997-11-24 22:37:52 +00:00
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
1997-11-24 22:37:52 +00:00
#ifndef __GTK_IMAGE_H__
#define __GTK_IMAGE_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gio/gio.h>
2016-10-02 16:19:59 +00:00
#include <gtk/gtkwidget.h>
1997-11-24 22:37:52 +00:00
G_BEGIN_DECLS
1997-11-24 22:37:52 +00:00
#define GTK_TYPE_IMAGE (gtk_image_get_type ())
#define GTK_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IMAGE, GtkImage))
#define GTK_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IMAGE))
1997-11-24 22:37:52 +00:00
2010-08-26 17:15:37 +00:00
typedef struct _GtkImage GtkImage;
1997-11-24 22:37:52 +00:00
/**
* GtkImageType:
* @GTK_IMAGE_EMPTY: there is no image displayed by the widget
* @GTK_IMAGE_ICON_NAME: the widget contains a named icon.
* This image type was added in GTK+ 2.6
* @GTK_IMAGE_GICON: the widget contains a #GIcon.
* This image type was added in GTK+ 2.14
* @GTK_IMAGE_PAINTABLE: the widget contains a #GdkPaintable.
* This image type was added in GTK+ 3.96
*
* Describes the image data representation used by a #GtkImage. If you
* want to get the image from the widget, you can only get the
* currently-stored representation. e.g. if the
* gtk_image_get_storage_type() returns #GTK_IMAGE_PAINTABLE, then you can
* call gtk_image_get_paintable(). For empty images, you can request any
2016-10-23 11:01:52 +00:00
* storage type (call any of the "get" functions), but they will all
* return %NULL values.
*/
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
typedef enum
{
GTK_IMAGE_EMPTY,
GTK_IMAGE_ICON_NAME,
GTK_IMAGE_GICON,
GTK_IMAGE_PAINTABLE
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
} GtkImageType;
GDK_AVAILABLE_IN_ALL
GType gtk_image_get_type (void) G_GNUC_CONST;
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_image_new (void);
GDK_AVAILABLE_IN_ALL
fix some shell typos 2001-05-04 Havoc Pennington <hp@redhat.com> * configure.in: fix some shell typos * gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix * gtk/gtkimage.c: handle animations * gtk/gtkcheckbutton.c (gtk_check_button_size_request): request border_width * 2, not just border_width * gtk/gtkscale.c: add "format_value" signal to allow people to override the way values are drawn. (gtk_scale_get_value_size): fix width/height mistake, and compute size from actual displayed text, not from made-up text. * gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in signal registration * tests/testtext.c: Add "Remove all tags" menu item for testing * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement * demos/gtk-demo/main.c (main): add hack so we can find modules without installing gtk * demos/gtk-demo/textview.c (insert_text): demo font scaling * gtk/gtkcellrenderertext.c: Add "scale" property (font scaling factor) (gtk_cell_renderer_text_set_property): remove some bogus g_object_notify * gtk/gtktexttag.c: add "scale" property which is a font scaling factor * gtk/gtktextlayout.c (add_text_attrs): add font scale attribute to layout * gtk/gtktextiter.c (gtk_text_iter_is_start): rename from gtk_text_iter_is_first 2001-05-04 Havoc Pennington <hp@redhat.com> * pixops/pixops.c (pixops_process): merge fix from stable: Patch from hoshem@mel.comcen.com.au to fix nonzero X offsets. Fixes bug #50371. * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix confusion of using "src" instead of "p". (pixops_composite_color_nearest): Use a more accurate (and correct, to begin with) compositing method. This cures checks showing through on images with no alpha. * gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing bytes unfilled. * gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints * gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change area_updated signal to use signed ints. Removed animation-related signals. * io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive rewrite action * gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract all the pesky details. Remove old frame-based API. Make GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
GtkWidget* gtk_image_new_from_file (const gchar *filename);
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_image_new_from_resource (const gchar *resource_path);
GDK_AVAILABLE_IN_ALL
fix some shell typos 2001-05-04 Havoc Pennington <hp@redhat.com> * configure.in: fix some shell typos * gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix * gtk/gtkimage.c: handle animations * gtk/gtkcheckbutton.c (gtk_check_button_size_request): request border_width * 2, not just border_width * gtk/gtkscale.c: add "format_value" signal to allow people to override the way values are drawn. (gtk_scale_get_value_size): fix width/height mistake, and compute size from actual displayed text, not from made-up text. * gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in signal registration * tests/testtext.c: Add "Remove all tags" menu item for testing * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement * demos/gtk-demo/main.c (main): add hack so we can find modules without installing gtk * demos/gtk-demo/textview.c (insert_text): demo font scaling * gtk/gtkcellrenderertext.c: Add "scale" property (font scaling factor) (gtk_cell_renderer_text_set_property): remove some bogus g_object_notify * gtk/gtktexttag.c: add "scale" property which is a font scaling factor * gtk/gtktextlayout.c (add_text_attrs): add font scale attribute to layout * gtk/gtktextiter.c (gtk_text_iter_is_start): rename from gtk_text_iter_is_first 2001-05-04 Havoc Pennington <hp@redhat.com> * pixops/pixops.c (pixops_process): merge fix from stable: Patch from hoshem@mel.comcen.com.au to fix nonzero X offsets. Fixes bug #50371. * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix confusion of using "src" instead of "p". (pixops_composite_color_nearest): Use a more accurate (and correct, to begin with) compositing method. This cures checks showing through on images with no alpha. * gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing bytes unfilled. * gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints * gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change area_updated signal to use signed ints. Removed animation-related signals. * io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive rewrite action * gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract all the pesky details. Remove old frame-based API. Make GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
GtkWidget* gtk_image_new_from_pixbuf (GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_image_new_from_paintable (GdkPaintable *paintable);
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_image_new_from_icon_name (const gchar *icon_name);
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_image_new_from_gicon (GIcon *icon);
fix some shell typos 2001-05-04 Havoc Pennington <hp@redhat.com> * configure.in: fix some shell typos * gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix * gtk/gtkimage.c: handle animations * gtk/gtkcheckbutton.c (gtk_check_button_size_request): request border_width * 2, not just border_width * gtk/gtkscale.c: add "format_value" signal to allow people to override the way values are drawn. (gtk_scale_get_value_size): fix width/height mistake, and compute size from actual displayed text, not from made-up text. * gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in signal registration * tests/testtext.c: Add "Remove all tags" menu item for testing * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement * demos/gtk-demo/main.c (main): add hack so we can find modules without installing gtk * demos/gtk-demo/textview.c (insert_text): demo font scaling * gtk/gtkcellrenderertext.c: Add "scale" property (font scaling factor) (gtk_cell_renderer_text_set_property): remove some bogus g_object_notify * gtk/gtktexttag.c: add "scale" property which is a font scaling factor * gtk/gtktextlayout.c (add_text_attrs): add font scale attribute to layout * gtk/gtktextiter.c (gtk_text_iter_is_start): rename from gtk_text_iter_is_first 2001-05-04 Havoc Pennington <hp@redhat.com> * pixops/pixops.c (pixops_process): merge fix from stable: Patch from hoshem@mel.comcen.com.au to fix nonzero X offsets. Fixes bug #50371. * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix confusion of using "src" instead of "p". (pixops_composite_color_nearest): Use a more accurate (and correct, to begin with) compositing method. This cures checks showing through on images with no alpha. * gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing bytes unfilled. * gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints * gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change area_updated signal to use signed ints. Removed animation-related signals. * io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive rewrite action * gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract all the pesky details. Remove old frame-based API. Make GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
GDK_AVAILABLE_IN_ALL
void gtk_image_clear (GtkImage *image);
GDK_AVAILABLE_IN_ALL
fix some shell typos 2001-05-04 Havoc Pennington <hp@redhat.com> * configure.in: fix some shell typos * gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix * gtk/gtkimage.c: handle animations * gtk/gtkcheckbutton.c (gtk_check_button_size_request): request border_width * 2, not just border_width * gtk/gtkscale.c: add "format_value" signal to allow people to override the way values are drawn. (gtk_scale_get_value_size): fix width/height mistake, and compute size from actual displayed text, not from made-up text. * gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in signal registration * tests/testtext.c: Add "Remove all tags" menu item for testing * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement * demos/gtk-demo/main.c (main): add hack so we can find modules without installing gtk * demos/gtk-demo/textview.c (insert_text): demo font scaling * gtk/gtkcellrenderertext.c: Add "scale" property (font scaling factor) (gtk_cell_renderer_text_set_property): remove some bogus g_object_notify * gtk/gtktexttag.c: add "scale" property which is a font scaling factor * gtk/gtktextlayout.c (add_text_attrs): add font scale attribute to layout * gtk/gtktextiter.c (gtk_text_iter_is_start): rename from gtk_text_iter_is_first 2001-05-04 Havoc Pennington <hp@redhat.com> * pixops/pixops.c (pixops_process): merge fix from stable: Patch from hoshem@mel.comcen.com.au to fix nonzero X offsets. Fixes bug #50371. * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix confusion of using "src" instead of "p". (pixops_composite_color_nearest): Use a more accurate (and correct, to begin with) compositing method. This cures checks showing through on images with no alpha. * gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing bytes unfilled. * gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints * gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change area_updated signal to use signed ints. Removed animation-related signals. * io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive rewrite action * gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract all the pesky details. Remove old frame-based API. Make GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
void gtk_image_set_from_file (GtkImage *image,
const gchar *filename);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_from_resource (GtkImage *image,
const gchar *resource_path);
GDK_AVAILABLE_IN_ALL
fix some shell typos 2001-05-04 Havoc Pennington <hp@redhat.com> * configure.in: fix some shell typos * gtk/gtkcolorsel.c (gtk_color_selection_destroy): warning fix * gtk/gtkimage.c: handle animations * gtk/gtkcheckbutton.c (gtk_check_button_size_request): request border_width * 2, not just border_width * gtk/gtkscale.c: add "format_value" signal to allow people to override the way values are drawn. (gtk_scale_get_value_size): fix width/height mistake, and compute size from actual displayed text, not from made-up text. * gtk/gtktexttag.c (gtk_text_tag_class_init): fix return type in signal registration * tests/testtext.c: Add "Remove all tags" menu item for testing * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): implement * demos/gtk-demo/main.c (main): add hack so we can find modules without installing gtk * demos/gtk-demo/textview.c (insert_text): demo font scaling * gtk/gtkcellrenderertext.c: Add "scale" property (font scaling factor) (gtk_cell_renderer_text_set_property): remove some bogus g_object_notify * gtk/gtktexttag.c: add "scale" property which is a font scaling factor * gtk/gtktextlayout.c (add_text_attrs): add font scale attribute to layout * gtk/gtktextiter.c (gtk_text_iter_is_start): rename from gtk_text_iter_is_first 2001-05-04 Havoc Pennington <hp@redhat.com> * pixops/pixops.c (pixops_process): merge fix from stable: Patch from hoshem@mel.comcen.com.au to fix nonzero X offsets. Fixes bug #50371. * gdk-pixbuf/pixops/pixops.c (pixops_composite_nearest): merge from stable: Patch from OKADA Mitsuru <m-okada@fjb.co.jp> to fix confusion of using "src" instead of "p". (pixops_composite_color_nearest): Use a more accurate (and correct, to begin with) compositing method. This cures checks showing through on images with no alpha. * gdk-pixbuf.c (gdk_pixbuf_fill): fix bug that left some trailing bytes unfilled. * gdk-pixbuf-io.h: fix UpdatedNotifyFunc to use signed ints * gdk-pixbuf-loader.h (struct _GdkPixbufLoaderClass): Change area_updated signal to use signed ints. Removed animation-related signals. * io-gif.c, io-gif-animation.h, io-gif-animation.c: Massive rewrite action * gdk-pixbuf-animation.c: Add GdkPixbufAnimationIter to abstract all the pesky details. Remove old frame-based API. Make GdkPixbufAnimation an abstract base class, derived by the loaders.
2001-05-07 15:58:47 +00:00
void gtk_image_set_from_pixbuf (GtkImage *image,
GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_from_paintable (GtkImage *image,
GdkPaintable *paintable);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_from_icon_name (GtkImage *image,
const gchar *icon_name);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_from_gicon (GtkImage *image,
GIcon *icon);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_pixel_size (GtkImage *image,
gint pixel_size);
GDK_AVAILABLE_IN_ALL
void gtk_image_set_icon_size (GtkImage *image,
GtkIconSize icon_size);
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
GDK_AVAILABLE_IN_ALL
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
GtkImageType gtk_image_get_storage_type (GtkImage *image);
GDK_AVAILABLE_IN_ALL
GdkPaintable *gtk_image_get_paintable (GtkImage *image);
GDK_AVAILABLE_IN_ALL
const char *gtk_image_get_icon_name (GtkImage *image);
GDK_AVAILABLE_IN_ALL
GIcon * gtk_image_get_gicon (GtkImage *image);
GDK_AVAILABLE_IN_ALL
gint gtk_image_get_pixel_size (GtkImage *image);
GDK_AVAILABLE_IN_ALL
GtkIconSize gtk_image_get_icon_size (GtkImage *image);
Move more text widget headers into the private header list 2000-09-26 Havoc Pennington <hp@redhat.com> * gtk/Makefile.am (gtk_private_h_sources): Move more text widget headers into the private header list * Makefile.am (pkgconfig_DATA): install pkg-config files * configure.in: add pkg-config files * gdk-2.0.pc.in, gdk-pixbuf.pc.in, gtk+-2.0.pc.in: pkg-config files * gtk/gtkwindow.c (gtk_window_read_rcfiles): Invalidate outstanding icon caches on theme change. * gtk/gtkiconfactory.h, gtk/gtkiconfactory.c: New icon system. Three important types: (GtkIconSource): Specification for creating a pixbuf appropriate for a direction/state/size triplet from a source pixbuf or filename (GtkIconSet): List of GtkIconSource objects that are used to create the "same" icon (e.g. an OK button icon), and cache for rendered icons (GtkIconFactory): Hash from stock ID to GtkIconSet; used to look up the icon set for a given stock ID. GTK maintains a stack of GtkIconFactory to search, and applications or libraries can add additional icon factories on top of the stack * gtk/gtkrc.h, gtk/gtkrc.c: When loading an RcStyle, parse the set of GtkIconSource specified for a given stock ID into a GtkIconSet, and put the GtkIconSet into a GtkIconFactory for the RcStyle, under the specified stock ID. * gtk/gtkstyle.h, gtk/gtkstyle.c: Add a virtual function render_icon used to derive a GdkPixbuf from a GtkIconSource. This allows people to theme how prelight, insensitive, etc. are done. (gtk_style_lookup_icon_set): Look up a stock ID in the list of icon factories for a style, and return the resulting icon set if any. (gtk_style_render_icon): Render an icon using the render_icon method in the GtkStyleClass. * gtk/gtkwidget.h, gtk/gtkwidget.c (gtk_widget_render_icon): Use the style for a given widget to look up a stock ID, get the icon set, and render an icon using the render_icon method of the style * gtk/gtkstock.h, gtk/gtkstock.c: Header with the GtkStockItem type (contains information about a stock item), the built-in stock item IDs, and functions to add/lookup stock items. * gtk/stock-icons/*: Stock icons that come with GTK * gtk/gtkbutton.h, gtk/gtkbutton.c (gtk_button_new_stock): Returns a button based on a GtkStockItem (gtk_button_new_accel): Takes a uline string and accel group, and installs the accelerator. * gtk/gtkimage.h, gtk/gtkimage.c: Make this into a generic image-display widget.
2000-09-26 20:22:17 +00:00
G_END_DECLS
1997-11-24 22:37:52 +00:00
#endif /* __GTK_IMAGE_H__ */