Eager Gesture Recognition on Aura
[chromium-blink-merge.git] / native_client_sdk / src / libraries / ppapi_simple / ps_event.cc
blobdaecb4062a97c919dc3ec837ee7f9fc91f48b9f4
1 // Copyright (c) 2013 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.
5 #include "ppapi/c/pp_instance.h"
6 #include "ppapi/c/pp_module.h"
8 #include "ppapi_simple/ps_event.h"
9 #include "ppapi_simple/ps_instance.h"
10 #include "ppapi_simple/ps_main.h"
13 void PSEventPost(PSEventType type) {
14 PSInstance::GetInstance()->PostEvent(type);
17 void PSEventPostBool(PSEventType type, PP_Bool state) {
18 PSInstance::GetInstance()->PostEvent(type, state);
21 void PSEventPostVar(PSEventType type, struct PP_Var var) {
22 PSInstance::GetInstance()->PostEvent(type, var);
25 void PSEventPostResource(PSEventType type, PP_Resource resource) {
26 PSInstance::GetInstance()->PostEvent(type, resource);
29 PSEvent* PSEventTryAcquire() {
30 return PSInstance::GetInstance()->TryAcquireEvent();
33 PSEvent* PSEventWaitAcquire() {
34 return PSInstance::GetInstance()->WaitAcquireEvent();
37 void PSEventRelease(PSEvent* event) {
38 PSInstance::GetInstance()->ReleaseEvent(event);
41 void PSEventSetFilter(PSEventTypeMask filter) {
42 PSInstance::GetInstance()->SetEnabledEvents(filter);