Esempio n. 1
0
        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); }
 }
Esempio n. 3
0
 internal TclCmdProcWrapper(TclInterp interp, TclCmdProc proc)
 {
     _interp = interp;
     _proc   = proc;
     unsafe { _callback = new Tcl_CmdProc(this.CallbackProc); }
 }
Esempio n. 4
0
File: tk.cs Progetto: ArildF/masters
 public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc) {
     return CreateCommand(cmdName, proc, null);
 }
Esempio n. 5
0
File: tk.cs Progetto: ArildF/masters
 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;
 }
Esempio n. 6
0
 public TclCmdToken CreateCommand(string cmdName, TclCmdProc proc)
 {
     return(CreateCommand(cmdName, proc, null));
 }