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 <h2 id="application-components">Application components</h2> | 22 <h2 id="application-components">Application components</h2> |
23 <p>A Native Client application typically contains the following components:</p> | 23 <p>A Native Client application typically contains the following components:</p> |
24 <ul class="small-gap"> | 24 <ul class="small-gap"> |
25 <li>an HTML file;</li> | 25 <li>an HTML file;</li> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 how to send messages between JavaScript code and Native Client modules.</p> | 197 how to send messages between JavaScript code and Native Client modules.</p> |
198 <p>The NaCl code is only invoked to handle various browser-issued | 198 <p>The NaCl code is only invoked to handle various browser-issued |
199 events and callbacks. There is no need to shut down the NaCl instance by | 199 events and callbacks. There is no need to shut down the NaCl instance by |
200 calling the <code>exit()</code> function. NaCl modules will be shut down when th
e user | 200 calling the <code>exit()</code> function. NaCl modules will be shut down when th
e user |
201 leaves the web page, or the NaCl module’s <code><embed></code> is ot
herwise destroyed. | 201 leaves the web page, or the NaCl module’s <code><embed></code> is ot
herwise destroyed. |
202 If the NaCl module does call the <code>exit()</code> function, the instance will | 202 If the NaCl module does call the <code>exit()</code> function, the instance will |
203 issue a <code>crash</code> event | 203 issue a <code>crash</code> event |
204 <a class="reference internal" href="/native-client/devguide/coding/progress-even
ts.html"><em>which can be handled in Javascript</em></a>.</p> | 204 <a class="reference internal" href="/native-client/devguide/coding/progress-even
ts.html"><em>which can be handled in Javascript</em></a>.</p> |
205 <p>While the <code>CreateModule()</code> factory function, the <code>Module</cod
e> class, and the | 205 <p>While the <code>CreateModule()</code> factory function, the <code>Module</cod
e> class, and the |
206 <code>Instance</code> class are required for a Native Client application, the co
de | 206 <code>Instance</code> class are required for a Native Client application, the co
de |
207 samples shown above don’t actually do anything. Subsequent chapters in the | 207 samples shown above don’t actually do anything. Subsequent sections in the |
208 Developer’s Guide build on these code samples and add more interesting | 208 Developer’s Guide build on these code samples and add more interesting |
209 functionality.</p> | 209 functionality.</p> |
210 </section> | 210 </section> |
211 | 211 |
212 {{/partials.standard_nacl_article}} | 212 {{/partials.standard_nacl_article}} |
OLD | NEW |