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

Unified Diff: native_client_sdk/src/libraries/ppapi_simple/ps_main.h

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright Created 7 years, 7 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: native_client_sdk/src/libraries/ppapi_simple/ps_main.h
diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_main.h b/native_client_sdk/src/libraries/ppapi_simple/ps_main.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bd66e291ae245f67f167d796622ba9f55accc1b
--- /dev/null
+++ b/native_client_sdk/src/libraries/ppapi_simple/ps_main.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 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_SIMPLE_PS_MAIN_H_
+#define PPAPI_SIMPLE_PS_MAIN_H_
+
+#include "ppapi_simple/ps.h"
+#include "ppapi_simple/ps_event.h"
+
+EXTERN_C_BEGIN
+
+typedef int (*PSMainFunc_t)(int argc, const char *argv[]);
+
+/**
+ * PSMainCreate
+ *
+ * Constructs an instance SimpleInstance and configures it to call into
+ * the provided "main" function.
+ */
+void* PSMainCreate(PP_Instance inst, PSMainFunc_t func, const char **argv);
+
+
+/**
+ * PPAPI_SIMPLE_REGISTER_MAIN
+ *
+ * Constructs a PSInstance ojbect and configures it to use call the provided
+ * 'main' function on it's own thread once initialization is complete.
+ */
+
+
+#define PPAPI_SIMPLE_REGISTER_MAIN(main, ...) \
+ PPAPI_SIMPLE_USE_MAIN(PSMainCreate, main, ##__VA_ARGS__)
+
+EXTERN_C_END
+
+#endif /* PPAPI_SIMPLE_PPAPI_SIMPLE_MAIN_H_ */
+
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_instance.cc ('k') | native_client_sdk/src/libraries/ppapi_simple/ps_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698