Back-porting a AXUIElementPostKeyboardEvent app to use PPostEvent
Back-porting a AXUIElementPostKeyboardEvent app to use PPostEvent
- Subject: Back-porting a AXUIElementPostKeyboardEvent app to use PPostEvent
- From: Ken Woodruff <email@hidden>
- Date: Wed, 07 May 2003 23:36:34 -0700
I have an "assisting" app that I originally developed on/for OS X that uses
AXUIElementPostKeyboardEvent() to send keyboard events to another (assisted)
app. It turns out that the majority of the installed base for the assisted
app is still on OS 9, so an OS 9 version is needed to provide a reasonable
migration path. The accessibility API (and CGPostKeyboardEvent()) don't
seem to be available in OS 9, so I decided to write a CGPostKeyboardEvent()
equivalent based on PPostEvent().
This plan seems ok so far as I've gone, my app is Carbon based so it
compiles and runs fine in OS 9 if I stub out the PostKeyboardEvent
rountines. The problem occurs when I try to get real--PPostEvent() isn't
defined in CarbonLib, so I've linked in InterfaceLib as well (with CarbonLib
first in the list, so presumably the only symbol I'm picking up from
InterfaceLib is PPostEvent()). Unfortunately my app now crashes on launch
(can't even run it in the debugger). I've found limited documentation about
how to migrate from InterfaceLib to Carbon (e.g.
http://developer.apple.com/techpubs/macosx/Carbon/CarbonPortingTools/carbon_
porting_guide/cpg_prepstruct/chapter_2_section_12.html) but nothing about
going the other direction. A few questions for the veterans on this list:
- is this approach feasible?
- Can CarbonLib and InterfaceLib peacefully coexist?
- if so can you point me to a relevant sample? (or suggest things I might be
doing wrong, I'm building the OS 9 version using CodeWarrior)
- do you have any suggestions for altogether different ways to approach
this?
Thanks,
--Ken
email@hidden
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.