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

Side by Side Diff: native_client_sdk/src/libraries/ppapi_simple/ps_event.cc

Issue 914983003: [NaCl SDK] Switch ppapi_simple to C library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tty output bug Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "ppapi/c/pp_instance.h"
6 #include "ppapi/c/pp_module.h"
7
8 #include "ppapi_simple/ps_event.h"
9 #include "ppapi_simple/ps_instance.h"
10 #include "ppapi_simple/ps_main.h"
11
12
13 void PSEventPost(PSEventType type) {
14 PSInstance::GetInstance()->PostEvent(type);
15 }
16
17 void PSEventPostBool(PSEventType type, PP_Bool state) {
18 PSInstance::GetInstance()->PostEvent(type, state);
19 }
20
21 void PSEventPostVar(PSEventType type, struct PP_Var var) {
22 PSInstance::GetInstance()->PostEvent(type, var);
23 }
24
25 void PSEventPostResource(PSEventType type, PP_Resource resource) {
26 PSInstance::GetInstance()->PostEvent(type, resource);
27 }
28
29 PSEvent* PSEventTryAcquire() {
30 return PSInstance::GetInstance()->TryAcquireEvent();
31 }
32
33 PSEvent* PSEventWaitAcquire() {
34 return PSInstance::GetInstance()->WaitAcquireEvent();
35 }
36
37 void PSEventRelease(PSEvent* event) {
38 PSInstance::GetInstance()->ReleaseEvent(event);
39 }
40
41 void PSEventSetFilter(PSEventTypeMask filter) {
42 PSInstance::GetInstance()->SetEnabledEvents(filter);
43 }
44
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_event.c ('k') | native_client_sdk/src/libraries/ppapi_simple/ps_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698