Re: Installing carbon event handlers into a cocoa application
Re: Installing carbon event handlers into a cocoa application
- Subject: Re: Installing carbon event handlers into a cocoa application
- From: Ricky Sharp <email@hidden>
- Date: Sun, 12 Nov 2006 13:05:05 -0600
On Nov 12, 2006, at 11:08 AM, Justin Walsh wrote:
Now I know this may sound strange or silly, and that the most
obvious and
abundant response is to just use Cocoa directly to do what i am
trying to
do. So please do not reply with such a response.
But you haven't stated what it is you're trying to do.
Note that it is indeed possible (and often the only solution) to
install Carbon event handlers in a Cocoa app. I do this myself to
have better Ink support.
However, depending upon what you want, there may be a better way to
do it all via Cocoa.
What I am after is using carbon to handle keyboard and mouse input
in a
cocoa application. I already have an Input Class that works in
carbon by
getting a windowRef from the carbon window and then installing the
event
handlers for the keyboard and mouse input, joysticks in the future.
I created a simple cocoa application and am able to get the
windowRef and
pass it to my class. From there it is finding the window, and
installing
the event handlers without returning any errors. However in the cocoa
application, it is not showing any response.
I started to look into subclassing the NSApplication class, and
think this
is where the solution is. My guess is that cocoa is absorbing the
keyboard
and mouse events, because by default it also creates event handlers
for
these actions.
My question is, what should i start looking at to disable or
overwrite the
keyboard and mouse, so my custom carbon based input code can handle
the code
instead. The fact that carbon is handling the windowRef i pass it
alone
makes me think that it is perfectly possible to do such a task.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden