summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-03-19 15:34:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-03-19 15:34:40 (GMT)
commit9b42a60edca63854c20fc62ffa51bb8dc2467293 (patch)
treed527c46cbfb60d2d280c193ec256f6aac155fd59
parent90ce810746fbaa08d5fa7099a347066d737c9275 (diff)
downloadtk-9b42a60edca63854c20fc62ffa51bb8dc2467293.zip
tk-9b42a60edca63854c20fc62ffa51bb8dc2467293.tar.gz
tk-9b42a60edca63854c20fc62ffa51bb8dc2467293.tar.bz2
Documented Tk_PreserveColormap. [Bug 220809]
-rw-r--r--ChangeLog13
-rw-r--r--doc/GetClrmap.322
2 files changed, 22 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index c091308..339902b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,11 @@
+2008-03-19 Donal K. Fellows <dkf@users.sf.net>
+
+ * doc/GetClrmap.3: Documented Tk_PreserveColormap. [Bug 220809]
+
2008-03-17 Joe English <jenglish@users.sourceforge.net>
- * unix/Makefile.in, win/Makefile.in, win/makefile.vc:
- Put ttkStubLib.o in libtkstub instead of libtk.
- [Bug 1863007].
+ * unix/Makefile.in, win/Makefile.in, win/makefile.vc: Put ttkStubLib.o
+ in libtkstub instead of libtk. [Bug 1863007]
2008-03-16 Donal K. Fellows <dkf@users.sf.net>
@@ -12,7 +15,7 @@
2008-03-13 Daniel Steffen <das@users.sourceforge.net>
* unix/configure.in: Use backslash-quoting instead of double-quoting
- * unix/tcl.m4: for lib paths in tkConfig.sh [Bug 1913622].
+ * unix/tcl.m4: for lib paths in tkConfig.sh. [Bug 1913622]
* unix/configure: autoconf-2.59
2008-03-13 Don Porter <dgp@users.sourceforge.net>
@@ -64,7 +67,7 @@
2008-03-06 Joe English <jenglish@users.sourceforge.net>
* doc/ttk_notebook.n: Move "TAB IDENTIFIERS" section above "WIDGET
- COMMAND" section [Bug 1882011].
+ COMMAND" section. [Bug 1882011]
2008-02-29 Pat Thoyts <patthoyts@users.sourceforge.net>
diff --git a/doc/GetClrmap.3 b/doc/GetClrmap.3
index 88f562c..cfb84d9 100644
--- a/doc/GetClrmap.3
+++ b/doc/GetClrmap.3
@@ -5,13 +5,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: GetClrmap.3,v 1.6 2007/12/13 15:23:43 dgp Exp $
+'\" RCS: @(#) $Id: GetClrmap.3,v 1.7 2008/03/19 15:34:41 dkf Exp $
'\"
.so man.macros
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
.BS
.SH NAME
-Tk_GetColormap, Tk_FreeColormap \- allocate and free colormaps
+Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap \- allocate and free colormaps
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
@@ -19,6 +19,8 @@ Tk_GetColormap, Tk_FreeColormap \- allocate and free colormaps
Colormap
\fBTk_GetColormap(\fIinterp, tkwin, string\fB)\fR
.sp
+\fBTk_PreserveColormap(\fIdisplay, colormap\fB)\fR
+.sp
\fBTk_FreeColormap(\fIdisplay, colormap\fB)\fR
.SH ARGUMENTS
.AS "Colormap" colormap
@@ -32,10 +34,9 @@ with the same screen and visual as \fItkwin\fR.
.AP Display *display in
Display for which \fIcolormap\fR was allocated.
.AP Colormap colormap in
-Colormap to free; must have been returned by a previous
+Colormap to free or preserve; must have been returned by a previous
call to \fBTk_GetColormap\fR or \fBTk_GetVisual\fR.
.BE
-
.SH DESCRIPTION
.PP
These procedures are used to manage colormaps.
@@ -47,13 +48,19 @@ window is returned.
If \fIstring\fR does not make sense, or if it refers to a window on
a different screen from \fItkwin\fR or with
a different visual than \fItkwin\fR, then \fBTk_GetColormap\fR returns
-\fBNone\fR and leaves an error message in \fIinterp->result\fR.
+\fBNone\fR and leaves an error message in \fIinterp\fR's result.
+.PP
+\fBTk_PreserveColormap\fR increases the internal reference count for a
+colormap previously returned by \fBTk_GetColormap\fR, which allows the
+colormap to be stored in several locations without knowing which order
+they will be released.
.PP
\fBTk_FreeColormap\fR should be called when a colormap returned by
\fBTk_GetColormap\fR is no longer needed.
Tk maintains a reference count for each colormap returned by
\fBTk_GetColormap\fR, so there should eventually be one call to
-\fBTk_FreeColormap\fR for each call to \fBTk_GetColormap\fR.
+\fBTk_FreeColormap\fR for each call to \fBTk_GetColormap\fR and each
+call to \fBTk_PreserveColormap\fR.
When a colormap's reference count becomes zero, Tk releases the
X colormap.
.PP
@@ -68,6 +75,5 @@ If \fBTk_GetColormap\fR is called with a \fIstring\fR value of
be returned by \fBTk_GetVisual\fR; however, it can be used in other
windows by calling \fBTk_GetColormap\fR with the original window's
name as \fIstring\fR.
-
.SH KEYWORDS
-colormap
+colormap, visual