| 1 |
# Copyright (c) 1990 The Regents of the University of California. |
| 2 |
# Copyright (c) 1994-1996 Sun Microsystems, Inc. |
| 3 |
# See the file "license.terms" for information on usage and redistribution |
| 4 |
# of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 5 |
# |
| 6 |
# |
| 7 |
|
| 8 |
=head1 NAME |
| 9 |
|
| 10 |
Tk_GetPixmap, Tk_FreePixmap - allocate and free pixmaps |
| 11 |
|
| 12 |
=for category C Programming |
| 13 |
|
| 14 |
=head1 SYNOPSIS |
| 15 |
|
| 16 |
B<#include E<lt>tk.hE<gt>> |
| 17 |
|
| 18 |
Pixmap |
| 19 |
B<Tk_GetPixmap(>I<display, d, width, height, depth>B<)> |
| 20 |
|
| 21 |
B<Tk_FreePixmap(>I<display, pixmap>B<)> |
| 22 |
|
| 23 |
=head1 ARGUMENTS |
| 24 |
|
| 25 |
=over 4 |
| 26 |
|
| 27 |
=item Display *display (in) |
| 28 |
|
| 29 |
X display for the pixmap. |
| 30 |
|
| 31 |
=item Drawable d (in) |
| 32 |
|
| 33 |
Pixmap or window where the new pixmap will be used for drawing. |
| 34 |
|
| 35 |
=item "int" width (in) |
| 36 |
|
| 37 |
Width of pixmap. |
| 38 |
|
| 39 |
=item "int" height (in) |
| 40 |
|
| 41 |
Height of pixmap. |
| 42 |
|
| 43 |
=item "int" depth (in) |
| 44 |
|
| 45 |
Number of bits per pixel in pixmap. |
| 46 |
|
| 47 |
=item Pixmap pixmap (in) |
| 48 |
|
| 49 |
Pixmap to destroy. |
| 50 |
|
| 51 |
=back |
| 52 |
|
| 53 |
=head1 DESCRIPTION |
| 54 |
|
| 55 |
These procedures are identical to the Xlib procedures B<XCreatePixmap> |
| 56 |
and B<XFreePixmap>, except that they have extra code to manage X |
| 57 |
resource identifiers so that identifiers for deleted pixmaps can be |
| 58 |
reused in the future. |
| 59 |
It is important for Tk applications to use these procedures rather |
| 60 |
than B<XCreatePixmap> and B<XFreePixmap>; otherwise long-running |
| 61 |
applications may run out of resource identifiers. |
| 62 |
|
| 63 |
B<Tk_GetPixmap> creates a pixmap suitable for drawing in I<d>, |
| 64 |
with dimensions given by I<width>, I<height>, and I<depth>, |
| 65 |
and returns its identifier. |
| 66 |
B<Tk_FreePixmap> destroys the pixmap given by I<pixmap> and makes |
| 67 |
its resource identifier available for reuse. |
| 68 |
|
| 69 |
=head1 KEYWORDS |
| 70 |
|
| 71 |
pixmap, resource identifier |