Tk_GetColormap
NAMESYNOPSIS
ARGUMENTS
DESCRIPTION
KEYWORDS
___________________________
NAME
Tk_GetColormap, Tk_PreserveColormap, Tk_FreeColormap − allocate and free colormaps
SYNOPSIS
#include <tk.h>
Colormap
Tk_GetColormap(interp, tkwin, string)
Tk_PreserveColormap(display, colormap)
Tk_FreeColormap(display, colormap)
ARGUMENTS
Tcl_Interp *interp (in) |
Interpreter to use for error reporting. | ||
Tk_Window tkwin (in) |
Token for window in which colormap will be used. | ||
const char *string (in) |
Selects a colormap: either new or the name of a window with the same screen and visual as tkwin. | ||
Display *display (in) |
Display for which colormap was allocated. | ||
Colormap colormap (in) |
Colormap to free or preserve; must have been returned by a previous call to Tk_GetColormap or Tk_GetVisual. |
______________
DESCRIPTION
These procedures are used to manage colormaps. Tk_GetColormap returns a colormap suitable for use in tkwin. If its string argument is new then a new colormap is created; otherwise string must be the name of another window with the same screen and visual as tkwin, and the colormap from that window is returned. If string does not make sense, or if it refers to a window on a different screen from tkwin or with a different visual than tkwin, then Tk_GetColormap returns None and leaves an error message in interp’s result.
Tk_PreserveColormap increases the internal reference count for a colormap previously returned by Tk_GetColormap, which allows the colormap to be stored in several locations without knowing which order they will be released.
Tk_FreeColormap should be called when a colormap returned by Tk_GetColormap is no longer needed. Tk maintains a reference count for each colormap returned by Tk_GetColormap, so there should eventually be one call to Tk_FreeColormap for each call to Tk_GetColormap and each call to Tk_PreserveColormap. When a colormap’s reference count becomes zero, Tk releases the X colormap.
Tk_GetVisual and Tk_GetColormap work together, in that a new colormap created by Tk_GetVisual may later be returned by Tk_GetColormap. The reference counting mechanism for colormaps includes both procedures, so callers of Tk_GetVisual must also call Tk_FreeColormap to release the colormap. If Tk_GetColormap is called with a string value of new then the resulting colormap will never be returned by Tk_GetVisual; however, it can be used in other windows by calling Tk_GetColormap with the original window’s name as string.
KEYWORDS
colormap, visual
More Linux Commands
manpages/asn1Parser.1.html
asn1Parser(1) - ASN.1 syntax tree generator for libtasn1....
Read FILE with ASN.1 definitions and generate a C array that is used with libtasn1 functions. Mandatory arguments to long options are mandatory for short option
manpages/ftello.3.html
ftello(3) - seek to or report file position - Linux man page
The fseeko() and ftello() functions are identical to fseek(3) and ftell(3) (see fseek(3)), respectively, except that the offset argument of fseeko() and the ret
manpages/termname_sp.3ncurses.html
termname_sp(3ncurses) - curses screen-pointer extension.....
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th
manpages/linux_bash.html
linux_bash - 301 Moved Permanently - linux_bash
manpages/Error::Simple.3pm.html
Error::Simple(3pm) - the simple error sub-class of Error....
The only purpose of this module is to allow one to say: use base Error::Simple; and the only thing it does is use Error.pm. Refer to the documentation of Error
manpages/getutline.3.html
getutline(3) - access utmp file entries - Linux manual page
New applications should use the POSIX.1-specified utmpx versions of these functions; see CONFORMING TO. utmpname() sets the name of the utmp-format file for the
manpages/gluLoadSamplingMatrices.3gl.html
gluLoadSamplingMatrices(3gl) - load NURBS sampling and culli
gluLoadSamplingMatrices uses model, perspective, and view to recompute the sampling and culling matrices stored in nurb. The sampling matrix determines how fine
manpages/lircd.8.html
lircd(8) - LIRC daemon decodes infrared signals and provides
The main task of lircd is to decode the infrared signals and provide an uniform interface for client applications. Clients can connect to lircd through a Unix d
manpages/plymouth.8.html
plymouth(8) A graphical boot system and logger (Man Page)...
plymouth is a graphical boot system for Linux which takes advantage of the kernel-based mode setting (KMS) available for modern graphic cards to provide a seaml
manpages/update_panels_sp.3ncurses.html
update_panels_sp(3ncurses) - curses screen-pointer extension
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th
manpages/Tcl_GetInt.3.html
Tcl_GetInt(3) - convert from string to integer, double, or b
These procedures convert from strings to integers or double-precision floating-point values or booleans (represented as 0- or 1-valued integers). Each of the pr
manpages/avmcapictrl.8.html
avmcapictrl.8 (Manual - Linux man page)....................
avmcapictrl is used to register active AVM ISA cards kernelcapi system and therewith to the isdn system. You need it also to upload the firmware to any active A
