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 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
31 #ifndef __GDK_PIXMAP_H__
32 #define __GDK_PIXMAP_H__
34 #include <gdk/gdktypes.h>
35 #include <gdk/gdkdrawable.h>
39 typedef struct _GdkPixmapObject GdkPixmapObject;
40 typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
42 #define GDK_TYPE_PIXMAP (gdk_pixmap_get_type ())
43 #define GDK_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP, GdkPixmap))
44 #define GDK_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
45 #define GDK_IS_PIXMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP))
46 #define GDK_IS_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXMAP))
47 #define GDK_PIXMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXMAP, GdkPixmapObjectClass))
48 #define GDK_PIXMAP_OBJECT(object) ((GdkPixmapObject *) GDK_PIXMAP (object))
50 struct _GdkPixmapObject
52 GdkDrawable parent_instance;
54 GdkDrawable *impl; /* window-system-specific delegate object */
59 struct _GdkPixmapObjectClass
61 GdkDrawableClass parent_class;
65 GType gdk_pixmap_get_type (void) G_GNUC_CONST;
69 GdkPixmap* gdk_pixmap_new (GdkDrawable *drawable,
73 GdkBitmap* gdk_bitmap_create_from_data (GdkDrawable *drawable,
77 GdkPixmap* gdk_pixmap_create_from_data (GdkDrawable *drawable,
85 GdkPixmap* gdk_pixmap_create_from_xpm (GdkDrawable *drawable,
87 const GdkColor *transparent_color,
88 const gchar *filename);
89 GdkPixmap* gdk_pixmap_colormap_create_from_xpm (GdkDrawable *drawable,
90 GdkColormap *colormap,
92 const GdkColor *transparent_color,
93 const gchar *filename);
94 GdkPixmap* gdk_pixmap_create_from_xpm_d (GdkDrawable *drawable,
96 const GdkColor *transparent_color,
98 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
99 GdkColormap *colormap,
101 const GdkColor *transparent_color,
104 /* Functions to create/lookup pixmaps from their native equivalents
106 #ifndef GDK_MULTIHEAD_SAFE
107 GdkPixmap* gdk_pixmap_foreign_new (GdkNativeWindow anid);
108 GdkPixmap* gdk_pixmap_lookup (GdkNativeWindow anid);
109 #endif /* GDK_MULTIHEAD_SAFE */
111 GdkPixmap* gdk_pixmap_foreign_new_for_display (GdkDisplay *display,
112 GdkNativeWindow anid);
113 GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display,
114 GdkNativeWindow anid);
115 GdkPixmap* gdk_pixmap_foreign_new_for_screen (GdkScreen *screen,
116 GdkNativeWindow anid,
121 #ifndef GDK_DISABLE_DEPRECATED
122 #define gdk_bitmap_ref g_object_ref
123 #define gdk_bitmap_unref g_object_unref
124 #define gdk_pixmap_ref g_object_ref
125 #define gdk_pixmap_unref g_object_unref
126 #endif /* GDK_DISABLE_DEPRECATED */
130 #endif /* __GDK_PIXMAP_H__ */