]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkimage.h
Remove stray 'return' statement. (#136855, David L. Cooper II)
[~andy/gtk] / gdk / gdkimage.h
index 6077fd5b2caac04b287864352ea9550717cd0118..1b52f850194f583ebf8f526cb7621c4f28acfd35 100644 (file)
@@ -17,51 +17,68 @@ extern "C" {
  *          for both the X server and the program to be reading/writing
  *          the image simultaneously and producing undesired results.
  *          On Win32, also a bitmap.
- *   Shared Pixmap: Also a shared memory image, which also has a
- *          pixmap using the same memory. Used by gdk_imlib with the
- *          Win32 backend.
  */
 typedef enum
 {
   GDK_IMAGE_NORMAL,
   GDK_IMAGE_SHARED,
-  GDK_IMAGE_FASTEST,
-  GDK_IMAGE_SHARED_PIXMAP
+  GDK_IMAGE_FASTEST
 } GdkImageType;
 
+typedef struct _GdkImageClass GdkImageClass;
+
+#define GDK_TYPE_IMAGE              (gdk_image_get_type ())
+#define GDK_IMAGE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_IMAGE, GdkImage))
+#define GDK_IMAGE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_IMAGE, GdkImageClass))
+#define GDK_IS_IMAGE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_IMAGE))
+#define GDK_IS_IMAGE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_IMAGE))
+#define GDK_IMAGE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_IMAGE, GdkImageClass))
+
 struct _GdkImage
 {
-  GdkImageType type;
-  GdkVisual    *visual;            /* visual used to create the image */
-  GdkByteOrder byte_order;
-  guint16      width;
-  guint16      height;
-  guint16      depth;
-  guint16      bpp;        /* bytes per pixel */
-  guint16      bpl;        /* bytes per line */
+  GObject parent_instance;
+
+  /*< public >*/
+  
+  GdkImageType type; /* read only. */
+  GdkVisual    *visual;            /* read only. visual used to create the image */
+  GdkByteOrder byte_order; /* read only. */
+  gint         width; /* read only. */
+  gint         height; /* read only. */
+  guint16      depth; /* read only. */
+  guint16      bpp;            /* read only. bytes per pixel */
+  guint16      bpl;            /* read only. bytes per line */
+  guint16       bits_per_pixel; /* read only. bits per pixel */
   gpointer     mem;
+
+  GdkColormap  *colormap; /* read only. */
+  
+  gpointer windowing_data; /* read only. */
+};
+
+struct _GdkImageClass
+{
+  GObjectClass parent_class;
 };
 
+GType     gdk_image_get_type   (void) G_GNUC_CONST;
 
-GdkImage* gdk_image_new_bitmap(GdkVisual     *visual,
-                               gpointer      data,
-                               gint          width,
-                               gint          height);
 GdkImage*  gdk_image_new       (GdkImageType  type,
                                GdkVisual    *visual,
                                gint          width,
                                gint          height);
-#ifdef GDK_WINDOWING_WIN32
-GdkImage*  gdk_image_bitmap_new(GdkImageType  type,
-                               GdkVisual    *visual,
-                               gint          width,
-                               gint          height);
-#endif
+
+#ifndef GDK_DISABLE_DEPRECATED
 GdkImage*  gdk_image_get       (GdkDrawable  *drawable,
                                gint          x,
                                gint          y,
                                gint          width,
                                gint          height);
+
+GdkImage * gdk_image_ref       (GdkImage     *image);
+void       gdk_image_unref     (GdkImage     *image);
+#endif
+
 void      gdk_image_put_pixel (GdkImage     *image,
                                gint          x,
                                gint          y,
@@ -69,8 +86,22 @@ void    gdk_image_put_pixel (GdkImage     *image,
 guint32           gdk_image_get_pixel (GdkImage     *image,
                                gint          x,
                                gint          y);
-void      gdk_image_destroy   (GdkImage     *image);
 
+void       gdk_image_set_colormap (GdkImage    *image,
+                                   GdkColormap *colormap);
+GdkColormap* gdk_image_get_colormap (GdkImage    *image);
+
+
+#ifdef GDK_ENABLE_BROKEN
+GdkImage* gdk_image_new_bitmap (GdkVisual     *visual,
+                               gpointer      data,
+                               gint          width,
+                               gint          height);
+#endif /* GDK_ENABLE_BROKEN */
+
+#ifndef GDK_DISABLE_DEPRECATED
+#define gdk_image_destroy              gdk_image_unref
+#endif /* GDK_DISABLE_DEPRECATED */
 
 #ifdef __cplusplus
 }