summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 16:03:38 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-20 16:03:38 +0000
commit61e3ef3a32dd7b5bd4c8c6b1b3a68ed081101a97 (patch)
treee3e36bb4af1681c01d613cd290e9f13e5308f3f3 /ppapi/c
parent8d5f3ace1907853bd6e838d4f061c23a526b5384 (diff)
downloadchromium_src-61e3ef3a32dd7b5bd4c8c6b1b3a68ed081101a97.zip
chromium_src-61e3ef3a32dd7b5bd4c8c6b1b3a68ed081101a97.tar.gz
chromium_src-61e3ef3a32dd7b5bd4c8c6b1b3a68ed081101a97.tar.bz2
Remove HandleInputEvent from PPP_Instance and freeze to 1.0.
Note I'm leaving in temporary backwards-compatibility. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2035 TEST=ppapi tests Review URL: http://codereview.chromium.org/7452002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/pp_input_event.h38
-rw-r--r--ppapi/c/ppp_instance.h45
2 files changed, 10 insertions, 73 deletions
diff --git a/ppapi/c/pp_input_event.h b/ppapi/c/pp_input_event.h
index 0c7854c..c3defc9 100644
--- a/ppapi/c/pp_input_event.h
+++ b/ppapi/c/pp_input_event.h
@@ -192,44 +192,6 @@ struct PP_InputEvent_Wheel {
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent_Wheel, 24);
/**
- * The PP_InputEventData union represents all input event data types.
- */
-union PP_InputEventData {
- struct PP_InputEvent_Key key;
- struct PP_InputEvent_Character character;
- struct PP_InputEvent_Mouse mouse;
- struct PP_InputEvent_Wheel wheel;
- /**
- * This value allows new events to be added without changing the size of
- * this struct.
- */
- char padding[64];
-};
-
-/**
- * The PP_InputEvent struct represents all input events.
- */
-struct PP_InputEvent {
- /** This value represents the type of the event. */
- PP_InputEvent_Type type;
- /** This value ensure the time_stamp is aligned on an 8-byte boundary
- * relative to the start of the struct. Some compilers align doubles
- * on 8-byte boundaries for 32-bit x86, and some align on 4-byte boundaries.
- */
- int32_t padding;
- /**
- * This value represents the time that this event was generated. This value
- * is not relative to any particular epoch; the most you can do is compare
- * time stamps.
- */
- PP_TimeTicks time_stamp;
- /**
- * This value represents the event type and its specific data.
- */
- union PP_InputEventData u;
-};
-PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
-/**
* @}
*/
diff --git a/ppapi/c/ppp_instance.h b/ppapi/c/ppp_instance.h
index f38f0ae..31f93a3 100644
--- a/ppapi/c/ppp_instance.h
+++ b/ppapi/c/ppp_instance.h
@@ -38,8 +38,8 @@
* to handle events such as change of focus or input events (keyboard/mouse)
* events.
*/
-#define PPP_INSTANCE_INTERFACE_0_5 "PPP_Instance;0.5"
-#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_0_5
+#define PPP_INSTANCE_INTERFACE_1_0 "PPP_Instance;1.0"
+#define PPP_INSTANCE_INTERFACE PPP_INSTANCE_INTERFACE_1_0
struct PPP_Instance {
/**
@@ -154,11 +154,13 @@ struct PPP_Instance {
* An instance's default condition is that it will not have focus.
*
* <strong>Note:</strong>Clicks on instances will give focus only if you
- * handle the click event. Return <code>true</code> from HandleInputEvent to
- * signal that the click event was handled. Otherwise the browser will bubble
- * the event and give focus to the element on the page that actually did end
- * up consuming it. If you're not getting focus, check to make sure you're
- * returning true from the mouse click in <code>HandleInputEvent</code>.
+ * handle the click event. Return <code>true</code> from
+ * <code>HandleInputEvent</code> in <code>PPP_InputEvent</code> (or use
+ * unfiltered events) to signal that the click event was handled. Otherwise,
+ * the browser will bubble the event and give focus to the element on the page
+ * that actually did end up consuming it. If you're not getting focus, check
+ * to make sure you're returning true from the mouse click in
+ * <code>HandleInputEvent</code>.
*
* @param[in] instance A <code>PP_Instance</code> indentifying the instance
* receiving the input event.
@@ -167,33 +169,6 @@ struct PPP_Instance {
*/
void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
/**
- * HandleInputEvent() handles input events, such as keyboard events. This
- * function returns <code>PP_TRUE</code> if the event was handled or
- * <code>PP_FALSE</code> if it was not.
- *
- * If the event was handled, it will not be forwarded to the web page or
- * browser. If it was not handled, it will bubble according to the normal
- * rules. So it is important that a module respond accurately with whether
- * event propagation should continue.
- *
- * Event propagation also controls focus. If you handle an event like a mouse
- * event, typically the instance will be given focus. Returning false means
- * that the click will be given to a lower part of the page and your module
- * will not receive focus. This allows an instance to be partially
- * transparent, where clicks on the transparent areas will behave like clicks
- * to the underlying page.
- *
- * @param[in] instance A <code>PP_Instance</code> indentifying one instance
- * of a module.
- *
- * @param[in] event The input event.
- *
- * @return <code>PP_TRUE</code> if <code>event</code> was handled,
- * <code>PP_FALSE</code> otherwise.
- */
- PP_Bool (*HandleInputEvent)(PP_Instance instance,
- const struct PP_InputEvent* event);
- /**
* HandleDocumentLoad() is called after initialize for a full-frame
* module that was instantiated based on the MIME type of a DOMWindow
* navigation. This situation only applies to modules that are pre-registered
@@ -227,7 +202,7 @@ struct PPP_Instance {
*/
-typedef struct PPP_Instance PPP_Instance_0_5;
+typedef struct PPP_Instance PPP_Instance_1_0;
#endif /* PPAPI_C_PPP_INSTANCE_H_ */