Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/tk3d.h @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 69:33d812a61356 |
---|---|
1 /* | |
2 * tk3d.h -- | |
3 * | |
4 * Declarations of types and functions shared by the 3d border module. | |
5 * | |
6 * Copyright (c) 1996-1997 by Sun Microsystems, Inc. | |
7 * | |
8 * See the file "license.terms" for information on usage and redistribution of | |
9 * this file, and for a DISCLAIMER OF ALL WARRANTIES. | |
10 */ | |
11 | |
12 #ifndef _TK3D | |
13 #define _TK3D | |
14 | |
15 #include "tkInt.h" | |
16 | |
17 /* | |
18 * One of the following data structures is allocated for each 3-D border | |
19 * currently in use. Structures of this type are indexed by borderTable, so | |
20 * that a single structure can be shared for several uses. | |
21 */ | |
22 | |
23 typedef struct TkBorder { | |
24 Screen *screen; /* Screen on which the border will be used. */ | |
25 Visual *visual; /* Visual for all windows and pixmaps using | |
26 * the border. */ | |
27 int depth; /* Number of bits per pixel of drawables where | |
28 * the border will be used. */ | |
29 Colormap colormap; /* Colormap out of which pixels are | |
30 * allocated. */ | |
31 int resourceRefCount; /* Number of active uses of this color (each | |
32 * active use corresponds to a call to | |
33 * Tk_Alloc3DBorderFromObj or Tk_Get3DBorder). | |
34 * If this count is 0, then this structure is | |
35 * no longer valid and it isn't present in | |
36 * borderTable: it is being kept around only | |
37 * because there are objects referring to it. | |
38 * The structure is freed when objRefCount and | |
39 * resourceRefCount are both 0. */ | |
40 int objRefCount; /* The number of Tcl objects that reference | |
41 * this structure. */ | |
42 XColor *bgColorPtr; /* Background color (intensity between | |
43 * lightColorPtr and darkColorPtr). */ | |
44 XColor *darkColorPtr; /* Color for darker areas (must free when | |
45 * deleting structure). NULL means shadows | |
46 * haven't been allocated yet.*/ | |
47 XColor *lightColorPtr; /* Color used for lighter areas of border | |
48 * (must free this when deleting structure). | |
49 * NULL means shadows haven't been allocated | |
50 * yet. */ | |
51 Pixmap shadow; /* Stipple pattern to use for drawing shadows | |
52 * areas. Used for displays with <= 64 colors | |
53 * or where colormap has filled up. */ | |
54 GC bgGC; /* Used (if necessary) to draw areas in the | |
55 * background color. */ | |
56 GC darkGC; /* Used to draw darker parts of the border. | |
57 * NULL means the shadow colors haven't been | |
58 * allocated yet.*/ | |
59 GC lightGC; /* Used to draw lighter parts of the border. | |
60 * NULL means the shadow colors haven't been | |
61 * allocated yet. */ | |
62 Tcl_HashEntry *hashPtr; /* Entry in borderTable (needed in order to | |
63 * delete structure). */ | |
64 struct TkBorder *nextPtr; /* Points to the next TkBorder structure with | |
65 * the same color name. Borders with the same | |
66 * name but different screens or colormaps are | |
67 * chained together off a single entry in | |
68 * borderTable. */ | |
69 } TkBorder; | |
70 | |
71 /* | |
72 * Maximum intensity for a color: | |
73 */ | |
74 | |
75 #define MAX_INTENSITY 65535 | |
76 | |
77 /* | |
78 * Declarations for platform specific interfaces used by this module. | |
79 */ | |
80 | |
81 MODULE_SCOPE TkBorder *TkpGetBorder(void); | |
82 MODULE_SCOPE void TkpGetShadows(TkBorder *borderPtr, Tk_Window tkwin); | |
83 MODULE_SCOPE void TkpFreeBorder(TkBorder *borderPtr); | |
84 | |
85 #endif /* _TK3D */ |