Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Wed, 26 May 1999 22:11:54 +0000

Re: Debugging, GII_INPUT and OpenAmulet-on-LibGWT

Rodolphe Ortalo wrote:
> > No, the mistake was in gwtCreateRootWindow() which looked really
> > weird to me. ;)
> > I'm not sure exactly what you were trying to achieve with that code,
> > or if you just got the idea of LibGII/LibGGI wrong? Please have a look
> > at my new gwtCreateRootWindow() and the updated demos, and tell me
> > if that does what you wanted.
> 
> Well. Surely. I have to admit that I am a little confused
> on the GGI<->GII interaction...
> E.g.: with did you use 'ggiJoinInputs' in gwtCreateRootWindow
> and not some form of   'giiJoinInputs' ?

Because in non-performance-critical code it's better to use the
LibGGI API than the LibGGI internals.

> Well, so, it seems a ggi_visual_t comes with its own gii_input_t
> ready? Can you access that one with gii* functions or do you
> always need to rely on the existence of a ggi* equivalent ?
> (This is for consistence among the way GWT obtain events on
> {root,child,offscreen} windows.)

For each gii* function there is a corresponding ggi* function which
takes a ggi_visual_t instead of a gii_input_t. For applications
it is recommended to use the ggi* functions when possible, because
that hides away the LibGII implementation from them.

However that is not a rule, just a recommendation, and you can use
ggiJoinInputs(vis, NULL) to return the input associated with a
visual (which is infact what is done when running the current demos).

> I was suspecting that in fact... But I think I'd better use
> GII functions directly for everything as, for 'normal' (non-root)
> windows, I use a 'input-null' GII input to queue the events...
> (These windows have no associated ggi_visual_t.) Am I right
> to say so or are there other implications ?
> 
> BTW: You are right, if I can access the gii_input_t furnished
> with a ggi_visual_t, the 'inp' parameter of gwtCreateRooWindow
> is not useful at all...

Yes, I'd suggest removing the 'inp' parameter and just change the
code to
root->input = ggiJoinInputs(vis, NULL);
which will make it possible for everything to use the gii* functions
just as now.

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

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