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; Warning
The GtkPreview struct contains private data only, and should be accessed using the functions below. GtkPreviewInfotypedef struct { guchar *lookup; gdouble gamma; } GtkPreviewInfo; Warning
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]; }; Warning
This union not used in GTK+. gtk_preview_uninit ()void gtk_preview_uninit (void); Warning
This function is deprecated and does nothing. gtk_preview_new ()GtkWidget* gtk_preview_new (GtkPreviewType type); Warning
Create a new preview widget.
gtk_preview_size ()void gtk_preview_size (GtkPreview *preview, gint width, gint height); Warning
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_put ()void gtk_preview_put (GtkPreview *preview, GdkWindow *window, GdkGC *gc, gint srcx, gint srcy, gint destx, gint desty, gint width, gint height); Warning
Takes a portion of the contents of a preview widget
and draws it onto the given drawable,
gtk_preview_draw_row ()void gtk_preview_draw_row (GtkPreview *preview, guchar *data, gint x, gint y, gint w); Warning
Sets the data for a portion of a row.
gtk_preview_set_expand ()void gtk_preview_set_expand (GtkPreview *preview, gboolean expand); Warning
Determines the way that the the preview widget behaves
when the size it is allocated is larger than the requested
size. If
gtk_preview_set_gamma ()void gtk_preview_set_gamma (double gamma_); Warning
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:
gtk_preview_set_color_cube ()void gtk_preview_set_color_cube (guint nred_shades, guint ngreen_shades, guint nblue_shades, guint ngray_shades); Warning
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); Warning
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); Warning
This function is deprecated and does nothing.
gtk_preview_set_dither ()void gtk_preview_set_dither (GtkPreview *preview, GdkRgbDither dither); Warning
Set the dithering mode for the display.
gtk_preview_get_visual ()GdkVisual* gtk_preview_get_visual (void); Warning
Returns the visual used by preview widgets. This
function is deprecated, and you should use
gtk_preview_get_cmap ()GdkColormap* gtk_preview_get_cmap (void); Warning
Returns the colormap used by preview widgets. This
function is deprecated, and you should use
gtk_preview_get_info ()GtkPreviewInfo* gtk_preview_get_info (void); Warning
Return a GtkPreviewInfo structure containing global information about preview widgets.
|