File indexing completed on 2025-01-17 09:55:34
0001
0002
0003
0004
0005 #ifndef _ITCLDECLS
0006 #define _ITCLDECLS
0007
0008 #if defined(USE_ITCL_STUBS)
0009
0010 ITCLAPI const char *Itcl_InitStubs(
0011 Tcl_Interp *, const char *version, int exact);
0012 #else
0013
0014 #define Itcl_InitStubs(interp, version, exact) Tcl_PkgRequireEx(interp,"itcl",version,exact,NULL)
0015
0016 #endif
0017
0018
0019
0020
0021 #define ITCL_STUBS_EPOCH 0
0022 #define ITCL_STUBS_REVISION 152
0023
0024 #ifdef __cplusplus
0025 extern "C" {
0026 #endif
0027
0028
0029
0030
0031
0032
0033
0034
0035 ITCLAPI int Itcl_RegisterC(Tcl_Interp *interp, const char *name,
0036 Tcl_CmdProc *proc, ClientData clientData,
0037 Tcl_CmdDeleteProc *deleteProc);
0038
0039 ITCLAPI int Itcl_RegisterObjC(Tcl_Interp *interp,
0040 const char *name, Tcl_ObjCmdProc *proc,
0041 ClientData clientData,
0042 Tcl_CmdDeleteProc *deleteProc);
0043
0044 ITCLAPI int Itcl_FindC(Tcl_Interp *interp, const char *name,
0045 Tcl_CmdProc **argProcPtr,
0046 Tcl_ObjCmdProc **objProcPtr,
0047 ClientData *cDataPtr);
0048
0049 ITCLAPI void Itcl_InitStack(Itcl_Stack *stack);
0050
0051 ITCLAPI void Itcl_DeleteStack(Itcl_Stack *stack);
0052
0053 ITCLAPI void Itcl_PushStack(ClientData cdata, Itcl_Stack *stack);
0054
0055 ITCLAPI ClientData Itcl_PopStack(Itcl_Stack *stack);
0056
0057 ITCLAPI ClientData Itcl_PeekStack(Itcl_Stack *stack);
0058
0059 ITCLAPI ClientData Itcl_GetStackValue(Itcl_Stack *stack, int pos);
0060
0061 ITCLAPI void Itcl_InitList(Itcl_List *listPtr);
0062
0063 ITCLAPI void Itcl_DeleteList(Itcl_List *listPtr);
0064
0065 ITCLAPI Itcl_ListElem * Itcl_CreateListElem(Itcl_List *listPtr);
0066
0067 ITCLAPI Itcl_ListElem * Itcl_DeleteListElem(Itcl_ListElem *elemPtr);
0068
0069 ITCLAPI Itcl_ListElem * Itcl_InsertList(Itcl_List *listPtr, ClientData val);
0070
0071 ITCLAPI Itcl_ListElem * Itcl_InsertListElem(Itcl_ListElem *pos,
0072 ClientData val);
0073
0074 ITCLAPI Itcl_ListElem * Itcl_AppendList(Itcl_List *listPtr, ClientData val);
0075
0076 ITCLAPI Itcl_ListElem * Itcl_AppendListElem(Itcl_ListElem *pos,
0077 ClientData val);
0078
0079 ITCLAPI void Itcl_SetListValue(Itcl_ListElem *elemPtr,
0080 ClientData val);
0081
0082 ITCLAPI void Itcl_EventuallyFree(ClientData cdata,
0083 Tcl_FreeProc *fproc);
0084
0085 ITCLAPI void Itcl_PreserveData(ClientData cdata);
0086
0087 ITCLAPI void Itcl_ReleaseData(ClientData cdata);
0088
0089 ITCLAPI Itcl_InterpState Itcl_SaveInterpState(Tcl_Interp *interp, int status);
0090
0091 ITCLAPI int Itcl_RestoreInterpState(Tcl_Interp *interp,
0092 Itcl_InterpState state);
0093
0094 ITCLAPI void Itcl_DiscardInterpState(Itcl_InterpState state);
0095
0096 ITCLAPI void * Itcl_Alloc(size_t size);
0097
0098 ITCLAPI void Itcl_Free(void *ptr);
0099
0100 typedef struct {
0101 const struct ItclIntStubs *itclIntStubs;
0102 } ItclStubHooks;
0103
0104 typedef struct ItclStubs {
0105 int magic;
0106 int epoch;
0107 int revision;
0108 const ItclStubHooks *hooks;
0109
0110 void (*reserved0)(void);
0111 void (*reserved1)(void);
0112 int (*itcl_RegisterC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc);
0113 int (*itcl_RegisterObjC) (Tcl_Interp *interp, const char *name, Tcl_ObjCmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc);
0114 int (*itcl_FindC) (Tcl_Interp *interp, const char *name, Tcl_CmdProc **argProcPtr, Tcl_ObjCmdProc **objProcPtr, ClientData *cDataPtr);
0115 void (*itcl_InitStack) (Itcl_Stack *stack);
0116 void (*itcl_DeleteStack) (Itcl_Stack *stack);
0117 void (*itcl_PushStack) (ClientData cdata, Itcl_Stack *stack);
0118 ClientData (*itcl_PopStack) (Itcl_Stack *stack);
0119 ClientData (*itcl_PeekStack) (Itcl_Stack *stack);
0120 ClientData (*itcl_GetStackValue) (Itcl_Stack *stack, int pos);
0121 void (*itcl_InitList) (Itcl_List *listPtr);
0122 void (*itcl_DeleteList) (Itcl_List *listPtr);
0123 Itcl_ListElem * (*itcl_CreateListElem) (Itcl_List *listPtr);
0124 Itcl_ListElem * (*itcl_DeleteListElem) (Itcl_ListElem *elemPtr);
0125 Itcl_ListElem * (*itcl_InsertList) (Itcl_List *listPtr, ClientData val);
0126 Itcl_ListElem * (*itcl_InsertListElem) (Itcl_ListElem *pos, ClientData val);
0127 Itcl_ListElem * (*itcl_AppendList) (Itcl_List *listPtr, ClientData val);
0128 Itcl_ListElem * (*itcl_AppendListElem) (Itcl_ListElem *pos, ClientData val);
0129 void (*itcl_SetListValue) (Itcl_ListElem *elemPtr, ClientData val);
0130 void (*itcl_EventuallyFree) (ClientData cdata, Tcl_FreeProc *fproc);
0131 void (*itcl_PreserveData) (ClientData cdata);
0132 void (*itcl_ReleaseData) (ClientData cdata);
0133 Itcl_InterpState (*itcl_SaveInterpState) (Tcl_Interp *interp, int status);
0134 int (*itcl_RestoreInterpState) (Tcl_Interp *interp, Itcl_InterpState state);
0135 void (*itcl_DiscardInterpState) (Itcl_InterpState state);
0136 void * (*itcl_Alloc) (size_t size);
0137 void (*itcl_Free) (void *ptr);
0138 } ItclStubs;
0139
0140 extern const ItclStubs *itclStubsPtr;
0141
0142 #ifdef __cplusplus
0143 }
0144 #endif
0145
0146 #if defined(USE_ITCL_STUBS)
0147
0148
0149
0150
0151
0152
0153
0154 #define Itcl_RegisterC \
0155 (itclStubsPtr->itcl_RegisterC)
0156 #define Itcl_RegisterObjC \
0157 (itclStubsPtr->itcl_RegisterObjC)
0158 #define Itcl_FindC \
0159 (itclStubsPtr->itcl_FindC)
0160 #define Itcl_InitStack \
0161 (itclStubsPtr->itcl_InitStack)
0162 #define Itcl_DeleteStack \
0163 (itclStubsPtr->itcl_DeleteStack)
0164 #define Itcl_PushStack \
0165 (itclStubsPtr->itcl_PushStack)
0166 #define Itcl_PopStack \
0167 (itclStubsPtr->itcl_PopStack)
0168 #define Itcl_PeekStack \
0169 (itclStubsPtr->itcl_PeekStack)
0170 #define Itcl_GetStackValue \
0171 (itclStubsPtr->itcl_GetStackValue)
0172 #define Itcl_InitList \
0173 (itclStubsPtr->itcl_InitList)
0174 #define Itcl_DeleteList \
0175 (itclStubsPtr->itcl_DeleteList)
0176 #define Itcl_CreateListElem \
0177 (itclStubsPtr->itcl_CreateListElem)
0178 #define Itcl_DeleteListElem \
0179 (itclStubsPtr->itcl_DeleteListElem)
0180 #define Itcl_InsertList \
0181 (itclStubsPtr->itcl_InsertList)
0182 #define Itcl_InsertListElem \
0183 (itclStubsPtr->itcl_InsertListElem)
0184 #define Itcl_AppendList \
0185 (itclStubsPtr->itcl_AppendList)
0186 #define Itcl_AppendListElem \
0187 (itclStubsPtr->itcl_AppendListElem)
0188 #define Itcl_SetListValue \
0189 (itclStubsPtr->itcl_SetListValue)
0190 #define Itcl_EventuallyFree \
0191 (itclStubsPtr->itcl_EventuallyFree)
0192 #define Itcl_PreserveData \
0193 (itclStubsPtr->itcl_PreserveData)
0194 #define Itcl_ReleaseData \
0195 (itclStubsPtr->itcl_ReleaseData)
0196 #define Itcl_SaveInterpState \
0197 (itclStubsPtr->itcl_SaveInterpState)
0198 #define Itcl_RestoreInterpState \
0199 (itclStubsPtr->itcl_RestoreInterpState)
0200 #define Itcl_DiscardInterpState \
0201 (itclStubsPtr->itcl_DiscardInterpState)
0202 #define Itcl_Alloc \
0203 (itclStubsPtr->itcl_Alloc)
0204 #define Itcl_Free \
0205 (itclStubsPtr->itcl_Free)
0206
0207 #endif
0208
0209
0210
0211 #endif