libtcl.h 788 B

12345678910111213141516171819202122232425262728
  1. #ifndef _LIBTCL_H
  2. #define _LIBTCL_H
  3. #include "common.h"
  4. #include "dl.h"
  5. #include <bdlib/src/String.h>
  6. #ifdef HAVE_LIBTCL
  7. #include <tcl.h>
  8. typedef int (*Tcl_Eval_t)(Tcl_Interp*, const char*);
  9. typedef Tcl_Command (*Tcl_CreateCommand_t)(Tcl_Interp*, const char*, Tcl_CmdProc*, ClientData, Tcl_CmdDeleteProc*);
  10. typedef const char* (*Tcl_GetStringResult_t)(Tcl_Interp*);
  11. typedef void (*Tcl_DeleteInterp_t)(Tcl_Interp*);
  12. typedef Tcl_Interp* (*Tcl_CreateInterp_t)(void);
  13. typedef void (*Tcl_FindExecutable_t)(const char*);
  14. typedef int (*Tcl_Init_t)(Tcl_Interp*);
  15. #define STDVAR (ClientData cd, Tcl_Interp *interp, int argc, const char *argv[])
  16. extern Tcl_Interp *global_interp;
  17. bd::String tcl_eval(const bd::String&);
  18. #endif
  19. int load_libtcl();
  20. int unload_libtcl();
  21. #endif /* !_LIBTCL_H */