Per P0 reqs add launch points + make download obvious. Also misc copy edits.
BUG=none R= mkearney@chromium.org, smain@chromium.org, binji@chromium.org TEST=none NOTRY=true (documentation only change) Priority list copied here for reference: P1 But written by different engineers, very uneven quality and voice. P2 Some documentation could be expanded. P0 The ramp-in for new users could be improved. P0 The landing page isn't "cool", it doesn't make developers want to jump in and use it. Could we have a more github-like thing that gets people started quickly? Could we have a narrative intro? We just bought the pna.cl domain, we should use it! P3 We think it's pretty important to keep the deep-dive in there (e.g. sandbox internals, bitcode reference). Review URL: https://codereview.chromium.org/476793002 Cr-Commit-Position: refs/heads/master@{#291696}
This commit is contained in:
chrome/common/extensions/docs/templates/json
native_client_sdk
doc_generated
_static
c-api.htmlcommunity
security-contest
devguide
coding
application-structure.htmlaudio.htmlfile-io.htmlmessage-system.htmlprogress-events.htmlurl-loading.htmlview-focus-input-events.html
devcycle
tutorial
pepper_stable
sdk
sitemap.htmlsrc
doc
_static
css
community
security-contest
devguide
coding
application-structure.rstaudio.rstfile-io.rstmessage-system.rstprogress-events.rsturl-loading.rstview-focus-input-events.rst
devcycle
tutorial
sdk
sitemap.rst@ -812,35 +812,15 @@
|
||||
},
|
||||
{
|
||||
"title": "Pepper API Reference",
|
||||
"href": "/native-client/pepper_stable/index",
|
||||
"href": "/native-client/c-api",
|
||||
"items": [
|
||||
{
|
||||
"title": "Pepper C Interfaces",
|
||||
"href": "/native-client/pepper_stable/c/group___interfaces"
|
||||
"title": "Pepper C API",
|
||||
"href": "/native-client/c-api"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C Structures",
|
||||
"href": "/native-client/pepper_stable/c/group___structs"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C Functions",
|
||||
"href": "/native-client/pepper_stable/c/group___functions"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C Enums",
|
||||
"href": "/native-client/pepper_stable/c/group___enums"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C Typedefs",
|
||||
"href": "/native-client/pepper_stable/c/group___typedefs"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C Macros",
|
||||
"href": "/native-client/pepper_stable/c/global_defs"
|
||||
},
|
||||
{
|
||||
"title": "Pepper C++ Classes",
|
||||
"href": "/native-client/pepper_stable/cpp/inherits"
|
||||
"title": "Pepper C++ API",
|
||||
"href": "/native-client/cpp-api"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -81,6 +81,23 @@ blockquote.indent-only {font-style: normal; color: #000; }
|
||||
display: block;
|
||||
margin: 1em auto 0;
|
||||
}
|
||||
#home .left-side {
|
||||
float: left;
|
||||
width: 54%;
|
||||
background-color: #FFF;
|
||||
}
|
||||
#home .left-side-inner {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#home .pull-quote {
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid;
|
||||
border-top: 1px solid;
|
||||
font-size: 14px;
|
||||
float: right;
|
||||
margin: .5em 2em 2em 2em;
|
||||
padding: 1em;
|
||||
}
|
||||
#home .right-side {
|
||||
float: right;
|
||||
width: 54%;
|
||||
|
@ -13,11 +13,11 @@
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #333333 } /* Generic.Output */
|
||||
.highlight .go { color: #303030 } /* Generic.Output */
|
||||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #0044DD } /* Generic.Traceback */
|
||||
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||
|
164
native_client_sdk/doc_generated/c-api.html
Normal file
164
native_client_sdk/doc_generated/c-api.html
Normal file
@ -0,0 +1,164 @@
|
||||
{{+bindTo:partials.standard_nacl_article}}
|
||||
|
||||
<span class="target" id="pepper-stable-c-index"><span id="c-api"></span></span><section id="pepper-c-api-reference-stable">
|
||||
<h1 id="pepper-c-api-reference-stable">Pepper C API Reference (Stable)</h1>
|
||||
<p>This page lists the C API for Pepper 35. Apps that use this API can
|
||||
run in Chrome 35 or higher.</p>
|
||||
<h2 id="id1"><a class="reference external" href="group___interfaces.html">Interfaces</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="struct_p_p_b___audio__1__1.html">PPB_Audio</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___audio_buffer__0__1.html">PPB_AudioBuffer</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___audio_config__1__1.html">PPB_AudioConfig</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___console__1__0.html">PPB_Console</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___core__1__0.html">PPB_Core</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_i_o__1__1.html">PPB_FileIO</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_mapping__0__1.html">PPB_FileMapping</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_ref__1__2.html">PPB_FileRef</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_system__1__0.html">PPB_FileSystem</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___fullscreen__1__0.html">PPB_Fullscreen</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___gamepad__1__0.html">PPB_Gamepad</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___graphics2_d__1__1.html">PPB_Graphics2D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___graphics3_d__1__0.html">PPB_Graphics3D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___host_resolver__1__0.html">PPB_HostResolver</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___i_m_e_input_event__1__0.html">PPB_IMEInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___image_data__1__0.html">PPB_ImageData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___input_event__1__0.html">PPB_InputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___instance__1__0.html">PPB_Instance</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___keyboard_input_event__1__2.html">PPB_KeyboardInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___media_stream_audio_track__0__1.html">PPB_MediaStreamAudioTrack</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___media_stream_video_track__0__1.html">PPB_MediaStreamVideoTrack</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___message_loop__1__0.html">PPB_MessageLoop</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___messaging__1__0.html">PPB_Messaging</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_cursor__1__0.html">PPB_MouseCursor</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_input_event__1__1.html">PPB_MouseInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_lock__1__0.html">PPB_MouseLock</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___net_address__1__0.html">PPB_NetAddress</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_list__1__0.html">PPB_NetworkList</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_monitor__1__0.html">PPB_NetworkMonitor</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_proxy__1__0.html">PPB_NetworkProxy</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___t_c_p_socket__1__1.html">PPB_TCPSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___text_input_controller__1__0.html">PPB_TextInputController</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___touch_input_event__1__0.html">PPB_TouchInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_d_p_socket__1__0.html">PPB_UDPSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_loader__1__0.html">PPB_URLLoader</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_request_info__1__0.html">PPB_URLRequestInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_response_info__1__0.html">PPB_URLResponseInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var__1__2.html">PPB_Var</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_array__1__0.html">PPB_VarArray</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_array_buffer__1__0.html">PPB_VarArrayBuffer</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_dictionary__1__0.html">PPB_VarDictionary</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___video_frame__0__1.html">PPB_VideoFrame</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___view__1__1.html">PPB_View</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___web_socket__1__0.html">PPB_WebSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___wheel_input_event__1__0.html">PPB_WheelInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___graphics3_d__1__0.html">PPP_Graphics3D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___input_event__0__1.html">PPP_InputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___instance__1__1.html">PPP_Instance</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___messaging__1__0.html">PPP_Messaging</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___mouse_lock__1__0.html">PPP_MouseLock</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<h2 id="id2"><a class="reference external" href="group___structs.html">Structures</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="struct_p_p___array_output.html">PP_ArrayOutput</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___directory_entry.html">PP_DirectoryEntry</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___file_info.html">PP_FileInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___float_point.html">PP_FloatPoint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___gamepad_sample_data.html">PP_GamepadSampleData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___gamepads_sample_data.html">PP_GamepadsSampleData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___host_resolver___hint.html">PP_HostResolver_Hint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___image_data_desc.html">PP_ImageDataDesc</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___character.html">PP_InputEvent_Character</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___key.html">PP_InputEvent_Key</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___mouse.html">PP_InputEvent_Mouse</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___wheel.html">PP_InputEvent_Wheel</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___point.html">PP_Point</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___rect.html">PP_Rect</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___size.html">PP_Size</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___touch_point.html">PP_TouchPoint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___var.html">PP_Var</a></li>
|
||||
<li><a class="reference external" href="union_p_p___var_value.html">PP_VarValue</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<h2 id="id3"><a class="reference external" href="group___functions.html">Functions</a></h2>
|
||||
<h2 id="id4"><a class="reference external" href="group___enums.html">Enums</a></h2>
|
||||
<h2 id="id5"><a class="reference external" href="group___typedefs.html">Typedefs</a></h2>
|
||||
<h2 id="id6"><a class="reference external" href="globals_defs.html">Macros</a></h2>
|
||||
<h2 id="files">Files</h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="pp__array__output_8h.html">pp_array_output.h</a></li>
|
||||
<li><a class="reference external" href="pp__bool_8h.html">pp_bool.h</a></li>
|
||||
<li><a class="reference external" href="pp__completion__callback_8h.html">pp_completion_callback.h</a></li>
|
||||
<li><a class="reference external" href="pp__directory__entry_8h.html">pp_directory_entry.h</a></li>
|
||||
<li><a class="reference external" href="pp__errors_8h.html">pp_errors.h</a></li>
|
||||
<li><a class="reference external" href="pp__file__info_8h.html">pp_file_info.h</a></li>
|
||||
<li><a class="reference external" href="pp__graphics__3d_8h.html">pp_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="pp__input__event_8h.html">pp_input_event.h</a></li>
|
||||
<li><a class="reference external" href="pp__instance_8h.html">pp_instance.h</a></li>
|
||||
<li><a class="reference external" href="pp__module_8h.html">pp_module.h</a></li>
|
||||
<li><a class="reference external" href="pp__point_8h.html">pp_point.h</a></li>
|
||||
<li><a class="reference external" href="pp__rect_8h.html">pp_rect.h</a></li>
|
||||
<li><a class="reference external" href="pp__resource_8h.html">pp_resource.h</a></li>
|
||||
<li><a class="reference external" href="pp__size_8h.html">pp_size.h</a></li>
|
||||
<li><a class="reference external" href="pp__stdint_8h.html">pp_stdint.h</a></li>
|
||||
<li><a class="reference external" href="pp__time_8h.html">pp_time.h</a></li>
|
||||
<li><a class="reference external" href="pp__touch__point_8h.html">pp_touch_point.h</a></li>
|
||||
<li><a class="reference external" href="pp__var_8h.html">pp_var.h</a></li>
|
||||
<li><a class="reference external" href="ppb_8h.html">ppb.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio_8h.html">ppb_audio.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio__buffer_8h.html">ppb_audio_buffer.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio__config_8h.html">ppb_audio_config.h</a></li>
|
||||
<li><a class="reference external" href="ppb__console_8h.html">ppb_console.h</a></li>
|
||||
<li><a class="reference external" href="ppb__core_8h.html">ppb_core.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__io_8h.html">ppb_file_io.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__mapping_8h.html">ppb_file_mapping.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__ref_8h.html">ppb_file_ref.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__system_8h.html">ppb_file_system.h</a></li>
|
||||
<li><a class="reference external" href="ppb__fullscreen_8h.html">ppb_fullscreen.h</a></li>
|
||||
<li><a class="reference external" href="ppb__gamepad_8h.html">ppb_gamepad.h</a></li>
|
||||
<li><a class="reference external" href="ppb__graphics__2d_8h.html">ppb_graphics_2d.h</a></li>
|
||||
<li><a class="reference external" href="ppb__graphics__3d_8h.html">ppb_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="ppb__host__resolver_8h.html">ppb_host_resolver.h</a></li>
|
||||
<li><a class="reference external" href="ppb__image__data_8h.html">ppb_image_data.h</a></li>
|
||||
<li><a class="reference external" href="ppb__input__event_8h.html">ppb_input_event.h</a></li>
|
||||
<li><a class="reference external" href="ppb__instance_8h.html">ppb_instance.h</a></li>
|
||||
<li><a class="reference external" href="ppb__media__stream__audio__track_8h.html">ppb_media_stream_audio_track.h</a></li>
|
||||
<li><a class="reference external" href="ppb__media__stream__video__track_8h.html">ppb_media_stream_video_track.h</a></li>
|
||||
<li><a class="reference external" href="ppb__message__loop_8h.html">ppb_message_loop.h</a></li>
|
||||
<li><a class="reference external" href="ppb__messaging_8h.html">ppb_messaging.h</a></li>
|
||||
<li><a class="reference external" href="ppb__mouse__cursor_8h.html">ppb_mouse_cursor.h</a></li>
|
||||
<li><a class="reference external" href="ppb__mouse__lock_8h.html">ppb_mouse_lock.h</a></li>
|
||||
<li><a class="reference external" href="ppb__net__address_8h.html">ppb_net_address.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__list_8h.html">ppb_network_list.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__monitor_8h.html">ppb_network_monitor.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__proxy_8h.html">ppb_network_proxy.h</a></li>
|
||||
<li><a class="reference external" href="ppb__tcp__socket_8h.html">ppb_tcp_socket.h</a></li>
|
||||
<li><a class="reference external" href="ppb__text__input__controller_8h.html">ppb_text_input_controller.h</a></li>
|
||||
<li><a class="reference external" href="ppb__udp__socket_8h.html">ppb_udp_socket.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__loader_8h.html">ppb_url_loader.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__request__info_8h.html">ppb_url_request_info.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__response__info_8h.html">ppb_url_response_info.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var_8h.html">ppb_var.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__array_8h.html">ppb_var_array.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__array__buffer_8h.html">ppb_var_array_buffer.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__dictionary_8h.html">ppb_var_dictionary.h</a></li>
|
||||
<li><a class="reference external" href="ppb__video__frame_8h.html">ppb_video_frame.h</a></li>
|
||||
<li><a class="reference external" href="ppb__view_8h.html">ppb_view.h</a></li>
|
||||
<li><a class="reference external" href="ppb__websocket_8h.html">ppb_websocket.h</a></li>
|
||||
<li><a class="reference external" href="ppp_8h.html">ppp.h</a></li>
|
||||
<li><a class="reference external" href="ppp__graphics__3d_8h.html">ppp_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="ppp__input__event_8h.html">ppp_input_event.h</a></li>
|
||||
<li><a class="reference external" href="ppp__instance_8h.html">ppp_instance.h</a></li>
|
||||
<li><a class="reference external" href="ppp__messaging_8h.html">ppp_messaging.h</a></li>
|
||||
<li><a class="reference external" href="ppp__mouse__lock_8h.html">ppp_mouse_lock.h</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
@ -55,7 +55,7 @@ evaluated as a winning exploit by the Judges.</p>
|
||||
will be asked to identify security Exploits in Google’s Native
|
||||
Client Software and enter those Exploits on Google’s <a class="reference external" href="http://code.google.com/p/nativeclient/issues/list">Native Client
|
||||
Issue Tracker</a>
|
||||
web site using the “Security Contest Template.” At this point, the
|
||||
website using the “Security Contest Template.” At this point, the
|
||||
Exploit will become an Issue and will no longer be able to be
|
||||
identified by another Participant. Google will then verify that the
|
||||
Issue is reproducible. If so, that Issue will become a Verified
|
||||
@ -714,14 +714,14 @@ applicable local law in Participant’s country of residence.</p>
|
||||
<p>Google further reserves the right to disqualify any Participant
|
||||
who tampers with the submission process or any other part of the
|
||||
Contest. Any attempt by a Participant to deliberately damage any
|
||||
web site or undermine the legitimate operation of the Contest is
|
||||
website or undermine the legitimate operation of the Contest is
|
||||
a violation of criminal and civil laws and should such an
|
||||
attempt be made, Google reserves the right to seek damages from
|
||||
any such Participant to the fullest extent of the applicable
|
||||
law.</p>
|
||||
</li>
|
||||
<li><p class="first">Internet Disclaimer. Google is not responsible for any
|
||||
malfunction of the entire Contest, the web site displaying the
|
||||
malfunction of the entire Contest, the website displaying the
|
||||
Contest terms and entry information, or any late, lost, damaged,
|
||||
misdirected, incomplete, illegible, undeliverable, or destroyed
|
||||
Exploits, Issues or Summaries due to system errors, failed,
|
||||
@ -731,7 +731,7 @@ kind, lost or unavailable network connections, typographical or
|
||||
system/human errors and failures, technical malfunction(s) of
|
||||
any telephone network or lines, cable connections, satellite
|
||||
transmissions, servers or providers, or computer equipment,
|
||||
traffic congestion on the Internet or at the web site displaying
|
||||
traffic congestion on the Internet or at the website displaying
|
||||
the Contest or any combination thereof, including other
|
||||
telecommunication, cable, digital or satellite malfunctions
|
||||
which may limit an entrant’s ability to participate. Google is
|
||||
|
128
native_client_sdk/doc_generated/cpp-api.html
Normal file
128
native_client_sdk/doc_generated/cpp-api.html
Normal file
@ -0,0 +1,128 @@
|
||||
{{+bindTo:partials.standard_nacl_article}}
|
||||
|
||||
<span class="target" id="pepper-stable-cpp-index"><span id="cpp-api"></span></span><section id="pepper-c-api-reference-stable">
|
||||
<h1 id="pepper-c-api-reference-stable">Pepper C++ API Reference (Stable)</h1>
|
||||
<p>This page lists the C++ API for Pepper 35. Apps that use this API can
|
||||
run in Chrome 35 or higher.</p>
|
||||
<h2 id="id1"><a class="reference external" href="inherits.html">Classes</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="classpp_1_1_audio.html">Audio</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_audio_buffer.html">AudioBuffer</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_audio_config.html">AudioConfig</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback.html">CompletionCallback</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback_factory.html">CompletionCallbackFactory</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_core.html">Core</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_directory_entry.html">DirectoryEntry</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_i_o.html">FileIO</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_ref.html">FileRef</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_system.html">FileSystem</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_float_point.html">FloatPoint</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_fullscreen.html">Fullscreen</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics2_d.html">Graphics2D</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics3_d.html">Graphics3D</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics3_d_client.html">Graphics3DClient</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_host_resolver.html">HostResolver</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_i_m_e_input_event.html">IMEInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_image_data.html">ImageData</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_input_event.html">InputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_instance.html">Instance</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_instance_handle.html">InstanceHandle</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_keyboard_input_event.html">KeyboardInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_media_stream_audio_track.html">MediaStreamAudioTrack</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_media_stream_video_track.html">MediaStreamVideoTrack</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_message_loop.html">MessageLoop</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_module.html">Module</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_cursor.html">MouseCursor</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_input_event.html">MouseInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_lock.html">MouseLock</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_net_address.html">NetAddress</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_list.html">NetworkList</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_monitor.html">NetworkMonitor</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_proxy.html">NetworkProxy</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_point.html">Point</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_rect.html">Rect</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_resource.html">Resource</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_size.html">Size</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_t_c_p_socket.html">TCPSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_text_input_controller.html">TextInputController</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_touch_input_event.html">TouchInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_touch_point.html">TouchPoint</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_d_p_socket.html">UDPSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_loader.html">URLLoader</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_request_info.html">URLRequestInfo</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_response_info.html">URLResponseInfo</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var.html">Var</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_1_1_out_exception.html">Var11OutException</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_array.html">VarArray</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_array_buffer.html">VarArrayBuffer</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_dictionary.html">VarDictionary</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_video_frame.html">VideoFrame</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_view.html">View</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_web_socket.html">WebSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_wheel_input_event.html">WheelInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1ext_1_1_ext_completion_callback_with_output.html">Ext::ExtCompletionCallbackWithOutput</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1internal_1_1_completion_callback_with_output_base.html">Internal::CompletionCallbackWithOutputBase</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1internal_1_1_directory_entry_array_output_adapter_with_storage.html">Internal::DirectoryEntryArrayOutputAdapterWithStorage</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<h2 id="files">Files</h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="audio_8h.html">audio.h</a></li>
|
||||
<li><a class="reference external" href="audio__buffer_8h.html">audio_buffer.h</a></li>
|
||||
<li><a class="reference external" href="audio__config_8h.html">audio_config.h</a></li>
|
||||
<li><a class="reference external" href="completion__callback_8h.html">completion_callback.h</a></li>
|
||||
<li><a class="reference external" href="completion__callback__factory_8h.html">completion_callback_factory.h</a></li>
|
||||
<li><a class="reference external" href="core_8h.html">core.h</a></li>
|
||||
<li><a class="reference external" href="directory__entry_8h.html">directory_entry.h</a></li>
|
||||
<li><a class="reference external" href="file__io_8h.html">file_io.h</a></li>
|
||||
<li><a class="reference external" href="file__ref_8h.html">file_ref.h</a></li>
|
||||
<li><a class="reference external" href="file__system_8h.html">file_system.h</a></li>
|
||||
<li><a class="reference external" href="fullscreen_8h.html">fullscreen.h</a></li>
|
||||
<li><a class="reference external" href="graphics__2d_8h.html">graphics_2d.h</a></li>
|
||||
<li><a class="reference external" href="graphics__3d_8h.html">graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="graphics__3d__client_8h.html">graphics_3d_client.h</a></li>
|
||||
<li><a class="reference external" href="host__resolver_8h.html">host_resolver.h</a></li>
|
||||
<li><a class="reference external" href="image__data_8h.html">image_data.h</a></li>
|
||||
<li><a class="reference external" href="input__event_8h.html">input_event.h</a></li>
|
||||
<li><a class="reference external" href="instance_8h.html">instance.h</a></li>
|
||||
<li><a class="reference external" href="instance__handle_8h.html">instance_handle.h</a></li>
|
||||
<li><a class="reference external" href="logging_8h.html">logging.h</a></li>
|
||||
<li><a class="reference external" href="media__stream__audio__track_8h.html">media_stream_audio_track.h</a></li>
|
||||
<li><a class="reference external" href="media__stream__video__track_8h.html">media_stream_video_track.h</a></li>
|
||||
<li><a class="reference external" href="message__loop_8h.html">message_loop.h</a></li>
|
||||
<li><a class="reference external" href="module_8h.html">module.h</a></li>
|
||||
<li><a class="reference external" href="module__embedder_8h.html">module_embedder.h</a></li>
|
||||
<li><a class="reference external" href="module__impl_8h.html">module_impl.h</a></li>
|
||||
<li><a class="reference external" href="mouse__cursor_8h.html">mouse_cursor.h</a></li>
|
||||
<li><a class="reference external" href="mouse__lock_8h.html">mouse_lock.h</a></li>
|
||||
<li><a class="reference external" href="net__address_8h.html">net_address.h</a></li>
|
||||
<li><a class="reference external" href="network__list_8h.html">network_list.h</a></li>
|
||||
<li><a class="reference external" href="network__monitor_8h.html">network_monitor.h</a></li>
|
||||
<li><a class="reference external" href="network__proxy_8h.html">network_proxy.h</a></li>
|
||||
<li><a class="reference external" href="pass__ref_8h.html">pass_ref.h</a></li>
|
||||
<li><a class="reference external" href="point_8h.html">point.h</a></li>
|
||||
<li><a class="reference external" href="rect_8h.html">rect.h</a></li>
|
||||
<li><a class="reference external" href="resource_8h.html">resource.h</a></li>
|
||||
<li><a class="reference external" href="size_8h.html">size.h</a></li>
|
||||
<li><a class="reference external" href="tcp__socket_8h.html">tcp_socket.h</a></li>
|
||||
<li><a class="reference external" href="text__input__controller_8h.html">text_input_controller.h</a></li>
|
||||
<li><a class="reference external" href="touch__point_8h.html">touch_point.h</a></li>
|
||||
<li><a class="reference external" href="udp__socket_8h.html">udp_socket.h</a></li>
|
||||
<li><a class="reference external" href="url__loader_8h.html">url_loader.h</a></li>
|
||||
<li><a class="reference external" href="url__request__info_8h.html">url_request_info.h</a></li>
|
||||
<li><a class="reference external" href="url__response__info_8h.html">url_response_info.h</a></li>
|
||||
<li><a class="reference external" href="var_8h.html">var.h</a></li>
|
||||
<li><a class="reference external" href="var__array_8h.html">var_array.h</a></li>
|
||||
<li><a class="reference external" href="var__array__buffer_8h.html">var_array_buffer.h</a></li>
|
||||
<li><a class="reference external" href="var__dictionary_8h.html">var_dictionary.h</a></li>
|
||||
<li><a class="reference external" href="video__frame_8h.html">video_frame.h</a></li>
|
||||
<li><a class="reference external" href="view_8h.html">view.h</a></li>
|
||||
<li><a class="reference external" href="websocket_8h.html">websocket.h</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
@ -11,8 +11,8 @@
|
||||
<li><a class="reference internal" href="#native-client-modules-a-closer-look" id="id5">Native Client modules: A closer look</a></li>
|
||||
</ul>
|
||||
|
||||
</div><p>This chapter of the Developer’s Guide describes the general structure of a
|
||||
Native Client application. The chapter assumes you are familiar with the
|
||||
</div><p>This section of the Developer’s Guide describes the general structure of a
|
||||
Native Client application. The section assumes you are familiar with the
|
||||
material presented in the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a>.</p>
|
||||
<aside class="note">
|
||||
The “Hello, World” example is used here to illustrate basic
|
||||
@ -204,7 +204,7 @@ issue a <code>crash</code> event
|
||||
<a class="reference internal" href="/native-client/devguide/coding/progress-events.html"><em>which can be handled in Javascript</em></a>.</p>
|
||||
<p>While the <code>CreateModule()</code> factory function, the <code>Module</code> class, and the
|
||||
<code>Instance</code> class are required for a Native Client application, the code
|
||||
samples shown above don’t actually do anything. Subsequent chapters in the
|
||||
samples shown above don’t actually do anything. Subsequent sections in the
|
||||
Developer’s Guide build on these code samples and add more interesting
|
||||
functionality.</p>
|
||||
</section>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<li><a class="reference internal" href="#starting-and-stopping-playback" id="id12">Starting and stopping playback</a></li>
|
||||
</ul>
|
||||
|
||||
</div><p>This chapter describes how to use the Pepper audio API to play an audio
|
||||
</div><p>This section describes how to use the Pepper audio API to play an audio
|
||||
stream. The Pepper audio API provides a low-level means of playing a stream of
|
||||
audio samples generated by a Native Client module. The API generally works as
|
||||
follows: A Native Client module creates an audio resource that represents an
|
||||
@ -32,7 +32,7 @@ audio stream, and tells the browser to start or stop playing the audio
|
||||
resource. The browser calls a function in the Native Client module to fill a
|
||||
buffer with audio samples every time it needs data to play from the audio
|
||||
stream.</p>
|
||||
<p>The code examples in this chapter describe a simple Native Client module that
|
||||
<p>The code examples in this section describe a simple Native Client module that
|
||||
generates audio samples using a sine wave with a frequency of 440 Hz. The module
|
||||
starts playing the audio samples as soon as it is loaded into the browser. For a
|
||||
slightly more sophisticated example, see the <code>audio</code> example (source code in
|
||||
|
@ -36,7 +36,7 @@
|
||||
</ul>
|
||||
|
||||
</div><h2 id="introduction">Introduction</h2>
|
||||
<p>This chapter describes how to use the <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_file_i_o">FileIO API</a> to read and write
|
||||
<p>This section describes how to use the <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_file_i_o">FileIO API</a> to read and write
|
||||
files using a local secure data store.</p>
|
||||
<p>You might use the File IO API with the URL Loading APIs to create an overall
|
||||
data download and caching solution for your NaCl applications. For example:</p>
|
||||
@ -50,7 +50,7 @@ file from the server.</li>
|
||||
<li>Load the file into memory using the File IO API when needed by your
|
||||
application.</li>
|
||||
</ol>
|
||||
<p>The example discussed in this chapter is included in the SDK in the directory
|
||||
<p>The example discussed in this section is included in the SDK in the directory
|
||||
<code>examples/api/file_io</code>.</p>
|
||||
<h2 id="reference-information">Reference information</h2>
|
||||
<p>For reference information related to FileIO, see the following documentation:</p>
|
||||
|
@ -31,13 +31,13 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><p>This chapter describes the messaging system used to communicate between the
|
||||
</div><p>This section describes the messaging system used to communicate between the
|
||||
JavaScript code and the Native Client module’s C or C++ code in a
|
||||
Native Client application. It introduces the concept of asynchronous
|
||||
programming and the basic steps required to set up a Native Client module
|
||||
that sends messages to and receive messages from JavaScript. This chapter
|
||||
that sends messages to and receive messages from JavaScript. This section
|
||||
assumes you are familiar with the material presented in the
|
||||
<a class="reference internal" href="/native-client/devguide/coding/application-structure.html"><em>Application Structure</em></a> chapter.</p>
|
||||
<a class="reference internal" href="/native-client/devguide/coding/application-structure.html"><em>Application Structure</em></a> section.</p>
|
||||
<aside class="note">
|
||||
The “Hello, World” example for getting started with NaCl is used here to
|
||||
illustrate basic programming techniques. You can find this code in
|
||||
|
@ -14,9 +14,9 @@
|
||||
|
||||
</div><p>There are five types of events that developers can respond to in Native Client:
|
||||
progress, message, view change, focus, and input events (each described in the
|
||||
glossary below). This chapter describes how to monitor progress events (events
|
||||
glossary below). This section describes how to monitor progress events (events
|
||||
that occur during the loading and execution of a Native Client module). This
|
||||
chapter assumes you are familiar with the material presented in the
|
||||
section assumes you are familiar with the material presented in the
|
||||
<a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a>.</p>
|
||||
<aside class="note">
|
||||
The load_progress example illustrates progress event handling. You can find
|
||||
|
@ -22,9 +22,9 @@
|
||||
</ul>
|
||||
|
||||
</div><h2 id="introduction">Introduction</h2>
|
||||
<p>This chapter describes how to use the <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_u_r_l_loader">URLLoader API</a> to load resources
|
||||
<p>This section describes how to use the <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_u_r_l_loader">URLLoader API</a> to load resources
|
||||
such as images and sound files from a server into your application.</p>
|
||||
<p>The example discussed in this chapter is included in the SDK in the directory
|
||||
<p>The example discussed in this section is included in the SDK in the directory
|
||||
<code>examples/api/url_loader</code>.</p>
|
||||
<h2 id="reference-information">Reference information</h2>
|
||||
<p>For reference information related to loading data from URLs, see the
|
||||
@ -42,7 +42,7 @@ following documentation:</p>
|
||||
caches your application’s HTML file, manifest file (.nmf), and Native Client
|
||||
module (.pexe or .nexe). If your application needs additional assets, such as
|
||||
images and sound files, it must explicitly load those assets. You can use the
|
||||
Pepper APIs described in this chapter to load assets from a URL into your
|
||||
Pepper APIs described in this section to load assets from a URL into your
|
||||
application.</p>
|
||||
<p>After you’ve loaded assets into your application, Chrome will cache those
|
||||
assets. To avoid being at the whim of the Chrome cache, however, you may want
|
||||
|
@ -20,10 +20,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><p>This chapter describes view change, focus, and input event handling for a
|
||||
Native Client module. The chapter assumes you are familiar with the
|
||||
</div><p>This section describes view change, focus, and input event handling for a
|
||||
Native Client module. The section assumes you are familiar with the
|
||||
material presented in the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a>.</p>
|
||||
<p>There are two examples used in this chapter to illustrate basic
|
||||
<p>There are two examples used in this section to illustrate basic
|
||||
programming techniques. The <code>input_events</code> example is used to
|
||||
illustrate how your module can react to keyboard and mouse input
|
||||
event. The <code>mouse_lock</code> example is used to illustrate how your module
|
||||
|
@ -372,7 +372,7 @@ etc.)</li>
|
||||
<li>Upload the application files (.html, .nmf, .nexe, .css, .js, image files,
|
||||
etc.) to the server on which the application is being hosted.</li>
|
||||
<li>Use <a class="reference external" href="http://www.google.com/webmasters/tools/">Google Webmaster Tools</a> to
|
||||
verify ownership of the web site on which the application runs.</li>
|
||||
verify ownership of the website on which the application runs.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Log in to the <a class="reference external" href="https://chrome.google.com/webstore/developer/dashboard">Chrome Web Store Developer Dashboard</a>.<ul class="small-gap">
|
||||
|
@ -27,19 +27,19 @@
|
||||
Client (PNaCl). This is a client-side application that uses HTML, JavaScript and
|
||||
a Native Client module written in C++. The PNaCl toolchain is used to enable
|
||||
running the Native Client module directly from a web page.</p>
|
||||
<p>It’s recommended to read the <a class="reference internal" href="/native-client/overview.html"><em>Native Client Technical Overview</em></a> prior to going through this tutorial.</p>
|
||||
<p>It’s recommended that you read the <a class="reference internal" href="/native-client/overview.html"><em>Native Client Technical Overview</em></a> prior to going through this tutorial.</p>
|
||||
<h3 id="what-the-application-in-this-tutorial-does">What the application in this tutorial does</h3>
|
||||
<p>The application in this tutorial shows how to load a Native Client module in a
|
||||
web page, and how to send messages between JavaScript and the C++ code in the
|
||||
Native Client module. In this simple application, the JavaScript code in the web
|
||||
page sends a <code>'hello'</code> message to the Native Client module. When the Native
|
||||
Client module receives a message, it checks whether the message is equal to the
|
||||
string <code>'hello'</code>. If it is, the Native Client module returns a message saying
|
||||
<code>'hello from NaCl'</code>. A JavaScript alert panel displays the message received
|
||||
from the Native Client module.</p>
|
||||
web page, and how to send messages between JavaScript and the Native Client
|
||||
module. In this simple application, the JavaScript sends a <code>'hello'</code> message
|
||||
to the Native Client module. When the Native Client module receives a message,
|
||||
it checks whether the message is equal to the string <code>'hello'</code>. If it is, the
|
||||
Native Client module returns a message saying <code>'hello from NaCl'</code>. A
|
||||
JavaScript alert panel displays the message received from the Native Client
|
||||
module.</p>
|
||||
<h3 id="communication-between-javascript-and-native-client-modules">Communication between JavaScript and Native Client modules</h3>
|
||||
<p>The Native Client programming model supports bidirectional communication between
|
||||
JavaScript and the Native Client module (C/C++ code). Both sides can initiate
|
||||
JavaScript and the Native Client module. Both sides can initiate
|
||||
and respond to messages. In all cases, the communication is asynchronous: The
|
||||
caller (JavaScript or the Native Client module) sends a message, but the caller
|
||||
does not wait for, or may not even expect, a response. This behavior is
|
||||
@ -65,8 +65,8 @@ The SDK may consist of several “bundles”, one per Chrome/Pepper vers
|
||||
<a class="reference internal" href="/native-client/version.html"><em>versioning information</em></a>). In the sample invocation above
|
||||
<code>pepper_$(VERSION)</code> refers to the specific version you want to use. For
|
||||
example, <code>pepper_31</code>. If you don’t know which version you need, use the
|
||||
one labeled <code>(stable)</code> by <code>naclsdk list</code>. See <a class="reference internal" href="/native-client/sdk/download.html"><em>Download the Native
|
||||
Client SDK</em></a> for more details.
|
||||
one labeled <code>(stable)</code> by the <code>naclsdk list</code> command. See
|
||||
<a class="reference internal" href="/native-client/sdk/download.html"><em>Download the Native Client SDK</em></a> for more details.
|
||||
</aside>
|
||||
<p>If no port number is specified, the server defaults to port 5103, and can be
|
||||
accessed at <code>http://localhost:5103</code>.</p>
|
||||
@ -214,7 +214,7 @@ contains some useful information about handling error events.</li>
|
||||
<h2 id="next-steps">Next steps</h2>
|
||||
<ul class="small-gap">
|
||||
<li>See the <a class="reference internal" href="/native-client/devguide/coding/application-structure.html"><em>Application Structure</em></a>
|
||||
chapter in the Developer’s Guide for information about how to structure a
|
||||
section in the Developer’s Guide for information about how to structure a
|
||||
Native Client module.</li>
|
||||
<li>Check the <a class="reference external" href="/native-client/pepper_stable/cpp">C++ Reference</a> for details
|
||||
about how to use the Pepper APIs.</li>
|
||||
|
@ -25,7 +25,7 @@ drawn on the page).</dd>
|
||||
<dd>A file containing metadata or information about accompanying files.</dd>
|
||||
<dt>message events</dt>
|
||||
<dd>Events used to pass data between JavaScript and the Native Client
|
||||
module (see the <a class="reference internal" href="/native-client/devguide/coding/message-system.html"><em>Messaging System</em></a> chapter).</dd>
|
||||
module (see the <a class="reference internal" href="/native-client/devguide/coding/message-system.html"><em>Messaging System</em></a> section).</dd>
|
||||
<dt>module</dt>
|
||||
<dd>Depending on context, “module” may mean one of two things. First, it may be a
|
||||
general short-term for for “Native Client module”—compiled C/C++ code
|
||||
|
@ -3,7 +3,9 @@
|
||||
<section id="welcome-to-native-client">
|
||||
<h1 id="welcome-to-native-client">Welcome to Native Client</h1>
|
||||
<div id="home">
|
||||
<a class="button-nacl button-download" href="/native-client/sdk/download.html">Download SDK</a>
|
||||
<div class="pull-quote">To get the SDK and<br/>installation instructions<br/>
|
||||
<a href="/native-client/sdk/download.html">visit the SDK Download page</a>.
|
||||
</div>
|
||||
<div class="big-intro"><p><strong>Native Client</strong> is a sandbox for running compiled C and C++ code in the
|
||||
browser efficiently and securely, independent of the user’s operating system.
|
||||
<strong>Portable Native Client</strong> extends that technology with
|
||||
@ -14,33 +16,55 @@ of native code to modern web browsers, without sacrificing the <strong>security<
|
||||
<strong>portability</strong> of the web. Watch the video below for an overview of
|
||||
Native Client, including its goals, how it works, and how
|
||||
Portable Native Client lets developers run native compiled code on the web.</p>
|
||||
<aside class="note">
|
||||
This site uses several examples of Native Client. For the best experience,
|
||||
consider downloading the <a class="reference external" href="http://www.google.com/chrome/">latest version of Chrome</a>.
|
||||
When you come back, be sure to <a class="reference external" href="https://gonativeclient.appspot.com/demo">check out our demos</a>.
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<iframe class="video" width="640" height="360"
|
||||
<iframe class="video" width="600" height="337"
|
||||
src="//www.youtube.com/embed/MvKEomoiKBA?rel=0" frameborder="0"></iframe>
|
||||
<div class="big-intro"><h2 id="two-types-of-modules">Two Types of Modules</h2>
|
||||
<p>Native Client comes in two flavors.</p>
|
||||
<ul class="small-gap">
|
||||
<li><strong>Portable Native Client (PNaCl)</strong>: Pronounced ‘pinnacle’, PNaCl runs single, portable (<strong>pexe</strong>) executables and is available
|
||||
in most implementations of Chrome. A translator built into Chrome
|
||||
translates the pexe into native code for the client hardware. The entire
|
||||
module is translated before any code is executed rather than as the code is
|
||||
executed. PNaCl modules can be hosted from any web server.</li>
|
||||
<li><strong>Native Client (NaCl)</strong>: Also called traditional or non-portable Native
|
||||
Client, NaCl runs
|
||||
architecture-dependent (<strong>nexe</strong>) modules, which are packaged into an
|
||||
application. At runtime, the browser decides which nexe to load based on the
|
||||
architecture of the client machine. NaCl modules must be run from the <a class="reference external" href="https://chrome.google.com/webstore/category/apps">Chrome
|
||||
Web Store (CWS)</a>.
|
||||
Fortunately, work from PNaCl modules can be used to create NaCl modules.</li>
|
||||
</ul>
|
||||
<p>These flavors are described in more depth in <a class="reference external" href="nacl-and-pnacl">PNaCl and NaCl</a></p>
|
||||
<div class="left-side">
|
||||
<div class="left-side-inner">
|
||||
<h2>Hello World</h2>
|
||||
<div class="big-intro"><p>To jump right in <a class="reference external" href="devguide/tutorial/tutorial-part1">take the tutorial</a> that walks you through a basic web
|
||||
application for Portable Native Client (PNaCl). This is a client-side
|
||||
application that uses HTML, JavaScript, and a Native Client module written in C++.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>A Little More Advanced</h2>
|
||||
<div class="big-intro"><p>If you’ve already got the basics down, you’re probably trying to get a real application ready for production. You’re <a class="reference external" href="/devguide/devcycle/building">building</a>, <a class="reference external" href="/devguide/devcycle/debugging">debugging</a> or <a class="reference external" href="/devguide/distributing">ready to distribute</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="right-side">
|
||||
<div class="right-side-inner">
|
||||
<h2>Guiding principles of Native Client</h2>
|
||||
<div class="big-intro">
|
||||
<ul>
|
||||
<li>Developer flexibility to program in any language.</li>
|
||||
<li>Running close to the metal to allow access to performance gains.</li>
|
||||
<li>Protecting users from malicious code and malware.</li>
|
||||
<li>Write-once, run-anywhere code portability across all user architectures.</li>
|
||||
</ul></div>
|
||||
<div class="left-side">
|
||||
<div class="left-side-inner">
|
||||
<h2>Nuts and Bolts</h2>
|
||||
<div class="big-intro"><p>You’ve been working on a Native Client module for a while now and you’ve run into an arcane problem. You may need to refer to the <a class="reference external" href="/reference/pnacl-bitcode-abi">PNaCl Bitcode Reference</a> or the <a class="reference external" href="/sandbox_internals/index">Sandbox internals</a>.</p>
|
||||
</div>
|
||||
</div><h2 id="get-started-with-native-client">Get started with Native Client</h2>
|
||||
<div class="big-intro"><ol class="arabic simple">
|
||||
<li><a class="reference internal" href="/native-client/sdk/download.html"><em>Download the Native Client SDK</em></a>.</li>
|
||||
<li>Read the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a>.</li>
|
||||
<li>Learn how to use the SDK and build both a web app and a Chrome app in the
|
||||
<a class="reference internal" href="/native-client/devguide/tutorial/tutorial-part1.html"><em>Getting Started Tutorial</em></a>.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div><h2 id="i-want-to-know-everything">I Want to Know Everything</h2>
|
||||
<p>So, you like to read now and try later. Start with our <a class="reference external" href="/overview">Technical Overview</a></p>
|
||||
<div class="big-intro" style="clear: both;"><p>Send us questions, comments, and feedback:
|
||||
<a class="reference external" href="https://groups.google.com/forum/#!forum/native-client-discuss">native-client-discuss</a>.</p>
|
||||
</div>
|
||||
</div></section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
||||
|
@ -21,8 +21,8 @@ client machine’s computational power to a much fuller extent than traditio
|
||||
web technologies, by running compiled C and C++ code at near-native speeds and
|
||||
taking advantage of multiple cores with shared memory.</p>
|
||||
<p>While Native Client provides operating system independence, it requires
|
||||
developers to generate architecture-specific executable modules
|
||||
(<strong>nexe</strong> modules) for each hardware platform. This is not only inconvenient
|
||||
developers to generate architecture-specific executable
|
||||
(<strong>nexe</strong>) modules for each hardware platform. This is not only inconvenient
|
||||
for developers, but architecture-specific machine code is not portable and thus
|
||||
not well-suited for the open web. The traditional method of application
|
||||
distribution on the web is through a self-contained bundle of HTML, CSS,
|
||||
@ -38,15 +38,14 @@ Chrome Web Store.</p>
|
||||
into two parts:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>compiling the source code to a portable bitcode format, and</li>
|
||||
<li>translating the bitcode to a host-specific executable.</li>
|
||||
<li>translating the bitcode to a host-specific executable just before execution.</li>
|
||||
</ol>
|
||||
<p>PNaCl enables developers
|
||||
to distribute <strong>portable executables</strong> (<strong>pexe</strong> modules) that the hosting
|
||||
environment (e.g., the Chrome browser) can translate to native code before
|
||||
executing. This portability aligns Native Client with existing open web
|
||||
technologies such as JavaScript: A developer can distribute a <strong>pexe</strong>
|
||||
as part of an application (along with HTML, CSS, and JavaScript),
|
||||
and the user’s machine is simply able to run it.</p>
|
||||
<p>PNaCl enables developers to distribute <strong>portable executables</strong> (<strong>pexe</strong>)
|
||||
modules that the hosting environment (in other words, the Chrome browser) can
|
||||
translate to native code before executing. This portability aligns Native Client
|
||||
with existing open web technologies such as JavaScript. A developer can
|
||||
distribute a <strong>pexe</strong> as part of an application (along with HTML, CSS, and
|
||||
JavaScript), and the user’s machine is simply able to run it.</p>
|
||||
<p>With PNaCl, a developer generates a single <strong>pexe</strong> from source code,
|
||||
rather than multiple platform-specific nexes. The <strong>pexe</strong> provides both
|
||||
architecture- and OS-independence. Since the <strong>pexe</strong> uses an abstract,
|
||||
@ -54,15 +53,12 @@ architecture-independent format, it does not suffer from the portability
|
||||
problem described above. Future versions of hosting environments should
|
||||
have no problem executing the <strong>pexe</strong>, even on new architectures.
|
||||
Moreover, if an existing architecture is subsequently enhanced, the
|
||||
<strong>pexe</strong> doesn’t even have to be recompiled—in some cases the
|
||||
<strong>pexe</strong> doesn’t even have to be recompiled. In some cases the
|
||||
client-side translation will automatically be able to take advantage of
|
||||
the new capabilities.</p>
|
||||
<p><strong>In short, PNaCl combines the portability of existing web technologies with
|
||||
the performance and security benefits of Native Client.</strong></p>
|
||||
<p>With the advent of PNaCl, the distribution restriction of Native Client
|
||||
can be lifted. Specifically, a <strong>pexe</strong> module can be part of any web
|
||||
application—it does not have to be distributed through the Chrome Web
|
||||
Store.</p>
|
||||
the new capabilities. A <strong>pexe</strong> module can be part of any web
|
||||
application. It does not have to be distributed through the Chrome Web
|
||||
Store. In short, PNaCl combines the portability of existing web technologies
|
||||
with the performance and security benefits of Native Client.</p>
|
||||
<p>PNaCl is a new technology, and as such it still has a few limitations
|
||||
as compared to NaCl. These limitations are described below.</p>
|
||||
<h2 id="when-to-use-pnacl">When to use PNaCl</h2>
|
||||
@ -87,15 +83,15 @@ for all supported architectures.</p>
|
||||
these limitations are critical for your application, you should use
|
||||
non-portable NaCl:</p>
|
||||
<ul class="small-gap">
|
||||
<li>By its nature, PNaCl does not support architecture-specific
|
||||
<li>PNaCl does not support architecture-specific
|
||||
instructions in an application (i.e., inline assembly), but tries to
|
||||
offer high-performance portable equivalents. One such example is
|
||||
PNaCl’s <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-language-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</li>
|
||||
<li>Currently PNaCl only supports static linking with the <code>newlib</code>
|
||||
<li>PNaCl only supports static linking with the <code>newlib</code>
|
||||
C standard library (the Native Client SDK provides a PNaCl port of
|
||||
<code>newlib</code>). Dynamic linking and <code>glibc</code> are not yet supported.
|
||||
Work is under way to enable dynamic linking in future versions of PNaCl.</li>
|
||||
<li>In the initial release, PNaCl does not support some GNU extensions
|
||||
<li>PNaCl does not support some GNU extensions
|
||||
like taking the address of a label for computed <code>goto</code>, or nested
|
||||
functions.</li>
|
||||
</ul>
|
||||
|
@ -42,50 +42,44 @@ languages as well.</p>
|
||||
<h2 id="why-use-native-client">Why use Native Client?</h2>
|
||||
<p>Native Client open-source technology is designed to run compiled code
|
||||
securely inside a browser at near-native speeds. Native Client puts web
|
||||
applications on the same playing field as traditional (locally-run)
|
||||
software—it provides the means to fully harness the client’s computational
|
||||
resources for applications such as 3D games, multimedia editors, CAD modeling,
|
||||
applications on the same playing field as desktop software—it provides the
|
||||
means to fully harness the client’s computational resources for applications
|
||||
such as 3D games, multimedia editors, CAD modeling,
|
||||
client-side data analytics, and interactive simulations.
|
||||
Native Client also aims to give C and C++ (and eventually other languages) the
|
||||
same level of portability and safety that JavaScript provides on the web today.</p>
|
||||
<p>Here are a few of the key benefits that Native Client offers:</p>
|
||||
<p>Important benefits of Native Client include:</p>
|
||||
<ul class="small-gap">
|
||||
<li><strong>Graphics, audio, and much more:</strong> Run native code modules that render 2D
|
||||
<li><strong>Graphics, audio, and much more:</strong> Running native code modules that render 2D
|
||||
and 3D graphics, play audio, respond to mouse and keyboard events, run on
|
||||
multiple threads, and access memory directly—all without requiring
|
||||
the user to install a plugin.</li>
|
||||
<li><strong>Portability:</strong> Write your applications once and you’ll be able to run them
|
||||
across operating systems (Windows, Linux, Mac, and Chrome OS) and CPU
|
||||
architectures (x86 and ARM).</li>
|
||||
<li><strong>Easy migration path to the web:</strong> Many developers and companies have years
|
||||
of work invested in existing desktop applications. Native Client makes the
|
||||
transition from the desktop to a web application significantly easier because
|
||||
it supports C and C++.</li>
|
||||
<li><strong>Security:</strong> Native Client uses a double sandbox model designed to protect
|
||||
the user’s system from malicious or buggy applications. This model offers the
|
||||
safety of traditional web applications without sacrificing performance and
|
||||
<li><strong>Portability:</strong> Writing your applications once and running them on operating
|
||||
systems (Windows, Linux, Mac, and Chrome OS) and CPU architectures (x86 and
|
||||
ARM).</li>
|
||||
<li><strong>Easy migration path to the web:</strong> Leveraging years of work in existing
|
||||
desktop applications. Native Client makes the transition from the desktop to a
|
||||
web application significantly easier because it supports C and C++.</li>
|
||||
<li><strong>Security:</strong> Protecting the user’s system from malicious or buggy
|
||||
applications through Native Client’s double sandbox model. This model offers
|
||||
the safety of traditional web applications without sacrificing performance and
|
||||
without requiring users to install a plugin.</li>
|
||||
<li><strong>Performance:</strong> Native Client allows web applications to run at speeds
|
||||
comparable to desktop applications (within 5-15% of native speed).
|
||||
Native Client also allows applications to harness all available CPU cores via
|
||||
a threading API; this enables demanding applications such as console-quality
|
||||
games to run inside the browser.</li>
|
||||
<li><strong>Performance:</strong> Running at speeds comparable to desktop applications (within
|
||||
5-15% of native speed). Native Client also allows applications to harness all
|
||||
available CPU cores via a threading API; this enables demanding applications
|
||||
such as console-quality games to run inside the browser.</li>
|
||||
</ul>
|
||||
<h2 id="common-use-cases">Common use cases</h2>
|
||||
<p>Typical use cases for Native Client include the following:</p>
|
||||
<ul class="small-gap">
|
||||
<li><strong>Existing software components:</strong> With support for C and C++, Native
|
||||
Client enables you to reuse existing software modules in
|
||||
web applications—you don’t need to rewrite and debug code
|
||||
that’s already proven to work well.</li>
|
||||
Client lets you to reuse existing software modules in web applications. You
|
||||
don’t need to rewrite and debug code that already works.</li>
|
||||
<li><strong>Legacy desktop applications:</strong> Native Client provides a smooth migration
|
||||
path from desktop applications to the web. You can port and recompile existing
|
||||
code for the computation engine of your application directly to Native Client,
|
||||
and need repurpose only the user interface and event handling portions to the
|
||||
new browser platform. Native Client allows you to embed existing functionality
|
||||
directly into the browser. At the same time, your application can take
|
||||
advantage of things the browser does well: handling user interaction and
|
||||
processing events, based on the latest developments in HTML5.</li>
|
||||
and need rebuild only the user interface and event handling portions for the
|
||||
browser.</li>
|
||||
<li><strong>Heavy computation in enterprise applications:</strong> Native Client can handle the
|
||||
number crunching required by large-scale enterprise applications. To ensure
|
||||
protection of user data, Native Client enables you to build complex
|
||||
@ -103,15 +97,14 @@ many platforms.</li>
|
||||
<li><strong>Any application that requires acceleration</strong>: Native Client fits seamlessly
|
||||
into web applications—it’s up to you to decide to what extent to use it.
|
||||
Use of Native Client covers the full spectrum from complete applications to
|
||||
small optimized routines that accelerate vital parts of web apps.</li>
|
||||
small optimized routines that accelerate vital parts of web applications.</li>
|
||||
</ul>
|
||||
<h2 id="how-native-client-works"><span id="link-how-nacl-works"></span>How Native Client works</h2>
|
||||
<p>Native Client is an umbrella name for a set of interrelated software components
|
||||
that work together to provide a way to develop C/C++ applications and run them
|
||||
securely on the web.</p>
|
||||
<p>Native Client is an umbrella name for a set of related software components that
|
||||
provide a way to develop C/C++ applications and run them securely on the web.</p>
|
||||
<p>At a high level, Native Client consists of:</p>
|
||||
<ul class="small-gap">
|
||||
<li><strong>Toolchains</strong>: collections of development tools (compilers, linkers, etc.)
|
||||
<li><strong>Toolchains</strong>: Collections of development tools (compilers, linkers, etc.)
|
||||
that transform C/C++ code to Native Client modules.</li>
|
||||
<li><strong>Runtime components</strong>: components embedded in the browser or other
|
||||
host platforms that allow execution of Native Client modules
|
||||
@ -123,9 +116,9 @@ securely and efficiently.</li>
|
||||
(PNaCl, pronounced “pinnacle”). Developers use the PNaCl toolchain
|
||||
to produce a single, portable (<strong>pexe</strong>) module. At runtime, a translator
|
||||
built into the browser translates the pexe into native code for the
|
||||
relevant client architecture.</p>
|
||||
<p>The right side of the diagram shows how to use traditional (non-portable)
|
||||
Native Client. Developers use a nacl-gcc based toolchain to produce multiple
|
||||
relevant client architecture. Translation occurs before any code is executed.</p>
|
||||
<p>The right side of the diagram shows how to use (non-portable) Native Client.
|
||||
Developers use a nacl-gcc based toolchain to produce multiple
|
||||
architecture-dependent (<strong>nexe</strong>) modules, which are packaged into an
|
||||
application. At runtime, the browser decides which nexe to load based
|
||||
on the architecture of the client machine.</p>
|
||||
|
171
native_client_sdk/doc_generated/pepper_stable/c-api.html
Normal file
171
native_client_sdk/doc_generated/pepper_stable/c-api.html
Normal file
@ -0,0 +1,171 @@
|
||||
{{+bindTo:partials.standard_nacl_article}}
|
||||
|
||||
<span class="target" id="pepper-stable-c-index"><span id="c-api"></span></span><section id="pepper-c-api-reference-stable">
|
||||
<h1 id="pepper-c-api-reference-stable">Pepper C API Reference (Stable)</h1>
|
||||
<p>This page lists the C API for Pepper 35. Apps that use this API can
|
||||
run in Chrome 35 or higher.</p>
|
||||
<section id="id1">
|
||||
<h2 id="id1"><a class="reference external" href="group___interfaces.html">Interfaces</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="struct_p_p_b___audio__1__1.html">PPB_Audio</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___audio_buffer__0__1.html">PPB_AudioBuffer</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___audio_config__1__1.html">PPB_AudioConfig</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___console__1__0.html">PPB_Console</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___core__1__0.html">PPB_Core</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_i_o__1__1.html">PPB_FileIO</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_mapping__0__1.html">PPB_FileMapping</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_ref__1__2.html">PPB_FileRef</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___file_system__1__0.html">PPB_FileSystem</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___fullscreen__1__0.html">PPB_Fullscreen</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___gamepad__1__0.html">PPB_Gamepad</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___graphics2_d__1__1.html">PPB_Graphics2D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___graphics3_d__1__0.html">PPB_Graphics3D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___host_resolver__1__0.html">PPB_HostResolver</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___i_m_e_input_event__1__0.html">PPB_IMEInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___image_data__1__0.html">PPB_ImageData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___input_event__1__0.html">PPB_InputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___instance__1__0.html">PPB_Instance</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___keyboard_input_event__1__2.html">PPB_KeyboardInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___media_stream_audio_track__0__1.html">PPB_MediaStreamAudioTrack</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___media_stream_video_track__0__1.html">PPB_MediaStreamVideoTrack</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___message_loop__1__0.html">PPB_MessageLoop</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___messaging__1__0.html">PPB_Messaging</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_cursor__1__0.html">PPB_MouseCursor</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_input_event__1__1.html">PPB_MouseInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___mouse_lock__1__0.html">PPB_MouseLock</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___net_address__1__0.html">PPB_NetAddress</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_list__1__0.html">PPB_NetworkList</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_monitor__1__0.html">PPB_NetworkMonitor</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___network_proxy__1__0.html">PPB_NetworkProxy</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___t_c_p_socket__1__1.html">PPB_TCPSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___text_input_controller__1__0.html">PPB_TextInputController</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___touch_input_event__1__0.html">PPB_TouchInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_d_p_socket__1__0.html">PPB_UDPSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_loader__1__0.html">PPB_URLLoader</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_request_info__1__0.html">PPB_URLRequestInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___u_r_l_response_info__1__0.html">PPB_URLResponseInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var__1__2.html">PPB_Var</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_array__1__0.html">PPB_VarArray</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_array_buffer__1__0.html">PPB_VarArrayBuffer</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___var_dictionary__1__0.html">PPB_VarDictionary</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___video_frame__0__1.html">PPB_VideoFrame</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___view__1__1.html">PPB_View</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___web_socket__1__0.html">PPB_WebSocket</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_b___wheel_input_event__1__0.html">PPB_WheelInputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___graphics3_d__1__0.html">PPP_Graphics3D</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___input_event__0__1.html">PPP_InputEvent</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___instance__1__1.html">PPP_Instance</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___messaging__1__0.html">PPP_Messaging</a></li>
|
||||
<li><a class="reference external" href="struct_p_p_p___mouse_lock__1__0.html">PPP_MouseLock</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section><section id="id2">
|
||||
<h2 id="id2"><a class="reference external" href="group___structs.html">Structures</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="struct_p_p___array_output.html">PP_ArrayOutput</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___directory_entry.html">PP_DirectoryEntry</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___file_info.html">PP_FileInfo</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___float_point.html">PP_FloatPoint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___gamepad_sample_data.html">PP_GamepadSampleData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___gamepads_sample_data.html">PP_GamepadsSampleData</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___host_resolver___hint.html">PP_HostResolver_Hint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___image_data_desc.html">PP_ImageDataDesc</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___character.html">PP_InputEvent_Character</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___key.html">PP_InputEvent_Key</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___mouse.html">PP_InputEvent_Mouse</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___input_event___wheel.html">PP_InputEvent_Wheel</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___point.html">PP_Point</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___rect.html">PP_Rect</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___size.html">PP_Size</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___touch_point.html">PP_TouchPoint</a></li>
|
||||
<li><a class="reference external" href="struct_p_p___var.html">PP_Var</a></li>
|
||||
<li><a class="reference external" href="union_p_p___var_value.html">PP_VarValue</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section><section id="id3">
|
||||
<h2 id="id3"><a class="reference external" href="group___functions.html">Functions</a></h2>
|
||||
</section><section id="id4">
|
||||
<h2 id="id4"><a class="reference external" href="group___enums.html">Enums</a></h2>
|
||||
</section><section id="id5">
|
||||
<h2 id="id5"><a class="reference external" href="group___typedefs.html">Typedefs</a></h2>
|
||||
</section><section id="id6">
|
||||
<h2 id="id6"><a class="reference external" href="globals_defs.html">Macros</a></h2>
|
||||
</section><section id="files">
|
||||
<h2 id="files">Files</h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="pp__array__output_8h.html">pp_array_output.h</a></li>
|
||||
<li><a class="reference external" href="pp__bool_8h.html">pp_bool.h</a></li>
|
||||
<li><a class="reference external" href="pp__completion__callback_8h.html">pp_completion_callback.h</a></li>
|
||||
<li><a class="reference external" href="pp__directory__entry_8h.html">pp_directory_entry.h</a></li>
|
||||
<li><a class="reference external" href="pp__errors_8h.html">pp_errors.h</a></li>
|
||||
<li><a class="reference external" href="pp__file__info_8h.html">pp_file_info.h</a></li>
|
||||
<li><a class="reference external" href="pp__graphics__3d_8h.html">pp_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="pp__input__event_8h.html">pp_input_event.h</a></li>
|
||||
<li><a class="reference external" href="pp__instance_8h.html">pp_instance.h</a></li>
|
||||
<li><a class="reference external" href="pp__module_8h.html">pp_module.h</a></li>
|
||||
<li><a class="reference external" href="pp__point_8h.html">pp_point.h</a></li>
|
||||
<li><a class="reference external" href="pp__rect_8h.html">pp_rect.h</a></li>
|
||||
<li><a class="reference external" href="pp__resource_8h.html">pp_resource.h</a></li>
|
||||
<li><a class="reference external" href="pp__size_8h.html">pp_size.h</a></li>
|
||||
<li><a class="reference external" href="pp__stdint_8h.html">pp_stdint.h</a></li>
|
||||
<li><a class="reference external" href="pp__time_8h.html">pp_time.h</a></li>
|
||||
<li><a class="reference external" href="pp__touch__point_8h.html">pp_touch_point.h</a></li>
|
||||
<li><a class="reference external" href="pp__var_8h.html">pp_var.h</a></li>
|
||||
<li><a class="reference external" href="ppb_8h.html">ppb.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio_8h.html">ppb_audio.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio__buffer_8h.html">ppb_audio_buffer.h</a></li>
|
||||
<li><a class="reference external" href="ppb__audio__config_8h.html">ppb_audio_config.h</a></li>
|
||||
<li><a class="reference external" href="ppb__console_8h.html">ppb_console.h</a></li>
|
||||
<li><a class="reference external" href="ppb__core_8h.html">ppb_core.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__io_8h.html">ppb_file_io.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__mapping_8h.html">ppb_file_mapping.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__ref_8h.html">ppb_file_ref.h</a></li>
|
||||
<li><a class="reference external" href="ppb__file__system_8h.html">ppb_file_system.h</a></li>
|
||||
<li><a class="reference external" href="ppb__fullscreen_8h.html">ppb_fullscreen.h</a></li>
|
||||
<li><a class="reference external" href="ppb__gamepad_8h.html">ppb_gamepad.h</a></li>
|
||||
<li><a class="reference external" href="ppb__graphics__2d_8h.html">ppb_graphics_2d.h</a></li>
|
||||
<li><a class="reference external" href="ppb__graphics__3d_8h.html">ppb_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="ppb__host__resolver_8h.html">ppb_host_resolver.h</a></li>
|
||||
<li><a class="reference external" href="ppb__image__data_8h.html">ppb_image_data.h</a></li>
|
||||
<li><a class="reference external" href="ppb__input__event_8h.html">ppb_input_event.h</a></li>
|
||||
<li><a class="reference external" href="ppb__instance_8h.html">ppb_instance.h</a></li>
|
||||
<li><a class="reference external" href="ppb__media__stream__audio__track_8h.html">ppb_media_stream_audio_track.h</a></li>
|
||||
<li><a class="reference external" href="ppb__media__stream__video__track_8h.html">ppb_media_stream_video_track.h</a></li>
|
||||
<li><a class="reference external" href="ppb__message__loop_8h.html">ppb_message_loop.h</a></li>
|
||||
<li><a class="reference external" href="ppb__messaging_8h.html">ppb_messaging.h</a></li>
|
||||
<li><a class="reference external" href="ppb__mouse__cursor_8h.html">ppb_mouse_cursor.h</a></li>
|
||||
<li><a class="reference external" href="ppb__mouse__lock_8h.html">ppb_mouse_lock.h</a></li>
|
||||
<li><a class="reference external" href="ppb__net__address_8h.html">ppb_net_address.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__list_8h.html">ppb_network_list.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__monitor_8h.html">ppb_network_monitor.h</a></li>
|
||||
<li><a class="reference external" href="ppb__network__proxy_8h.html">ppb_network_proxy.h</a></li>
|
||||
<li><a class="reference external" href="ppb__tcp__socket_8h.html">ppb_tcp_socket.h</a></li>
|
||||
<li><a class="reference external" href="ppb__text__input__controller_8h.html">ppb_text_input_controller.h</a></li>
|
||||
<li><a class="reference external" href="ppb__udp__socket_8h.html">ppb_udp_socket.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__loader_8h.html">ppb_url_loader.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__request__info_8h.html">ppb_url_request_info.h</a></li>
|
||||
<li><a class="reference external" href="ppb__url__response__info_8h.html">ppb_url_response_info.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var_8h.html">ppb_var.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__array_8h.html">ppb_var_array.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__array__buffer_8h.html">ppb_var_array_buffer.h</a></li>
|
||||
<li><a class="reference external" href="ppb__var__dictionary_8h.html">ppb_var_dictionary.h</a></li>
|
||||
<li><a class="reference external" href="ppb__video__frame_8h.html">ppb_video_frame.h</a></li>
|
||||
<li><a class="reference external" href="ppb__view_8h.html">ppb_view.h</a></li>
|
||||
<li><a class="reference external" href="ppb__websocket_8h.html">ppb_websocket.h</a></li>
|
||||
<li><a class="reference external" href="ppp_8h.html">ppp.h</a></li>
|
||||
<li><a class="reference external" href="ppp__graphics__3d_8h.html">ppp_graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="ppp__input__event_8h.html">ppp_input_event.h</a></li>
|
||||
<li><a class="reference external" href="ppp__instance_8h.html">ppp_instance.h</a></li>
|
||||
<li><a class="reference external" href="ppp__messaging_8h.html">ppp_messaging.h</a></li>
|
||||
<li><a class="reference external" href="ppp__mouse__lock_8h.html">ppp_mouse_lock.h</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section></section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
130
native_client_sdk/doc_generated/pepper_stable/cpp-api.html
Normal file
130
native_client_sdk/doc_generated/pepper_stable/cpp-api.html
Normal file
@ -0,0 +1,130 @@
|
||||
{{+bindTo:partials.standard_nacl_article}}
|
||||
|
||||
<span class="target" id="pepper-stable-cpp-index"><span id="cpp-api"></span></span><section id="pepper-c-api-reference-stable">
|
||||
<h1 id="pepper-c-api-reference-stable">Pepper C++ API Reference (Stable)</h1>
|
||||
<p>This page lists the C++ API for Pepper 35. Apps that use this API can
|
||||
run in Chrome 35 or higher.</p>
|
||||
<section id="id1">
|
||||
<h2 id="id1"><a class="reference external" href="inherits.html">Classes</a></h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="classpp_1_1_audio.html">Audio</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_audio_buffer.html">AudioBuffer</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_audio_config.html">AudioConfig</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback.html">CompletionCallback</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback_factory.html">CompletionCallbackFactory</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_core.html">Core</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_directory_entry.html">DirectoryEntry</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_i_o.html">FileIO</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_ref.html">FileRef</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_file_system.html">FileSystem</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_float_point.html">FloatPoint</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_fullscreen.html">Fullscreen</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics2_d.html">Graphics2D</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics3_d.html">Graphics3D</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_graphics3_d_client.html">Graphics3DClient</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_host_resolver.html">HostResolver</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_i_m_e_input_event.html">IMEInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_image_data.html">ImageData</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_input_event.html">InputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_instance.html">Instance</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_instance_handle.html">InstanceHandle</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_keyboard_input_event.html">KeyboardInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_media_stream_audio_track.html">MediaStreamAudioTrack</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_media_stream_video_track.html">MediaStreamVideoTrack</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_message_loop.html">MessageLoop</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_module.html">Module</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_cursor.html">MouseCursor</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_input_event.html">MouseInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_mouse_lock.html">MouseLock</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_net_address.html">NetAddress</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_list.html">NetworkList</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_monitor.html">NetworkMonitor</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_network_proxy.html">NetworkProxy</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_point.html">Point</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_rect.html">Rect</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_resource.html">Resource</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_size.html">Size</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_t_c_p_socket.html">TCPSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_text_input_controller.html">TextInputController</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_touch_input_event.html">TouchInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_touch_point.html">TouchPoint</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_d_p_socket.html">UDPSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_loader.html">URLLoader</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_request_info.html">URLRequestInfo</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_u_r_l_response_info.html">URLResponseInfo</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var.html">Var</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_1_1_out_exception.html">Var11OutException</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_array.html">VarArray</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_array_buffer.html">VarArrayBuffer</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_var_dictionary.html">VarDictionary</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_video_frame.html">VideoFrame</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_view.html">View</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_web_socket.html">WebSocket</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1_wheel_input_event.html">WheelInputEvent</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1ext_1_1_ext_completion_callback_with_output.html">Ext::ExtCompletionCallbackWithOutput</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1internal_1_1_completion_callback_with_output_base.html">Internal::CompletionCallbackWithOutputBase</a></li>
|
||||
<li><a class="reference external" href="classpp_1_1internal_1_1_directory_entry_array_output_adapter_with_storage.html">Internal::DirectoryEntryArrayOutputAdapterWithStorage</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section><section id="files">
|
||||
<h2 id="files">Files</h2>
|
||||
<blockquote>
|
||||
<div><ul class="small-gap">
|
||||
<li><a class="reference external" href="audio_8h.html">audio.h</a></li>
|
||||
<li><a class="reference external" href="audio__buffer_8h.html">audio_buffer.h</a></li>
|
||||
<li><a class="reference external" href="audio__config_8h.html">audio_config.h</a></li>
|
||||
<li><a class="reference external" href="completion__callback_8h.html">completion_callback.h</a></li>
|
||||
<li><a class="reference external" href="completion__callback__factory_8h.html">completion_callback_factory.h</a></li>
|
||||
<li><a class="reference external" href="core_8h.html">core.h</a></li>
|
||||
<li><a class="reference external" href="directory__entry_8h.html">directory_entry.h</a></li>
|
||||
<li><a class="reference external" href="file__io_8h.html">file_io.h</a></li>
|
||||
<li><a class="reference external" href="file__ref_8h.html">file_ref.h</a></li>
|
||||
<li><a class="reference external" href="file__system_8h.html">file_system.h</a></li>
|
||||
<li><a class="reference external" href="fullscreen_8h.html">fullscreen.h</a></li>
|
||||
<li><a class="reference external" href="graphics__2d_8h.html">graphics_2d.h</a></li>
|
||||
<li><a class="reference external" href="graphics__3d_8h.html">graphics_3d.h</a></li>
|
||||
<li><a class="reference external" href="graphics__3d__client_8h.html">graphics_3d_client.h</a></li>
|
||||
<li><a class="reference external" href="host__resolver_8h.html">host_resolver.h</a></li>
|
||||
<li><a class="reference external" href="image__data_8h.html">image_data.h</a></li>
|
||||
<li><a class="reference external" href="input__event_8h.html">input_event.h</a></li>
|
||||
<li><a class="reference external" href="instance_8h.html">instance.h</a></li>
|
||||
<li><a class="reference external" href="instance__handle_8h.html">instance_handle.h</a></li>
|
||||
<li><a class="reference external" href="logging_8h.html">logging.h</a></li>
|
||||
<li><a class="reference external" href="media__stream__audio__track_8h.html">media_stream_audio_track.h</a></li>
|
||||
<li><a class="reference external" href="media__stream__video__track_8h.html">media_stream_video_track.h</a></li>
|
||||
<li><a class="reference external" href="message__loop_8h.html">message_loop.h</a></li>
|
||||
<li><a class="reference external" href="module_8h.html">module.h</a></li>
|
||||
<li><a class="reference external" href="module__embedder_8h.html">module_embedder.h</a></li>
|
||||
<li><a class="reference external" href="module__impl_8h.html">module_impl.h</a></li>
|
||||
<li><a class="reference external" href="mouse__cursor_8h.html">mouse_cursor.h</a></li>
|
||||
<li><a class="reference external" href="mouse__lock_8h.html">mouse_lock.h</a></li>
|
||||
<li><a class="reference external" href="net__address_8h.html">net_address.h</a></li>
|
||||
<li><a class="reference external" href="network__list_8h.html">network_list.h</a></li>
|
||||
<li><a class="reference external" href="network__monitor_8h.html">network_monitor.h</a></li>
|
||||
<li><a class="reference external" href="network__proxy_8h.html">network_proxy.h</a></li>
|
||||
<li><a class="reference external" href="pass__ref_8h.html">pass_ref.h</a></li>
|
||||
<li><a class="reference external" href="point_8h.html">point.h</a></li>
|
||||
<li><a class="reference external" href="rect_8h.html">rect.h</a></li>
|
||||
<li><a class="reference external" href="resource_8h.html">resource.h</a></li>
|
||||
<li><a class="reference external" href="size_8h.html">size.h</a></li>
|
||||
<li><a class="reference external" href="tcp__socket_8h.html">tcp_socket.h</a></li>
|
||||
<li><a class="reference external" href="text__input__controller_8h.html">text_input_controller.h</a></li>
|
||||
<li><a class="reference external" href="touch__point_8h.html">touch_point.h</a></li>
|
||||
<li><a class="reference external" href="udp__socket_8h.html">udp_socket.h</a></li>
|
||||
<li><a class="reference external" href="url__loader_8h.html">url_loader.h</a></li>
|
||||
<li><a class="reference external" href="url__request__info_8h.html">url_request_info.h</a></li>
|
||||
<li><a class="reference external" href="url__response__info_8h.html">url_response_info.h</a></li>
|
||||
<li><a class="reference external" href="var_8h.html">var.h</a></li>
|
||||
<li><a class="reference external" href="var__array_8h.html">var_array.h</a></li>
|
||||
<li><a class="reference external" href="var__array__buffer_8h.html">var_array_buffer.h</a></li>
|
||||
<li><a class="reference external" href="var__dictionary_8h.html">var_dictionary.h</a></li>
|
||||
<li><a class="reference external" href="video__frame_8h.html">video_frame.h</a></li>
|
||||
<li><a class="reference external" href="view_8h.html">view.h</a></li>
|
||||
<li><a class="reference external" href="websocket_8h.html">websocket.h</a></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section></section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
@ -4,8 +4,8 @@
|
||||
<h1 id="pepper-api-reference-stable">Pepper API Reference (Stable)</h1>
|
||||
<p>This page lists the API for Pepper 35. Apps that use this API can
|
||||
run in Chrome 35 or higher.</p>
|
||||
<h2 id="pepper-c-api-reference"><a class="reference internal" href="/native-client/pepper_stable/c/index.html#pepper-stable-c-index"><em>Pepper C API Reference</em></a></h2>
|
||||
<h2 id="id1"><a class="reference internal" href="/native-client/pepper_stable/cpp/index.html#pepper-stable-cpp-index"><em>Pepper C++ API Reference</em></a></h2>
|
||||
<h2 id="pepper-c-api-reference"><a class="reference internal" href="/native-client/c-api.html#pepper-stable-c-index"><em>Pepper C API Reference</em></a></h2>
|
||||
<h2 id="id1"><a class="reference internal" href="/native-client/cpp-api.html#pepper-stable-cpp-index"><em>Pepper C++ API Reference</em></a></h2>
|
||||
</section>
|
||||
|
||||
{{/partials.standard_nacl_article}}
|
||||
|
@ -2,82 +2,61 @@
|
||||
|
||||
<section id="download-the-native-client-sdk">
|
||||
<span id="download"></span><h1 id="download-the-native-client-sdk"><span id="download"></span>Download the Native Client SDK</h1>
|
||||
<p>To build Native Client modules, you must download and install the Native
|
||||
Client Software Development Kit (SDK). This page provides an overview
|
||||
of the Native Client SDK, and instructions for how to download and
|
||||
install the SDK.</p>
|
||||
<h2 id="overview">Overview</h2>
|
||||
<p>To build Native Client modules, you must download and install the Native Client
|
||||
Software Development Kit (SDK). This page provides an overview of the Native
|
||||
Client SDK, and instructions for how to download and install the SDK.</p>
|
||||
<div id="home">
|
||||
<a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
|
||||
</div><h2 id="overview">Overview</h2>
|
||||
<p>The Native Client SDK includes the following:</p>
|
||||
<dl class="docutils">
|
||||
<dt>support for multiple Pepper versions</dt>
|
||||
<dd>The SDK contains <strong>bundles</strong> that let you compile Native Client modules
|
||||
using different versions of the
|
||||
<a class="reference internal" href="/native-client/overview.html#link-pepper"><em>Pepper Plugin API</em></a> (e.g., Pepper 31 or Pepper Canary). Review the
|
||||
<a class="reference internal" href="/native-client/sdk/release-notes.html"><em>Release Notes</em></a> for a description of the new features
|
||||
included in each Pepper version to help you decide which bundle to
|
||||
use to develop your application. In general, Native Client modules
|
||||
compiled using a particular Pepper version will work in
|
||||
corresponding versions of Chrome and higher. For example, a module
|
||||
compiled using the Pepper 31 bundle will work in Chrome 31 and
|
||||
higher.</dd>
|
||||
<dt>update utility</dt>
|
||||
<dd>The <code>naclsdk</code> utility (<code>naclsdk.bat</code> on Windows) lets you download new
|
||||
bundles that are available, as well as new versions of existing bundles.</dd>
|
||||
<dt>toolchains</dt>
|
||||
<dd>Each platform includes three toolchains: one for compiling
|
||||
Portable Native Client (PNaCl) applications, one for compiling
|
||||
architecture-specific Native Client applications with newlib, and
|
||||
one for compiling architecture-specific Native Client applications with glibc.
|
||||
Newlib and glibc are two different implementations
|
||||
of the C standard library. All three toolchains contain
|
||||
Native Client-compatible versions of standard compilers, linkers,
|
||||
and other tools. See <a class="reference internal" href="/native-client/nacl-and-pnacl.html"><em>NaCl and PNaCl</em></a> to help
|
||||
you choose the right toolchain.</dd>
|
||||
<dt>examples</dt>
|
||||
<dd>Each example in the SDK includes C or C++ source files and header files
|
||||
illustrating how to use NaCl and Pepper, along with a Makefile to build
|
||||
the example using each of the toolchains.</dd>
|
||||
<dt>tools</dt>
|
||||
<dd>The SDK includes a number of additional tools that you can use for
|
||||
tasks such as validating Native Client modules and running modules
|
||||
from the command line.</dd>
|
||||
</dl>
|
||||
<ul class="small-gap">
|
||||
<li><strong>Support for multiple Pepper versions</strong> to compile for specific minimum
|
||||
versions of Chrome.</li>
|
||||
<li><strong>Update utility</strong> to download new bundles that are available, as well as new
|
||||
versions of existing bundles.</li>
|
||||
<li><strong>Toolchains</strong> to compile for Portable Native Client (PNaCl), traditional
|
||||
Native Client (NaCl), and for compiling architecture-specific Native Client
|
||||
applications with glibc.</li>
|
||||
<li><strong>Examples</strong> Including C or C++ source files and header files illustrating
|
||||
how to use NaCl and Pepper, and Makefiles to build the example with each of
|
||||
the toolchains.</li>
|
||||
<li><strong>Tools</strong> for validating Native Client modules and running modules from the
|
||||
command line.</li>
|
||||
</ul>
|
||||
<p>Follow the steps below to download and install the Native Client SDK.</p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ul class="small-gap">
|
||||
<li><p class="first"><strong>Python:</strong> Make sure you have Python 2.6 or 2.7 installed, and that the
|
||||
Python executable is in your path.</p>
|
||||
<li><p class="first"><strong>Python 2.6 or 2.7:</strong> Make sure that the Python executable is in your path.
|
||||
Python 2.7 is preferred. Python 3.x is not yet supported.</p>
|
||||
<ul class="small-gap">
|
||||
<li>On Mac/Linux, Python is likely preinstalled. Run the command <code>"python
|
||||
-V</code>” in a terminal window, and make sure that the version of Python you
|
||||
have is 2.6.x or 2.7.x (if it’s not, upgrade to one of those versions).</li>
|
||||
<li>On Mac and Linux, Python is likely preinstalled. Run the command “<code>python
|
||||
-V</code>” in a terminal window, and make sure that the version you have is 2.6.x
|
||||
or 2.7.x.</li>
|
||||
<li>On Windows, you may need to install Python. Go to
|
||||
<a class="reference external" href="http://www.python.org/download/">http://www.python.org/download/</a> and
|
||||
select the latest 2.x version. In addition, be sure to add the Python
|
||||
directory (for example, <code>C:\python27</code>) to the PATH <a class="reference external" href="http://en.wikipedia.org/wiki/Environment_variable">environment
|
||||
variable</a>. After
|
||||
you’ve installed Python, run the command <code>"python -V</code>” in a Command
|
||||
Prompt window and verify that the version of Python you have is 2.6.x or
|
||||
2.7.x.</li>
|
||||
<li>Note that Python 3.x is not yet supported.</li>
|
||||
variable</a>. Run
|
||||
“<code>python -V</code>” from a command line to verify that you properly configured
|
||||
the PATH variable.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>Make:</strong> On the Mac, you need to install the <code>make</code> command on your system
|
||||
before you can build and run the examples in the SDK. One easy way to get
|
||||
<code>make</code>, along with several other useful tools, is to install
|
||||
<a class="reference external" href="https://developer.apple.com/technologies/tools/">Xcode Developer Tools</a>.
|
||||
After installing Xcode, go to the Preferences menu, select
|
||||
Downloads and Components, and verify that Command Line Tools are installed.
|
||||
If you’d rather not install Xcode, you can download and build an
|
||||
<a class="reference external" href="http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1">open source version</a> of
|
||||
<code>make</code>. In order to build the command you may also need to download and
|
||||
install a copy of <a class="reference external" href="https://github.com/kennethreitz/osx-gcc-installer">gcc</a>.</li>
|
||||
After installing Xcode, go to the XCode menu, open the Preferences dialog box
|
||||
then select Downloads and Components. Verify that Command Line Tools are
|
||||
installed. If you’d rather not install Xcode, you can download and build an
|
||||
<a class="reference external" href="http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1">open source version</a> of <code>make</code>.
|
||||
To build the command you may also need to download and install
|
||||
<a class="reference external" href="https://github.com/kennethreitz/osx-gcc-installer">gcc</a>.</li>
|
||||
</ul>
|
||||
<h2 id="download-and-install-the-sdk">Download and install the SDK</h2>
|
||||
<h2 id="installing-the-sdk">Installing the SDK</h2>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Download the SDK update utility: <a class="reference external" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">nacl_sdk.zip</a>.</p>
|
||||
<li><p class="first">Download the SDK update zip file: <a class="reference external" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">nacl_sdk.zip</a>.</p>
|
||||
</li>
|
||||
<li><p class="first">Unzip the SDK update utility:</p>
|
||||
<li><p class="first">Unzip the file:</p>
|
||||
<ul class="small-gap">
|
||||
<li><p class="first">On Mac/Linux, run the command “<code>unzip nacl_sdk.zip</code>” in a terminal
|
||||
window.</p>
|
||||
@ -86,23 +65,25 @@ window.</p>
|
||||
dialog box will open; enter a location and click “Extract”.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Unzipping the SDK update utility creates a directory called <code>nacl_sdk</code> with
|
||||
the following files and directories:</p>
|
||||
<p>A directory is created called <code>nacl_sdk</code> with the following files and
|
||||
directories:</p>
|
||||
<ul class="small-gap">
|
||||
<li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) — the front end of the update
|
||||
utility, i.e., the command you run to download the latest bundles</p>
|
||||
<li><p class="first"><code>naclsdk</code> (and <code>naclsdk.bat</code> for Windows) — the update utility,
|
||||
which is the command you run to download and update bundles.</p>
|
||||
</li>
|
||||
<li><p class="first"><code>sdk_cache</code> — a directory with a manifest file that lists the bundles
|
||||
you have already downloaded</p>
|
||||
you have already downloaded.</p>
|
||||
</li>
|
||||
<li><p class="first"><code>sdk_tools</code> — the back end of the update utility, also known as the
|
||||
“sdk_tools” bundle</p>
|
||||
<li><p class="first"><code>sdk_tools</code> — the code run by the <code>naclsdk</code> command.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p class="first">To see the SDK bundles that are available for download, go to the <code>nacl_sdk</code>
|
||||
directory and run <code>naclsdk</code> with the <code>"list"</code> command.
|
||||
The SDK includes a separate bundle for each version of Chrome/Pepper.</p>
|
||||
</ol>
|
||||
<h2 id="installing-bundles">Installing bundles</h2>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">To see the SDK bundles that are available for download, go to the
|
||||
<code>nacl_sdk</code> directory and run <code>naclsdk</code> with the “<code>list</code>” command. The
|
||||
SDK includes a separate bundle for each version of Chrome/Pepper.</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
<pre class="prettyprint">
|
||||
$ cd nacl_sdk
|
||||
@ -121,26 +102,26 @@ Bundles:
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_31 (post_stable)
|
||||
pepper_32 (post_stable)
|
||||
pepper_33 (post_stable)
|
||||
pepper_34 (post_stable)
|
||||
pepper_35 (stable)
|
||||
pepper_36 (beta)
|
||||
pepper_37 (dev)
|
||||
pepper_canary (canary)
|
||||
bionic_canary (canary)
|
||||
</pre>
|
||||
<p>The sample output above shows that there are a number of bundles available
|
||||
for download, and that you have already installed the latest revision of the
|
||||
<code>sdk_tools</code> bundle (it was included in the zip file you downloaded).
|
||||
Each bundle is labeled post-stable, stable, beta, dev, or canary.
|
||||
These labels usually correspond to the current versions of
|
||||
Chrome. (In the example above, Chrome 31 is stable, Chrome 32 is beta, etc.).
|
||||
We generally recommend that you download and use a “stable” bundle,
|
||||
as applications developed with “stable” bundles can be used by all current
|
||||
<p>The sample output above shows that several bundles are available for
|
||||
download, and that you have already installed the latest revision of the
|
||||
<code>sdk_tools</code> bundle. (It was included in the zip file you downloaded.) Each
|
||||
bundle is labeled post-stable, stable, beta, dev, or canary. These labels
|
||||
usually correspond to the current versions of Chrome.</p>
|
||||
<p>We recommend that you download and use a “stable” bundle, because
|
||||
applications developed with “stable” bundles can be used by all current
|
||||
Chrome users. This is because Native Client is designed to be
|
||||
backward-compatible (for example, applications developed with the
|
||||
<code>pepper_31</code> bundle can run in Chrome 31, Chrome 32, etc.).
|
||||
Thus in the example above, <code>pepper_31</code> is the recommended bundle to use.</p>
|
||||
<code>pepper_31</code> bundle can run in Chrome 31, Chrome 32, etc.).</p>
|
||||
</li>
|
||||
<li><p class="first">Run <code>naclsdk</code> with the “update” command to download recommended bundles.</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
@ -151,25 +132,26 @@ $ ./naclsdk update
|
||||
<pre class="prettyprint">
|
||||
> naclsdk update
|
||||
</pre>
|
||||
<p>By default, <code>naclsdk</code> only downloads bundles that are
|
||||
recommended—generally those that are “stable.” Continuing with the earlier example, the
|
||||
“update” command would only download the <code>pepper_31</code>
|
||||
bundle, since the bundles <code>pepper_32</code> and greater are not yet stable.
|
||||
If you want the <code>pepper_32</code> bundle, you must ask for it explicitly:</p>
|
||||
<p>By default, <code>naclsdk</code> only downloads bundles that are recommended—
|
||||
generally those that are “stable.” Continuing with the earlier example, the
|
||||
“update” command would only download the <code>pepper_35</code> bundle, since the
|
||||
bundles <code>pepper_36</code> and greater are not yet stable. If you want the
|
||||
<code>pepper_36</code> bundle, you must ask for it explicitly:</p>
|
||||
<pre class="prettyprint">
|
||||
$ ./naclsdk update pepper_32
|
||||
$ ./naclsdk update pepper_36
|
||||
</pre>
|
||||
<p>Note that you never need to update the <code>sdk_tools</code> bundle—it is
|
||||
updated automatically (if necessary) whenever you run <code>naclsdk</code>.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<aside class="note">
|
||||
The minimum SDK bundle that supports PNaCl is <code>pepper_31</code>.
|
||||
<blockquote>
|
||||
<div>You never need to update the <code>sdk_tools</code> bundle. It is updated
|
||||
automatically (if necessary) whenever you run <code>naclsdk</code>.</div></blockquote>
|
||||
|
||||
</aside>
|
||||
<h2 id="staying-up-to-date-and-getting-new-versions-of-bundles">Staying up-to-date and getting new versions of bundles</h2>
|
||||
<h2 id="updating-bundles">Updating bundles</h2>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Run <code>naclsdk</code> with the “list” command again; this will show you the list of
|
||||
available bundles and verify which bundles you have installed.</p>
|
||||
<li><p class="first">Run <code>naclsdk</code> with the “list” command. This shows you the list of available
|
||||
bundles and verifies which bundles you have installed.</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
<pre class="prettyprint">
|
||||
$ ./naclsdk list
|
||||
@ -178,8 +160,7 @@ $ ./naclsdk list
|
||||
<pre class="prettyprint">
|
||||
> naclsdk list
|
||||
</pre>
|
||||
<p>Continuing with the earlier example, if you previously downloaded the
|
||||
<code>pepper_31</code> bundle, you should see output similar to this:</p>
|
||||
<p>If an update is available, you’ll see something like this.:</p>
|
||||
<pre class="prettyprint">
|
||||
Bundles:
|
||||
I: installed
|
||||
@ -187,58 +168,26 @@ Bundles:
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
I pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_31 (post_stable)
|
||||
pepper_32 (post_stable)
|
||||
pepper_33 (post_stable)
|
||||
pepper_34 (post_stable)
|
||||
I* pepper_35 (stable)
|
||||
pepper_36 (beta)
|
||||
pepper_37 (dev)
|
||||
pepper_canary (canary)
|
||||
bionic_canary (canary)
|
||||
</pre>
|
||||
<p>An asterisk next to a bundle indicates that there is an update available it.
|
||||
If you run “<code>naclsdk update</code>” now, it warns you with a message similar to
|
||||
this:</p>
|
||||
<pre class="prettyprint">
|
||||
WARNING: pepper_35 already exists, but has an update available. Run update
|
||||
with the --force option to overwrite the existing directory. Warning: This
|
||||
will overwrite any modifications you have made within this directory.
|
||||
</pre>
|
||||
</li>
|
||||
<li><p class="first">Running <code>naclsdk</code> with the “update” command again will verify that your
|
||||
bundles are up-to-date, or warn if you there are new versions of previously
|
||||
installed bundles.</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
<pre class="prettyprint">
|
||||
$ ./naclsdk update
|
||||
</pre>
|
||||
<p>On Windows:</p>
|
||||
<pre class="prettyprint">
|
||||
> naclsdk update
|
||||
</pre>
|
||||
<p>Continuing with the earlier example, you should see output similar to this:</p>
|
||||
<pre class="prettyprint">
|
||||
pepper_31 is already up-to-date.
|
||||
</pre>
|
||||
</li>
|
||||
<li><p class="first">To check if there is a new version of a previously installed bundle, you can
|
||||
run the “list” command again:</p>
|
||||
<pre class="prettyprint">
|
||||
Bundles:
|
||||
I: installed
|
||||
*: update available
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
I* pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_canary (canary)
|
||||
</pre>
|
||||
<p>An asterisk next to a bundle indicates that there is an update
|
||||
available for that bundle. If you run the “update” command now,
|
||||
<code>naclsdk</code> will warn you with a message similar to this:</p>
|
||||
<pre class="prettyprint">
|
||||
WARNING: pepper_31 already exists, but has an update available.
|
||||
Run update with the --force option to overwrite the existing directory.
|
||||
Warning: This will overwrite any modifications you have made within this directory.
|
||||
</pre>
|
||||
<p>To dowload the new version of a bundle and overwrite the existing directory
|
||||
for that bundle, run <code>naclsdk</code> with the <code>--force</code> option.</p>
|
||||
<li><p class="first">To download and install the new bundle, run:</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
<pre class="prettyprint">
|
||||
$ ./naclsdk update --force
|
||||
@ -248,6 +197,9 @@ $ ./naclsdk update --force
|
||||
> naclsdk update --force
|
||||
</pre>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="help-with-the-naclsdk-utility">Help with the <code>naclsdk</code> utility</h2>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">For more information about the <code>naclsdk</code> utility, run:</p>
|
||||
<p>On Mac/Linux:</p>
|
||||
<pre class="prettyprint">
|
||||
@ -259,15 +211,15 @@ $ ./naclsdk help
|
||||
</pre>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Next steps:</p>
|
||||
<p><strong>Next steps:</strong></p>
|
||||
<ul class="small-gap">
|
||||
<li>Browse through the <a class="reference internal" href="/native-client/sdk/release-notes.html"><em>Release Notes</em></a> for important
|
||||
<li>Browse through the <a class="reference external" href="release-notes">Release Notes</a> for important
|
||||
information about the SDK and new bundles.</li>
|
||||
<li>If you’re just getting started with Native Client, we recommend reading
|
||||
the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a> and walking through the
|
||||
<a class="reference internal" href="/native-client/devguide/tutorial/tutorial-part1.html"><em>Getting Started Tutorial</em></a>.</li>
|
||||
<li>If you’re just starting with Native Client, we recommend reading the
|
||||
<a class="reference external" href="../overview">Technical Overview</a> and walking through the
|
||||
<a class="reference external" href="/devguide/tutorial/tutorial-part1">Getting Started Tutorial</a>.</li>
|
||||
<li>If you’d rather dive into information about the toolchains, see
|
||||
<a class="reference internal" href="/native-client/devguide/devcycle/building.html"><em>Building Native Client Modules</em></a>.</li>
|
||||
<a class="reference external" href="/devguide/devcycle/building">Building Native Client Modules</a>.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
@ -6,57 +6,52 @@
|
||||
Each example demonstrates one or two key Native Client programming concepts.
|
||||
After you’ve <a class="reference internal" href="/native-client/sdk/download.html"><em>downloaded the SDK</em></a>, follow the instructions
|
||||
on this page to build and run the examples.</p>
|
||||
<h2 id="configure-the-google-chrome-browser">Configure the Google Chrome Browser</h2>
|
||||
<p>Your version of Chrome must be equal to or greater than the version of your SDK
|
||||
bundle. For example, if you’re developing with the <code>pepper_31</code> bundle, you
|
||||
must use Google Chrome version 31 or greater. To find out what version of Chrome
|
||||
you’re using, type <code>about:chrome</code> or <code>about:version</code> in the Chrome address
|
||||
bar.</p>
|
||||
<h2 id="enable-native-client">Enable Native Client</h2>
|
||||
<aside class="note">
|
||||
If you are using Chrome 31 or later, you can skip this section.
|
||||
</aside>
|
||||
<p>To run Portable Native Client applications you must specifically enable Native
|
||||
Client in Chrome:</p>
|
||||
<ol class="arabic">
|
||||
<li><p class="first">Your version of Chrome must be equal to or greater than the version of
|
||||
your SDK bundle. For example, if you’re developing with the <code>pepper_31</code>
|
||||
bundle, you must use Google Chrome version 31 or greater. To find out what
|
||||
version of Chrome you’re using, type <code>about:chrome</code> or <code>about:version</code>
|
||||
in the Chrome address bar.</p>
|
||||
</li>
|
||||
<li><p class="first">For Portable Native Client, no extra Chrome flags are needed as of
|
||||
Chrome version 31.</p>
|
||||
<p>For other Native Client applications, or to <strong>debug</strong> Portable Native
|
||||
Client applications by translating the <strong>pexe</strong> to a <strong>nexe</strong> ahead of
|
||||
time, enable the Native Client flag. Native Client is enabled by default
|
||||
only for applications distributed through the Chrome Web Store. To run
|
||||
Native Client applications that are not distributed through the Chrome
|
||||
Web Store, like the SDK examples, you must specifically enable the Native
|
||||
Client flag in Chrome:</p>
|
||||
<li><p class="first">Type <code>about:flags</code> in the Chrome address bar and scroll down to “Native
|
||||
Client”.</p>
|
||||
<ul class="small-gap">
|
||||
<li><p class="first">Type <code>about:flags</code> in the Chrome address bar and scroll down to
|
||||
“Native Client”.</p>
|
||||
</li>
|
||||
<li><p class="first">If the link below “Native Client” says “Disable”, then Native Client is
|
||||
already enabled and you don’t need to do anything else.</p>
|
||||
</li>
|
||||
<li><p class="first">If the link below “Native Client” says “Enable”, click the “Enable”
|
||||
link, scroll down to the bottom of the page, and click the “Relaunch
|
||||
Now” button. All browser windows will restart when you relaunch Chrome.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p class="first">Disable the Chrome cache. Chrome caches resources aggressively; when you
|
||||
are building a Native Client application you should disable the cache to
|
||||
make sure that Chrome loads the latest version:</p>
|
||||
<ul class="small-gap">
|
||||
<li><p class="first">Open Chrome’s developer tools by clicking the menu icon <img alt="menu-icon" src="/native-client/images/menu-icon.png" /> and
|
||||
choosing Tools > Developer tools.</p>
|
||||
</li>
|
||||
<li><p class="first">Click the gear icon <img alt="gear-icon" src="/native-client/images/gear-icon.png" /> in the bottom right corner of the
|
||||
Chrome window.</p>
|
||||
</li>
|
||||
<li><p class="first">Under the “General” settings, check the box next to “Disable cache”.</p>
|
||||
<li><p class="first">If the link below “Native Client” says “Enable”, click the “Enable”
|
||||
link.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p class="first">Scroll down to the bottom of the page, and click “Relaunch Now”. All browser
|
||||
windows will restart when you relaunch Chrome.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="disable-the-chrome-cache">Disable the Chrome cache</h2>
|
||||
<p>Chrome caches resources aggressively. When you are building a Native Client
|
||||
application you should disable the cache to make sure that Chrome loads the
|
||||
latest version.</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Open Chrome’s developer tools by clicking the menu icon <img alt="menu-icon" src="/native-client/images/menu-icon.png" /> and
|
||||
choosing Tools > Developer tools.</li>
|
||||
<li>Click the gear icon <img alt="gear-icon" src="/native-client/images/gear-icon.png" /> in the bottom right corner of the Chrome
|
||||
window.</li>
|
||||
<li>Under the “General” settings, check the box next to “Disable cache”.</li>
|
||||
</ol>
|
||||
<h2 id="build-the-sdk-examples">Build the SDK examples</h2>
|
||||
<p>Starting with the <code>pepper_24</code> bundle, the Makefile scripts for the SDK
|
||||
examples build multiple versions of the examples using all three SDK
|
||||
toolchains (newlib, glibc, and PNaCl) and in both release and debug
|
||||
configurations. (Note that some examples build only with the particular
|
||||
toolchains).</p>
|
||||
<p>The Makefile scripts for the SDK examples build multiple versions of the
|
||||
examples using all three SDK toolchains (newlib, glibc, and PNaCl) and in both
|
||||
release and debug configurations. (Note that some examples build only with
|
||||
particular toolchains).</p>
|
||||
<h3 id="build-all-examples">Build all examples</h3>
|
||||
<p>To build all the examples, go to the examples directory in a specific SDK
|
||||
bundle and run <code>make</code>:</p>
|
||||
<pre class="prettyprint">
|
||||
@ -79,6 +74,7 @@ make[2]: Entering directory `pepper_31/examples/api/url_loader'
|
||||
CXX newlib/Debug/url_loader_x86_32.o
|
||||
...
|
||||
</pre>
|
||||
<h3 id="build-a-single-example">Build a single example</h3>
|
||||
<p>Calling <code>make</code> from inside a particular example’s directory will build only
|
||||
that example:</p>
|
||||
<pre class="prettyprint">
|
||||
@ -92,6 +88,7 @@ $ make
|
||||
LINK newlib/Debug/core_arm.nexe
|
||||
CREATE_NMF newlib/Debug/core.nmf
|
||||
</pre>
|
||||
<h3 id="override-defaults">Override defaults</h3>
|
||||
<p>You can call <code>make</code> with the <code>TOOLCHAIN</code> and <code>CONFIG</code> parameters to
|
||||
override the defaults:</p>
|
||||
<pre class="prettyprint">
|
||||
@ -136,12 +133,13 @@ make[1]: Entering directory `pepper_31/examples/api/core'
|
||||
LINK linux/Debug/core.so
|
||||
make[1]: Leaving directory `pepper_31/examples/api/core'
|
||||
</pre>
|
||||
<h2 id="build-results">Build results</h2>
|
||||
<p>After running <code>make</code>, each example directory will contain one or more of
|
||||
the following subdirectories:</p>
|
||||
<ul class="small-gap">
|
||||
<li>a <code>newlib</code> directory with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
<li>a <code>glibc</code> directory with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
<li>a <code>pnacl</code> directory with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
<li><code>newlib</code> with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
<li><code>glibc</code> with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
<li><code>pnacl</code> with subdirectories <code>Debug</code> and <code>Release</code>;</li>
|
||||
</ul>
|
||||
<p>For the newlib and glibc toolchains the Debug and Release subdirectories
|
||||
contain .nexe files for all target architectures. For the PNaCl toolchain
|
||||
|
@ -27,13 +27,17 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="/native-client/sdk/download.html">Download the Native Client SDK</a><ul class="small-gap">
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#overview">Overview</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#prerequisites">Prerequisites</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#download-and-install-the-sdk">Download and install the SDK</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#staying-up-to-date-and-getting-new-versions-of-bundles">Staying up-to-date and getting new versions of bundles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#installing-the-sdk">Installing the SDK</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#installing-bundles">Installing bundles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#updating-bundles">Updating bundles</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/download.html#help-with-the-naclsdk-utility">Help with the <code>naclsdk</code> utility</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/native-client/sdk/examples.html">Running the SDK Examples</a><ul class="small-gap">
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#configure-the-google-chrome-browser">Configure the Google Chrome Browser</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#enable-native-client">Enable Native Client</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#disable-the-chrome-cache">Disable the Chrome cache</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#build-the-sdk-examples">Build the SDK examples</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#build-results">Build results</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#run-the-sdk-examples">Run the SDK examples</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#run-the-sdk-examples-as-packaged-apps">Run the SDK examples as packaged apps</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/sdk/examples.html#debugging-the-sdk-examples">Debugging the SDK examples</a></li>
|
||||
@ -280,6 +284,21 @@
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/community/security-contest/contest-faq.html#why-is-my-country-province-excluded-from-the-contest">Why is my country/province excluded from the contest?</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/native-client/c-api.html">Pepper C API Reference (Stable)</a><ul class="small-gap">
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id1">Interfaces</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id2">Structures</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id3">Functions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id4">Enums</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id5">Typedefs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#id6">Macros</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/c-api.html#files">Files</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/native-client/cpp-api.html">Pepper C++ API Reference (Stable)</a><ul class="small-gap">
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/cpp-api.html#id1">Classes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/cpp-api.html#files">Files</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="/native-client/pepper_stable/c/index.html">Pepper C API Reference (Stable)</a><ul class="small-gap">
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/pepper_stable/c/index.html#id1">Interfaces</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="/native-client/pepper_stable/c/index.html#id2">Structures</a></li>
|
||||
|
17
native_client_sdk/src/doc/_static/css/nacl.css
vendored
17
native_client_sdk/src/doc/_static/css/nacl.css
vendored
@ -81,6 +81,23 @@ blockquote.indent-only {font-style: normal; color: #000; }
|
||||
display: block;
|
||||
margin: 1em auto 0;
|
||||
}
|
||||
#home .left-side {
|
||||
float: left;
|
||||
width: 54%;
|
||||
background-color: #FFF;
|
||||
}
|
||||
#home .left-side-inner {
|
||||
padding-right: 40px;
|
||||
}
|
||||
#home .pull-quote {
|
||||
background-color: #f5f5f5;
|
||||
border-bottom: 1px solid;
|
||||
border-top: 1px solid;
|
||||
font-size: 14px;
|
||||
float: right;
|
||||
margin: .5em 2em 2em 2em;
|
||||
padding: 1em;
|
||||
}
|
||||
#home .right-side {
|
||||
float: right;
|
||||
width: 54%;
|
||||
|
3
native_client_sdk/src/doc/c-api.rst
Normal file
3
native_client_sdk/src/doc/c-api.rst
Normal file
@ -0,0 +1,3 @@
|
||||
.. _c-api:
|
||||
|
||||
.. include:: pepper_stable/c/index.rst
|
@ -65,7 +65,7 @@ I. Binding Agreement
|
||||
will be asked to identify security Exploits in Google’s Native
|
||||
Client Software and enter those Exploits on Google’s `Native Client
|
||||
Issue Tracker <http://code.google.com/p/nativeclient/issues/list>`_
|
||||
web site using the "Security Contest Template." At this point, the
|
||||
website using the "Security Contest Template." At this point, the
|
||||
Exploit will become an Issue and will no longer be able to be
|
||||
identified by another Participant. Google will then verify that the
|
||||
Issue is reproducible. If so, that Issue will become a Verified
|
||||
@ -772,14 +772,14 @@ I. Binding Agreement
|
||||
Google further reserves the right to disqualify any Participant
|
||||
who tampers with the submission process or any other part of the
|
||||
Contest. Any attempt by a Participant to deliberately damage any
|
||||
web site or undermine the legitimate operation of the Contest is
|
||||
website or undermine the legitimate operation of the Contest is
|
||||
a violation of criminal and civil laws and should such an
|
||||
attempt be made, Google reserves the right to seek damages from
|
||||
any such Participant to the fullest extent of the applicable
|
||||
law.
|
||||
|
||||
#. Internet Disclaimer. Google is not responsible for any
|
||||
malfunction of the entire Contest, the web site displaying the
|
||||
malfunction of the entire Contest, the website displaying the
|
||||
Contest terms and entry information, or any late, lost, damaged,
|
||||
misdirected, incomplete, illegible, undeliverable, or destroyed
|
||||
Exploits, Issues or Summaries due to system errors, failed,
|
||||
@ -789,7 +789,7 @@ I. Binding Agreement
|
||||
system/human errors and failures, technical malfunction(s) of
|
||||
any telephone network or lines, cable connections, satellite
|
||||
transmissions, servers or providers, or computer equipment,
|
||||
traffic congestion on the Internet or at the web site displaying
|
||||
traffic congestion on the Internet or at the website displaying
|
||||
the Contest or any combination thereof, including other
|
||||
telecommunication, cable, digital or satellite malfunctions
|
||||
which may limit an entrant’s ability to participate. Google is
|
||||
|
3
native_client_sdk/src/doc/cpp-api.rst
Normal file
3
native_client_sdk/src/doc/cpp-api.rst
Normal file
@ -0,0 +1,3 @@
|
||||
.. _cpp-api:
|
||||
|
||||
.. include:: pepper_stable/cpp/index.rst
|
@ -9,8 +9,8 @@ Application Structure
|
||||
:backlinks: none
|
||||
:depth: 2
|
||||
|
||||
This chapter of the Developer's Guide describes the general structure of a
|
||||
Native Client application. The chapter assumes you are familiar with the
|
||||
This section of the Developer's Guide describes the general structure of a
|
||||
Native Client application. The section assumes you are familiar with the
|
||||
material presented in the :doc:`Technical Overview <../../overview>`.
|
||||
|
||||
|
||||
@ -250,6 +250,6 @@ issue a ``crash`` event
|
||||
|
||||
While the ``CreateModule()`` factory function, the ``Module`` class, and the
|
||||
``Instance`` class are required for a Native Client application, the code
|
||||
samples shown above don't actually do anything. Subsequent chapters in the
|
||||
samples shown above don't actually do anything. Subsequent sections in the
|
||||
Developer's Guide build on these code samples and add more interesting
|
||||
functionality.
|
||||
|
@ -9,7 +9,7 @@ Audio
|
||||
:backlinks: none
|
||||
:depth: 2
|
||||
|
||||
This chapter describes how to use the Pepper audio API to play an audio
|
||||
This section describes how to use the Pepper audio API to play an audio
|
||||
stream. The Pepper audio API provides a low-level means of playing a stream of
|
||||
audio samples generated by a Native Client module. The API generally works as
|
||||
follows: A Native Client module creates an audio resource that represents an
|
||||
@ -18,7 +18,7 @@ resource. The browser calls a function in the Native Client module to fill a
|
||||
buffer with audio samples every time it needs data to play from the audio
|
||||
stream.
|
||||
|
||||
The code examples in this chapter describe a simple Native Client module that
|
||||
The code examples in this section describe a simple Native Client module that
|
||||
generates audio samples using a sine wave with a frequency of 440 Hz. The module
|
||||
starts playing the audio samples as soon as it is loaded into the browser. For a
|
||||
slightly more sophisticated example, see the ``audio`` example (source code in
|
||||
|
@ -12,7 +12,7 @@ File I/O
|
||||
Introduction
|
||||
============
|
||||
|
||||
This chapter describes how to use the `FileIO API
|
||||
This section describes how to use the `FileIO API
|
||||
</native-client/pepper_stable/cpp/classpp_1_1_file_i_o>`_ to read and write
|
||||
files using a local secure data store.
|
||||
|
||||
@ -28,7 +28,7 @@ data download and caching solution for your NaCl applications. For example:
|
||||
#. Load the file into memory using the File IO API when needed by your
|
||||
application.
|
||||
|
||||
The example discussed in this chapter is included in the SDK in the directory
|
||||
The example discussed in this section is included in the SDK in the directory
|
||||
``examples/api/file_io``.
|
||||
|
||||
Reference information
|
||||
|
@ -9,13 +9,13 @@ Messaging System
|
||||
:backlinks: none
|
||||
:depth: 2
|
||||
|
||||
This chapter describes the messaging system used to communicate between the
|
||||
This section describes the messaging system used to communicate between the
|
||||
JavaScript code and the Native Client module's C or C++ code in a
|
||||
Native Client application. It introduces the concept of asynchronous
|
||||
programming and the basic steps required to set up a Native Client module
|
||||
that sends messages to and receive messages from JavaScript. This chapter
|
||||
that sends messages to and receive messages from JavaScript. This section
|
||||
assumes you are familiar with the material presented in the
|
||||
:doc:`Application Structure <application-structure>` chapter.
|
||||
:doc:`Application Structure <application-structure>` section.
|
||||
|
||||
.. Note::
|
||||
:class: note
|
||||
|
@ -13,9 +13,9 @@ Progress Events
|
||||
|
||||
There are five types of events that developers can respond to in Native Client:
|
||||
progress, message, view change, focus, and input events (each described in the
|
||||
glossary below). This chapter describes how to monitor progress events (events
|
||||
glossary below). This section describes how to monitor progress events (events
|
||||
that occur during the loading and execution of a Native Client module). This
|
||||
chapter assumes you are familiar with the material presented in the
|
||||
section assumes you are familiar with the material presented in the
|
||||
:doc:`Technical Overview <../../overview>`.
|
||||
|
||||
.. Note::
|
||||
|
@ -12,11 +12,11 @@ URL Loading
|
||||
Introduction
|
||||
============
|
||||
|
||||
This chapter describes how to use the `URLLoader API
|
||||
This section describes how to use the `URLLoader API
|
||||
</native-client/pepper_stable/cpp/classpp_1_1_u_r_l_loader>`_ to load resources
|
||||
such as images and sound files from a server into your application.
|
||||
|
||||
The example discussed in this chapter is included in the SDK in the directory
|
||||
The example discussed in this section is included in the SDK in the directory
|
||||
``examples/api/url_loader``.
|
||||
|
||||
Reference information
|
||||
@ -41,7 +41,7 @@ When a user launches your Native Client web application, Chrome downloads and
|
||||
caches your application's HTML file, manifest file (.nmf), and Native Client
|
||||
module (.pexe or .nexe). If your application needs additional assets, such as
|
||||
images and sound files, it must explicitly load those assets. You can use the
|
||||
Pepper APIs described in this chapter to load assets from a URL into your
|
||||
Pepper APIs described in this section to load assets from a URL into your
|
||||
application.
|
||||
|
||||
After you've loaded assets into your application, Chrome will cache those
|
||||
|
@ -11,11 +11,11 @@ View Change, Focus, and Input Events
|
||||
:backlinks: none
|
||||
:depth: 2
|
||||
|
||||
This chapter describes view change, focus, and input event handling for a
|
||||
Native Client module. The chapter assumes you are familiar with the
|
||||
This section describes view change, focus, and input event handling for a
|
||||
Native Client module. The section assumes you are familiar with the
|
||||
material presented in the :doc:`Technical Overview <../../overview>`.
|
||||
|
||||
There are two examples used in this chapter to illustrate basic
|
||||
There are two examples used in this section to illustrate basic
|
||||
programming techniques. The ``input_events`` example is used to
|
||||
illustrate how your module can react to keyboard and mouse input
|
||||
event. The ``mouse_lock`` example is used to illustrate how your module
|
||||
|
@ -420,7 +420,7 @@ is how to do so:
|
||||
* Upload the application files (.html, .nmf, .nexe, .css, .js, image files,
|
||||
etc.) to the server on which the application is being hosted.
|
||||
* Use `Google Webmaster Tools <http://www.google.com/webmasters/tools/>`_ to
|
||||
verify ownership of the web site on which the application runs.
|
||||
verify ownership of the website on which the application runs.
|
||||
|
||||
#. Log in to the `Chrome Web Store Developer Dashboard
|
||||
<https://chrome.google.com/webstore/developer/dashboard>`_.
|
||||
|
@ -17,26 +17,26 @@ Client (PNaCl). This is a client-side application that uses HTML, JavaScript and
|
||||
a Native Client module written in C++. The PNaCl toolchain is used to enable
|
||||
running the Native Client module directly from a web page.
|
||||
|
||||
It's recommended to read the :doc:`Native Client Technical Overview
|
||||
It's recommended that you read the :doc:`Native Client Technical Overview
|
||||
</overview>` prior to going through this tutorial.
|
||||
|
||||
What the application in this tutorial does
|
||||
------------------------------------------
|
||||
|
||||
The application in this tutorial shows how to load a Native Client module in a
|
||||
web page, and how to send messages between JavaScript and the C++ code in the
|
||||
Native Client module. In this simple application, the JavaScript code in the web
|
||||
page sends a ``'hello'`` message to the Native Client module. When the Native
|
||||
Client module receives a message, it checks whether the message is equal to the
|
||||
string ``'hello'``. If it is, the Native Client module returns a message saying
|
||||
``'hello from NaCl'``. A JavaScript alert panel displays the message received
|
||||
from the Native Client module.
|
||||
web page, and how to send messages between JavaScript and the Native Client
|
||||
module. In this simple application, the JavaScript sends a ``'hello'`` message
|
||||
to the Native Client module. When the Native Client module receives a message,
|
||||
it checks whether the message is equal to the string ``'hello'``. If it is, the
|
||||
Native Client module returns a message saying ``'hello from NaCl'``. A
|
||||
JavaScript alert panel displays the message received from the Native Client
|
||||
module.
|
||||
|
||||
Communication between JavaScript and Native Client modules
|
||||
----------------------------------------------------------
|
||||
|
||||
The Native Client programming model supports bidirectional communication between
|
||||
JavaScript and the Native Client module (C/C++ code). Both sides can initiate
|
||||
JavaScript and the Native Client module. Both sides can initiate
|
||||
and respond to messages. In all cases, the communication is asynchronous: The
|
||||
caller (JavaScript or the Native Client module) sends a message, but the caller
|
||||
does not wait for, or may not even expect, a response. This behavior is
|
||||
@ -76,8 +76,8 @@ rule called ``serve`` is the easiest way to invoke it:
|
||||
:doc:`versioning information </version>`). In the sample invocation above
|
||||
``pepper_$(VERSION)`` refers to the specific version you want to use. For
|
||||
example, ``pepper_31``. If you don't know which version you need, use the
|
||||
one labeled ``(stable)`` by ``naclsdk list``. See :doc:`Download the Native
|
||||
Client SDK </sdk/download>` for more details.
|
||||
one labeled ``(stable)`` by the ``naclsdk list`` command. See
|
||||
:doc:`Download the Native Client SDK </sdk/download>` for more details.
|
||||
|
||||
If no port number is specified, the server defaults to port 5103, and can be
|
||||
accessed at ``http://localhost:5103``.
|
||||
@ -280,7 +280,7 @@ Next steps
|
||||
==========
|
||||
|
||||
* See the :doc:`Application Structure </devguide/coding/application-structure>`
|
||||
chapter in the Developer's Guide for information about how to structure a
|
||||
section in the Developer's Guide for information about how to structure a
|
||||
Native Client module.
|
||||
* Check the `C++ Reference </native-client/pepper_stable/cpp>`_ for details
|
||||
about how to use the Pepper APIs.
|
||||
|
@ -27,7 +27,7 @@ manifest file
|
||||
A file containing metadata or information about accompanying files.
|
||||
message events
|
||||
Events used to pass data between JavaScript and the Native Client
|
||||
module (see the :doc:`Messaging System <devguide/coding/message-system>` chapter).
|
||||
module (see the :doc:`Messaging System <devguide/coding/message-system>` section).
|
||||
module
|
||||
Depending on context, "module" may mean one of two things. First, it may be a
|
||||
general short-term for for "Native Client module"---compiled C/C++ code
|
||||
|
@ -5,7 +5,9 @@ Welcome to Native Client
|
||||
.. raw:: html
|
||||
|
||||
<div id="home">
|
||||
<a class="button-nacl button-download" href="/native-client/sdk/download.html">Download SDK</a>
|
||||
<div class="pull-quote">To get the SDK and<br/>installation instructions<br/>
|
||||
<a href="/native-client/sdk/download.html">visit the SDK Download page</a>.
|
||||
</div>
|
||||
<div class="big-intro">
|
||||
|
||||
**Native Client** is a sandbox for running compiled C and C++ code in the
|
||||
@ -18,47 +20,89 @@ In short, Native Client brings the **performance** and **low-level control**
|
||||
of native code to modern web browsers, without sacrificing the **security** and
|
||||
**portability** of the web. Watch the video below for an overview of
|
||||
Native Client, including its goals, how it works, and how
|
||||
Portable Native Client lets developers run native compiled code on the web.
|
||||
Portable Native Client lets developers run native compiled code on the web.
|
||||
|
||||
.. Note::
|
||||
:class: note
|
||||
|
||||
This site uses several examples of Native Client. For the best experience,
|
||||
consider downloading the `latest version of Chrome <http://www.google.com/chrome/>`_.
|
||||
When you come back, be sure to `check out our demos
|
||||
<https://gonativeclient.appspot.com/demo>`_.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
|
||||
<iframe class="video" width="640" height="360"
|
||||
<iframe class="video" width="600" height="337"
|
||||
src="//www.youtube.com/embed/MvKEomoiKBA?rel=0" frameborder="0"></iframe>
|
||||
|
||||
<div class="right-side">
|
||||
<div class="right-side-inner">
|
||||
<h2>Guiding principles of Native Client</h2>
|
||||
<div class="big-intro">
|
||||
<ul>
|
||||
<li>Developer flexibility to program in any language.</li>
|
||||
<li>Running close to the metal to allow access to performance gains.</li>
|
||||
<li>Protecting users from malicious code and malware.</li>
|
||||
<li>Write-once, run-anywhere code portability across all user architectures.</li>
|
||||
</ul>
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Get started with Native Client
|
||||
==============================
|
||||
|
||||
Two Types of Modules
|
||||
====================
|
||||
|
||||
Native Client comes in two flavors.
|
||||
|
||||
* **Portable Native Client (PNaCl)**: Pronounced 'pinnacle', PNaCl runs single, portable (**pexe**) executables and is available
|
||||
in most implementations of Chrome. A translator built into Chrome
|
||||
translates the pexe into native code for the client hardware. The entire
|
||||
module is translated before any code is executed rather than as the code is
|
||||
executed. PNaCl modules can be hosted from any web server.
|
||||
* **Native Client (NaCl)**: Also called traditional or non-portable Native
|
||||
Client, NaCl runs
|
||||
architecture-dependent (**nexe**) modules, which are packaged into an
|
||||
application. At runtime, the browser decides which nexe to load based on the
|
||||
architecture of the client machine. NaCl modules must be run from the `Chrome
|
||||
Web Store (CWS) <https://chrome.google.com/webstore/category/apps>`_.
|
||||
Fortunately, work from PNaCl modules can be used to create NaCl modules.
|
||||
|
||||
These flavors are described in more depth in `PNaCl and NaCl <nacl-and-pnacl>`_
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div class="left-side">
|
||||
<div class="left-side-inner">
|
||||
<h2>Hello World</h2>
|
||||
<div class="big-intro">
|
||||
|
||||
#. :doc:`Download the Native Client SDK <sdk/download>`.
|
||||
#. Read the :doc:`Technical Overview <overview>`.
|
||||
#. Learn how to use the SDK and build both a web app and a Chrome app in the
|
||||
:doc:`Getting Started Tutorial <devguide/tutorial/tutorial-part1>`.
|
||||
To jump right in `take the tutorial <devguide/tutorial/tutorial-part1>`_ that walks you through a basic web
|
||||
application for Portable Native Client (PNaCl). This is a client-side
|
||||
application that uses HTML, JavaScript, and a Native Client module written in C++.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>A Little More Advanced</h2>
|
||||
<div class="big-intro">
|
||||
|
||||
If you've already got the basics down, you're probably trying to get a real application ready for production. You're `building </devguide/devcycle/building>`_, `debugging </devguide/devcycle/debugging>`_ or `ready to distribute </devguide/distributing>`_.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
|
||||
<div class="left-side">
|
||||
<div class="left-side-inner">
|
||||
<h2>Nuts and Bolts</h2>
|
||||
<div class="big-intro">
|
||||
|
||||
You've been working on a Native Client module for a while now and you've run into an arcane problem. You may need to refer to the `PNaCl Bitcode Reference </reference/pnacl-bitcode-abi>`_ or the `Sandbox internals </sandbox_internals/index>`_.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
I Want to Know Everything
|
||||
=========================
|
||||
|
||||
So, you like to read now and try later. Start with our `Technical Overview </overview>`_
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div class="big-intro" style="clear: both;">
|
||||
|
||||
Send us questions, comments, and feedback:
|
||||
@ -67,4 +111,3 @@ Send us questions, comments, and feedback:
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,8 +24,8 @@ web technologies, by running compiled C and C++ code at near-native speeds and
|
||||
taking advantage of multiple cores with shared memory.
|
||||
|
||||
While Native Client provides operating system independence, it requires
|
||||
developers to generate architecture-specific executable modules
|
||||
(**nexe** modules) for each hardware platform. This is not only inconvenient
|
||||
developers to generate architecture-specific executable
|
||||
(**nexe**) modules for each hardware platform. This is not only inconvenient
|
||||
for developers, but architecture-specific machine code is not portable and thus
|
||||
not well-suited for the open web. The traditional method of application
|
||||
distribution on the web is through a self-contained bundle of HTML, CSS,
|
||||
@ -44,15 +44,14 @@ PNaCl solves the portability problem by splitting the compilation process
|
||||
into two parts:
|
||||
|
||||
#. compiling the source code to a portable bitcode format, and
|
||||
#. translating the bitcode to a host-specific executable.
|
||||
#. translating the bitcode to a host-specific executable just before execution.
|
||||
|
||||
PNaCl enables developers
|
||||
to distribute **portable executables** (**pexe** modules) that the hosting
|
||||
environment (e.g., the Chrome browser) can translate to native code before
|
||||
executing. This portability aligns Native Client with existing open web
|
||||
technologies such as JavaScript: A developer can distribute a **pexe**
|
||||
as part of an application (along with HTML, CSS, and JavaScript),
|
||||
and the user's machine is simply able to run it.
|
||||
PNaCl enables developers to distribute **portable executables** (**pexe**)
|
||||
modules that the hosting environment (in other words, the Chrome browser) can
|
||||
translate to native code before executing. This portability aligns Native Client
|
||||
with existing open web technologies such as JavaScript. A developer can
|
||||
distribute a **pexe** as part of an application (along with HTML, CSS, and
|
||||
JavaScript), and the user's machine is simply able to run it.
|
||||
|
||||
With PNaCl, a developer generates a single **pexe** from source code,
|
||||
rather than multiple platform-specific nexes. The **pexe** provides both
|
||||
@ -61,17 +60,12 @@ architecture-independent format, it does not suffer from the portability
|
||||
problem described above. Future versions of hosting environments should
|
||||
have no problem executing the **pexe**, even on new architectures.
|
||||
Moreover, if an existing architecture is subsequently enhanced, the
|
||||
**pexe** doesn't even have to be recompiled---in some cases the
|
||||
**pexe** doesn't even have to be recompiled. In some cases the
|
||||
client-side translation will automatically be able to take advantage of
|
||||
the new capabilities.
|
||||
|
||||
**In short, PNaCl combines the portability of existing web technologies with
|
||||
the performance and security benefits of Native Client.**
|
||||
|
||||
With the advent of PNaCl, the distribution restriction of Native Client
|
||||
can be lifted. Specifically, a **pexe** module can be part of any web
|
||||
application---it does not have to be distributed through the Chrome Web
|
||||
Store.
|
||||
the new capabilities. A **pexe** module can be part of any web
|
||||
application. It does not have to be distributed through the Chrome Web
|
||||
Store. In short, PNaCl combines the portability of existing web technologies
|
||||
with the performance and security benefits of Native Client.
|
||||
|
||||
PNaCl is a new technology, and as such it still has a few limitations
|
||||
as compared to NaCl. These limitations are described below.
|
||||
@ -107,14 +101,14 @@ The limitations below apply to the current release of PNaCl. If any of
|
||||
these limitations are critical for your application, you should use
|
||||
non-portable NaCl:
|
||||
|
||||
* By its nature, PNaCl does not support architecture-specific
|
||||
* PNaCl does not support architecture-specific
|
||||
instructions in an application (i.e., inline assembly), but tries to
|
||||
offer high-performance portable equivalents. One such example is
|
||||
PNaCl's :ref:`Portable SIMD Vectors <portable_simd_vectors>`.
|
||||
* Currently PNaCl only supports static linking with the ``newlib``
|
||||
* PNaCl only supports static linking with the ``newlib``
|
||||
C standard library (the Native Client SDK provides a PNaCl port of
|
||||
``newlib``). Dynamic linking and ``glibc`` are not yet supported.
|
||||
Work is under way to enable dynamic linking in future versions of PNaCl.
|
||||
* In the initial release, PNaCl does not support some GNU extensions
|
||||
* PNaCl does not support some GNU extensions
|
||||
like taking the address of a label for computed ``goto``, or nested
|
||||
functions.
|
||||
|
@ -38,35 +38,33 @@ Why use Native Client?
|
||||
|
||||
Native Client open-source technology is designed to run compiled code
|
||||
securely inside a browser at near-native speeds. Native Client puts web
|
||||
applications on the same playing field as traditional (locally-run)
|
||||
software---it provides the means to fully harness the client's computational
|
||||
resources for applications such as 3D games, multimedia editors, CAD modeling,
|
||||
applications on the same playing field as desktop software---it provides the
|
||||
means to fully harness the client's computational resources for applications
|
||||
such as 3D games, multimedia editors, CAD modeling,
|
||||
client-side data analytics, and interactive simulations.
|
||||
Native Client also aims to give C and C++ (and eventually other languages) the
|
||||
same level of portability and safety that JavaScript provides on the web today.
|
||||
|
||||
Here are a few of the key benefits that Native Client offers:
|
||||
Important benefits of Native Client include:
|
||||
|
||||
* **Graphics, audio, and much more:** Run native code modules that render 2D
|
||||
* **Graphics, audio, and much more:** Running native code modules that render 2D
|
||||
and 3D graphics, play audio, respond to mouse and keyboard events, run on
|
||||
multiple threads, and access memory directly---all without requiring
|
||||
the user to install a plugin.
|
||||
* **Portability:** Write your applications once and you'll be able to run them
|
||||
across operating systems (Windows, Linux, Mac, and Chrome OS) and CPU
|
||||
architectures (x86 and ARM).
|
||||
* **Easy migration path to the web:** Many developers and companies have years
|
||||
of work invested in existing desktop applications. Native Client makes the
|
||||
transition from the desktop to a web application significantly easier because
|
||||
it supports C and C++.
|
||||
* **Security:** Native Client uses a double sandbox model designed to protect
|
||||
the user's system from malicious or buggy applications. This model offers the
|
||||
safety of traditional web applications without sacrificing performance and
|
||||
* **Portability:** Writing your applications once and running them on operating
|
||||
systems (Windows, Linux, Mac, and Chrome OS) and CPU architectures (x86 and
|
||||
ARM).
|
||||
* **Easy migration path to the web:** Leveraging years of work in existing
|
||||
desktop applications. Native Client makes the transition from the desktop to a
|
||||
web application significantly easier because it supports C and C++.
|
||||
* **Security:** Protecting the user's system from malicious or buggy
|
||||
applications through Native Client's double sandbox model. This model offers
|
||||
the safety of traditional web applications without sacrificing performance and
|
||||
without requiring users to install a plugin.
|
||||
* **Performance:** Native Client allows web applications to run at speeds
|
||||
comparable to desktop applications (within 5-15% of native speed).
|
||||
Native Client also allows applications to harness all available CPU cores via
|
||||
a threading API; this enables demanding applications such as console-quality
|
||||
games to run inside the browser.
|
||||
* **Performance:** Running at speeds comparable to desktop applications (within
|
||||
5-15% of native speed). Native Client also allows applications to harness all
|
||||
available CPU cores via a threading API; this enables demanding applications
|
||||
such as console-quality games to run inside the browser.
|
||||
|
||||
Common use cases
|
||||
================
|
||||
@ -74,17 +72,13 @@ Common use cases
|
||||
Typical use cases for Native Client include the following:
|
||||
|
||||
* **Existing software components:** With support for C and C++, Native
|
||||
Client enables you to reuse existing software modules in
|
||||
web applications---you don't need to rewrite and debug code
|
||||
that's already proven to work well.
|
||||
Client lets you to reuse existing software modules in web applications. You
|
||||
don't need to rewrite and debug code that already works.
|
||||
* **Legacy desktop applications:** Native Client provides a smooth migration
|
||||
path from desktop applications to the web. You can port and recompile existing
|
||||
code for the computation engine of your application directly to Native Client,
|
||||
and need repurpose only the user interface and event handling portions to the
|
||||
new browser platform. Native Client allows you to embed existing functionality
|
||||
directly into the browser. At the same time, your application can take
|
||||
advantage of things the browser does well: handling user interaction and
|
||||
processing events, based on the latest developments in HTML5.
|
||||
and need rebuild only the user interface and event handling portions for the
|
||||
browser.
|
||||
* **Heavy computation in enterprise applications:** Native Client can handle the
|
||||
number crunching required by large-scale enterprise applications. To ensure
|
||||
protection of user data, Native Client enables you to build complex
|
||||
@ -102,20 +96,19 @@ Typical use cases for Native Client include the following:
|
||||
* **Any application that requires acceleration**: Native Client fits seamlessly
|
||||
into web applications---it's up to you to decide to what extent to use it.
|
||||
Use of Native Client covers the full spectrum from complete applications to
|
||||
small optimized routines that accelerate vital parts of web apps.
|
||||
small optimized routines that accelerate vital parts of web applications.
|
||||
|
||||
.. _link_how_nacl_works:
|
||||
|
||||
How Native Client works
|
||||
=======================
|
||||
|
||||
Native Client is an umbrella name for a set of interrelated software components
|
||||
that work together to provide a way to develop C/C++ applications and run them
|
||||
securely on the web.
|
||||
Native Client is an umbrella name for a set of related software components that
|
||||
provide a way to develop C/C++ applications and run them securely on the web.
|
||||
|
||||
At a high level, Native Client consists of:
|
||||
|
||||
* **Toolchains**: collections of development tools (compilers, linkers, etc.)
|
||||
* **Toolchains**: Collections of development tools (compilers, linkers, etc.)
|
||||
that transform C/C++ code to Native Client modules.
|
||||
* **Runtime components**: components embedded in the browser or other
|
||||
host platforms that allow execution of Native Client modules
|
||||
@ -129,10 +122,10 @@ The left side of the diagram shows how to use Portable Native Client
|
||||
(PNaCl, pronounced "pinnacle"). Developers use the PNaCl toolchain
|
||||
to produce a single, portable (**pexe**) module. At runtime, a translator
|
||||
built into the browser translates the pexe into native code for the
|
||||
relevant client architecture.
|
||||
relevant client architecture. Translation occurs before any code is executed.
|
||||
|
||||
The right side of the diagram shows how to use traditional (non-portable)
|
||||
Native Client. Developers use a nacl-gcc based toolchain to produce multiple
|
||||
The right side of the diagram shows how to use (non-portable) Native Client.
|
||||
Developers use a nacl-gcc based toolchain to produce multiple
|
||||
architecture-dependent (**nexe**) modules, which are packaged into an
|
||||
application. At runtime, the browser decides which nexe to load based
|
||||
on the architecture of the client machine.
|
||||
|
@ -3,112 +3,95 @@
|
||||
Download the Native Client SDK
|
||||
==============================
|
||||
|
||||
To build Native Client modules, you must download and install the Native
|
||||
Client Software Development Kit (SDK). This page provides an overview
|
||||
of the Native Client SDK, and instructions for how to download and
|
||||
install the SDK.
|
||||
To build Native Client modules, you must download and install the Native Client
|
||||
Software Development Kit (SDK). This page provides an overview of the Native
|
||||
Client SDK, and instructions for how to download and install the SDK.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div id="home">
|
||||
<a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
|
||||
</div>
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The Native Client SDK includes the following:
|
||||
|
||||
support for multiple Pepper versions
|
||||
The SDK contains **bundles** that let you compile Native Client modules
|
||||
using different versions of the
|
||||
:ref:`link_pepper` (e.g., Pepper 31 or Pepper Canary). Review the
|
||||
:doc:`Release Notes <release-notes>` for a description of the new features
|
||||
included in each Pepper version to help you decide which bundle to
|
||||
use to develop your application. In general, Native Client modules
|
||||
compiled using a particular Pepper version will work in
|
||||
corresponding versions of Chrome and higher. For example, a module
|
||||
compiled using the Pepper 31 bundle will work in Chrome 31 and
|
||||
higher.
|
||||
|
||||
update utility
|
||||
The ``naclsdk`` utility (``naclsdk.bat`` on Windows) lets you download new
|
||||
bundles that are available, as well as new versions of existing bundles.
|
||||
|
||||
toolchains
|
||||
Each platform includes three toolchains: one for compiling
|
||||
Portable Native Client (PNaCl) applications, one for compiling
|
||||
architecture-specific Native Client applications with newlib, and
|
||||
one for compiling architecture-specific Native Client applications with glibc.
|
||||
Newlib and glibc are two different implementations
|
||||
of the C standard library. All three toolchains contain
|
||||
Native Client-compatible versions of standard compilers, linkers,
|
||||
and other tools. See :doc:`NaCl and PNaCl </nacl-and-pnacl>` to help
|
||||
you choose the right toolchain.
|
||||
|
||||
examples
|
||||
Each example in the SDK includes C or C++ source files and header files
|
||||
illustrating how to use NaCl and Pepper, along with a Makefile to build
|
||||
the example using each of the toolchains.
|
||||
|
||||
tools
|
||||
The SDK includes a number of additional tools that you can use for
|
||||
tasks such as validating Native Client modules and running modules
|
||||
from the command line.
|
||||
- **Support for multiple Pepper versions** to compile for specific minimum
|
||||
versions of Chrome.
|
||||
- **Update utility** to download new bundles that are available, as well as new
|
||||
versions of existing bundles.
|
||||
- **Toolchains** to compile for Portable Native Client (PNaCl), traditional
|
||||
Native Client (NaCl), and for compiling architecture-specific Native Client
|
||||
applications with glibc.
|
||||
- **Examples** Including C or C++ source files and header files illustrating
|
||||
how to use NaCl and Pepper, and Makefiles to build the example with each of
|
||||
the toolchains.
|
||||
- **Tools** for validating Native Client modules and running modules from the
|
||||
command line.
|
||||
|
||||
Follow the steps below to download and install the Native Client SDK.
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
* **Python:** Make sure you have Python 2.6 or 2.7 installed, and that the
|
||||
Python executable is in your path.
|
||||
|
||||
* On Mac/Linux, Python is likely preinstalled. Run the command ``"python
|
||||
-V``" in a terminal window, and make sure that the version of Python you
|
||||
have is 2.6.x or 2.7.x (if it's not, upgrade to one of those versions).
|
||||
* **Python 2.6 or 2.7:** Make sure that the Python executable is in your path.
|
||||
Python 2.7 is preferred. Python 3.x is not yet supported.
|
||||
|
||||
* On Mac and Linux, Python is likely preinstalled. Run the command "``python
|
||||
-V``" in a terminal window, and make sure that the version you have is 2.6.x
|
||||
or 2.7.x.
|
||||
* On Windows, you may need to install Python. Go to
|
||||
`http://www.python.org/download/ <http://www.python.org/download/>`_ and
|
||||
select the latest 2.x version. In addition, be sure to add the Python
|
||||
directory (for example, ``C:\python27``) to the PATH `environment
|
||||
variable <http://en.wikipedia.org/wiki/Environment_variable>`_. After
|
||||
you've installed Python, run the command ``"python -V``" in a Command
|
||||
Prompt window and verify that the version of Python you have is 2.6.x or
|
||||
2.7.x.
|
||||
* Note that Python 3.x is not yet supported.
|
||||
variable <http://en.wikipedia.org/wiki/Environment_variable>`_. Run
|
||||
"``python -V``" from a command line to verify that you properly configured
|
||||
the PATH variable.
|
||||
|
||||
* **Make:** On the Mac, you need to install the ``make`` command on your system
|
||||
before you can build and run the examples in the SDK. One easy way to get
|
||||
``make``, along with several other useful tools, is to install
|
||||
`Xcode Developer Tools <https://developer.apple.com/technologies/tools/>`_.
|
||||
After installing Xcode, go to the Preferences menu, select
|
||||
Downloads and Components, and verify that Command Line Tools are installed.
|
||||
If you'd rather not install Xcode, you can download and build an
|
||||
After installing Xcode, go to the XCode menu, open the Preferences dialog box
|
||||
then select Downloads and Components. Verify that Command Line Tools are
|
||||
installed. If you'd rather not install Xcode, you can download and build an
|
||||
`open source version
|
||||
<http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of
|
||||
``make``. In order to build the command you may also need to download and
|
||||
install a copy of `gcc <https://github.com/kennethreitz/osx-gcc-installer>`_.
|
||||
<http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``.
|
||||
To build the command you may also need to download and install
|
||||
`gcc <https://github.com/kennethreitz/osx-gcc-installer>`_.
|
||||
|
||||
Download and install the SDK
|
||||
----------------------------
|
||||
Installing the SDK
|
||||
------------------
|
||||
|
||||
#. Download the SDK update utility: `nacl_sdk.zip
|
||||
#. Download the SDK update zip file: `nacl_sdk.zip
|
||||
<http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip>`_.
|
||||
|
||||
#. Unzip the SDK update utility:
|
||||
#. Unzip the file:
|
||||
|
||||
* On Mac/Linux, run the command "``unzip nacl_sdk.zip``" in a terminal
|
||||
window.
|
||||
* On Windows, right-click on the .zip file and select "Extract All...". A
|
||||
dialog box will open; enter a location and click "Extract".
|
||||
|
||||
Unzipping the SDK update utility creates a directory called ``nacl_sdk`` with
|
||||
the following files and directories:
|
||||
A directory is created called ``nacl_sdk`` with the following files and
|
||||
directories:
|
||||
|
||||
* ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the front end of the update
|
||||
utility, i.e., the command you run to download the latest bundles
|
||||
* ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility,
|
||||
which is the command you run to download and update bundles.
|
||||
* ``sdk_cache`` --- a directory with a manifest file that lists the bundles
|
||||
you have already downloaded
|
||||
* ``sdk_tools`` --- the back end of the update utility, also known as the
|
||||
"sdk_tools" bundle
|
||||
you have already downloaded.
|
||||
* ``sdk_tools`` --- the code run by the ``naclsdk`` command.
|
||||
|
||||
#. To see the SDK bundles that are available for download, go to the ``nacl_sdk``
|
||||
directory and run ``naclsdk`` with the ``"list"`` command.
|
||||
The SDK includes a separate bundle for each version of Chrome/Pepper.
|
||||
.. installing-bundles:
|
||||
|
||||
Installing bundles
|
||||
------------------
|
||||
|
||||
#. To see the SDK bundles that are available for download, go to the
|
||||
``nacl_sdk`` directory and run ``naclsdk`` with the "``list``" command. The
|
||||
SDK includes a separate bundle for each version of Chrome/Pepper.
|
||||
|
||||
On Mac/Linux::
|
||||
|
||||
@ -128,26 +111,28 @@ Download and install the SDK
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_31 (post_stable)
|
||||
pepper_32 (post_stable)
|
||||
pepper_33 (post_stable)
|
||||
pepper_34 (post_stable)
|
||||
pepper_35 (stable)
|
||||
pepper_36 (beta)
|
||||
pepper_37 (dev)
|
||||
pepper_canary (canary)
|
||||
bionic_canary (canary)
|
||||
|
||||
The sample output above shows that there are a number of bundles available
|
||||
for download, and that you have already installed the latest revision of the
|
||||
``sdk_tools`` bundle (it was included in the zip file you downloaded).
|
||||
Each bundle is labeled post-stable, stable, beta, dev, or canary.
|
||||
These labels usually correspond to the current versions of
|
||||
Chrome. (In the example above, Chrome 31 is stable, Chrome 32 is beta, etc.).
|
||||
We generally recommend that you download and use a "stable" bundle,
|
||||
as applications developed with "stable" bundles can be used by all current
|
||||
|
||||
The sample output above shows that several bundles are available for
|
||||
download, and that you have already installed the latest revision of the
|
||||
``sdk_tools`` bundle. (It was included in the zip file you downloaded.) Each
|
||||
bundle is labeled post-stable, stable, beta, dev, or canary. These labels
|
||||
usually correspond to the current versions of Chrome.
|
||||
|
||||
We recommend that you download and use a "stable" bundle, because
|
||||
applications developed with "stable" bundles can be used by all current
|
||||
Chrome users. This is because Native Client is designed to be
|
||||
backward-compatible (for example, applications developed with the
|
||||
``pepper_31`` bundle can run in Chrome 31, Chrome 32, etc.).
|
||||
Thus in the example above, ``pepper_31`` is the recommended bundle to use.
|
||||
|
||||
#. Run ``naclsdk`` with the "update" command to download recommended bundles.
|
||||
|
||||
@ -159,27 +144,27 @@ Download and install the SDK
|
||||
|
||||
> naclsdk update
|
||||
|
||||
By default, ``naclsdk`` only downloads bundles that are
|
||||
recommended---generally those that are "stable." Continuing with the earlier example, the
|
||||
"update" command would only download the ``pepper_31``
|
||||
bundle, since the bundles ``pepper_32`` and greater are not yet stable.
|
||||
If you want the ``pepper_32`` bundle, you must ask for it explicitly::
|
||||
By default, ``naclsdk`` only downloads bundles that are recommended---
|
||||
generally those that are "stable." Continuing with the earlier example, the
|
||||
"update" command would only download the ``pepper_35`` bundle, since the
|
||||
bundles ``pepper_36`` and greater are not yet stable. If you want the
|
||||
``pepper_36`` bundle, you must ask for it explicitly::
|
||||
|
||||
$ ./naclsdk update pepper_32
|
||||
|
||||
Note that you never need to update the ``sdk_tools`` bundle---it is
|
||||
updated automatically (if necessary) whenever you run ``naclsdk``.
|
||||
$ ./naclsdk update pepper_36
|
||||
|
||||
.. Note::
|
||||
:class: note
|
||||
|
||||
You never need to update the ``sdk_tools`` bundle. It is updated
|
||||
automatically (if necessary) whenever you run ``naclsdk``.
|
||||
|
||||
The minimum SDK bundle that supports PNaCl is ``pepper_31``.
|
||||
.. updating-bundles:
|
||||
|
||||
Staying up-to-date and getting new versions of bundles
|
||||
Updating bundles
|
||||
------------------------------------------------------
|
||||
|
||||
#. Run ``naclsdk`` with the "list" command again; this will show you the list of
|
||||
available bundles and verify which bundles you have installed.
|
||||
#. Run ``naclsdk`` with the "list" command. This shows you the list of available
|
||||
bundles and verifies which bundles you have installed.
|
||||
|
||||
On Mac/Linux::
|
||||
|
||||
@ -188,9 +173,8 @@ Staying up-to-date and getting new versions of bundles
|
||||
On Windows::
|
||||
|
||||
> naclsdk list
|
||||
|
||||
Continuing with the earlier example, if you previously downloaded the
|
||||
``pepper_31`` bundle, you should see output similar to this::
|
||||
|
||||
If an update is available, you'll see something like this.::
|
||||
|
||||
Bundles:
|
||||
I: installed
|
||||
@ -198,57 +182,25 @@ Staying up-to-date and getting new versions of bundles
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
I pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_31 (post_stable)
|
||||
pepper_32 (post_stable)
|
||||
pepper_33 (post_stable)
|
||||
pepper_34 (post_stable)
|
||||
I* pepper_35 (stable)
|
||||
pepper_36 (beta)
|
||||
pepper_37 (dev)
|
||||
pepper_canary (canary)
|
||||
bionic_canary (canary)
|
||||
|
||||
#. Running ``naclsdk`` with the "update" command again will verify that your
|
||||
bundles are up-to-date, or warn if you there are new versions of previously
|
||||
installed bundles.
|
||||
An asterisk next to a bundle indicates that there is an update available it.
|
||||
If you run "``naclsdk update``" now, it warns you with a message similar to
|
||||
this::
|
||||
|
||||
On Mac/Linux::
|
||||
WARNING: pepper_35 already exists, but has an update available. Run update
|
||||
with the --force option to overwrite the existing directory. Warning: This
|
||||
will overwrite any modifications you have made within this directory.
|
||||
|
||||
$ ./naclsdk update
|
||||
|
||||
On Windows::
|
||||
|
||||
> naclsdk update
|
||||
|
||||
Continuing with the earlier example, you should see output similar to this::
|
||||
|
||||
pepper_31 is already up-to-date.
|
||||
|
||||
#. To check if there is a new version of a previously installed bundle, you can
|
||||
run the "list" command again::
|
||||
|
||||
Bundles:
|
||||
I: installed
|
||||
*: update available
|
||||
|
||||
I sdk_tools (stable)
|
||||
vs_addin (dev)
|
||||
pepper_27 (post_stable)
|
||||
pepper_28 (post_stable)
|
||||
pepper_29 (post_stable)
|
||||
pepper_30 (post_stable)
|
||||
I* pepper_31 (stable)
|
||||
pepper_32 (beta)
|
||||
pepper_canary (canary)
|
||||
|
||||
An asterisk next to a bundle indicates that there is an update
|
||||
available for that bundle. If you run the "update" command now,
|
||||
``naclsdk`` will warn you with a message similar to this::
|
||||
|
||||
WARNING: pepper_31 already exists, but has an update available.
|
||||
Run update with the --force option to overwrite the existing directory.
|
||||
Warning: This will overwrite any modifications you have made within this directory.
|
||||
|
||||
To dowload the new version of a bundle and overwrite the existing directory
|
||||
for that bundle, run ``naclsdk`` with the ``--force`` option.
|
||||
#. To download and install the new bundle, run:
|
||||
|
||||
On Mac/Linux::
|
||||
|
||||
@ -257,6 +209,9 @@ Staying up-to-date and getting new versions of bundles
|
||||
On Windows::
|
||||
|
||||
> naclsdk update --force
|
||||
|
||||
Help with the ``naclsdk`` utility
|
||||
---------------------------------
|
||||
|
||||
#. For more information about the ``naclsdk`` utility, run:
|
||||
|
||||
@ -268,12 +223,12 @@ Staying up-to-date and getting new versions of bundles
|
||||
|
||||
> naclsdk help
|
||||
|
||||
Next steps:
|
||||
**Next steps:**
|
||||
|
||||
* Browse through the :doc:`Release Notes <release-notes>` for important
|
||||
* Browse through the `Release Notes <release-notes>`_ for important
|
||||
information about the SDK and new bundles.
|
||||
* If you're just getting started with Native Client, we recommend reading
|
||||
the :doc:`Technical Overview <../overview>` and walking through the
|
||||
:doc:`Getting Started Tutorial </devguide/tutorial/tutorial-part1>`.
|
||||
* If you're just starting with Native Client, we recommend reading the
|
||||
`Technical Overview <../overview>`_ and walking through the
|
||||
`Getting Started Tutorial </devguide/tutorial/tutorial-part1>`_.
|
||||
* If you'd rather dive into information about the toolchains, see
|
||||
:doc:`Building Native Client Modules </devguide/devcycle/building>`.
|
||||
`Building Native Client Modules </devguide/devcycle/building>`_.
|
||||
|
@ -8,52 +8,61 @@ Each example demonstrates one or two key Native Client programming concepts.
|
||||
After you've :doc:`downloaded the SDK <download>`, follow the instructions
|
||||
on this page to build and run the examples.
|
||||
|
||||
Configure the Google Chrome Browser
|
||||
-----------------------------------
|
||||
Your version of Chrome must be equal to or greater than the version of your SDK
|
||||
bundle. For example, if you're developing with the ``pepper_31`` bundle, you
|
||||
must use Google Chrome version 31 or greater. To find out what version of Chrome
|
||||
you're using, type ``about:chrome`` or ``about:version`` in the Chrome address
|
||||
bar.
|
||||
|
||||
#. Your version of Chrome must be equal to or greater than the version of
|
||||
your SDK bundle. For example, if you're developing with the ``pepper_31``
|
||||
bundle, you must use Google Chrome version 31 or greater. To find out what
|
||||
version of Chrome you're using, type ``about:chrome`` or ``about:version``
|
||||
in the Chrome address bar.
|
||||
|
||||
Enable Native Client
|
||||
--------------------
|
||||
|
||||
#. For Portable Native Client, no extra Chrome flags are needed as of
|
||||
Chrome version 31.
|
||||
.. note::
|
||||
:class: note
|
||||
|
||||
If you are using Chrome 31 or later, you can skip this section.
|
||||
|
||||
For other Native Client applications, or to **debug** Portable Native
|
||||
Client applications by translating the **pexe** to a **nexe** ahead of
|
||||
time, enable the Native Client flag. Native Client is enabled by default
|
||||
only for applications distributed through the Chrome Web Store. To run
|
||||
Native Client applications that are not distributed through the Chrome
|
||||
Web Store, like the SDK examples, you must specifically enable the Native
|
||||
Client flag in Chrome:
|
||||
To run Portable Native Client applications you must specifically enable Native
|
||||
Client in Chrome:
|
||||
|
||||
* Type ``about:flags`` in the Chrome address bar and scroll down to
|
||||
"Native Client".
|
||||
* If the link below "Native Client" says "Disable", then Native Client is
|
||||
#. Type ``about:flags`` in the Chrome address bar and scroll down to "Native
|
||||
Client".
|
||||
|
||||
- If the link below "Native Client" says "Disable", then Native Client is
|
||||
already enabled and you don't need to do anything else.
|
||||
|
||||
* If the link below "Native Client" says "Enable", click the "Enable"
|
||||
link, scroll down to the bottom of the page, and click the "Relaunch
|
||||
Now" button. All browser windows will restart when you relaunch Chrome.
|
||||
link.
|
||||
|
||||
#. Scroll down to the bottom of the page, and click "Relaunch Now". All browser
|
||||
windows will restart when you relaunch Chrome.
|
||||
|
||||
#. Disable the Chrome cache. Chrome caches resources aggressively; when you
|
||||
are building a Native Client application you should disable the cache to
|
||||
make sure that Chrome loads the latest version:
|
||||
Disable the Chrome cache
|
||||
------------------------
|
||||
|
||||
* Open Chrome's developer tools by clicking the menu icon |menu-icon| and
|
||||
choosing Tools > Developer tools.
|
||||
* Click the gear icon |gear-icon| in the bottom right corner of the
|
||||
Chrome window.
|
||||
* Under the "General" settings, check the box next to "Disable cache".
|
||||
Chrome caches resources aggressively. When you are building a Native Client
|
||||
application you should disable the cache to make sure that Chrome loads the
|
||||
latest version.
|
||||
|
||||
#. Open Chrome's developer tools by clicking the menu icon |menu-icon| and
|
||||
choosing Tools > Developer tools.
|
||||
|
||||
#. Click the gear icon |gear-icon| in the bottom right corner of the Chrome
|
||||
window.
|
||||
|
||||
#. Under the "General" settings, check the box next to "Disable cache".
|
||||
|
||||
Build the SDK examples
|
||||
----------------------
|
||||
|
||||
Starting with the ``pepper_24`` bundle, the Makefile scripts for the SDK
|
||||
examples build multiple versions of the examples using all three SDK
|
||||
toolchains (newlib, glibc, and PNaCl) and in both release and debug
|
||||
configurations. (Note that some examples build only with the particular
|
||||
toolchains).
|
||||
The Makefile scripts for the SDK examples build multiple versions of the
|
||||
examples using all three SDK toolchains (newlib, glibc, and PNaCl) and in both
|
||||
release and debug configurations. (Note that some examples build only with
|
||||
particular toolchains).
|
||||
|
||||
Build all examples
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To build all the examples, go to the examples directory in a specific SDK
|
||||
bundle and run ``make``::
|
||||
@ -76,6 +85,9 @@ bundle and run ``make``::
|
||||
make[2]: Entering directory `pepper_31/examples/api/url_loader'
|
||||
CXX newlib/Debug/url_loader_x86_32.o
|
||||
...
|
||||
|
||||
Build a single example
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Calling ``make`` from inside a particular example's directory will build only
|
||||
that example::
|
||||
@ -90,6 +102,9 @@ that example::
|
||||
LINK newlib/Debug/core_arm.nexe
|
||||
CREATE_NMF newlib/Debug/core.nmf
|
||||
|
||||
Override defaults
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
You can call ``make`` with the ``TOOLCHAIN`` and ``CONFIG`` parameters to
|
||||
override the defaults::
|
||||
|
||||
@ -135,13 +150,15 @@ all available toolchains::
|
||||
LINK linux/Debug/core.so
|
||||
make[1]: Leaving directory `pepper_31/examples/api/core'
|
||||
|
||||
Build results
|
||||
-------------
|
||||
|
||||
After running ``make``, each example directory will contain one or more of
|
||||
the following subdirectories:
|
||||
|
||||
* a ``newlib`` directory with subdirectories ``Debug`` and ``Release``;
|
||||
* a ``glibc`` directory with subdirectories ``Debug`` and ``Release``;
|
||||
* a ``pnacl`` directory with subdirectories ``Debug`` and ``Release``;
|
||||
* ``newlib`` with subdirectories ``Debug`` and ``Release``;
|
||||
* ``glibc`` with subdirectories ``Debug`` and ``Release``;
|
||||
* ``pnacl`` with subdirectories ``Debug`` and ``Release``;
|
||||
|
||||
For the newlib and glibc toolchains the Debug and Release subdirectories
|
||||
contain .nexe files for all target architectures. For the PNaCl toolchain
|
||||
|
@ -43,6 +43,8 @@ Contents:
|
||||
community/security-contest/contest-announcement.rst
|
||||
community/security-contest/contest-terms.rst
|
||||
community/security-contest/contest-faq.rst
|
||||
c-api.rst
|
||||
cpp-api.rst
|
||||
pepper_stable/c/index.rst
|
||||
pepper_stable/cpp/index.rst
|
||||
pepper_beta/c/index.rst
|
||||
|
Reference in New Issue
Block a user