1 /* Copyright 2014 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.
6 /* From private/ppb_input_event_private.idl,
7 * modified Tue May 20 18:31:39 2014.
10 #ifndef PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_
13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_stdint.h"
19 #define PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1 "PPB_InputEvent_Private;0.1"
20 #define PPB_INPUTEVENT_PRIVATE_INTERFACE PPB_INPUTEVENT_PRIVATE_INTERFACE_0_1
24 * This file defines the PPB_InputEvent_Private interfaces.
29 * @addtogroup Interfaces
33 * The <code>PPB_InputEvent_Private</code> interface contains pointers to
35 * functions related to generic input events on the browser.
37 struct PPB_InputEvent_Private_0_1
{
39 * TraceInputLatency() traces the latency of the input event. The input
40 * latency is shown in the trace viewer. The starting point of the input
41 * latency is when the input event is sent from renderer to plugin. If the
42 * input event does not cause any rendering damage, the end point of input
43 * latency is when TraceInputLatency() is called on the event. If the input
44 * event does cause rendering damage, the end point of input latency is when
45 * the resulted plugin frame eventually reaches screen.
47 * Notes: In the current version, only Graphics2D damage is considered as
48 * rendering damage. And it works only when the Graphics2Ds are bound to
49 * the plugin instance.
51 * @param[in] event A <code>PP_Resource</code> corresponding to an input
54 * @param[in] has_damage A bool indicating whether the event has caused any
57 * @return <code>PP_TRUE</code> if the latency for the given event is tracked.
59 PP_Bool (*TraceInputLatency
)(PP_Resource event
, PP_Bool has_damage
);
61 * StartTrackingLatency() requests input latency to be tracked.
63 * Without calling StartTrackingLatency() first, TraceInputLatency() won't
66 * @param[in] instance The <code>PP_Instance</code> of the instance requesting
67 * to start tracking input latency.
69 void (*StartTrackingLatency
)(PP_Instance instance
);
72 typedef struct PPB_InputEvent_Private_0_1 PPB_InputEvent_Private
;
77 #endif /* PPAPI_C_PRIVATE_PPB_INPUT_EVENT_PRIVATE_H_ */