oddjob@oz.plymouth.edu (Andrew C. Stoffel) (04/29/91)
(for those who care --> follow-ups directed towards comp.sys.atari.st.tech where they belong) This is really a hypothetical question...... There is a program called "viola" that is sort of an X11 (x windows) version of hypercard. Does anybody have any experience porting programs built on the X11 model of client-server programs to GEM (or anything else) on the ST ? (I know..... I COULD wait until I could afford a TT and *nix..) I'm pretty sure it's been done already --> for example... the program contained in texdraw.lzh in /atari/tex on atari.archive.umich.edu ... Anyone got any ideas ??? Comments ??? -Andy- -- |"The Snark WAS a Boojum, you see!"|Good : acs@unhd.unh.edu | |"Reality !?! Isn't that something |Better : ANDYS@psc.plymouth.edu | | you sprinkle on ice ??" |Best : oddjob@oz.plymouth.edu |
klamer@mi.eltn.utwente.nl (Klamer Schutte) (05/02/91)
In <1991Apr28.194206.1750@oz.plymouth.edu> oddjob@oz.plymouth.edu (Andrew C. Stoffel) writes: >Does anybody have any experience porting programs built on the X11 >model of client-server programs to GEM (or anything else) on the ST ? >(I know..... I COULD wait until I could afford a TT and *nix..) This is not as difficult as it seems. The other way around is a lot more difficult! What you have to do is: 0) When initialising the program register all client functions (You want to get a pointer to them). 1) make a endless loop in your program 2) put in there an event_multi and a (huge) switch statement 3) at all switch labels, see iff there is a client, and do him or if there is no client, do the default. Here is an example of untested pseudo code: register_clients(); while(1) { event_multi( all options enabled ); switch( type off message ) case keyevent: find_active_window(); if (there_is_a_client(window)) (*do_client_function( window, key ); else do_default_key_action(window); break; case mousevent: ... ... } >Anyone got any ideas ??? Comments ??? Comments ??? Klamer -- Klamer Schutte Faculty of electrical engineering -- University of Twente, The Netherlands klamer@mi.eltn.utwente.nl {backbone}!mcsun!mi.eltn.utwente.nl!klamer