/[dtapublic]/projs/trunk/shared_source/c_tk_base_7_5_w_mods/tk3d.h
ViewVC logotype

Diff of /projs/trunk/shared_source/c_tk_base_7_5_w_mods/tk3d.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 69 by dashley, Sat Nov 5 10:54:17 2016 UTC revision 71 by dashley, Sat Nov 5 11:07:06 2016 UTC
# Line 1  Line 1 
1  /* $Header$ */  /* $Header$ */
2    
3  /*  /*
4   * tk3d.h --   * tk3d.h --
5   *   *
6   *      Declarations of types and functions shared by the 3d border   *      Declarations of types and functions shared by the 3d border
7   *      module.   *      module.
8   *   *
9   * Copyright (c) 1996-1997 by Sun Microsystems, Inc.   * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
10   *   *
11   * See the file "license.terms" for information on usage and redistribution   * See the file "license.terms" for information on usage and redistribution
12   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13   *   *
14   * RCS: @(#) $Id: tk3d.h,v 1.1.1.1 2001/06/13 04:53:30 dtashley Exp $   * RCS: @(#) $Id: tk3d.h,v 1.1.1.1 2001/06/13 04:53:30 dtashley Exp $
15   */   */
16    
17  #ifndef _TK3D  #ifndef _TK3D
18  #define _TK3D  #define _TK3D
19    
20  #include "tkInt.h"  #include "tkInt.h"
21    
22  #ifdef BUILD_tk  #ifdef BUILD_tk
23  # undef TCL_STORAGE_CLASS  # undef TCL_STORAGE_CLASS
24  # define TCL_STORAGE_CLASS DLLEXPORT  # define TCL_STORAGE_CLASS DLLEXPORT
25  #endif  #endif
26    
27  /*  /*
28   * One of the following data structures is allocated for each 3-D border   * One of the following data structures is allocated for each 3-D border
29   * currently in use.  Structures of this type are indexed by   * currently in use.  Structures of this type are indexed by
30   * borderTable, so that a single structure can be shared for several   * borderTable, so that a single structure can be shared for several
31   * uses.   * uses.
32   */   */
33    
34  typedef struct TkBorder {  typedef struct TkBorder {
35      Screen *screen;             /* Screen on which the border will be used. */      Screen *screen;             /* Screen on which the border will be used. */
36      Visual *visual;             /* Visual for all windows and pixmaps using      Visual *visual;             /* Visual for all windows and pixmaps using
37                                   * the border. */                                   * the border. */
38      int depth;                  /* Number of bits per pixel of drawables where      int depth;                  /* Number of bits per pixel of drawables where
39                                   * the border will be used. */                                   * the border will be used. */
40      Colormap colormap;          /* Colormap out of which pixels are      Colormap colormap;          /* Colormap out of which pixels are
41                                   * allocated. */                                   * allocated. */
42      int resourceRefCount;       /* Number of active uses of this color (each      int resourceRefCount;       /* Number of active uses of this color (each
43                                   * active use corresponds to a call to                                   * active use corresponds to a call to
44                                   * Tk_Alloc3DBorderFromObj or Tk_Get3DBorder).                                   * Tk_Alloc3DBorderFromObj or Tk_Get3DBorder).
45                                   * If this count is 0, then this structure                                   * If this count is 0, then this structure
46                                   * is no longer valid and it isn't present                                   * is no longer valid and it isn't present
47                                   * in borderTable: it is being kept around                                   * in borderTable: it is being kept around
48                                   * only because there are objects referring                                   * only because there are objects referring
49                                   * to it.  The structure is freed when                                   * to it.  The structure is freed when
50                                   * resourceRefCount and objRefCount are                                   * resourceRefCount and objRefCount are
51                                   * both 0. */                                   * both 0. */
52      int objRefCount;            /* The number of Tcl objects that reference      int objRefCount;            /* The number of Tcl objects that reference
53                                   * this structure. */                                   * this structure. */
54      XColor *bgColorPtr;         /* Background color (intensity      XColor *bgColorPtr;         /* Background color (intensity
55                                   * between lightColorPtr and                                   * between lightColorPtr and
56                                   * darkColorPtr). */                                   * darkColorPtr). */
57      XColor *darkColorPtr;       /* Color for darker areas (must free when      XColor *darkColorPtr;       /* Color for darker areas (must free when
58                                   * deleting structure). NULL means shadows                                   * deleting structure). NULL means shadows
59                                   * haven't been allocated yet.*/                                   * haven't been allocated yet.*/
60      XColor *lightColorPtr;      /* Color used for lighter areas of border      XColor *lightColorPtr;      /* Color used for lighter areas of border
61                                   * (must free this when deleting structure).                                   * (must free this when deleting structure).
62                                   * NULL means shadows haven't been allocated                                   * NULL means shadows haven't been allocated
63                                   * yet. */                                   * yet. */
64      Pixmap shadow;              /* Stipple pattern to use for drawing      Pixmap shadow;              /* Stipple pattern to use for drawing
65                                   * shadows areas.  Used for displays with                                   * shadows areas.  Used for displays with
66                                   * <= 64 colors or where colormap has filled                                   * <= 64 colors or where colormap has filled
67                                   * up. */                                   * up. */
68      GC bgGC;                    /* Used (if necessary) to draw areas in      GC bgGC;                    /* Used (if necessary) to draw areas in
69                                   * the background color. */                                   * the background color. */
70      GC darkGC;                  /* Used to draw darker parts of the      GC darkGC;                  /* Used to draw darker parts of the
71                                   * border. None means the shadow colors                                   * border. None means the shadow colors
72                                   * haven't been allocated yet.*/                                   * haven't been allocated yet.*/
73      GC lightGC;                 /* Used to draw lighter parts of      GC lightGC;                 /* Used to draw lighter parts of
74                                   * the border. None means the shadow colors                                   * the border. None means the shadow colors
75                                   * haven't been allocated yet. */                                   * haven't been allocated yet. */
76      Tcl_HashEntry *hashPtr;     /* Entry in borderTable (needed in      Tcl_HashEntry *hashPtr;     /* Entry in borderTable (needed in
77                                   * order to delete structure). */                                   * order to delete structure). */
78      struct TkBorder *nextPtr;   /* Points to the next TkBorder structure with      struct TkBorder *nextPtr;   /* Points to the next TkBorder structure with
79                                   * the same color name.  Borders with the                                   * the same color name.  Borders with the
80                                   * same name but different screens or                                   * same name but different screens or
81                                   * colormaps are chained together off a                                   * colormaps are chained together off a
82                                   * single entry in borderTable. */                                   * single entry in borderTable. */
83  } TkBorder;  } TkBorder;
84    
85    
86  /*  /*
87   * Maximum intensity for a color:   * Maximum intensity for a color:
88   */   */
89    
90  #define MAX_INTENSITY 65535  #define MAX_INTENSITY 65535
91    
92  /*  /*
93   * Declarations for platform specific interfaces used by this module.   * Declarations for platform specific interfaces used by this module.
94   */   */
95    
96  extern TkBorder *       TkpGetBorder _ANSI_ARGS_((void));  extern TkBorder *       TkpGetBorder _ANSI_ARGS_((void));
97  extern void             TkpGetShadows _ANSI_ARGS_((TkBorder *borderPtr,  extern void             TkpGetShadows _ANSI_ARGS_((TkBorder *borderPtr,
98                              Tk_Window tkwin));                              Tk_Window tkwin));
99  extern void             TkpFreeBorder _ANSI_ARGS_((TkBorder *borderPtr));  extern void             TkpFreeBorder _ANSI_ARGS_((TkBorder *borderPtr));
100    
101  # undef TCL_STORAGE_CLASS  # undef TCL_STORAGE_CLASS
102  # define TCL_STORAGE_CLASS DLLIMPORT  # define TCL_STORAGE_CLASS DLLIMPORT
103    
104  #endif /* _TK3D */  #endif /* _TK3D */
105    
106  /* End of tk3d.h */  /* End of tk3d.h */

Legend:
Removed from v.69  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25