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

Unified Diff: ppapi/c/ppp_input_event.h

Issue 7285010: Implement an input event resource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/c/ppp_input_event.h
===================================================================
--- ppapi/c/ppp_input_event.h (revision 0)
+++ ppapi/c/ppp_input_event.h (revision 0)
@@ -0,0 +1,37 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef PPAPI_C_PPP_INPUT_EVENT_H_
+#define PPAPI_C_PPP_INPUT_EVENT_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_resource.h"
+
+#define PPP_INPUT_EVENT_INTERFACE_0_1 "PPP_InputEvent;0.1"
+#define PPP_INPUT_EVENT_INTERFACE PPP_INPUT_EVENT_INTERFACE_0_1
+
+struct PPP_InputEvent {
+ /**
+ * Function for receiving input events from the browser.
+ *
+ * In order to receive input events, you must register for them by calling
+ * PPB_InputEvent.RequestInputEvents() or RequestFilteringInputEvents(). By
+ * default, no events are delivered.
+ *
+ * In general, you should try to keep input event handling short. Especially
+ * for filtered input events, the browser or page may be blocked waiting for
+ * you to respond.
+ *
+ * @return PP_TRUE if the event was handled, PP_FALSE if not. If you have
+ * registered to filter this class of events by calling
+ * RequestFilteringInputEvents, and you return PP_FALSE, the event will
+ * be forwarded to the page (and eventually the browser) for the default
+ * handling.
dmichael (off chromium) 2011/07/01 20:04:19 Maybe point out that if it's not a filtering event
brettw 2011/07/01 21:14:52 You don't have to release the resource (since this
+ */
+ PP_Bool (*HandleInputEvent)(PP_Instance instance, PP_Resource input_event);
+};
+
+#endif // PPAPI_C_PPP_INPUT_EVENT_H_
Property changes on: ppapi/c/ppp_input_event.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698