9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <russcox@gmail.com>
To: David Leimbach <leimy2k@gmail.com>, 9fans <9fans@cse.psu.edu>
Subject: Re: [9fans] plan9port libdraw
Date: Thu, 13 Jan 2005 00:05:30 -0500	[thread overview]
Message-ID: <ee9e417a0501122105156aafc9@mail.gmail.com> (raw)
In-Reply-To: <3e1162e605011220524bc2fe41@mail.gmail.com>

> Looking at files like keyboard.c vs x11-keyboard.c a lot of
> functions are pretty close to the same except inner I/O
> handling functions.  Part of my problem is not really knowing
> the X11 APIs very well and as a result trying to understand
> what some of the code is doing is getting tricky.

Note that keyboard.c and mouse.c aren't actually
compiled.  They're just reference copies of the Plan 9
versions.

> 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.  

If you have questions, feel free to ask.

Russ


  reply	other threads:[~2005-01-13  5:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12 21:13 David Leimbach
2005-01-12 21:23 ` William Josephson
2005-01-12 21:38 ` Russ Cox
2005-01-13  0:12   ` David Leimbach
2005-01-13  2:24     ` William K. Josephson
2005-01-13 21:21       ` David Leimbach
2005-01-13  4:52   ` David Leimbach
2005-01-13  5:05     ` Russ Cox [this message]
2005-01-13  5:08       ` David Leimbach
2005-01-12 22:40 ` Charles Forsyth
2005-01-13  0:16   ` David Leimbach
2005-01-13  0:39     ` Charles Forsyth
2005-01-13 17:33   ` [9fans] SDL on Plan9 was " Joel Salomon
2005-01-13 18:22     ` Steve Simon
     [not found] <200501131459.j0DExSMn023614@skeeve.com>
     [not found] ` <3e1162e6050113132167c99ec2@mail.gmail.com>
2005-01-15 19:18   ` [9fans] " David Leimbach
2005-01-15 20:00     ` David Leimbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee9e417a0501122105156aafc9@mail.gmail.com \
    --to=russcox@gmail.com \
    --cc=9fans@cse.psu.edu \
    --cc=leimy2k@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).