]> Pileus Git - ~andy/gtk/blob - gdk/gdkpixmap.h
Updated Arabic translation
[~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 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 #error "Only <gdk/gdk.h> can be included directly."
29 #endif
30
31 #ifndef __GDK_PIXMAP_H__
32 #define __GDK_PIXMAP_H__
33
34 #include <gdk/gdktypes.h>
35 #include <gdk/gdkdrawable.h>
36
37 G_BEGIN_DECLS
38
39 typedef struct _GdkPixmapObject GdkPixmapObject;
40 typedef struct _GdkPixmapObjectClass GdkPixmapObjectClass;
41
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))
49
50 struct _GdkPixmapObject
51 {
52   GdkDrawable parent_instance;
53   
54   GdkDrawable *impl;  /* window-system-specific delegate object */
55
56   gint depth;
57 };
58
59 struct _GdkPixmapObjectClass
60 {
61   GdkDrawableClass parent_class;
62
63 };
64
65 GType      gdk_pixmap_get_type          (void) G_GNUC_CONST;
66
67 /* Pixmaps
68  */
69 GdkPixmap* gdk_pixmap_new               (GdkDrawable *drawable,
70                                          gint         width,
71                                          gint         height,
72                                          gint         depth);
73 GdkBitmap* gdk_bitmap_create_from_data  (GdkDrawable *drawable,
74                                          const gchar *data,
75                                          gint         width,
76                                          gint         height);
77 GdkPixmap* gdk_pixmap_create_from_data  (GdkDrawable    *drawable,
78                                          const gchar    *data,
79                                          gint            width,
80                                          gint            height,
81                                          gint            depth,
82                                          const GdkColor *fg,
83                                          const GdkColor *bg);
84
85 GdkPixmap* gdk_pixmap_create_from_xpm            (GdkDrawable    *drawable,
86                                                   GdkBitmap     **mask,
87                                                   const GdkColor *transparent_color,
88                                                   const gchar    *filename);
89 GdkPixmap* gdk_pixmap_colormap_create_from_xpm   (GdkDrawable    *drawable,
90                                                   GdkColormap    *colormap,
91                                                   GdkBitmap     **mask,
92                                                   const GdkColor *transparent_color,
93                                                   const gchar    *filename);
94 GdkPixmap* gdk_pixmap_create_from_xpm_d          (GdkDrawable    *drawable,
95                                                   GdkBitmap     **mask,
96                                                   const GdkColor *transparent_color,
97                                                   gchar         **data);
98 GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable    *drawable,
99                                                   GdkColormap    *colormap,
100                                                   GdkBitmap     **mask,
101                                                   const GdkColor *transparent_color,
102                                                   gchar         **data);
103
104 /* Functions to create/lookup pixmaps from their native equivalents
105  */
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 */
110
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,
117                                                   gint             width,
118                                                   gint             height,
119                                                   gint             depth);
120
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 */
127
128 G_END_DECLS
129
130 #endif /* __GDK_PIXMAP_H__ */