1/*
2 * ------------------------------------------------------------------------
3 *      PACKAGE:  [incr Tk]
4 *  DESCRIPTION:  Building mega-widgets with [incr Tcl]
5 *
6 *  [incr Tk] provides a framework for building composite "mega-widgets"
7 *  using [incr Tcl] classes.  It defines a set of base classes that are
8 *  specialized to create all other widgets.
9 *
10 *  ADDING [incr Tk] TO A Tcl-BASED APPLICATION:
11 *
12 *    To add [incr Tk] facilities to a Tcl application, modify the
13 *    Tcl_AppInit() routine as follows:
14 *
15 *    1) Include the header files for [incr Tcl] and [incr Tk] near
16 *       the top of the file containing Tcl_AppInit():
17 *
18 *         #include "itcl.h"
19 *         #include "itk.h"
20 *
21 *    2) Within the body of Tcl_AppInit(), add the following lines:
22 *
23 *         if (Itcl_Init(interp) == TCL_ERROR) {
24 *             return TCL_ERROR;
25 *         }
26 *         if (Itk_Init(interp) == TCL_ERROR) {
27 *             return TCL_ERROR;
28 *         }
29 *
30 *    3) Link your application with libitcl.a and libitk.a
31 *
32 *    NOTE:  An example file "tkAppInit.c" containing the changes shown
33 *           above is included in this distribution.
34 *
35 * ========================================================================
36 *  AUTHOR:  Michael J. McLennan
37 *           Bell Labs Innovations for Lucent Technologies
38 *           mmclennan@lucent.com
39 *           http://www.tcltk.com/itcl
40 *
41 *     RCS:  $Id: itk.h,v 1.18 2007/05/24 22:15:41 hobbs Exp $
42 * ========================================================================
43 *           Copyright (c) 1993-1998  Lucent Technologies, Inc.
44 * ------------------------------------------------------------------------
45 * See the file "license.terms" for information on usage and redistribution
46 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
47 */
48#ifndef ITK_H
49#define ITK_H
50
51#ifndef TCL_ALPHA_RELEASE
52#   define TCL_ALPHA_RELEASE	0
53#endif
54#ifndef TCL_BETA_RELEASE
55#   define TCL_BETA_RELEASE	1
56#endif
57#ifndef TCL_FINAL_RELEASE
58#   define TCL_FINAL_RELEASE	2
59#endif
60
61
62#define ITK_MAJOR_VERSION	3
63#define ITK_MINOR_VERSION	4
64#define ITK_RELEASE_LEVEL	TCL_FINAL_RELEASE
65#define ITK_RELEASE_SERIAL	0
66
67#define ITK_VERSION		"3.4"
68#define ITK_PATCH_LEVEL		"3.4.0"
69
70
71/*
72 * A special definition used to allow this header file to be included
73 * in resource files so that they can get obtain version information from
74 * this file.  Resource compilers don't like all the C stuff, like typedefs
75 * and procedure declarations, that occur below.
76 */
77
78#ifndef RC_INVOKED
79
80#include "tk.h"
81#include "itclInt.h"
82
83#undef TCL_STORAGE_CLASS
84#ifdef BUILD_itk
85#   define TCL_STORAGE_CLASS DLLEXPORT
86#else
87#   ifdef USE_ITK_STUBS
88#	define TCL_STORAGE_CLASS
89#   else
90#	define TCL_STORAGE_CLASS DLLIMPORT
91#   endif
92#endif
93
94/*
95 *  List of options in alphabetical order:
96 */
97typedef struct ItkOptList {
98    Tcl_HashTable *options;     /* list containing the real options */
99    Tcl_HashEntry **list;       /* gives ordering of options */
100    int len;                    /* number of entries in order list */
101    int max;                    /* maximum size of order list */
102} ItkOptList;
103
104/*
105 *  List of options created in the class definition:
106 */
107typedef struct ItkClassOptTable {
108    Tcl_HashTable options;        /* option storage with fast lookup */
109    ItkOptList order;             /* gives ordering of options */
110} ItkClassOptTable;
111
112/*
113 *  Each option created in the class definition:
114 */
115typedef struct ItkClassOption {
116    ItclMember *member;           /* info about this option */
117    char *resName;                /* resource name in X11 database */
118    char *resClass;               /* resource class name in X11 database */
119    char *init;                   /* initial value for option */
120} ItkClassOption;
121
122#include "itkDecls.h"
123
124/*
125 *  This function is contained in the itkstub static library
126 */
127
128#ifdef USE_ITK_STUBS
129TCL_EXTERNC CONST char *
130	Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
131			    CONST char *version, int exact));
132#else
133#define Itk_InitStubs(interp, version, exact) \
134      Tcl_PkgRequire(interp, "Itk", version, exact)
135#endif
136
137/*
138 * Public functions that are not accessible via the stubs table.
139 */
140
141#undef TCL_STORAGE_CLASS
142#define TCL_STORAGE_CLASS DLLIMPORT
143
144#endif /* RC_INVOKED */
145#endif /* ITK_H */
146