Have a look in Core/UI/Event.h. There's a constant called
'firstUserEvent'. I typically do something like:

#define AppCustomEvent1 ( firstUserEvent )
#define AppCustomEvent2 ( firstUserEvent + 1 )
etc.

(Although I note the actual value for 'firstUserEvent' has changed from
0x7FFF to 0x6000 in Palm OS 3.5 which is good because otherwise your
custom events numbers end up being negative (which I guess is ok because
enums are signed ints)).

Anyway, then you can do things like

  EventType customEvent;

  customEvent.eType = AppCustomEvent1;
  customEvent.data.generic.data1 = someUsefulValue;
  EvtAddEventToQueue( &customEvent );

Hope that helps?

Stuart Nicholson
Programmer
Firepad, Inc.

-----Original Message-----
From: HowY [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 5:12 PM
To: Palm Developer Forum
Subject: Custom Event


Hi

Im trying to generate a power on event to test
aside from the nilEvent sent when the device is
powered up

How is a custom event(type) defined

if i try to  addEventToQueue (WakeUpEvent)
ie:
    eventP->eType=WakeUpEvent;
    EvtAddEventToQueue (eventP);

it complains that there is no such WakeUpEvent.

How would a custom event be defined? and where?

Thanks!





-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to