NPAPI:ExtendedXEventModel

From MozillaWiki
Revision as of 17:42, 27 April 2010 by Josh (talk | contribs) (Created page with '= Status = Under consideration. = Contributors = * Last modified: April 27, 2010 * Authors: Oleg Romashin (Nokia), Josh Aas (Mozilla) * Contributors: = Overview = The defau…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Status

Under consideration.

Contributors

  • Last modified: April 27, 2010
  • Authors: Oleg Romashin (Nokia), Josh Aas (Mozilla)
  • Contributors:

Overview

The default X event model simply sends a native X event as the argument to NPP_HandleEvent. This extended X event model sends a struct with an event type and an event pointer to allow for events that are not native X events.

The Default X Event Model

As this will be the first alternative to the X event model, we'll designate the original default model:

NPEventModelX (NPEventModel = 2)

Negotiating NPEventModelExtendedX

For documentation on negotiating drawing models, see NPAPI:Models. The event model variables for extended X events are:

NPEventModelExtendedX (NPEventModel = 3) NPNVsupportsExtendedXEventsBool (NPNVariable = 3002)

Event Structure

 typedef struct _NPExtendedXEvent
 {
   NPXEventType type;
   void *event;
 
 } NPExtendedXEvent;