]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/pixmaps.sgml
Add some ids to reduce dangling links.
[~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><anchor id="GdkPixmap"/>
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
31 <!-- ##### FUNCTION gdk_pixmap_new ##### -->
32 <para>
33 Create a new pixmap with a given size and depth.
34 </para>
35
36 @drawable: 
37 @width: The width of the new pixmap in pixels.
38 @height: The height of the new pixmap in pixels.
39 @depth: The depth (number of bits per pixel) of the new pixmap. 
40   If -1, and @window is not %NULL, the depth of the new
41   pixmap will be equal to that of @window.
42 @Returns: the #GdkPixmap
43 <!-- # Unused Parameters # -->
44 @window: a #GdkWindow, used to determine default values for the
45   new pixmap. Can be %NULL if @depth is specified,
46
47
48 <!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
49 <para>
50 Creates a new bitmap from data in XBM format.
51 </para>
52
53 @drawable: 
54 @data: a pointer to the XBM data.
55 @width: the width of the new pixmap in pixels.
56 @height: the height of the new pixmap in pixels.
57 @Returns: the #GdkBitmap
58 <!-- # Unused Parameters # -->
59 @window: a #GdkWindow, used to determine default values for the
60   new pixmap. Can be %NULL, in which case the root window is
61   used.
62
63
64 <!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
65 <para>
66 Create a two-color pixmap from data in XBM data.
67 </para>
68
69 @drawable: 
70 @data: a pointer to the data.
71 @width: the width of the new pixmap in pixels.
72 @height: the height of the new pixmap in pixels.
73 @depth: the depth (number of bits per pixel) of the new pixmap.
74 @fg: the foreground color.
75 @bg: the background color.
76 @Returns: the #GdkPixmap
77 <!-- # Unused Parameters # -->
78 @window: a #GdkWindow, used to determine default values for the
79   new pixmap. Can be %NULL, if the depth is given.
80
81
82 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
83 <para>
84 Create a pixmap from a XPM file.
85 </para>
86
87 @drawable: 
88 @mask: a pointer to a place to store a bitmap representing
89 the transparency mask of the XPM file. Can be %NULL,
90 in which case transparency will be ignored.
91 @transparent_color: the color to be used for the pixels
92 that are transparent in the input file. Can be %NULL,
93 in which case a default color will be used.
94 @filename: the filename of a file containing XPM data.
95 @Returns: the #GdkPixmap
96 <!-- # Unused Parameters # -->
97 @window: a #GdkWindow, used to determine default values for the
98   new pixmap.
99
100
101 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
102 <para>
103 Create a pixmap from a XPM file using a particular colormap.
104 </para>
105
106 @drawable: 
107 @colormap: the #GdkColormap that the new pixmap will be use.
108   If omitted, the colormap for @window will be used.
109 @mask: a pointer to a place to store a bitmap representing
110 the transparency mask of the XPM file. Can be %NULL,
111 in which case transparency will be ignored.
112 @transparent_color: the color to be used for the pixels
113 that are transparent in the input file. Can be %NULL,
114 in which case a default color will be used.
115 @filename: the filename of a file containing XPM data.
116 @Returns: the #GdkPixmap.
117 <!-- # Unused Parameters # -->
118 @window: a #GdkWindow, used to determine default values for the
119   new pixmap. Can be %NULL if @colormap is given.
120
121
122 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
123 <para>
124 Create a pixmap from data in XPM format.
125 </para>
126
127 @drawable: 
128 @mask: Pointer to a place to store a bitmap representing
129 the transparency mask of the XPM file. Can be %NULL,
130 in which case transparency will be ignored.
131 @transparent_color: This color will be used for the pixels
132 that are transparent in the input file. Can be %NULL
133 in which case a default color will be used.
134 @data: Pointer to a string containing the XPM data.
135 @Returns: the #GdkPixmap
136 <!-- # Unused Parameters # -->
137 @window: a #GdkWindow, used to determine default values for the
138   new pixmap.
139
140
141 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
142 <para>
143 Create a pixmap from data in XPM format using a particular
144 colormap.
145 </para>
146
147 @drawable: 
148 @colormap: the #GdkColormap that the new pixmap will be use.
149   If omitted, the colormap for @window will be used.
150 @mask: a pointer to a place to store a bitmap representing
151 the transparency mask of the XPM file. Can be %NULL,
152 in which case transparency will be ignored.
153 @transparent_color: the color to be used for the pixels
154 that are transparent in the input file. Can be %NULL,
155 in which case a default color will be used.
156 @data: Pointer to a string containing the XPM data.
157 @Returns: the #GdkPixmap.
158 <!-- # Unused Parameters # -->
159 @window: a #GdkWindow, used to determine default values for the
160   new pixmap. Can be %NULL if @colormap is given.
161
162
163 <!-- ##### MACRO gdk_pixmap_ref ##### -->
164 <para>
165 Deprecated equivalent of g_object_ref().
166 </para>
167
168 @Returns: @pixmap
169 <!-- # Unused Parameters # -->
170 @pixmap: a #GdkPixmap
171
172
173 <!-- ##### MACRO gdk_pixmap_unref ##### -->
174 <para>
175 Deprecated equivalent of g_object_unref().
176 </para>
177
178 <!-- # Unused Parameters # -->
179 @pixmap: a #GdkPixmap
180
181
182 <!-- ##### STRUCT GdkBitmap ##### -->
183 <para>
184 An opaque structure representing an offscreen drawable of depth
185 1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
186 #GdkWindow, can often be used interchangeably.  The type #GdkDrawable
187 refers generically to any of these types.
188 </para>
189
190 @user_data: 
191
192 <!-- ##### MACRO gdk_bitmap_ref ##### -->
193 <para>
194 Deprecated equivalent of g_object_ref().
195 </para>
196
197 @Returns: @pixmap
198 <!-- # Unused Parameters # -->
199 @pixmap: a #GdkBitmap
200
201
202 <!-- ##### MACRO gdk_bitmap_unref ##### -->
203 <para>
204 Deprecated equivalent of g_object_unref().
205 </para>
206
207 <!-- # Unused Parameters # -->
208 @pixmap: a #GdkBitmap
209
210