The Pepper Plug-in API (PPAPI) lets Native Client modules communicate with the hosting browser and access system-level functions in a safe and portable way. For a brief description of Pepper see the Technical Overview.
Pepper has both a C API and a C++ API. These APIs are generally divided into two parts: functions that are implemented in the browser and that you call from your Native Client module, and functions that the browser invokes and that you must implement in your Native Client module.
To develop a Native Client module using a specific version of Pepper, you must
download and use the corresponding SDK bundle. For example, to use
Pepper 30 you must download and use the
pepper_30 SDK bundle.
Native Client modules compiled using a particular Pepper version will generally work in corresponding versions of Chrome and higher.
For example, a module compiled using Pepper 30 will work in Chrome 30 and higher.
The reference documentation on this site includes both the C and C++ APIs for the most recent versions of Pepper. Before you read the reference documentation, we recommend that you read the Technical Overview and the Getting Started Tutorial.
Pepper C API
The lowest level of Pepper is the C API, declared in the header files in
include/ppapi/c. The C API represents the lowest
level binary interface between a Native Client module and the browser.
C API Groupings
The C API is divided into three sub-groupings, indicated by the prefixes
- The prefix
PP, used to help prevent naming collisions, stands for "Pepper Plug-in" (also known as the Native Client module). Common structs have a
PP_prefix, such as
PP_Rectfor describing a rectangle. There are also several utility functions in the
- 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_Coreinterface is a collection of core interfaces implemented by the browser and accessed by the Native Client module.
- Interfaces implemented by the Native Client module (plug-in) are prefixed by
PPP, where "
P" stands for plug-in. For example, the
PPP_InputEventinterface defines how a Native Client module reacts to input events such as a key press. You implement
PPPinterfaces in your Native Client module.
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.
The Native Client module also calls
PPB_Instance functions in the browser to manipulate
Navigating the C API reference
Click the links below "Pepper C API" in the left navbar to view the C API by construct (all interfaces, structures, functions, etc.),
by functional area (all APIs pertaining to audio, 2D graphics, 3D graphics, etc.), or by file (all APIs in