| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#ifndef USE_TCL_STUBS |
| 25 |
#define USE_TCL_STUBS |
| 26 |
#endif |
| 27 |
#undef USE_TCL_STUB_PROCS |
| 28 |
|
| 29 |
#ifndef USE_TK_STUBS |
| 30 |
#define USE_TK_STUBS |
| 31 |
#endif |
| 32 |
#undef USE_TK_STUB_PROCS |
| 33 |
|
| 34 |
#include "tkPort.h" |
| 35 |
#include "tkInt.h" |
| 36 |
|
| 37 |
#ifdef __WIN32__ |
| 38 |
#include "tkWinInt.h" |
| 39 |
#endif |
| 40 |
|
| 41 |
#ifdef MAC_TCL |
| 42 |
#include "tkMacInt.h" |
| 43 |
#endif |
| 44 |
|
| 45 |
#ifdef MAC_OSX_TK |
| 46 |
#include "tkMacOSXInt.h" |
| 47 |
#endif |
| 48 |
|
| 49 |
#include "tkDecls.h" |
| 50 |
#include "tkIntDecls.h" |
| 51 |
#include "tkPlatDecls.h" |
| 52 |
#include "tkIntPlatDecls.h" |
| 53 |
#include "tkIntXlibDecls.h" |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
#undef TCL_STORAGE_CLASS |
| 61 |
#define TCL_STORAGE_CLASS DLLEXPORT |
| 62 |
|
| 63 |
TkStubs *tkStubsPtr; |
| 64 |
TkPlatStubs *tkPlatStubsPtr; |
| 65 |
TkIntStubs *tkIntStubsPtr; |
| 66 |
TkIntPlatStubs *tkIntPlatStubsPtr; |
| 67 |
TkIntXlibStubs *tkIntXlibStubsPtr; |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
#ifdef Tk_InitStubs |
| 89 |
#undef Tk_InitStubs |
| 90 |
#endif |
| 91 |
|
| 92 |
CONST char * |
| 93 |
Tk_InitStubs(interp, version, exact) |
| 94 |
Tcl_Interp *interp; |
| 95 |
char *version; |
| 96 |
int exact; |
| 97 |
{ |
| 98 |
CONST char *actualVersion; |
| 99 |
|
| 100 |
actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, exact, |
| 101 |
(ClientData *) &tkStubsPtr); |
| 102 |
if (!actualVersion) { |
| 103 |
return NULL; |
| 104 |
} |
| 105 |
|
| 106 |
if (!tkStubsPtr) { |
| 107 |
Tcl_SetResult(interp, |
| 108 |
"This implementation of Tk does not support stubs", |
| 109 |
TCL_STATIC); |
| 110 |
return NULL; |
| 111 |
} |
| 112 |
|
| 113 |
tkPlatStubsPtr = tkStubsPtr->hooks->tkPlatStubs; |
| 114 |
tkIntStubsPtr = tkStubsPtr->hooks->tkIntStubs; |
| 115 |
tkIntPlatStubsPtr = tkStubsPtr->hooks->tkIntPlatStubs; |
| 116 |
tkIntXlibStubsPtr = tkStubsPtr->hooks->tkIntXlibStubs; |
| 117 |
|
| 118 |
return actualVersion; |
| 119 |
} |