开发者

Implementing NSTextInputClient without NSView

开发者 https://www.devze.com 2023-03-16 14:35 出处:网络
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 str

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消