Implementing NSTextInputClient without NSView
I have an application with custom widgets and custom event handling model (I'm rendering in OpenGL). I would like to i开发者_开发百科mplement a text edit view taking advantage of Cocoa text input structures, but I don't know how to generate NSEvent objects to pass to NSTextInputContext. In particular, I'm having problems providing a window number, graphic context and mouse cursor coordinates (since i have to provide them in the window's coordinate system). Probably graphic context isn't needed but mouse coordinates are necessary to handle mouse selection events.
Is there any way I can solve this?
精彩评论