]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/pixmaps.sgml
Initial revision
[~andy/gtk] / docs / reference / gdk / tmpl / pixmaps.sgml
1 <!-- ##### SECTION Title ##### -->
2 Bitmaps and Pixmaps
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Offscreen drawables.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 Pixmaps are offscreen drawables. They can be drawn upon with the
10 standard drawing primitives, then copied to another drawable (such as
11 a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
12 is the number of bits per pixels. Bitmaps are simply pixmaps
13 with a depth of 1. (That is, they are monochrome bitmaps - each
14 pixel can be either on or off).
15 </para>
16
17 <!-- ##### SECTION See_Also ##### -->
18 <para>
19 </para>
20
21 <!-- ##### STRUCT GdkPixmap ##### -->
22 <para>
23 An opaque structure representing an offscreen drawable.
24 Pointers to structures of type #GdkPixmap, #GdkBitmap,
25 and #GdkWindow, can often be used interchangeably. 
26 The type #GdkDrawable refers generically to any of
27 these types.
28 </para>
29
30 @user_data: 
31
32 <!-- ##### FUNCTION gdk_pixmap_new ##### -->
33 <para>
34 Create a new pixmap with a given size and depth.
35 </para>
36
37 @window: a #GdkWindow, used to determine default values for the
38   new pixmap. Can be %NULL if @depth is specified,
39 @width: The width of the new pixmap in pixels.
40 @height: The height of the new pixmap in pixels.
41 @depth: The depth (number of bits per pixel) of the new pixmap. 
42   If -1, and @window is not %NULL, the depth of the new
43   pixmap will be equal to that of @window.
44 @Returns: the #GdkBitmap
45
46
47 <!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
48 <para>
49 Creates a new bitmap from data in XBM format.
50 </para>
51
52 @window: a #GdkWindow, used to determine default values for the
53   new pixmap. Can be %NULL, in which case the root window is
54   used.
55 @data: a pointer to the XBM data.
56 @width: the width of the new pixmap in pixels.
57 @height: the height of the new pixmap in pixels.
58 @Returns: the #GdkBitmap
59
60
61 <!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
62 <para>
63 Create a two-color pixmap from data in XBM data.
64 </para>
65
66 @window: a #GdkWindow, used to determine default values for the
67   new pixmap. Can be %NULL, if the depth is given.
68 @data: a pointer to the data.
69 @width: the width of the new pixmap in pixels.
70 @height: the height of the new pixmap in pixels.
71 @depth: the depth (number of bits per pixel) of the new pixmap.
72 @fg: the foreground color.
73 @bg: the background color.
74 @Returns: the #GdkPixmap
75
76
77 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
78 <para>
79 Create a pixmap from a XPM file.
80 </para>
81
82 @window: a #GdkWindow, used to determine default values for the
83   new pixmap.
84 @mask: a pointer to a place to store a bitmap representing
85 the transparency mask of the XPM file. Can be %NULL,
86 in which case transparency will be ignored.
87 @transparent_color: the color to be used for the pixels
88 that are transparent in the input file. Can be %NULL,
89 in which case a default color will be used.
90 @filename: the filename of a file containing XPM data.
91 @Returns: the #GdkPixmap
92
93
94 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
95 <para>
96 Create a pixmap from a XPM file using a particular colormap.
97 </para>
98
99 @window: a #GdkWindow, used to determine default values for the
100   new pixmap. Can be %NULL if @colormap is given.
101 @colormap: the #GdkColormap that the new pixmap will be use.
102   If omitted, the colormap for @window will be used.
103 @mask: a pointer to a place to store a bitmap representing
104 the transparency mask of the XPM file. Can be %NULL,
105 in which case transparency will be ignored.
106 @transparent_color: the color to be used for the pixels
107 that are transparent in the input file. Can be %NULL,
108 in which case a default color will be used.
109 @filename: the filename of a file containing XPM data.
110 @Returns: the #GdkPixmap.
111
112
113 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
114 <para>
115 Create a pixmap from data in XPM format.
116 </para>
117
118 @window: a #GdkWindow, used to determine default values for the
119   new pixmap.
120 @mask: Pointer to a place to store a bitmap representing
121 the transparency mask of the XPM file. Can be %NULL,
122 in which case transparency will be ignored.
123 @transparent_color: This color will be used for the pixels
124 that are transparent in the input file. Can be %NULL
125 in which case a default color will be used.
126 @data: Pointer to a string containing the XPM data.
127 @Returns: the #GdkPixmap
128
129
130 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
131 <para>
132 Create a pixmap from data in XPM format using a particular
133 colormap.
134 </para>
135
136 @window: a #GdkWindow, used to determine default values for the
137   new pixmap. Can be %NULL if @colormap is given.
138 @colormap: the #GdkColormap that the new pixmap will be use.
139   If omitted, the colormap for @window will be used.
140 @mask: a pointer to a place to store a bitmap representing
141 the transparency mask of the XPM file. Can be %NULL,
142 in which case transparency will be ignored.
143 @transparent_color: the color to be used for the pixels
144 that are transparent in the input file. Can be %NULL,
145 in which case a default color will be used.
146 @data: Pointer to a string containing the XPM data.
147 @Returns: the #GdkPixmap.
148
149
150 <!-- ##### FUNCTION gdk_pixmap_ref ##### -->
151 <para>
152 Increase the reference count of a pixmap.
153 </para>
154
155 @pixmap: a #GdkPixmap
156 @Returns: @pixmap
157
158
159 <!-- ##### FUNCTION gdk_pixmap_unref ##### -->
160 <para>
161 Decrease the reference count of a pixmap. If the resulting
162 reference count is zero, destroy the pixmap.
163 </para>
164
165 @pixmap: a #GdkPixmap
166
167
168 <!-- ##### STRUCT GdkBitmap ##### -->
169 <para>
170 An opaque structure representing an offscreen drawable of depth
171 1. Pointers to structures of type GdkPixmap, #GdkBitmap, and
172 #GdkWindow, can often be used interchangeably.  The type #GdkDrawable
173 refers generically to any of these types.
174 </para>
175
176 @user_data: 
177
178 <!-- ##### FUNCTION gdk_bitmap_ref ##### -->
179 <para>
180 Increase the reference count of a bitmap. An alias
181 for gdk_pixmap_ref().
182 </para>
183
184 @pixmap: 
185 @Returns: 
186
187
188 <!-- ##### FUNCTION gdk_bitmap_unref ##### -->
189 <para>
190 Decrease the reference count of a bitmap. An alias
191 for gdk_pixmap_unref().
192 </para>
193
194 @pixmap: 
195
196