Re: getting an EventRecord?
Re: getting an EventRecord?
- Subject: Re: getting an EventRecord?
- From: Marcel Weiher <email@hidden>
- Date: Thu, 1 May 2003 11:33:24 +0200
On Thursday, May 1, 2003, at 10:16 Uhr, Matt Pease wrote:
Hi Marcel & all --
I need the event because the fxn I'm calling in my library needs
the event. It was written during the days of events & polling & such.
What does it do with the event?
I believe that calling currentEvent will give me a NSEvent, right?
Sending the currentEvent message will get you an NSEvent, yes.
I know its strange, but I need a EventRecord style event.
Anyone know a way to get an EventRecord directly in Cocoa?
Seems like these are my options?
* use WaitNextEvent to get it directly.
* override sendEvent or call currentEvent & get a NSEvent. But
what is
the
best way to convert an NSEvent into a EventRecord?
* some other way?
I don't really see the problem, but then I may just be naive. From the
headers:
struct EventRecord {
EventKind what;
UInt32 message;
UInt32 when;
Point where;
EventModifiers modifiers;
};
I'd just synthesize a null-event and feed that to the library.
EvenRecord event;
event.what = nullEvent;
//--- fill out other fields if required, possibly by querying the
current-event
feedTheLib( event );
Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.