I am working on an application which allows the user to perform input via international keyboard on a Mac. However, the Composition window displayed by the Mac OS for the user to type in the characters is located outside my application's view. I need to move the location of the composition window so that it overlaps the edit window inside my application. Please let me know if there is a way this can be done programmatically?
views:
24answers:
1
A:
The only (non-hacky) way to move windows that don't belong to you is to use the Accessibility Framework. You'll want to convert your view frame's coordinates to screen coordinates, then use the Accessibility API to move the window to that screen-coordinate-based frame.
Joshua Nozzi
2010-10-26 18:26:00
Please let me know if there is an API which I can use to get a handle to the Input method's Composition window, so that I can move it to its new location ?
Anisha Saigal
2010-10-26 19:37:30
That's exactly what I just did.
Joshua Nozzi
2010-10-26 19:40:31
Please let me know the name of this API
Anisha Saigal
2010-10-26 19:44:01
*Read the answer I posted and follow the link.* How can you expect help if you're unwilling to read?
Joshua Nozzi
2010-10-26 19:50:50
I apologize as I missed seeing the link. I will check it out .Thanks
Anisha Saigal
2010-10-26 19:57:09
hi Joshua: I implemented the NSTextInputClient protocol in my View and now I am able to capture the keystrokes from the international keyboard. However,as a result of implementation of this protocol, the system has disabled the display of the international input's composition window. As a result of this the user cannot see the characters as they are being typed (before the Enter key is pressed). Please let me know if there is a way to enable the display of this composition window. Thanks in advance for your help.
Anisha Saigal
2010-10-29 18:51:07