1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
7 <!-- ##### SECTION Long_Description ##### -->
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).
17 <!-- ##### SECTION See_Also ##### -->
21 <!-- ##### STRUCT 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
32 <!-- ##### FUNCTION gdk_pixmap_new ##### -->
34 Create a new pixmap with a given size and depth.
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
47 <!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
49 Creates a new bitmap from data in XBM format.
52 @window: a #GdkWindow, used to determine default values for the
53 new pixmap. Can be %NULL, in which case the root window is
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
61 <!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
63 Create a two-color pixmap from data in XBM data.
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
77 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
79 Create a pixmap from a XPM file.
82 @window: a #GdkWindow, used to determine default values for the
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
94 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
96 Create a pixmap from a XPM file using a particular colormap.
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.
113 <!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
115 Create a pixmap from data in XPM format.
118 @window: a #GdkWindow, used to determine default values for the
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
130 <!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
132 Create a pixmap from data in XPM format using a particular
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.
150 <!-- ##### FUNCTION gdk_pixmap_ref ##### -->
152 Increase the reference count of a pixmap.
155 @pixmap: a #GdkPixmap
159 <!-- ##### FUNCTION gdk_pixmap_unref ##### -->
161 Decrease the reference count of a pixmap. If the resulting
162 reference count is zero, destroy the pixmap.
165 @pixmap: a #GdkPixmap
168 <!-- ##### STRUCT GdkBitmap ##### -->
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.
178 <!-- ##### FUNCTION gdk_bitmap_ref ##### -->
180 Increase the reference count of a bitmap. An alias
181 for gdk_pixmap_ref().
188 <!-- ##### FUNCTION gdk_bitmap_unref ##### -->
190 Decrease the reference count of a bitmap. An alias
191 for gdk_pixmap_unref().