home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tk8.0 / generic / tk3d.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  2.4 KB  |  80 lines  |  [TEXT/CWIE]

  1. /*
  2.  * tk3d.h --
  3.  *
  4.  *    Declarations of types and functions shared by the 3d border
  5.  *    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.  * SCCS: @(#) tk3d.h 1.1 96/11/04 13:52:59
  13.  */
  14.  
  15. #ifndef _TK3D
  16. #define _TK3D
  17.  
  18. #include <tkInt.h>
  19.  
  20. /*
  21.  * One of the following data structures is allocated for
  22.  * each 3-D border currently in use.  Structures of this
  23.  * type are indexed by borderTable, so that a single
  24.  * structure can be shared for several uses.
  25.  */
  26.  
  27. typedef struct {
  28.     Screen *screen;        /* Screen on which the border will be used. */
  29.     Visual *visual;        /* Visual for all windows and pixmaps using
  30.                  * the border. */
  31.     int depth;            /* Number of bits per pixel of drawables where
  32.                  * the border will be used. */
  33.     Colormap colormap;        /* Colormap out of which pixels are
  34.                  * allocated. */
  35.     int refCount;        /* Number of different users of
  36.                  * this border.  */
  37.     XColor *bgColorPtr;        /* Background color (intensity
  38.                  * between lightColorPtr and
  39.                  * darkColorPtr). */
  40.     XColor *darkColorPtr;    /* Color for darker areas (must free when
  41.                  * deleting structure). NULL means shadows
  42.                  * haven't been allocated yet.*/
  43.     XColor *lightColorPtr;    /* Color used for lighter areas of border
  44.                  * (must free this when deleting structure).
  45.                  * NULL means shadows haven't been allocated
  46.                  * yet. */
  47.     Pixmap shadow;        /* Stipple pattern to use for drawing
  48.                  * shadows areas.  Used for displays with
  49.                  * <= 64 colors or where colormap has filled
  50.                  * up. */
  51.     GC bgGC;            /* Used (if necessary) to draw areas in
  52.                  * the background color. */
  53.     GC darkGC;            /* Used to draw darker parts of the
  54.                  * border. None means the shadow colors
  55.                  * haven't been allocated yet.*/
  56.     GC lightGC;            /* Used to draw lighter parts of
  57.                  * the border. None means the shadow colors
  58.                  * haven't been allocated yet. */
  59.     Tcl_HashEntry *hashPtr;    /* Entry in borderTable (needed in
  60.                  * order to delete structure). */
  61. } TkBorder;
  62.  
  63.  
  64. /*
  65.  * Maximum intensity for a color:
  66.  */
  67.  
  68. #define MAX_INTENSITY 65535
  69.  
  70. /*
  71.  * Declarations for platform specific interfaces used by this module.
  72.  */
  73.  
  74. EXTERN TkBorder *    TkpGetBorder _ANSI_ARGS_((void));
  75. EXTERN void        TkpGetShadows _ANSI_ARGS_((TkBorder *borderPtr,
  76.                 Tk_Window tkwin));
  77. EXTERN void        TkpFreeBorder _ANSI_ARGS_((TkBorder *borderPtr));
  78.  
  79. #endif /* _TK3D */
  80.