1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #ifndef __GTK_PREVIEW_H__
19 #define __GTK_PREVIEW_H__
22 #include <gtk/gtkwidget.h>
27 #endif /* __cplusplus */
30 #define GTK_PREVIEW(obj) GTK_CHECK_CAST (obj, gtk_preview_get_type (), GtkPreview)
31 #define GTK_PREVIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_preview_get_type (), GtkPreviewClass)
32 #define GTK_IS_PREVIEW(obj) GTK_CHECK_TYPE (obj, gtk_preview_get_type ())
35 typedef struct _GtkPreview GtkPreview;
36 typedef struct _GtkPreviewInfo GtkPreviewInfo;
37 typedef union _GtkDitherInfo GtkDitherInfo;
38 typedef struct _GtkPreviewClass GtkPreviewClass;
46 guint16 buffer_height;
52 struct _GtkPreviewInfo
59 gulong *reserved_pixels;
65 GtkDitherInfo *dither_red;
66 GtkDitherInfo *dither_green;
67 GtkDitherInfo *dither_blue;
68 GtkDitherInfo *dither_gray;
69 guchar ***dither_matrix;
88 struct _GtkPreviewClass
90 GtkWidgetClass parent_class;
98 guint gtk_preview_get_type (void);
99 void gtk_preview_uninit (void);
100 GtkWidget* gtk_preview_new (GtkPreviewType type);
101 void gtk_preview_size (GtkPreview *preview,
104 void gtk_preview_put (GtkPreview *preview,
113 void gtk_preview_put_row (GtkPreview *preview,
119 void gtk_preview_draw_row (GtkPreview *preview,
124 void gtk_preview_set_expand (GtkPreview *preview,
127 void gtk_preview_set_gamma (double gamma);
128 void gtk_preview_set_color_cube (guint nred_shades,
132 void gtk_preview_set_install_cmap (gint install_cmap);
133 void gtk_preview_set_reserved (gint nreserved);
134 GdkVisual* gtk_preview_get_visual (void);
135 GdkColormap* gtk_preview_get_cmap (void);
136 GtkPreviewInfo* gtk_preview_get_info (void);
141 #endif /* __cplusplus */
144 #endif /* __GTK_PREVIEW_H__ */