O'Reilly logo

Tcl/Tk in a Nutshell by Paul Raines, Jeff Tranter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Alphabetical Summary of Functions

void Tcl_AddErrorInfo (Tcl_Interp *interp, char *message)
void Tcl_AddObjErrorInfo(Tcl_Interp *interp, char *message, int length)
char *Tcl_Alloc(int size)
void Tcl_AllowExceptions(Tcl_Interp *interp)
int Tcl_AppInit(Tcl_Interp *interp)
int Tcl_AppendAllObjTypes(Tcl_Interp *interp, Tcl_Obj *objPtr)
void Tcl_AppendElement(Tcl_Interp *interp, char *string)
void Tcl_AppendResult(Tcl_Interp *interp, ...)
void Tcl_AppendStringsToObj(Tcl_Obj *interp, ...)
void Tcl_AppendToObj(Tcl_Obj *objPtr, char *bytes, int length)
Tcl_AsyncHandler Tcl_AsyncCreate(Tcl_AsyncProc *proc, ClientData clientData)
void Tcl_AsyncDelete(Tcl_AsyncHandler async)
int Tcl_AsyncInvoke(Tcl_Interp *interp, int code)
void Tcl_AsyncMark(Tcl_AsyncHandler async)
int Tcl_AsyncReady(void)
void Tcl_BackgroundError(Tcl_Interp *interp)
char Tcl_Backslash(const char *src, int *readPtr)
int Tcl_BadChannelOption(Tcl_Interp *interp, char *optionName, char *optionList)
void Tcl_CallWhenDeleted(Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
     ClientData clientData)
void Tcl_CancelIdleCall(Tcl_IdleProc *idleProc, ClientData clientData)
int Tcl_Close(Tcl_Interp *interp, Tcl_Channel chan)
int Tcl_CommandComplete(char *cmd)
Tcl_Obj *Tcl_ConcatObj(int objc, Tcl_Obj *const objv[])
char *Tcl_Concat(int argc, char **argv)
int Tcl_ConvertCountedElement(const char *src, int length, char *dst, int flags)
int Tcl_ConvertElement(const char *src, char *dst, int flags)
int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_ObjType *typePtr)
int Tcl_CreateAliasObj(Tcl_Interp *slave, char *slaveCmd, Tcl_Interp *target,
    char *targetCmd, int objc, Tcl_Obj *const objv[])
int Tcl_CreateAlias(Tcl_Interp *slave, char *slaveCmd, Tcl_Interp *target,
    char *targetCmd, int argc, char **argv)
void Tcl_CreateChannelHandler(Tcl_Channel chan, int mask,
    Tcl_ChannelProc *proc, ClientData clientData)
Tcl_Channel Tcl_CreateChannel(Tcl_ChannelType *typePtr, char *chanName,
    ClientData instanceData, int mask)
void Tcl_CreateCloseHandler(Tcl_Channel chan, Tcl_Closeproc *proc,
    ClientData clientData)
Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, char *cmdName,
    Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteproc *deleteProc)
void Tcl_CreateEventSource(Tcl_EventSetupProc *setupProc,
    Tcl_EventCheckproc *checkproc, ClientData clientData)
void Tcl_CreateExitHandler(Tcl_Exitproc *proc, ClientData clientData)
void Tcl_CreateFileHandler(int fd, int mask, Tcl_Fileproc *proc,
    ClientData clientData)
Tcl_HashEntry *Tcl_CreateHashEntry(Tcl_hashTable *tablePtr, char *key,
    int *newPtr)
Tcl_Interp *Tcl_CreateInterp(void)
void Tcl_CreateMathFunc(Tcl_Interp *interp, char *name, int numArgs,
    Tcl_ValueType *argTypes, Tcl_Mathproc *proc, ClientData clientData)
Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp, char *cmdName,
    Tcl_ObjCmdProc *proc, ClientData clientData,
    Tcl_CmdDeleteProc *deleteProc)
Tcl_Interp *Tcl_CreateSlave(Tcl_Interp *interp, char *slaveName, int isSafe)
Tcl_TimerToken Tcl_CreateTimerHandler(int milliseconds, Tcl_TimerProc *proc,
    ClientData clientData)
Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level, Tcl_CmdTraceProc *proc,
    ClientData clientData)
char *Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *string)
char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *string, int length)
void Tcl_DStringEndSublist(Tcl_DString *dsPtr)
void Tcl_DStringFree(Tcl_DString *dsPtr)
void Tcl_DStringGetResult(Tcl_Interp *interp, Tcl_DString *dsPtr)
void Tcl_DStringInit(Tcl_DString *dsPtr)
int Tcl_DStringLength(Tcl_DString *dsPtr)
void Tcl_DStringResult(Tcl_Interp *interp, Tcl_DString *dsPtr)
void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length)
void Tcl_DStringStartSublist(Tcl_DString *dsPtr)
char *Tcl_DStringValue(Tcl_DString *dsPtr)
void Tcl_DecrRefCount(Tcl_Obj *objPtr)
void Tcl_DeleteAssocData(Tcl_Interp *interp, char *name)
void Tcl_DeleteChannelHandler(Tcl_Channel chan, Tcl_ChannelProc *proc,
     ClientData clientData)
void Tcl_DeleteCloseHandler(Tcl_Channel chan, Tcl_CloseProc *proc,
     ClientData clientData)
int Tcl_DeleteCommandFromToken(Tcl_Interp *interp, Tcl_Command command)
int Tcl_DeleteCommand(Tcl_Interp *interp, char *cmdName)
void Tcl_DeleteEventSource(Tcl_EventSetupproc *setupProc,
    Tcl_EventCheckproc *checkproc, ClientData clientData)
void Tcl_DeleteEvents(Tcl_EventDeleteproc *proc, ClientData clientData)
void Tcl_DeleteExitHandler(Tcl_Exitproc *proc, ClientData clientData)
void Tcl_DeleteFileHandler(int fd)
void Tcl_DeleteHashEntry(Tcl_HashEntry *entryPtr)
void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr)
void Tcl_DeleteInterp(Tcl_Interp *interp)
void Tcl_DeleteTimerHandler(Tcl_TimerToken token)
void Tcl_DeleteTrace(Tcl_Interp *interp, Tcl_Trace trace)
void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr)
int Tcl_DoOneEvent(int flags)
void Tcl_DoWhenIdle(Tcl_Idleproc *proc, ClientData clientData)
void Tcl_DontCallWhenDeleted(Tcl_Interp *interp, Tcl_InterpDeleteProc *proc,
     ClientData clientData)
Tcl_Obj *Tcl_DuplicateObj(Tcl_Obj *objPtr)
int Tcl_Eof(Tcl_Channel chan)
char *Tcl_ErrnoId(void)
int Tcl_EvalFile(Tcl_Interp *interp, char *fileName)
int Tcl_EvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
int Tcl_Eval(Tcl_Interp *interp, char *string)
void Tcl_EventuallyFree(ClientData clientData, Tcl_FreeProc *freeproc)
void Tcl_Exit(int status)
int Tcl_ExposeCommand(Tcl_Interp *interp, char *hiddenCmdToken,
    char *cmdName)
int Tcl_ExprBooleanObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr)
int Tcl_ExprBoolean(Tcl_Interp *interp, char *string, int *ptr)
int Tcl_ExprDoubleObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *ptr)
int Tcl_ExprDouble(Tcl_Interp *interp, char *string, double *ptr)
int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *ptr)
int Tcl_ExprLong(Tcl_Interp *interp, char *string, long *ptr)
int Tcl_ExprObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj **resultPtrPtr)
int Tcl_ExprString(Tcl_Interp *interp, char *string)
void Tcl_Finalize(void)
void Tcl_FindExecutable(char *argv0)
Tcl_HashEntry *Tcl_FindHashEntry(Tcl_HashTable *tablePtr, char *key)
Tcl_HashEntry *Tcl_FirstHashEntry(Tcl_HashTable *tablePtr,
    Tcl_HashSearch *searchPtr)
int Tcl_Flush(Tcl_Channel chan)
void Tcl_FreeResult(Tcl_Interp *interp)
void Tcl_Free(char *ptr)
int Tcl_GetAliasObj(Tcl_Interp *interp, char *slaveCmd, Tcl_Interp **targetInterpPtr,
    char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objv)
int Tcl_GetAlias(Tcl_Interp *interp, char *slaveCmd, Tcl_Interp **targetInterpPtr,
    char **targetCmdPtr, int *argcPtr, char ***argvPtr)
ClientData Tcl_GetAssocData(Tcl_Interp *interp, char *name,
    Tcl_InterpDeleteproc **procPtr)
int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *boolPtr)
int Tcl_GetBoolean(Tcl_Interp *interp, char *string, int *boolPtr)
int Tcl_GetChannelBufferSize(Tcl_Channel chan)
int Tcl_GetChannelFlags(Tcl_Channel channel)
int Tcl_GetChannelHandle(Tcl_Channel chan, int direction, ClientData *handlePtr)
ClientData Tcl_GetChannelInstanceData(Tcl_Channel chan)
int Tcl_GetChannelMode(Tcl_Channel chan)
char *Tcl_GetChannelName(Tcl_Channel chan)
int Tcl_GetChannelOption(Tcl_Interp *interp, Tcl_Channel chan,
    char *optionName, Tcl_DString *dsPtr)
Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp, char *chanName, int *modePtr)
Tcl_ChannelType *Tcl_GetChannelType(Tcl_Channel chan)
int Tcl_GetCommandInfo(Tcl_Interp *interp, char *cmdName,
    Tcl_CmdInfo *infoPtr)
char *Tcl_GetCommandName(Tcl_Interp *interp, Tcl_Command command)
int Tcl_GetDoubleFr omObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr)
int Tcl_GetDouble(Tcl_Interp *interp, char *string, double *doublePtr)
int Tcl_GetErrno(void)
char *Tcl_GetHashKey(Tcl_HashEntry *entryPtr)
ClientData Tcl_GetHashValue(Tcl_HashEntry *entryPtr)
int Tcl_GetIndexFr omObj(Tcl_Interp *interp, Tcl_Obj *objPtr, char **tablePtr,
    char *msg, int flags, int *indexPtr)
int Tcl_GetIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr)
int Tcl_GetInt(Tcl_Interp *interp, char *string, int *intPtr)
int Tcl_GetInterpPath(Tcl_Interp *askInterp, Tcl_Interp *slaveInterp)
int Tcl_GetLongFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *longPtr)
Tcl_Interp *Tcl_GetMaster(Tcl_Interp *interp)
Tcl_Obj *Tcl_GetObjResult(Tcl_Interp *interp)
Tcl_ObjType *Tcl_GetObjType(char *typeName)
int Tcl_GetOpenFile(Tcl_Interp *interp, char *string, int write, int checkUsage,
    ClientData *filePtr)
Tcl_PathType Tcl_GetPathType(char *path)
int Tcl_GetServiceMode(void)
Tcl_Interp *Tcl_GetSlave(Tcl_Interp *interp, char *slaveName)
Tcl_Channel Tcl_GetStdChannel(int type)
char *Tcl_GetStringFr omObj(Tcl_Obj *objPtr, int *lengthPtr)
char *Tcl_GetStringResult(Tcl_Interp *interp)
char *Tcl_GetVar2(Tcl_Interp *interp, char *part1, char *part2, int flags)
char *Tcl_GetVar(Tcl_Interp *interp, char *varName, int flags)
int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr)
int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr)
int Tcl_GlobalEvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
int Tcl_GlobalEval(Tcl_Interp *interp, char *command)
char *Tcl_HashStats(Tcl_HashTable *tablePtr)
int Tcl_HideCommand(Tcl_Interp *interp, char *cmdName,
    char *hiddenCmdToken)
void Tcl_IncrRefCount(Tcl_Obj *objPtr)
void Tcl_InitHashTable(Tcl_HashTable *tablePtr, int keyType)
int Tcl_Init(Tcl_Interp *interp)
int Tcl_InputBlocked(Tcl_Channel chan)
int Tcl_InputBuffered(Tcl_Channel chan)
int Tcl_InterpDeleted(Tcl_Interp *interp)
void Tcl_InvalidateStringRep(Tcl_Obj *objPtr)
int Tcl_IsSafe(Tcl_Interp *interp)
int Tcl_IsShar ed(Tcl_Obj *objPtr)
char *Tcl_JoinPath(int argc, char **argv, Tcl_DString *resultPtr)
int Tcl_LinkVar(Tcl_Interp *interp, char *varName, char *addr, int type)
int Tcl_ListObjAppendElement(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr)
int Tcl_ListObjAppendList(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *elemListPtr)
int Tcl_ListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr, int *objcPtr,
    Tcl_Obj ***objvPtr)
int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, int index,
    Tcl_Obj **objPtrPtr)
int Tcl_ListObjLength(Tcl_Interp *interp, Tcl_Obj *listPtr, int *intPtr)
int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, int first, int count,
    int objc, Tcl_Obj *const objv[])
void Tcl_Main(int argc, char **argv, Tcl_AppInitproc *appInitProc
Tcl_Channel Tcl_MakeFileChannel(ClientData handle, int mode)
int Tcl_MakeSafe(Tcl_Interp *interp)
Tcl_Channel Tcl_MakeTcpClientChannel(ClientData tcpSocket)
char *Tcl_Merge(int argc, char **argv)
Tcl_Obj *Tcl_NewBooleanObj(int boolValue)
Tcl_Obj *Tcl_NewDoubleObj(double doubleValue)
Tcl_Obj *Tcl_NewIntObj(int intValue)
Tcl_Obj *Tcl_NewListObj(int objc, Tcl_Obj *cont objv[])
Tcl_Obj *Tcl_NewLongObj(long longValue)
Tcl_Obj *Tcl_NewObj()
Tcl_Obj *Tcl_NewStringObj(char *bytes, int length)
Tcl_HashEntry *Tcl_NextHashEntry(Tcl_HashSearch *searchPtr)
void Tcl_NotifyChannel(Tcl_Channel channel, int mask)
Tcl_Obj *Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
    int flags)
Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
    Tcl_Obj *newValuePtr, int flags)
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
    char **argv, int flags)
Tcl_Channel Tcl_OpenFileChannel(Tcl_Interp *interp, char *fileName,
    char *modeString, int permissions)
Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port, char *address,
    char *myaddr, int myport, int async)
Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port, char *host,
    Tcl_TcpAcceptproc *acceptproc, ClientData callbackData)
int Tcl_PkgPr ovide(Tcl_Interp *interp, char *name, char *version)
char *Tcl_PkgRequir e(Tcl_Interp *interp, char *name, char *version, int exact)
char *Tcl_PosixError(Tcl_Interp *interp)
void Tcl_Pr eserve(ClientData data)
void Tcl_PrintDouble(Tcl_Interp *interp, double value, char *dst)
void Tcl_QueueEvent(Tcl_Event *evPtr, Tcl_QueuePosition position)
int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead)
char *Tcl_Realloc(char *ptr, int size)
void Tcl_ReapDetachedprocs(void)
int Tcl_RecordAndEvalObj(Tcl_Interp *interp, Tcl_Obj *cmdPtr, int flags)
int Tcl_RecordAndEval(Tcl_Interp *interp, char *cmd, int flags)
Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, char *string)
int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp, char *string, char *start)
int Tcl_RegExpMatch(Tcl_Interp *interp, char *string, char *pattern)
void Tcl_RegExpRange(Tcl_RegExp regexp, int index, char **startPtr, char **endPtr)
void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan)
void Tcl_RegisterObjType(Tcl_ObjType *typePtr)
void Tcl_Release(ClientData clientData)
void Tcl_ResetResult(Tcl_Interp *interp)
int Tcl_ScanCountedElement(const char *string, int length, int *flagPtr)
int Tcl_ScanElement(const char *string, int *flagPtr)
int Tcl_Seek(Tcl_Channel chan, int offset, int mode)
int Tcl_ServiceAll(void)
int Tcl_ServiceEvent(int flags)
void Tcl_SetAssocData(Tcl_Interp *interp, char *name, Tcl_InterpDeleteProc *proc,
    ClientData clientData)
void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue)
void Tcl_SetChannelBuf ferSize(Tcl_Channel chan, int sz)
int Tcl_SetChannelOption(Tcl_Interp *interp, Tcl_Channel chan, char *optionName,
    char *newValue)
int Tcl_SetCommandInfo(Tcl_Interp *interp, char *cmdName, Tcl_CmdInfo *infoPtr)
void Tcl_SetDefaultTranslation(TclChannel channel, Tcl_EolTranslation transMode)
void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue)
void Tcl_SetErrno(int err)
void Tcl_SetErrorCode(Tcl_Interp *arg1, ...)
void Tcl_SetHashValue(Tcl_HashEntry *entryPtr, Clientdata value)
void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue)
void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[])
void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue)
void Tcl_SetMaxBlockTime(Tcl_Time *timePtr)
void Tcl_SetObjErrorCode(Tcl_Interp *interp, Tcl_Obj *errorObjPtr)
void Tcl_SetObjLength(Tcl_Obj *objPtr, int length)
void Tcl_SetObjResult(Tcl_Interp *interp, Tcl_Obj *resultObjPtr)
int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth)
void Tcl_SetResult(Tcl_Interp *interp, char *string, Tcl_FreeProc *freeProc)
int Tcl_SetServiceMode(int mode)
void Tcl_SetStdChannel(Tcl_Channel channel, int type)
void Tcl_SetStringObj(Tcl_Obj *objPtr, char *bytes, int length)
void Tcl_SetTimer(Tcl_Time *timePtr)
char *Tcl_SetVar2(Tcl_Interp *interp, char *part1, char *part2, char *newValue,
     int flags)
char *Tcl_SetVar(Tcl_Interp *interp, char *varName, char *newValue, int flags)
char *Tcl_SignalId(int sig)
char *Tcl_SignalMsg(int sig)
void Tcl_Sleep(int ms)
int Tcl_SplitList(Tcl_Interp *interp, char *list, int *argcPtr, char ***argvPtr)
void Tcl_SplitPath(char *path, int *argcPtr, char ***argvPtr)
void Tcl_StaticPackage(Tcl_Interp *interp, char
 *pkgName, Tcl_PackageInitproc *initproc,
     Tcl_PackageInitproc *safeInitproc)
int Tcl_StringMatch(char *string, char *pattern)
int Tcl_Tell(Tcl_Channel chan)
char *Tcl_T ildeSubst(Tcl_Interp *interp, char *name, Tcl_DString *resultPtr)
int Tcl_TraceVar2(Tcl_Interp *interp, char *part1, char *part2, int flags,
    Tcl_VarTraceproc *proc, ClientData clientData)
int Tcl_TraceVar(Tcl_Interp *interp, char *varName, int flags,
    Tcl_VarTraceproc *proc, ClientData clientData)
char *Tcl_TranslateFileName(Tcl_Interp *interp, char *name, Tcl_DString *bufferPtr)
int Tcl_Ungets(Tcl_Channel chan, char *str, int len, int atHead)
void Tcl_UnlinkVar(Tcl_Interp *interp, char *varName)
int Tcl_Unr egisterChannel(Tcl_Interp *interp, Tcl_Channel chan)
int Tcl_UnsetVar2(Tcl_Interp *interp, char *part1, char *part2, int flags)
int Tcl_UnsetVar(Tcl_Interp *interp, char *varName, int flags)
void Tcl_UntraceVar2(Tcl_Interp *interp, char *part1, char *part2, int flags,
    Tcl_VarTraceproc *proc, ClientData clientData)
void Tcl_UntraceVar(Tcl_Interp *interp, char *varName, int flags,
    Tcl_VarTraceproc *proc, ClientData clientData)
int Tcl_UpVar2(Tcl_Interp *interp, char *frameName, char *part1, char *part2,
    char *localName, int flags)
int Tcl_UpVar(Tcl_Interp *interp, char *frameName, char *varName,
    char *localName, int flags)
void Tcl_UpdateLinkedVar(Tcl_Interp *interp, char *varName)
int Tcl_VarEval(Tcl_Interp *interp, ...)
ClientData Tcl_VarTraceInfo2(Tcl_Interp *interp, char *part1, char *part2, int flags,
    Tcl_VarTraceproc *procPtr, ClientData prevClientData)
ClientData Tcl_VarTraceInfo(Tcl_Interp *interp, char *varName, int flags,
    Tcl_VarTraceproc *procPtr, ClientData prevClientData)
int Tcl_WaitForEvent(Tcl_Time *timePtr)
int Tcl_Write(Tcl_Channel chan, char *s, int slen)
void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
    char *message)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required