Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Side by Side Diff: webkit/glue/pepper/pepper.h

Issue 343069: To facilitate apatrick's work on the 3D renderer for Pepper,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/npapi/bindings/npapi.h ('k') | webkit/glue/plugins/nphostapi.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_PEPPER_PEPPER_H_
6 #define WEBKIT_GLUE_PEPPER_PEPPER_H_
7
8 #ifdef PEPPER_APIS_ENABLED
9
10 #include "base/basictypes.h"
11 #include "third_party/npapi/bindings/npapi.h"
12
13 /*
14 * A fake "enum" value for getting Pepper extensions.
15 * The variable returns a pointer to an NPPepperExtensions structure
16 */
17 #define NPNVPepperExtensions ((NPNVariable) 4000)
18
19 typedef enum {
20 NPMouseButton_None = -1,
21 NPMouseButton_Left = 0,
22 NPMouseButton_Middle = 1,
23 NPMouseButton_Right = 2,
24 } NPMouseButtons;
25
26 typedef enum {
27 NPEventType_Undefined = -1,
28 NPEventType_MouseDown = 0,
29 NPEventType_MouseUp = 1,
30 NPEventType_MouseMove = 2,
31 NPEventType_MouseEnter = 3,
32 NPEventType_MouseLeave = 4,
33 NPEventType_MouseWheel = 5,
34 NPEventType_RawKeyDown = 6,
35 NPEventType_KeyDown = 7,
36 NPEventType_KeyUp = 8,
37 NPEventType_Char = 9,
38 NPEventType_Minimize = 10,
39 NPEventType_Focus = 11,
40 NPEventType_Device = 12
41 } NPEventTypes;
42
43 typedef enum {
44 NPEventModifier_ShiftKey = 1 << 0,
45 NPEventModifier_ControlKey = 1 << 1,
46 NPEventModifier_AltKey = 1 << 2,
47 NPEventModifier_MetaKey = 1 << 3,
48 NPEventModifier_IsKeyPad = 1 << 4,
49 NPEventModifier_IsAutoRepeat = 1 << 5,
50 NPEventModifier_LeftButtonDown = 1 << 6,
51 NPEventModifier_MiddleButtonDown = 1 << 7,
52 NPEventModifier_RightButtonDown = 1 << 8
53 } NPEventModifiers;
54
55 typedef struct _NPKeyEvent
56 {
57 uint32 modifier;
58 uint32 normalizedKeyCode;
59 } NPKeyEvent;
60
61 typedef struct _NPCharacterEvent
62 {
63 uint32 modifier;
64 uint16 text[4];
65 uint16 unmodifiedText[4];
66 } NPCharacterEvent;
67
68 typedef struct _NPMouseEvent
69 {
70 uint32 modifier;
71 int32 button;
72 int32 x;
73 int32 y;
74 int32 clickCount;
75 } NPMouseEvent;
76
77 typedef struct _NPMouseWheelEvent
78 {
79 uint32 modifier;
80 float deltaX;
81 float deltaY;
82 float wheelTicksX;
83 float wheelTicksY;
84 uint32 scrollByPage;
85 } NPMouseWheelEvent;
86
87 typedef struct _NPDeviceEvent {
88 uint32 device_uid;
89 uint32 subtype;
90 /* uint8 generic[0]; */
91 } NPDeviceEvent;
92
93 typedef struct _NPMinimizeEvent {
94 int32 value;
95 } NPMinimizeEvent;
96
97 typedef struct _NPFocusEvent {
98 int32 value;
99 } NPFocusEvent;
100
101 typedef struct _NPPepprEvent
102 {
103 uint32 size;
104 int32 type;
105 double timeStampSeconds;
106 union {
107 NPKeyEvent key;
108 NPCharacterEvent character;
109 NPMouseEvent mouse;
110 NPMouseWheelEvent wheel;
111 NPMinimizeEvent minimize;
112 NPFocusEvent focus;
113 NPDeviceEvent device;
114 } u;
115 } NPPepperEvent;
116
117 typedef struct _NPPepperRegion
118 {
119 int32 x;
120 int32 y;
121 int32 w;
122 int32 h;
123 } NPPepperRegion;
124
125 typedef enum _NPRenderType
126 {
127 NPRenderGraphicsRGBA
128 } NPRenderType;
129
130 typedef struct _NPRenderContext
131 {
132 union {
133 struct {
134 void* region;
135 int32 stride;
136 } graphicsRgba;
137 } u;
138 } NPRenderContext;
139
140 typedef void (*NPFlushRenderContextCallbackPtr)(NPRenderContext* context,
141 NPError err,
142 void* userData);
143 typedef NPError (*NPInitializeRenderContextPtr)(NPP instance,
144 NPRenderType type,
145 NPRenderContext* context);
146 typedef NPError (*NPFlushRenderContextPtr)(NPP instance,
147 NPRenderContext* context,
148 NPFlushRenderContextCallbackPtr callb ack,
149 void* userData);
150 typedef NPError (*NPDestroyRenderContextPtr)(NPP instance,
151 NPRenderContext* context);
152
153 typedef struct _NPPepperExtensions
154 {
155 /* Renderer extensions */
156 NPInitializeRenderContextPtr initializeRender;
157 NPFlushRenderContextPtr flushRender;
158 NPDestroyRenderContextPtr destroyRender;
159 /* Shared memory extensions */
160 } NPPepperExtensions;
161
162 #endif /* PEPPER_APIS_ENABLED */
163
164 #endif /* WEBKIT_GLUE_PEPPER_PEPPER_H_ */
OLDNEW
« no previous file with comments | « third_party/npapi/bindings/npapi.h ('k') | webkit/glue/plugins/nphostapi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698