Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / native_client_sdk / src / libraries / ppapi_simple / ps.h
blob54a7d86b274772fbc0df77b26dbff7781190f636
1 /* Copyright 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. */
5 #ifndef PPAPI_SIMPLE_PS_H_
6 #define PPAPI_SIMPLE_PS_H_
8 #include "ppapi/c/pp_instance.h"
9 #include "sdk_util/macros.h"
11 EXTERN_C_BEGIN
13 /**
14 * The ppapi_simple library simplifies the use of the Pepper interfaces by
15 * providing a more traditional 'C' or 'C++' style framework. The library
16 * creates an PSInstance derived object based on the ppapi_cpp library and
17 * initializes the nacl_io library to provide a POSIX friendly I/O environment.
19 * In order to provide a standard blocking environment, the library will hide
20 * the actual "Pepper Thread" which is the thread that standard events
21 * such as window resize, mouse keyboard, or other inputs arrive. To prevent
22 * blocking, instead we enqueue these events onto a thread safe linked list
23 * and expect them to be processed on a new thread. In addition, the library
24 * will automatically start a new thread on which can be used effectively
25 * as a "main" entry point.
27 * For C style development, the PPAPI_SIMPLE_REGISTER_MAIN(XX) macros provide a
28 * mechanism to register the entry an point for "main". All events are pushed
29 * onto an event queue which can then be pulled from this new thread.
30 * NOTE: The link will still need libstdc++ and libppapi_cpp since the library
31 * is still creating a C++ object which does the initialization work and
32 * forwards the events.
34 * For C++ style development, use the ppapi_simple_instance.h,
35 * ppapi_simple_instance_2d.h, and ppapi_simple_instance_3d.h headers as
36 * a base class, and overload the appropriate virtual functions such as
37 * Main, ChangeContext, or Render.
40 /**
41 * PSGetInstanceId
43 * Return the PP_Instance id of this instance of the module. This is required
44 * by most of the Pepper resource creation routines.
46 PP_Instance PSGetInstanceId(void);
48 /**
49 * PSGetInterface
51 * Return the Pepper instance referred to by 'name'. Will return a pointer
52 * to the interface, or NULL if not found or not available.
54 const void* PSGetInterface(const char *name);
56 EXTERN_C_END
58 #endif /* PPAPI_SIMPLE_PS_H_ */