Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <e94_msu@elixir.e.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Wed, 19 Aug 1998 16:10:11 +0200

Re: keyboard.h changes

> Marcus writes:
> 
> >  Current Linux apps (and kernel functions) doesn't have a clue
> >  about what a ggi_key_event is, so I can't possibly see any
> >  reason to why the content of ggi_key_event should depend on
> >  Linux keysyms at all.   If GGI Console wants compability, which it
> >  must if it ever wants to get into the kernel, it needs to convert
> >  from/to ggi_key_event to what Linux uses regardless of what's inside
> >  ggi_key_event.
> 
> GGI Console is using ggi_key_events to pass around key events (from
> keyboard driver -> keymapper -> xterm emulator), so the definition of
> "ggi_key_event" directly affects GGI Console.  It is just the current
> assumption in GGI Console that GGI keysym == Linux keysym that is
> worrying me, but that can probably be fixed fairly easily.

We shouldn't care about compability with something that isn't even
done yet. I think that the changes you proposed will make the libggi
API more intuitive when it comes to keyboard handling, and if
nobody objects to the _API_ then we shall implement it.

Then Jason may or may not choose to use this scheme for GGI
Console. If he does, fine. If he doesn't, we'll write a
GGIconsole2libggi keysym converter, so what?

I might add that I agree with Linus on that kernel and user-level
code including the same headers is usually a very bad idea.
User-level code that interfaces the kernel should be clearly
abstracted to be independent of changes in the kernel.

In this particular case the abstraction should be in the
GGI Console target. Whether GGI Console and libggi actually
uses the same keysyms are not important at all. The important
thing is that either way, other parts of libggi than the
key-event handler in the GGI Console target shouldn't depend
on what the GGI Console uses.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |      E-Mail: e94_msu@e.kth.se


Index: [thread] [date] [subject] [author]