1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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.
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.
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.
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/.
27 #ifndef __GDK_PIXMAP_H__
28 #define __GDK_PIXMAP_H__
30 #include <gdk/gdktypes.h>
31 #include <gdk/gdkdrawable.h>
35 typedef struct _GdkPixmapObject GdkPixmapObject;
36 typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
38 #define GDK_TYPE_PIXMAP (gdk_pixmap_get_type ())
39 #define GDK_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP, GdkPixmap))
40 #define GDK_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
41 #define GDK_IS_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP))
42 #define GDK_IS_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXMAP))
43 #define GDK_PIXMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
44 #define GDK_PIXMAP_OBJECT(object) ((GdkPixmapObject *) GDK_PIXMAP (object))
46 struct _GdkPixmapObject
48 GdkDrawable parent_instance;
50 GdkDrawable *impl; /* window-system-specific delegate object */
55 struct _GdkPixmapObjectClass
57 GdkDrawableClass parent_class;
61 GType gdk_pixmap_get_type (void) G_GNUC_CONST;
65 GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,
69 GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable,
73 GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
81 GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
83 const GdkColor *transparent_color,
84 const gchar *filename);
85 GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
86 GdkColormap *colormap,
88 const GdkColor *transparent_color,
89 const gchar *filename);
90 GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
92 const GdkColor *transparent_color,
94 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
95 GdkColormap *colormap,
97 const GdkColor *transparent_color,
100 /* Functions to create/lookup pixmaps from their native equivalents
102 #ifndef GDK_MULTIHEAD_SAFE
103 GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid);
104 GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid);
105 #endif /* GDK_MULTIHEAD_SAFE */
107 GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display,
108 GdkNativeWindow anid);
109 GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display,
110 GdkNativeWindow anid);
112 #ifndef GDK_DISABLE_DEPRECATED
113 #define gdk_bitmap_ref gdk_drawable_ref
114 #define gdk_bitmap_unref gdk_drawable_unref
115 #define gdk_pixmap_ref gdk_drawable_ref
116 #define gdk_pixmap_unref gdk_drawable_unref
117 #endif /* GDK_DISABLE_DEPRECATED */
121 #endif /* __GDK_PIXMAP_H__ */