gdkimage.h

Go to the documentation of this file.
00001 #ifndef __GDK_IMAGE_H__
00002 #define __GDK_IMAGE_H__
00003 
00004 #include <gdk/gdktypes.h>
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif                          /* __cplusplus */
00009 
00010 /* Types of images.
00011  *   Normal: Normal X image type. These are slow as they involve passing
00012  *           the entire image through the X connection each time a draw
00013  *           request is required. On Win32, a bitmap.
00014  *   Shared: Shared memory X image type. These are fast as the X server
00015  *           and the program actually use the same piece of memory. They
00016  *           should be used with care though as there is the possibility
00017  *           for both the X server and the program to be reading/writing
00018  *           the image simultaneously and producing undesired results.
00019  *           On Win32, also a bitmap.
00020  *   Shared Pixmap: Also a shared memory image, which also has a
00021  *           pixmap using the same memory. Used by gdk_imlib with the
00022  *           Win32 backend.
00023  */
00024    typedef enum {
00025       GDK_IMAGE_NORMAL,
00026       GDK_IMAGE_SHARED,
00027       GDK_IMAGE_FASTEST,
00028       GDK_IMAGE_SHARED_PIXMAP
00029    } GdkImageType;
00030 
00031    struct _GdkImage {
00032       GdkImageType type;
00033       GdkVisual *visual;        /* visual used to create the image */
00034       GdkByteOrder byte_order;
00035       guint16 width;
00036       guint16 height;
00037       guint16 depth;
00038       guint16 bpp;              /* bytes per pixel */
00039       guint16 bpl;              /* bytes per line */
00040       gpointer mem;
00041    };
00042 
00043    GdkImage *gdk_image_new_bitmap(GdkVisual * visual,
00044                                   gpointer data, gint width, gint height);
00045    GdkImage *gdk_image_new(GdkImageType type,
00046                            GdkVisual * visual, gint width, gint height);
00047 #ifdef GDK_WINDOWING_WIN32
00048    GdkImage *gdk_image_bitmap_new(GdkImageType type,
00049                                   GdkVisual * visual,
00050                                   gint width, gint height);
00051 
00052 #endif
00053    GdkImage *gdk_image_get(GdkDrawable * drawable,
00054                            gint x, gint y, gint width, gint height);
00055 
00056    GdkImage *gdk_image_ref(GdkImage * image);
00057    void gdk_image_unref(GdkImage * image);
00058 
00059    void gdk_image_put_pixel(GdkImage * image,
00060                             gint x, gint y, guint32 pixel);
00061    guint32 gdk_image_get_pixel(GdkImage * image, gint x, gint y);
00062 
00063 
00064 #ifdef __cplusplus
00065 }
00066 #endif                          /* __cplusplus */
00067 #endif                          /* __GDK_IMAGE_H__ */

Generated on Tue Jul 5 14:14:37 2011 for ROOT_528-00b_version by  doxygen 1.5.1