From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3e1162e6050112210876644305@mail.gmail.com> Date: Wed, 12 Jan 2005 21:08:49 -0800 From: David Leimbach To: Russ Cox Subject: Re: [9fans] plan9port libdraw In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <3e1162e605011213134327baa2@mail.gmail.com> <3e1162e605011220524bc2fe41@mail.gmail.com> Cc: 9fans <9fans@cse.psu.edu> Topicbox-Message-UUID: 2d8873be-eace-11e9-9e20-41e7f4b1d025 > Note that keyboard.c and mouse.c aren't actually > compiled. They're just reference copies of the Plan 9 > versions. I figured as much when looking at the duplicate functions. > > > I was a decent SDL programmer a few years back but I never > > really did much with X11. :) > > > > Hopefully this will be more educational than frustrating. > > If what you say about SDL being somewhat model-independent > is true, then it shouldn't be too bad. The only files you'll need > to provide are equivalents to the x11-*.c in libdraw. > Some you can stub out (like x11-cload.c, where you > can just remove the if and its body), some will translate > fairly directly (like x11-mouse.c and x11-keyboard.c), > and others should have the non-X-dependent pieces split > out of them (like x11-init.c). In all, though, it's only 2,500 > lines of code, so it shouldn't be too bad. And you definitely > don't need to understand X. > I guess what I need to know is what is expected in and out of some of these functions and the best description I get is the existing X code. Sometimes the data in is just a void * like in the _ioproc function for keyboard.c... It's immediately handled through a Keyboardctl pointer though so that's not so bad. I've already done a copy of all the x11-*.c to sdl-*.c and am working on those. > If you have questions, feel free to ask. I certainly will :) Dave > > Russ >