NPAPI:CocoaEventModel: Difference between revisions

Jump to navigation Jump to search
Line 49: Line 49:
* NPP_HandleEvent now passes an NPCocoaEvent struct.
* NPP_HandleEvent now passes an NPCocoaEvent struct.
* Null events are no longer sent.
* Null events are no longer sent.
* The window handle in NP_CGContext and NP_GLContext is now an NSWindow* instead of a WindowRef.
* The window field of NPWindow is null. the CGContextRef to use when drawing is a member of the draw event struct.


All coordinates passed to the plugin via the Cocoa event model are based on the origin being in the top-left (not bottom-left as in standard Cocoa coordinates). This is on account of the fact that the CoreGraphics context given to the plugins is flipped for historical reasons.
All coordinates passed to the plugin via the Cocoa event model are based on the origin being in the top-left (not bottom-left as in standard Cocoa coordinates). This is on account of the fact that the CoreGraphics context given to the plugins is flipped for historical reasons.
24

edits

Navigation menu