Ardour  9.0-pre0-384-ga76afae0e9
gdkimage.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser 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.
8  *
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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GDK_IMAGE_H__
28 #define __GDK_IMAGE_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdktypes.h>
35 
36 G_BEGIN_DECLS
37 
38 /* Types of images.
39  * Normal: Normal X image type. These are slow as they involve passing
40  * the entire image through the X connection each time a draw
41  * request is required. On Win32, a bitmap.
42  * Shared: Shared memory X image type. These are fast as the X server
43  * and the program actually use the same piece of memory. They
44  * should be used with care though as there is the possibility
45  * for both the X server and the program to be reading/writing
46  * the image simultaneously and producing undesired results.
47  * On Win32, also a bitmap.
48  */
49 typedef enum
50 {
55 
56 typedef struct _GdkImageClass GdkImageClass;
57 
58 #define GDK_TYPE_IMAGE (gdk_image_get_type ())
59 #define GDK_IMAGE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_IMAGE, GdkImage))
60 #define GDK_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_IMAGE, GdkImageClass))
61 #define GDK_IS_IMAGE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_IMAGE))
62 #define GDK_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_IMAGE))
63 #define GDK_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_IMAGE, GdkImageClass))
64 
65 struct _GdkImage
66 {
67  GObject parent_instance;
68 
69  /*< public >*/
70 
71  GdkImageType GSEAL (type); /* read only. */
72  GdkVisual *GSEAL (visual); /* read only. visual used to create the image */
73  GdkByteOrder GSEAL (byte_order); /* read only. */
74  gint GSEAL (width); /* read only. */
75  gint GSEAL (height); /* read only. */
76  guint16 GSEAL (depth); /* read only. */
77  guint16 GSEAL (bpp); /* read only. bytes per pixel */
78  guint16 GSEAL (bpl); /* read only. bytes per line */
79  guint16 GSEAL (bits_per_pixel); /* read only. bits per pixel */
80  gpointer GSEAL (mem);
81 
82  GdkColormap *GSEAL (colormap); /* read only. */
83 
84  /*< private >*/
85  gpointer GSEAL (windowing_data); /* read only. */
86 };
87 
89 {
90  GObjectClass parent_class;
91 };
92 
93 GType gdk_image_get_type (void) G_GNUC_CONST;
94 
95 #ifndef GDK_DISABLE_DEPRECATED
97  GdkVisual *visual,
98  gint width,
99  gint height);
100 
102  gint x,
103  gint y,
104  gint width,
105  gint height);
106 
109 
111  gint x,
112  gint y,
113  guint32 pixel);
115  gint x,
116  gint y);
117 
119  GdkColormap *colormap);
121 
132 
133 #ifdef GDK_ENABLE_BROKEN
134 GdkImage* gdk_image_new_bitmap (GdkVisual *visual,
135  gpointer data,
136  gint width,
137  gint height);
138 #endif /* GDK_ENABLE_BROKEN */
139 
140 #define gdk_image_destroy g_object_unref
141 #endif /* GDK_DISABLE_DEPRECATED */
142 
143 G_END_DECLS
144 
145 #endif /* __GDK_IMAGE_H__ */
void gdk_image_set_colormap(GdkImage *image, GdkColormap *colormap)
guint16 gdk_image_get_bits_per_pixel(GdkImage *image)
void gdk_image_unref(GdkImage *image)
gint gdk_image_get_height(GdkImage *image)
guint16 gdk_image_get_depth(GdkImage *image)
GdkVisual * gdk_image_get_visual(GdkImage *image)
guint16 gdk_image_get_bytes_per_pixel(GdkImage *image)
gpointer gdk_image_get_pixels(GdkImage *image)
GdkColormap * gdk_image_get_colormap(GdkImage *image)
void gdk_image_put_pixel(GdkImage *image, gint x, gint y, guint32 pixel)
gint gdk_image_get_width(GdkImage *image)
GdkByteOrder gdk_image_get_byte_order(GdkImage *image)
GdkImageType gdk_image_get_image_type(GdkImage *image)
GdkImage * gdk_image_ref(GdkImage *image)
guint16 gdk_image_get_bytes_per_line(GdkImage *image)
GdkImageType
Definition: gdkimage.h:50
@ GDK_IMAGE_NORMAL
Definition: gdkimage.h:51
@ GDK_IMAGE_FASTEST
Definition: gdkimage.h:53
@ GDK_IMAGE_SHARED
Definition: gdkimage.h:52
GdkImage * gdk_image_get(GdkDrawable *drawable, gint x, gint y, gint width, gint height)
guint32 gdk_image_get_pixel(GdkImage *image, gint x, gint y)
GType gdk_image_get_type(void) G_GNUC_CONST
GdkImage * gdk_image_new(GdkImageType type, GdkVisual *visual, gint width, gint height)
GdkByteOrder
Definition: gdktypes.h:119
GtkImageImageData image
Definition: gtkimage.h:1
GObjectClass parent_class
Definition: gdkimage.h:90
gint GSEAL(height)
gpointer GSEAL(mem)
gpointer GSEAL(windowing_data)
GdkImageType GSEAL(type)
guint16 GSEAL(bpp)
GdkColormap * GSEAL(colormap)
guint16 GSEAL(bits_per_pixel)
GObject parent_instance
Definition: gdkimage.h:67
GdkByteOrder GSEAL(byte_order)
guint16 GSEAL(depth)
gint GSEAL(width)
GdkVisual * GSEAL(visual)
guint16 GSEAL(bpl)
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1