OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [generic/] [tkColor.h] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
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.1.1.1 2002-01-16 10:25:51 markom 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
/* CYGNUS LOCAL.  */
26
typedef struct TkGCList TkGCList;
27
 
28
/*
29
 * One of the following data structures is used to keep track of
30
 * each color that the color module has allocated from the X display
31
 * server.
32
 */
33
 
34
#define COLOR_MAGIC ((unsigned int) 0x46140277)
35
 
36
typedef struct TkColor {
37
    XColor color;               /* Information about this color. */
38
    unsigned int magic;         /* Used for quick integrity check on this
39
                                 * structure.   Must always have the
40
                                 * value COLOR_MAGIC. */
41
    GC gc;                      /* Simple gc with this color as foreground
42
                                 * color and all other fields defaulted.
43
                                 * May be None. */
44
    Screen *screen;             /* Screen where this color is valid.  Used
45
                                 * to delete it, and to find its display. */
46
    Colormap colormap;          /* Colormap from which this entry was
47
                                 * allocated. */
48
    Visual *visual;             /* Visual associated with colormap. */
49
    int refCount;               /* Number of uses of this structure. */
50
    Tcl_HashTable *tablePtr;    /* Hash table that indexes this structure
51
                                 * (needed when deleting structure). */
52
    Tcl_HashEntry *hashPtr;     /* Pointer to hash table entry for this
53
                                 * structure. (for use in deleting entry). */
54
    /* CYGNUS LOCAL */
55
    TkGCList *gcList;           /* List of GCs which use this color.  */
56
} TkColor;
57
 
58
/*
59
 * Common APIs exported from all platform-specific implementations.
60
 */
61
 
62
#ifndef TkpFreeColor
63
EXTERN void             TkpFreeColor _ANSI_ARGS_((TkColor *tkColPtr));
64
#endif
65
EXTERN TkColor *        TkpGetColor _ANSI_ARGS_((Tk_Window tkwin,
66
                            Tk_Uid name));
67
EXTERN TkColor *        TkpGetColorByValue _ANSI_ARGS_((Tk_Window tkwin,
68
                            XColor *colorPtr));
69
 
70
/* CYGNUS LOCAL.  */
71
EXTERN void             TkMapOverColors _ANSI_ARGS_((void (*) (TkColor *)));
72
EXTERN void             TkColorChanged _ANSI_ARGS_((TkColor *));
73
 
74
# undef TCL_STORAGE_CLASS
75
# define TCL_STORAGE_CLASS DLLIMPORT
76
 
77
#endif /* _TKCOLOR */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.