| OLD | NEW |
| (Empty) | |
| 1 /* Copyright (c) 2012 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 |
| 6 #include "ppapi/c/pp_instance.h" |
| 7 #include "ppapi/c/pp_module.h" |
| 8 |
| 9 #include "ppapi_simple/ppapi_simple_instance.h" |
| 10 #include "ppapi_simple/ppapi_simple_main.h" |
| 11 |
| 12 void* PSCreateMain(PP_Instance inst, PSMainFunc_t func, const char* argv[]) { |
| 13 PSInstance* pInst = new PSInstance(inst, argv); |
| 14 pInst->SetMain(func); |
| 15 return pInst; |
| 16 } |
| 17 |
| 18 void PSPostEvent(PSEventType type) { |
| 19 PSInstance::GetInstance()->PostEvent(type); |
| 20 } |
| 21 |
| 22 void PSPostBoolEvent(PSEventType type, PP_Bool state) { |
| 23 PSInstance::GetInstance()->PostEvent(type, state); |
| 24 } |
| 25 |
| 26 void PSPostVarEvent(PSEventType type, struct PP_Var var) { |
| 27 PSInstance::GetInstance()->PostEvent(type, var); |
| 28 } |
| 29 |
| 30 void PSPostResourceEvent(PSEventType type, PP_Resource resource) { |
| 31 PSInstance::GetInstance()->PostEvent(type, resource); |
| 32 } |
| 33 |
| 34 PSEvent* PSAcquireEvent(int block) { |
| 35 return PSInstance::GetInstance()->AcquireEvent(block); |
| 36 } |
| 37 |
| 38 void PSReleaseEvent(PSEvent* event) { |
| 39 PSInstance::GetInstance()->ReleaseEvent(event); |
| 40 } |
| 41 |
| 42 void PSSetEventFilter(uint32_t filter) { |
| 43 PSInstance::GetInstance()->SetEnabledEvents(filter); |
| 44 } |
| 45 |
| OLD | NEW |