Details
struct GtkPreview
The GtkPreview struct contains private data only, and
should be accessed using the functions below.
struct GtkPreviewInfo
struct GtkPreviewInfo
{
GdkVisual *visual;
GdkColormap *cmap;
guchar *lookup;
gdouble gamma;
}; |
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 GtkDitherInfo
union GtkDitherInfo
{
gushort s[2];
guchar c[4];
}; |
This union not used in GTK+.
gtk_preview_uninit ()
void gtk_preview_uninit (void); |
This function is deprecated and does nothing.
gtk_preview_new ()
Create a new preview widget.
gtk_preview_size ()
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 ()
Takes a portion of the contents of a preview widget
and draws it onto the given drawable, window.
gtk_preview_draw_row ()
Sets the data for a portion of a row.
gtk_preview_set_expand ()
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); |
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); |
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); |
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); |
This function is deprecated and does nothing.
gtk_preview_set_dither ()
Set the dithering mode for the display.
gtk_preview_get_visual ()
Returns the visual used by preview widgets. This
function is deprecated, and you should use
gdk_rgb_get_visual() instead.
gtk_preview_get_cmap ()
Returns the colormap used by preview widgets. This
function is deprecated, and you should use
gdk_rgb_get_cmap() instead.
gtk_preview_get_info ()
Return a GtkPreviewInfo structure containing
global information about preview widgets.
gtk_preview_reset ()
void gtk_preview_reset (void); |
This function is deprecated and does nothing. It was
once used for changing the colormap and visual on the fly.