Home | History | Annotate | Download | only in simple_hello_world
      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 #ifdef SEL_LDR
     12 #define example_main main
     13 #endif
     14 
     15 int example_main(int argc, char* argv[]) {
     16   /* Use ppb_messaging to send "Hello World" to JavaScript. */
     17   printf("Hello World STDOUT.\n");
     18 
     19   /* Use ppb_console send "Hello World" to the JavaScript Console. */
     20   fprintf(stderr, "Hello World STDERR.\n");
     21   return 0;
     22 }
     23 
     24 /*
     25  * Register the function to call once the Instance Object is initialized.
     26  * see: pappi_simple/ps_main.h
     27  */
     28 PPAPI_SIMPLE_REGISTER_MAIN(example_main)
     29