Rob Porter very helpfully pointed out on the mailing list:
If a drawing context isn't set by SetWindow, why does
PluginWindowMacCocoaCG have an NP_CGContext argument to the
constructor, and a getContext() method which always returns NULL?
I just modified my own local copy such that PluginWindowMacCocoaCG
doesn't have an argument to the constructor, and implemented
HandleEvent such that if a cocoa event is a drawing event it set's the
windows context and sends out a RefreshEvent. The really nice thing
about doing it this way is that all of the drawing in the plugin can
be implemented in the RefreshEvent handler. It's not very desirable,
in my opinion, to have drawing code scattered about the plugin
depending on which platform the plugin is running on. Is this a
modification you guys would be interest in? Any better ways of
improving the situation?
Thanks,
Rob
Original issue reported on code.google.com by amack...@gmail.com on 28 Sep 2010 at 3:22
Original issue reported on code.google.com by
amack...@gmail.com
on 28 Sep 2010 at 3:22