synopsis#include <gtk/gtk.h> gtkpreview; gtkpreviewinfo; union gtkditherinfo; void gtk_preview_uninit (void); gtkwidget* gtk_preview_new (gtkpreviewtype type); void gtk_preview_size (gtkpreview *preview, gint width, gint height); void gtk_preview_put (gtkpreview *preview, gdkwindow *window, gdkgc *gc, gint srcx, gint srcy, gint destx, gint desty, gint width, gint height); void gtk_preview_draw_row (gtkpreview *preview, guchar *data, gint x, gint y, gint w); void gtk_preview_set_expand (gtkpreview *preview, gboolean expand); void gtk_preview_set_gamma (double gamma_); void gtk_preview_set_color_cube (guint nred_shades, guint ngreen_shades, guint nblue_shades, guint ngray_shades); void gtk_preview_set_install_cmap (gint install_cmap); void gtk_preview_set_reserved (gint nreserved); void gtk_preview_set_dither (gtkpreview *preview, gdkrgbdither dither); gdkvisual* gtk_preview_get_visual (void); gdkcolormap* gtk_preview_get_cmap (void); gtkpreviewinfo* gtk_preview_get_info (void); void gtk_preview_reset (void); descriptionthe gtkpreview widget provides a simple interface used to display images as rgb or grayscale data. it's deprecated; just use a gdkpixbuf displayed by a gtkimage, or perhaps a gtkdrawingarea. gtkpreview has no advantage over those approaches. detailsgtkpreviewtypedef struct _gtkpreview gtkpreview; warninggtkpreview is deprecated and should not be used in newly-written code. the gtkpreview-struct struct contains private data only, and should be accessed using the functions below. gtkpreviewinfotypedef struct { guchar *lookup; gdouble gamma; } gtkpreviewinfo; warninggtkpreviewinfo is deprecated and should not be used in newly-written code. contains information about global properties of preview widgets. the gtkpreviewinfo struct contains the following fields. (these fields should be considered read-only. they should never be set by an application.)
union gtkditherinfounion gtkditherinfo { gushort s[2]; guchar c[4]; }; warninggtkditherinfo is deprecated and should not be used in newly-written code. this union not used in gtk+. gtk_preview_uninit ()void gtk_preview_uninit (void); warninggtk_preview_uninit is deprecated and should not be used in newly-written code. this function is deprecated and does nothing. gtk_preview_new ()gtkwidget* gtk_preview_new (gtkpreviewtype type); warninggtk_preview_new is deprecated and should not be used in newly-written code. create a new preview widget.
gtk_preview_size ()void gtk_preview_size (gtkpreview *preview, gint width, gint height); warninggtk_preview_size is deprecated and should not be used in newly-written code. set the size that the preview widget will request in response to a "size_request" signal. the drawing area may actually be allocated a size larger than this depending on how it is packed within the enclosing containers. the effect of this is determined by whether the preview is set to expand or not (see gtk_preview_expand())
gtk_preview_put ()void gtk_preview_put (gtkpreview *preview, gdkwindow *window, gdkgc *gc, gint srcx, gint srcy, gint destx, gint desty, gint width, gint height); warninggtk_preview_put is deprecated and should not be used in newly-written code. takes a portion of the contents of a preview widget and draws it onto the given drawable, window.
gtk_preview_draw_row ()void gtk_preview_draw_row (gtkpreview *preview, guchar *data, gint x, gint y, gint w); warninggtk_preview_draw_row is deprecated and should not be used in newly-written code. sets the data for a portion of a row.
gtk_preview_set_expand ()void gtk_preview_set_expand (gtkpreview *preview, gboolean expand); warninggtk_preview_set_expand is deprecated and should not be used in newly-written code. determines the way that the the preview widget behaves when the size it is allocated is larger than the requested size. if expand is false, then the preview's window and buffer will be no larger than the size set with gtk_preview_size(), and the data set will be centered in the allocation if it is larger. if expand is true then the window and buffer will expand with the allocation; the application is responsible for catching the "size_allocate" signal and providing the data appropriate for this size.
gtk_preview_set_gamma ()void gtk_preview_set_gamma (double gamma_); warninggtk_preview_set_gamma is deprecated and should not be used in newly-written code. set the gamma-correction value for all preview widgets. (this function will eventually be replaced with a function that sets a per-preview-widget gamma value). the resulting intensity is given by: destination_value * pow (source_value/255, 1/gamma). the gamma value is applied when the data is set with gtk_preview_draw_row() so changing this value will not affect existing data in preview widgets.
gtk_preview_set_color_cube ()void gtk_preview_set_color_cube (guint nred_shades, guint ngreen_shades, guint nblue_shades, guint ngray_shades); warninggtk_preview_set_color_cube is deprecated and should not be used in newly-written code. this function is deprecated and does nothing. gdkrgb automatically picks an optimium color cube for the display.
gtk_preview_set_install_cmap ()void gtk_preview_set_install_cmap (gint install_cmap); warninggtk_preview_set_install_cmap is deprecated and should not be used in newly-written code. this function is deprecated and does nothing. gdkrgb will automatically pick a private colormap if it cannot allocate sufficient colors.
gtk_preview_set_reserved ()void gtk_preview_set_reserved (gint nreserved); warninggtk_preview_set_reserved is deprecated and should not be used in newly-written code. this function is deprecated and does nothing.
gtk_preview_set_dither ()void gtk_preview_set_dither (gtkpreview *preview, gdkrgbdither dither); warninggtk_preview_set_dither is deprecated and should not be used in newly-written code. set the dithering mode for the display.
gtk_preview_get_visual ()gdkvisual* gtk_preview_get_visual (void); warninggtk_preview_get_visual is deprecated and should not be used in newly-written code. returns the visual used by preview widgets. this function is deprecated, and you should use gdk_rgb_get_visual() instead.
gtk_preview_get_cmap ()gdkcolormap* gtk_preview_get_cmap (void); warninggtk_preview_get_cmap is deprecated and should not be used in newly-written code. returns the colormap used by preview widgets. this function is deprecated, and you should use gdk_rgb_get_cmap() instead.
gtk_preview_get_info ()gtkpreviewinfo* gtk_preview_get_info (void); warninggtk_preview_get_info is deprecated and should not be used in newly-written code. return a gtkpreviewinfo structure containing global information about preview widgets.
property detailsthe "expand" property"expand" gboolean : read / write whether the preview widget should take up the entire space it is allocated. default value: false |