00001 /* 00002 * ------------------------------------------------------------------------ 00003 * PACKAGE: [incr Tk] 00004 * DESCRIPTION: Building mega-widgets with [incr Tcl] 00005 * 00006 * [incr Tk] provides a framework for building composite "mega-widgets" 00007 * using [incr Tcl] classes. It defines a set of base classes that are 00008 * specialized to create all other widgets. 00009 * 00010 * ADDING [incr Tk] TO A Tcl-BASED APPLICATION: 00011 * 00012 * To add [incr Tk] facilities to a Tcl application, modify the 00013 * Tcl_AppInit() routine as follows: 00014 * 00015 * 1) Include the header files for [incr Tcl] and [incr Tk] near 00016 * the top of the file containing Tcl_AppInit(): 00017 * 00018 * #include "itcl.h" 00019 * #include "itk.h" 00020 * 00021 * 2) Within the body of Tcl_AppInit(), add the following lines: 00022 * 00023 * if (Itcl_Init(interp) == TCL_ERROR) { 00024 * return TCL_ERROR; 00025 * } 00026 * if (Itk_Init(interp) == TCL_ERROR) { 00027 * return TCL_ERROR; 00028 * } 00029 * 00030 * 3) Link your application with libitcl.a and libitk.a 00031 * 00032 * NOTE: An example file "tkAppInit.c" containing the changes shown 00033 * above is included in this distribution. 00034 * 00035 * ======================================================================== 00036 * AUTHOR: Michael J. McLennan 00037 * Bell Labs Innovations for Lucent Technologies 00038 * mmclennan@lucent.com 00039 * http://www.tcltk.com/itcl 00040 * 00041 * RCS: $Id: itk.h,v 14.1 2004/11/16 19:42:10 morrison Exp $ 00042 * ======================================================================== 00043 * Copyright (c) 1993-1998 Lucent Technologies, Inc. 00044 * ------------------------------------------------------------------------ 00045 * See the file "license.terms" for information on usage and redistribution 00046 * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 00047 */ 00048 #ifndef ITK_H 00049 #define ITK_H 00050 00051 #ifndef TCL_ALPHA_RELEASE 00052 # define TCL_ALPHA_RELEASE 0 00053 #endif 00054 #ifndef TCL_BETA_RELEASE 00055 # define TCL_BETA_RELEASE 1 00056 #endif 00057 #ifndef TCL_FINAL_RELEASE 00058 # define TCL_FINAL_RELEASE 2 00059 #endif 00060 00061 00062 #define ITK_MAJOR_VERSION 3 00063 #define ITK_MINOR_VERSION 3 00064 #define ITK_RELEASE_LEVEL TCL_BETA_RELEASE 00065 #define ITK_RELEASE_SERIAL 1 00066 00067 #define ITK_VERSION "3.3" 00068 #define ITK_PATCH_LEVEL "3.3b1" 00069 00070 00071 /* 00072 * A special definition used to allow this header file to be included 00073 * in resource files so that they can get obtain version information from 00074 * this file. Resource compilers don't like all the C stuff, like typedefs 00075 * and procedure declarations, that occur below. 00076 */ 00077 00078 #ifndef RC_INVOKED 00079 00080 #include "tk.h" 00081 #include "itclInt.h" 00082 00083 #undef TCL_STORAGE_CLASS 00084 #ifdef BUILD_itk 00085 # define TCL_STORAGE_CLASS DLLEXPORT 00086 #else 00087 # ifdef USE_ITK_STUBS 00088 # define TCL_STORAGE_CLASS 00089 # else 00090 # define TCL_STORAGE_CLASS DLLIMPORT 00091 # endif 00092 #endif 00093 00094 /* 00095 * List of options in alphabetical order: 00096 */ 00097 typedef struct ItkOptList { 00098 Tcl_HashTable *options; /* list containing the real options */ 00099 Tcl_HashEntry **list; /* gives ordering of options */ 00100 int len; /* number of entries in order list */ 00101 int max; /* maximum size of order list */ 00102 } ItkOptList; 00103 00104 /* 00105 * List of options created in the class definition: 00106 */ 00107 typedef struct ItkClassOptTable { 00108 Tcl_HashTable options; /* option storage with fast lookup */ 00109 ItkOptList order; /* gives ordering of options */ 00110 } ItkClassOptTable; 00111 00112 /* 00113 * Each option created in the class definition: 00114 */ 00115 typedef struct ItkClassOption { 00116 ItclMember *member; /* info about this option */ 00117 char *resName; /* resource name in X11 database */ 00118 char *resClass; /* resource class name in X11 database */ 00119 char *init; /* initial value for option */ 00120 } ItkClassOption; 00121 00122 #include "itkDecls.h" 00123 00124 /* 00125 * This function is contained in the itkstub static library 00126 */ 00127 00128 #ifdef USE_ITK_STUBS 00129 TCL_EXTERNC CONST char * 00130 Itk_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, 00131 CONST char *version, int exact)); 00132 #else 00133 #define Itk_InitStubs(interp, version, exact) \ 00134 Tcl_PkgRequire(interp, "Itk", version, exact) 00135 #endif 00136 00137 /* 00138 * Public functions that are not accessible via the stubs table. 00139 */ 00140 00141 #undef TCL_STORAGE_CLASS 00142 #define TCL_STORAGE_CLASS DLLIMPORT 00143 00144 #endif /* RC_INVOKED */ 00145 #endif /* ITK_H */ 00146 00147 /* 00148 * Local Variables: 00149 * mode: C 00150 * tab-width: 8 00151 * c-basic-offset: 4 00152 * indent-tabs-mode: t 00153 * End: 00154 * ex: shiftwidth=4 tabstop=8 00155 */