From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16345 invoked from network); 24 Jul 2000 07:10:28 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jul 2000 07:10:28 -0000 Received: (qmail 3346 invoked by alias); 24 Jul 2000 07:09:46 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3329 Received: (qmail 3339 invoked from network); 24 Jul 2000 07:09:45 -0000 Date: Mon, 24 Jul 2000 09:09:42 +0200 (MET DST) Message-Id: <200007240709.JAA05296@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-users@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sat, 22 Jul 2000 17:14:32 +0000 Subject: Re: Tksh and dtksh replacements for Zsh-users? Bart Schaefer wrote: > On Jul 22, 3:07pm, Juhapekka Tolvanen wrote: > } Subject: Tksh and dtksh replacements for Zsh-users? > } > } Tksh is an implementation of the Tcl C library written on top of the > } library for the new KornShell (ksh93). Dtksh is something like Tksh, > } but it is for making of CDE-apps. > } > } I just wonder: Is it possible to create something like that for zsh? > > Sure. Just another module. > > I don't know about the CDE graphics library, but the easiest way for Tk > would be to create a zsh module to link to the Tcl library as a builtin > command, then simply attach the existing Tcl bindings for Tk to that. I > did exactly that years ago for Z-Mail, although the version with Tk was > never released. The zsh module would also have to install a couple of > Tcl builtins to use for calling back to zsh functions, because the Tk > event loop has to be allowed to take over control once the UI is ready > to come up. I've been playing with this ztk idea some time ago (never found the time to try to hack it). If someone things about trying it, he should first try to define a zwait() function (probably with a better name) that is called everywhere when the shell waits for signals or input (i.e. a wrapper around select). And then allow modules to register file-descriptors (and timeouts?) that have to be monitored (with callback functions or something). That way we probably (hopefully) could respond to X-Events asynchronously. That would be nice to have anyway (and I've seen right, the ksh sources have such a function). To workers: There might be some connection between this and the builtins-usable- in-a-pipe we had some time ago. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de