| OLD | NEW |
| 1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
| 2 | 2 |
| 3 <section id="application-structure"> | 3 <section id="application-structure"> |
| 4 <span id="devcycle-application-structure"></span><h1 id="application-structure">
<span id="devcycle-application-structure"></span>Application Structure</h1> | 4 <span id="devcycle-application-structure"></span><h1 id="application-structure">
<span id="devcycle-application-structure"></span>Application Structure</h1> |
| 5 <div class="contents local" id="contents" style="display: none"> | 5 <div class="contents local" id="contents" style="display: none"> |
| 6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
| 7 <li><a class="reference internal" href="#application-components" id="id1">Applic
ation components</a></li> | 7 <li><a class="reference internal" href="#application-components" id="id1">Applic
ation components</a></li> |
| 8 <li><a class="reference internal" href="#html-file-and-the-embed-element" id="id
2">HTML file and the <embed> element</a></li> | 8 <li><a class="reference internal" href="#html-file-and-the-embed-element" id="id
2">HTML file and the <embed> element</a></li> |
| 9 <li><a class="reference internal" href="#manifest-files" id="id3">Manifest Files
</a></li> | 9 <li><a class="reference internal" href="#manifest-files" id="id3">Manifest Files
</a></li> |
| 10 <li><a class="reference internal" href="#modules-and-instances" id="id4">Modules
and instances</a></li> | 10 <li><a class="reference internal" href="#modules-and-instances" id="id4">Modules
and instances</a></li> |
| 11 <li><a class="reference internal" href="#native-client-modules-a-closer-look" id
="id5">Native Client modules: A closer look</a></li> | 11 <li><a class="reference internal" href="#native-client-modules-a-closer-look" id
="id5">Native Client modules: A closer look</a></li> |
| 12 </ul> | 12 </ul> |
| 13 | 13 |
| 14 </div><p>This chapter of the Developer’s Guide describes the general struc
ture of a | 14 </div><p>This section of the Developer’s Guide describes the general struc
ture of a |
| 15 Native Client application. The chapter assumes you are familiar with the | 15 Native Client application. The section assumes you are familiar with the |
| 16 material presented in the <a class="reference internal" href="/native-client/ove
rview.html"><em>Technical Overview</em></a>.</p> | 16 material presented in the <a class="reference internal" href="/native-client/ove
rview.html"><em>Technical Overview</em></a>.</p> |
| 17 <aside class="note"> | 17 <aside class="note"> |
| 18 The “Hello, World” example is used here to illustrate basic | 18 The “Hello, World” example is used here to illustrate basic |
| 19 Native Client programming techniques. You can find this code in the | 19 Native Client programming techniques. You can find this code in the |
| 20 <em>/getting_started/part1</em> directory in the Native Client SDK download. | 20 <em>/getting_started/part1</em> directory in the Native Client SDK download. |
| 21 </aside> | 21 </aside> |
| 22 <section id="application-components"> | 22 <section id="application-components"> |
| 23 <h2 id="application-components">Application components</h2> | 23 <h2 id="application-components">Application components</h2> |
| 24 <p>A Native Client application typically contains the following components:</p> | 24 <p>A Native Client application typically contains the following components:</p> |
| 25 <ul class="small-gap"> | 25 <ul class="small-gap"> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 how to send messages between JavaScript code and Native Client modules.</p> | 202 how to send messages between JavaScript code and Native Client modules.</p> |
| 203 <p>The NaCl code is only invoked to handle various browser-issued | 203 <p>The NaCl code is only invoked to handle various browser-issued |
| 204 events and callbacks. There is no need to shut down the NaCl instance by | 204 events and callbacks. There is no need to shut down the NaCl instance by |
| 205 calling the <code>exit()</code> function. NaCl modules will be shut down when th
e user | 205 calling the <code>exit()</code> function. NaCl modules will be shut down when th
e user |
| 206 leaves the web page, or the NaCl module’s <code><embed></code> is ot
herwise destroyed. | 206 leaves the web page, or the NaCl module’s <code><embed></code> is ot
herwise destroyed. |
| 207 If the NaCl module does call the <code>exit()</code> function, the instance will | 207 If the NaCl module does call the <code>exit()</code> function, the instance will |
| 208 issue a <code>crash</code> event | 208 issue a <code>crash</code> event |
| 209 <a class="reference internal" href="/native-client/devguide/coding/progress-even
ts.html"><em>which can be handled in Javascript</em></a>.</p> | 209 <a class="reference internal" href="/native-client/devguide/coding/progress-even
ts.html"><em>which can be handled in Javascript</em></a>.</p> |
| 210 <p>While the <code>CreateModule()</code> factory function, the <code>Module</cod
e> class, and the | 210 <p>While the <code>CreateModule()</code> factory function, the <code>Module</cod
e> class, and the |
| 211 <code>Instance</code> class are required for a Native Client application, the co
de | 211 <code>Instance</code> class are required for a Native Client application, the co
de |
| 212 samples shown above don’t actually do anything. Subsequent chapters in the | 212 samples shown above don’t actually do anything. Subsequent sections in the |
| 213 Developer’s Guide build on these code samples and add more interesting | 213 Developer’s Guide build on these code samples and add more interesting |
| 214 functionality.</p> | 214 functionality.</p> |
| 215 </section></section> | 215 </section></section> |
| 216 | 216 |
| 217 {{/partials.standard_nacl_article}} | 217 {{/partials.standard_nacl_article}} |
| OLD | NEW |