Changes

Jump to: navigation, search

NPAPI:Pepper

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

Navigation menu