public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc, TclCmdDeleteProc deleteProc) { TclCmdToken token; TclCmdProcWrapper cmdWrapper = new TclCmdProcWrapper(this, proc); TclCmdDeleteProcWrapper deleteWrapper = new TclCmdDeleteProcWrapper(this, deleteProc, cmdWrapper); unsafe { token._token = TclNative.Tcl_CreateCommand(_interp, cmdName, cmdWrapper.Callback, IntPtr.Zero, deleteWrapper.Callback); } return(token); }
internal TclCmdProcWrapper(TclInterp interp, TclCmdProc proc) { _interp = interp; _proc = proc; unsafe { _callback = new Tcl_CmdProc(this.CallbackProc); } }
public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc) { return CreateCommand(cmdName, proc, null); }
public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc, TclCmdDeleteProc deleteProc) { TclCmdToken token; TclCmdProcWrapper cmdWrapper = new TclCmdProcWrapper(this, proc); TclCmdDeleteProcWrapper deleteWrapper = new TclCmdDeleteProcWrapper(this, deleteProc, cmdWrapper); unsafe { token._token = TclNative.Tcl_CreateCommand(_interp, cmdName, cmdWrapper.Callback, IntPtr.Zero, deleteWrapper.Callback); } return token; }
public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc) { return(CreateCommand(cmdName, proc, null)); }