]> Pileus Git - ~andy/gtk/blob - gdk/gdkpixmap.h
resort if we're already in 'unsorted' state, and update the docs
[~andy/gtk] / gdk / gdkpixmap.h
1 #ifndef __GDK_PIXMAP_H__
2 #define __GDK_PIXMAP_H__
3
4 #include <gdk/gdktypes.h>
5 #include <gdk/gdkdrawable.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif /* __cplusplus */
10
11 typedef struct _GdkPixmapObject GdkPixmapObject;
12 typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
13
14 #define GDK_TYPE_PIXMAP              (gdk_pixmap_get_type ())
15 #define GDK_PIXMAP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP, GdkPixmap))
16 #define GDK_PIXMAP_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
17 #define GDK_IS_PIXMAP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP))
18 #define GDK_IS_PIXMAP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXMAP))
19 #define GDK_PIXMAP_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
20 #define GDK_PIXMAP_OBJECT(object)    ((GdkPixmapObject *) GDK_PIXMAP (object))
21
22 struct _GdkPixmapObject
23 {
24   GdkDrawable parent_instance;
25   
26   GdkDrawable *impl;  /* window-system-specific delegate object */
27
28   gint depth;
29 };
30
31 struct _GdkPixmapObjectClass
32 {
33   GdkDrawableClass parent_class;
34
35 };
36
37 GType      gdk_pixmap_get_type          (void) G_GNUC_CONST;
38
39 /* Pixmaps
40  */
41 GdkPixmap* gdk_pixmap_new               (GdkWindow  *window,
42                                          gint        width,
43                                          gint        height,
44                                          gint        depth);
45 GdkBitmap* gdk_bitmap_create_from_data  (GdkWindow   *window,
46                                          const gchar *data,
47                                          gint         width,
48                                          gint         height);
49 GdkPixmap* gdk_pixmap_create_from_data  (GdkWindow   *window,
50                                          const gchar *data,
51                                          gint         width,
52                                          gint         height,
53                                          gint         depth,
54                                          GdkColor    *fg,
55                                          GdkColor    *bg);
56
57 GdkPixmap* gdk_pixmap_create_from_xpm            (GdkWindow    *window,
58                                                   GdkBitmap   **mask,
59                                                   GdkColor     *transparent_color,
60                                                   const gchar  *filename);
61 GdkPixmap* gdk_pixmap_colormap_create_from_xpm   (GdkWindow    *window,
62                                                   GdkColormap  *colormap,
63                                                   GdkBitmap   **mask,
64                                                   GdkColor     *transparent_color,
65                                                   const gchar  *filename);
66 GdkPixmap* gdk_pixmap_create_from_xpm_d          (GdkWindow    *window,
67                                                   GdkBitmap   **mask,
68                                                   GdkColor     *transparent_color,
69                                                   gchar       **data);
70 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkWindow    *window,
71                                                   GdkColormap  *colormap,
72                                                   GdkBitmap   **mask,
73                                                   GdkColor     *transparent_color,
74                                                   gchar       **data);
75
76 /* Functions to create/lookup pixmaps from their native equivalents */
77 GdkPixmap*    gdk_pixmap_foreign_new (GdkNativeWindow anid);
78 GdkPixmap*    gdk_pixmap_lookup      (GdkNativeWindow anid);
79
80 #ifndef GDK_DISABLE_DEPRECATED
81 #define gdk_bitmap_ref                 gdk_drawable_ref
82 #define gdk_bitmap_unref               gdk_drawable_unref
83 #define gdk_pixmap_ref                 gdk_drawable_ref
84 #define gdk_pixmap_unref               gdk_drawable_unref
85 #endif /* GDK_DISABLE_DEPRECATED */
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91 #endif /* __GDK_PIXMAP_H__ */