45
edits
Line 410: | Line 410: | ||
struct NPKeyEvent { | struct NPKeyEvent { | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
uint32 modifier; // [0] : NPModifier | |||
uint32 normalizedKeyCode; // [4] : key codes from Chromium's keyboard_codes_posix.h | |||
}; | }; | ||
struct NPCharacterEvent { | struct NPCharacterEvent { | ||
uint32 modifier; // [0] : NPModifier | |||
uint16 text[4]; // [4] : 16bit wchar | |||
uint16 unmodifiedText[4]; // [12] : 16bit wchar | |||
// End of Pepper event specification version 1.0 | // End of Pepper event specification version 1.0 | ||
// Additional future key event fields go here... | // Additional future key event fields go here... | ||
Line 424: | Line 424: | ||
struct NPMouseEvent { | struct NPMouseEvent { | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
uint32 modifier; // [0] : NPModifier | |||
int32 button; // [4] : NPMouseButtons | |||
int32 x; // [8] : Relative to upper left corner of embedded area, in units of pixels | |||
int32 y; // [12]: Relative to upper left corner of embedded area (+y down) | |||
int32 clickCount; // [16]: Number of button clicks | |||
// End of Pepper event specification version 1.0 | // End of Pepper event specification version 1.0 | ||
// Additional future mouse event fields go here... | // Additional future mouse event fields go here... | ||
Line 435: | Line 435: | ||
struct NPMouseWheelEvent { | struct NPMouseWheelEvent { | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
uint32 modifier; // [0] : NPModifier | |||
float deltaX; // [4] : Positive deltaX indicate scroll left, in scroll wheel units. | float deltaX; // [4] : Positive deltaX indicate scroll left, in scroll wheel units. | ||
float deltaY; // [8] : Positive deltaY indicate scroll up, in scroll wheel units. | float deltaY; // [8] : Positive deltaY indicate scroll up, in scroll wheel units. | ||
Line 442: | Line 442: | ||
float wheelTicksY; // [16]: Positive wheelTicksY indicate scroll up. | float wheelTicksY; // [16]: Positive wheelTicksY indicate scroll up. | ||
// Wheel ticks can be fractional values on certain devices. | // Wheel ticks can be fractional values on certain devices. | ||
uint32 scrollByPage; // [20]: 0 - scroll by line, 1 - scroll by page | |||
// End of Pepper event specification version 1.0 | // End of Pepper event specification version 1.0 | ||
// Additional future mouse wheel event fields go here... | // Additional future mouse wheel event fields go here... | ||
Line 453: | Line 453: | ||
// Note: this area is under construction | // Note: this area is under construction | ||
uint32 device_uid; // [0] : unique id of device (comes in on PEPPER NPN_SetWindow) | |||
uint32 subtype; // [4] : device event subtype | |||
uint8 generic[0]; // [8] : payload is typecast based on device uid & subtype | |||
}; | }; | ||
Line 461: | Line 461: | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
// Minimizing may also include becoming a background/foreground tab. | // Minimizing may also include becoming a background/foreground tab. | ||
int32 value; // [0] : New value | |||
// 0 = transitioning out of minimized state | // 0 = transitioning out of minimized state | ||
// 1 = transitioning to a minimized state | // 1 = transitioning to a minimized state | ||
Line 471: | Line 471: | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
// The embedded Pepper area is gaining or losing keyboard focus. | // The embedded Pepper area is gaining or losing keyboard focus. | ||
int32 value; // [0] : New value | |||
// 0 = losing focus | // 0 = losing focus | ||
// 1 = gaining focus | // 1 = gaining focus | ||
Line 480: | Line 480: | ||
struct NPEvent { | struct NPEvent { | ||
// Structure layout must match between trusted & untrusted code. | // Structure layout must match between trusted & untrusted code. | ||
int32 type; // [0] : NPEventTypes | |||
uint32 size; // [4] : Size in bytes of _this_ event structure. | |||
double timeStampSeconds; // [8] : Time of creation; seconds since epoch. | double timeStampSeconds; // [8] : Time of creation; seconds since epoch. | ||
Line 498: | Line 498: | ||
}; | }; | ||
Keycodes used by NPKeyEvent.normalizedKeyCode (keyboard_codes_posix.h) | // Keycodes used by NPKeyEvent.normalizedKeyCode (keyboard_codes_posix.h) | ||
enum { | enum { |
edits