]> Pileus Git - ~andy/gtk/blob - gdk/gdkpixmap.h
Translation updated by Ivar Smolin
[~andy/gtk] / gdk / gdkpixmap.h
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 /*
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/. 
25  */
26
27 #ifndef __GDK_PIXMAP_H__
28 #define __GDK_PIXMAP_H__
29
30 #include <gdk/gdktypes.h>
31 #include <gdk/gdkdrawable.h>
32
33 G_BEGIN_DECLS
34
35 typedef struct _GdkPixmapObject GdkPixmapObject;
36 typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
37
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))
45
46 struct _GdkPixmapObject
47 {
48   GdkDrawable parent_instance;
49   
50   GdkDrawable *impl;  /* window-system-specific delegate object */
51
52   gint depth;
53 };
54
55 struct _GdkPixmapObjectClass
56 {
57   GdkDrawableClass parent_class;
58
59 };
60
61 GType      gdk_pixmap_get_type          (void) G_GNUC_CONST;
62
63 /* Pixmaps
64  */
65 GdkPixmap* gdk_pixmap_new               (GdkDrawable *drawable,
66                                          gint         width,
67                                          gint         height,
68                                          gint         depth);
69 GdkBitmap* gdk_bitmap_create_from_data  (GdkDrawable *drawable,
70                                          const gchar *data,
71                                          gint         width,
72                                          gint         height);
73 GdkPixmap* gdk_pixmap_create_from_data  (GdkDrawable    *drawable,
74                                          const gchar    *data,
75                                          gint            width,
76                                          gint            height,
77                                          gint            depth,
78                                          const GdkColor *fg,
79                                          const GdkColor *bg);
80
81 GdkPixmap* gdk_pixmap_create_from_xpm            (GdkDrawable    *drawable,
82                                                   GdkBitmap     **mask,
83                                                   const GdkColor *transparent_color,
84                                                   const gchar    *filename);
85 GdkPixmap* gdk_pixmap_colormap_create_from_xpm   (GdkDrawable    *drawable,
86                                                   GdkColormap    *colormap,
87                                                   GdkBitmap     **mask,
88                                                   const GdkColor *transparent_color,
89                                                   const gchar    *filename);
90 GdkPixmap* gdk_pixmap_create_from_xpm_d          (GdkDrawable    *drawable,
91                                                   GdkBitmap     **mask,
92                                                   const GdkColor *transparent_color,
93                                                   gchar         **data);
94 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable    *drawable,
95                                                   GdkColormap    *colormap,
96                                                   GdkBitmap     **mask,
97                                                   const GdkColor *transparent_color,
98                                                   gchar         **data);
99
100 /* Functions to create/lookup pixmaps from their native equivalents
101  */
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 */
106
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);
111 GdkPixmap*    gdk_pixmap_foreign_new_for_screen  (GdkScreen       *screen,
112                                                   GdkNativeWindow  anid,
113                                                   gint             width,
114                                                   gint             height,
115                                                   gint             depth);
116
117 #ifndef GDK_DISABLE_DEPRECATED
118 #define gdk_bitmap_ref                 gdk_drawable_ref
119 #define gdk_bitmap_unref               gdk_drawable_unref
120 #define gdk_pixmap_ref                 gdk_drawable_ref
121 #define gdk_pixmap_unref               gdk_drawable_unref
122 #endif /* GDK_DISABLE_DEPRECATED */
123
124 G_END_DECLS
125
126 #endif /* __GDK_PIXMAP_H__ */