31e88fa515990375250a7b06a78c2169b29a8af7
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / examples / tutorial / using_ppapi_simple / hello_world.c
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
6 #include <stdio.h>
7 #include <string.h>
8
9 #include "ppapi_simple/ps_main.h"
10
11 int example_main(int argc, char* argv[]) {
12   /* Use ppb_messaging to send "Hello World" to JavaScript. */
13   printf("Hello World STDOUT.\n");
14
15   /* Use ppb_console send "Hello World" to the JavaScript Console. */
16   fprintf(stderr, "Hello World STDERR.\n");
17   return 0;
18 }
19
20 /*
21  * Register the function to call once the Instance Object is initialized.
22  * see: pappi_simple/ps_main.h
23  *
24  * This is not needed when building the sel_ldr version of this example
25  * which does not link against ppapi_simple.
26  */
27 PPAPI_SIMPLE_REGISTER_MAIN(example_main)