nanogui: about nanowm


Previous by date: 21 Feb 2001 13:40:26 -0000 about nanowm, xiang lee
Next by date: 21 Feb 2001 13:40:26 -0000 Re: Why Microwin, John Waldron
Previous in thread: 21 Feb 2001 13:40:26 -0000 about nanowm, xiang lee
Next in thread: 21 Feb 2001 13:40:26 -0000 Re: about nanowm, xiang lee

Subject: Re: about nanowm
From: Alex Holden ####@####.####
Date: 21 Feb 2001 13:40:26 -0000
Message-Id: <Pine.LNX.4.04.10102211324130.604-100000@hyperspace.linuxhacker.org>

On Wed, 21 Feb 2001, [gb2312] xiang lee wrote:
>   I wanna to add a hotbutton control to nanowm for my

What's a hotbutton control?

>   At beginning,I try to find out how I can add a
> hotbutton event to the nano-X's events ,but I find 
> that the most event is come from the Mouse and
> Keyboard

If you really need to add a new event type (as opposed to a keyboard event
with a special key value or something):

In include/nano-X.h :
Add a new GR_EVENT_TYPE_ #define.
Add a new GR_EVENT_MASK_ #define.
Add a new GR_EVENT_ structure definition. Note that it has to start with
a GR_EVENT_TYPE value.
Add the structure to the GR_EVENT union.

In nanox/srvevent.c :
Add a GsDeliverYourEvent() function which looks through the
rootwp->eventclients list for windows which have selected to receive the
event, and when you find one which you want to send an event to, use
GsAllocEvent() to allocate a new event structure then just fill it in
(then forget about it- GsAllocEvent() adds it to the event list so you
don't have to).

You will then need to call the GsDeliverYourEvent() function whenever you
want to generate your event. How you do this depends on the application
(specifically, how the server decides that it wants to generate an event).

>   Then  I try to got windows message from nanowm and 
> save it in my apps ,when the hotbutton message coming 
> this apps send command to nanowm.

I don't understand.

> but when I send "5" to the pipe the nano-X broken
> here is some error message:
> nanowm: error 2
> Got unexpected event -65514
> nxclient 3252: Wrong packet type 0 (expected 22)

This is the kind of thing which happens if your application tries to write
to stdout. Are you using printf() for debugging or something?

-- 
------- Alex Holden -------
http://www.linuxhacker.org/
 http://www.robogeeks.org/


Previous by date: 21 Feb 2001 13:40:26 -0000 about nanowm, xiang lee
Next by date: 21 Feb 2001 13:40:26 -0000 Re: Why Microwin, John Waldron
Previous in thread: 21 Feb 2001 13:40:26 -0000 about nanowm, xiang lee
Next in thread: 21 Feb 2001 13:40:26 -0000 Re: about nanowm, xiang lee


Powered by ezmlm-browse 0.20.