1 <!DOCTYPE html> 2 [include "/chrome/nativeclient/_local_variables.ezt"] [# this file should be at root of your document hierarchy ] 3 [define section]docs[end] [# this should be "docs" if the file lives in the "Docs" section (top nav)] 4 [# Otherwise, it's "home," "articles," "download," or "terms" ] 5 [define page_title]Pepper C API[end] [# this is the title for only this page ] 6 7 [include "/_boilerplate_header.ezt"] 8 [verbatim] 9 10 <p>This reference documentation describes the C version of the Pepper API, a cross-platform, open-source API for creating Native Client modules. Some interfaces are already implemented in any Native Client-aware browser and certain portions of the API will be implemented by you in the Native Client module. This page has the following contents: 11 </p> 12 13 <ol class="toc"> 14 <li><a href="#reading">Before you start</a></li> 15 <li><a href="#pepperc">Pepper C reference</a></li> 16 <li><a href="#navigate">Navigating the Pepper C reference</a></li> 17 </ol> 18 19 <h2 id="reading">Before you start</h2> 20 21 <p>We recommend that you read the following documents prior to reading the API documentation:</p> 22 23 <ul class="nolist"> 24 <li><a href="/chrome/nativeclient/docs/technical_overview.html">Technical Overview</a></li> 25 <li><a href="/chrome/nativeclient/docs/tutorial.html">Tutorial: Getting Started</a></li> 26 <li><a href="/chrome/nativeclient/docs/developers_guide.html">Developer's Guide</a></li> 27 </ul> 28 29 <h2 id="pepperc">Pepper C reference</h2> 30 31 <p>The lowest level of the Pepper API is the C API, declared in the header files in ppapi/c. The C API represents the lowest level binary interface between a Native Client module and the browser.</p> 32 33 <h3>C API Groupings</h3> 34 35 <p>The C API is divided into three sub-groupings, indicated by the prefixes PP, PPB, and PPP.</p> 36 37 <p>The prefix "PP," used to help prevent naming collisions, stands for "Pepper Plugin" also known as the "Native Client module." Common structs have a PP_ prefix, such as PP_Var for representing a JavaScript variable or PP_Rect for describing a rectangle. There are also several PP_ utility functions in the PP_ grouping.</p> 38 39 <p>Interfaces in the C API are named according to whether they are implemented by the browser or by you, the web app developer, in the Native Client module. Interfaces implemented by the browser are prefixed by "PPB" where "B" stands for browser. For example, the PPB_Core interface is a collection of core interfaces implemented by the browser and accessed by the Native Client module. As a web app developer, you need only know how to invoke PPB_ interfaces in your Native Client module.</p> 40 41 <p>Interfaces implemented by the Native Client module (Plugin) are prefixed by "PPP" where "P" stands for plugin. For example, the PPP_Class interface provides an object accessible to JavaScript in the browser. You will implement these interfaces in your Native Client module.</p> 42 43 <p>In some cases, there might be both a browser and a Native Client module interface for the same concept. For example, the PPP_Instance interface represents the Native Client module functions that the browser calls related to a certain instance. This interface is used to deliver mouse click events to the Native Client module. The Native Client module will call PPB_Instance in the browser to allow the Native Client module to manipulate its instance.</p> 44 45 <h2 id="navigate">Navigating the Pepper C reference</h2> 46 47 <p>Click on any of the links below "Pepper C API" on the left to view the API by construct (all interfaces, structures, functions, and so on), functional area (all APIs pertaining to audio, 2D graphics, 3D graphics, and so on), or file (all APIs in <code>pp_bool.h</code>, <code>ppp.h</code>, <code>ppb_var.h</code>, and so on).</p> 48 49 [endverbatim] 50 [include "/_boilerplate_footer.ezt"] 51