Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / pTk / tkColor.h
CommitLineData
86530b38
AT
1/*
2 * tkColor.h --
3 *
4 * Declarations of data types and functions used by the
5 * Tk color module.
6 *
7 * Copyright (c) 1996 by Sun Microsystems, Inc.
8 *
9 * See the file "license.terms" for information on usage and redistribution
10 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 *
12 * RCS: @(#) $Id: tkColor.h,v 1.4 1998/09/14 18:23:08 stanton Exp $
13 */
14
15#ifndef _TKCOLOR
16#define _TKCOLOR
17
18#include "tkInt.h"
19
20#ifdef BUILD_tk
21# undef TCL_STORAGE_CLASS
22# define TCL_STORAGE_CLASS DLLEXPORT
23#endif
24
25/*
26 * One of the following data structures is used to keep track of
27 * each color that the color module has allocated from the X display
28 * server.
29 */
30
31#define COLOR_MAGIC ((unsigned int) 0x46140277)
32
33typedef struct TkColor {
34 XColor color; /* Information about this color. */
35 unsigned int magic; /* Used for quick integrity check on this
36 * structure. Must always have the
37 * value COLOR_MAGIC. */
38 GC gc; /* Simple gc with this color as foreground
39 * color and all other fields defaulted.
40 * May be None. */
41 Screen *screen; /* Screen where this color is valid. Used
42 * to delete it, and to find its display. */
43 Colormap colormap; /* Colormap from which this entry was
44 * allocated. */
45 Visual *visual; /* Visual associated with colormap. */
46 int refCount; /* Number of uses of this structure. */
47 Tcl_HashTable *tablePtr; /* Hash table that indexes this structure
48 * (needed when deleting structure). */
49 Tcl_HashEntry *hashPtr; /* Pointer to hash table entry for this
50 * structure. (for use in deleting entry). */
51} TkColor;
52
53/*
54 * Common APIs exported from all platform-specific implementations.
55 */
56
57#ifndef TkpFreeColor
58EXTERN void TkpFreeColor _ANSI_ARGS_((TkColor *tkColPtr));
59#endif
60EXTERN TkColor * TkpGetColor _ANSI_ARGS_((Tk_Window tkwin,
61 Tk_Uid name));
62EXTERN TkColor * TkpGetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
63 XColor *colorPtr));
64
65# undef TCL_STORAGE_CLASS
66# define TCL_STORAGE_CLASS DLLIMPORT
67
68#endif /* _TKCOLOR */