]> Pileus Git - ~andy/gtk/blob - gdk/gdkpixmap.h
gdk_x11_get_xatom_by_name_for_display takes a GdkDisplay *, not an
[~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               (GdkDrawable *drawable,
42                                          gint         width,
43                                          gint         height,
44                                          gint         depth);
45 GdkBitmap* gdk_bitmap_create_from_data  (GdkDrawable *drawable,
46                                          const gchar *data,
47                                          gint         width,
48                                          gint         height);
49 GdkPixmap* gdk_pixmap_create_from_data  (GdkDrawable *drawable,
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            (GdkDrawable  *drawable,
58                                                   GdkBitmap   **mask,
59                                                   GdkColor     *transparent_color,
60                                                   const gchar  *filename);
61 GdkPixmap* gdk_pixmap_colormap_create_from_xpm   (GdkDrawable  *drawable,
62                                                   GdkColormap  *colormap,
63                                                   GdkBitmap   **mask,
64                                                   GdkColor     *transparent_color,
65                                                   const gchar  *filename);
66 GdkPixmap* gdk_pixmap_create_from_xpm_d          (GdkDrawable  *drawable,
67                                                   GdkBitmap   **mask,
68                                                   GdkColor     *transparent_color,
69                                                   gchar       **data);
70 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable  *drawable,
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  */
78 #ifndef GDK_MULTIHEAD_SAFE
79 GdkPixmap*    gdk_pixmap_foreign_new (GdkNativeWindow anid);
80 GdkPixmap*    gdk_pixmap_lookup      (GdkNativeWindow anid);
81 #endif /* GDK_MULTIHEAD_SAFE */
82
83 GdkPixmap*    gdk_pixmap_foreign_new_for_display (GdkDisplay      *display,
84                                                   GdkNativeWindow  anid);
85 GdkPixmap*    gdk_pixmap_lookup_for_display      (GdkDisplay      *display,
86                                                   GdkNativeWindow  anid);
87
88 #ifndef GDK_DISABLE_DEPRECATED
89 #define gdk_bitmap_ref                 gdk_drawable_ref
90 #define gdk_bitmap_unref               gdk_drawable_unref
91 #define gdk_pixmap_ref                 gdk_drawable_ref
92 #define gdk_pixmap_unref               gdk_drawable_unref
93 #endif /* GDK_DISABLE_DEPRECATED */
94
95 #ifdef __cplusplus
96 }
97 #endif /* __cplusplus */
98
99 #endif /* __GDK_PIXMAP_H__ */