Index: [thread] [date] [subject] [author]
  From: Denis Oliver Kropp <dok@fischlustig.de>
  To  : ggi-develop@eskimo.com
  Date: Mon, 3 May 1999 07:51:01 +0200

Re: heavy bug in LIBGII (?)

Marcus Sundberg´s crap from Son, 02 Mai 1999:
> Denis Oliver Kropp wrote:
> > 
> > Hello,
> > 
> > we are working on a GGI impl. for ClanLib.
> 
> Oh, that's good to hear.

Yes, GGI-on-X is faster than the native X implementation of ClanLib!!
GGI on fbdev is as fast as my fbdev implementation.
There´s a terrible flickering with my TNT AGP, don´t know yet why.
Maybe the data is not written fast enough and the panning is to early?

> 
> > We have some trouble with the event handling of LIBGII.
> > 
> > Every time we press a key, we get two events, one press and one release event,
> > even if we dont release the key. The libgii demo proves this behaviour.

Stupid question, saw linux-kbd after posting it ;-)

> 
> This is expected behaviour with the LibGII demo. The LibGII demo opens
> the input-stdin inputlib for input. As the name suggests it reads
> input from the standard input stream.
> 
> There is currently _NO_ way to know when a key is pressed or released
> with this inputlib, simple because the standard input is simply a
> stream of ascii characters. The best thing we can do here is generate
> one press and and one immediately following release event for each
> character so at least applications that only reads press and repeat
> events can work.
> 
> This is however not a problem for you, because you should not use
> input-stdin. Infact you should not explicitly open any inputlibs
> at all, as I suspect you intend to use LibGGI for graphics output.
> 
> If you use LibGGI for graphics it will automaticly open suitable inputs
> for you and associate them with each visual that is opened. You then
> use the ggiEvent* functions instead of the giiEvent* functions to
> read events. Users can also specify extra inputs to be associated
> with visuals, using the GGI_INPUT environment variable.
> 
> Lastly, if you really want to use LibGII for input without using
> LibGGI for output (Which I would actually recommend you to do, as
> you can use LibGII for input with your native X11, SVGAlib and
> FBDev display drivers. The advantage of that is that you get a
> single API to program against, which supports virtually all
> available features. For example - for in-game controls you are
> probably just interrested in what physical keys are pressed and
> released, so you use the "label" field of events. On the other
> hand - when the user should enter a text string (like his name in
> the hiscore table), you can just use the "sym" field and you get
> support for upper/lower case, international keys and dead keys
> without having to deal with those things in your own code.)
> 
> You should use input-linux-kbd for keyboard input on the console,
> input-linux-mouse for mouse input on the console, input-xwin for
> key and mouse input from an already opened X-window, and input-x
> for generic key and mouse input from X (like when using Glide for
> output). Note that input-xwin needs to be passed a structure with
> some info, see ggi/input/xwin.h for that struct.
> 
> I should also recommend to have a look at LibGIC which gets events
> from a gii_input_t handle a will automaticly handle all possible input
> types in a way transparent to the application. It is however still
> in pre-alpha stage.

Thanks for your detailed answer! I will look at the ggiEvents today.

--
Denis Oliver Kropp (dok)
+ Fischlustig +

ClanBomber, the kick ass game that uses kick ass Clanlib.
www.fischlustig.de/clanbomber	www.clanlib.org
(klopft sich auf die Schulter)

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