Re: Rethinking my approach; rather overwhelmed.
Re: Rethinking my approach; rather overwhelmed.
- Subject: Re: Rethinking my approach; rather overwhelmed.
- From: Andreas Monitzer <email@hidden>
- Date: Wed, 18 Jun 2008 02:03:38 +0200
On Jun 18, 2008, at 01:22, Louis Gerbarg wrote:
It sounds like what you want to do is here is subclass NSApplication,
with a replacement implementation of sendEvent that decodes the
incoming events, marshals the NSEvent's parameters, then sends them to
your C++ code for processing. If your C++ code uses them you swallow
the event, if not you pass it onto the superclasses implementation and
the app code will handle them just like any other Cocoa application.
Note that this is just what I did for the X-server:
http://www.google.com/codesearch?hl=en&q=monitzer+show:Nu3rlWhknBM:x28_xYSo3mE:b82DNfVvtyQ&sa=N&cd=1&ct=rc&cs_p=http://gentoo.osuosl.org/distfiles/X430src-3.tgz&cs_f=xc/programs/Xserver/hw/darwin/quartz/XApplication.m
This can serve as an example on how to implement something like this.
Just don't forget to declare this subclass to be the principal class
of the application bundle.
andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden