OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tk/] [doc/] [GetClrmap.3] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: GetClrmap.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures"
12
.BS
13
.SH NAME
14
Tk_GetColormap, Tk_FreeColormap \- allocate and free colormaps
15
.SH SYNOPSIS
16
.nf
17
\fB#include \fR
18
.sp
19
Colormap
20
\fBTk_GetColormap(\fIinterp, tkwin, string\fB)\fR
21
.sp
22
\fBTk_FreeColormap(\fIdisplay, colormap\fB)\fR
23
.SH ARGUMENTS
24
.AS "Colormap" colormap
25
.AP Tcl_Interp *interp in
26
Interpreter to use for error reporting.
27
.AP Tk_Window tkwin in
28
Token for window in which colormap will be used.
29
.AP char *string in
30
Selects a colormap:  either \fBnew\fR or the name of a window
31
with the same screen and visual as \fItkwin\fR.
32
.AP Display *display in
33
Display for which \fIcolormap\fR was allocated.
34
.AP Colormap colormap in
35
Colormap to free;  must have been returned by a previous
36
call to \fBTk_GetColormap\fR or \fBTk_GetVisual\fR.
37
.BE
38
 
39
.SH DESCRIPTION
40
.PP
41
These procedures are used to manage colormaps.
42
\fBTk_GetColormap\fR returns a colormap suitable for use in \fItkwin\fR.
43
If its \fIstring\fR argument is \fBnew\fR then a new colormap is
44
created;  otherwise \fIstring\fR must be the name of another window
45
with the same screen and visual as \fItkwin\fR, and the colormap from that
46
window is returned.
47
If \fIstring\fR doesn't make sense, or if it refers to a window on
48
a different screen from \fItkwin\fR or with
49
a different visual than \fItkwin\fR, then \fBTk_GetColormap\fR returns
50
\fBNone\fR and leaves an error message in \fIinterp->result\fR.
51
.PP
52
\fBTk_FreeColormap\fR should be called when a colormap returned by
53
\fBTk_GetColormap\fR is no longer needed.
54
Tk maintains a reference count for each colormap returned by
55
\fBTk_GetColormap\fR, so there should eventually be one call to
56
\fBTk_FreeColormap\fR for each call to \fBTk_GetColormap\fR.
57
When a colormap's reference count becomes zero, Tk releases the
58
X colormap.
59
.PP
60
\fBTk_GetVisual\fR and \fBTk_GetColormap\fR work together, in that
61
a new colormap created by \fBTk_GetVisual\fR may later be returned
62
by \fBTk_GetColormap\fR.
63
The reference counting mechanism for colormaps includes both procedures,
64
so callers of \fBTk_GetVisual\fR must also call \fBTk_FreeColormap\fR
65
to release the colormap.
66
If \fBTk_GetColormap\fR is called with a \fIstring\fR value of
67
\fBnew\fR then the resulting colormap will never
68
be returned by \fBTk_GetVisual\fR;  however, it can be used in other
69
windows by calling \fBTk_GetColormap\fR with the original window's
70
name as \fIstring\fR.
71
 
72
.SH KEYWORDS
73
colormap

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.