diff options
author | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-19 23:29:19 +0000 |
---|---|---|
committer | noelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-19 23:29:19 +0000 |
commit | e07e61a23b44fbba88e2e6760d6513eb115addd4 (patch) | |
tree | c628860f4cc532ce1678549cbc73fe1ef5a3a260 /native_client_sdk/src | |
parent | e6ebc150926677d73f950c4d377f0c221f3a180c (diff) | |
download | chromium_src-e07e61a23b44fbba88e2e6760d6513eb115addd4.zip chromium_src-e07e61a23b44fbba88e2e6760d6513eb115addd4.tar.gz chromium_src-e07e61a23b44fbba88e2e6760d6513eb115addd4.tar.bz2 |
Automatically generate index.html from data in DSC files
Adds a new script which takes the example DSC files and
generates a new index.html. Clean up examples while at it,
so that we generate a good page:
Remove tumbler
Remove duplicate fullscreen examples
Add LINUX builds
Auto generate index.html
Review URL: https://chromiumcodereview.appspot.com/11275173
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168628 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src')
21 files changed, 174 insertions, 209 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index 45ac8f0..1eb4aef 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -555,24 +555,21 @@ def BuildStepCopyBuildHelpers(pepperdir, platform): EXAMPLE_LIST = [ 'debugging', + 'dlopen', 'file_histogram', 'file_io', - 'fullscreen_tumbler', 'gamepad', 'geturl', 'hello_nacl_mounts', - 'hello_world_interactive', 'hello_world', 'hello_world_gles', + 'hello_world_interactive', 'input_events', 'load_progress', 'mouselock', - 'multithreaded_input_events', 'pi_generator', - 'pong', 'sine_synth', 'websocket', - 'dlopen', ] LIBRARY_LIST = [ @@ -624,7 +621,7 @@ def BuildStepCopyExamples(pepperdir, toolchains, build_experimental, clobber): MakeDirectoryOrClobber(pepperdir, 'src', clobber) # Copy individual files - files = ['favicon.ico', 'httpd.cmd', 'index.html'] + files = ['favicon.ico', 'httpd.cmd'] for filename in files: oshelpers.Copy(['-v', os.path.join(SDK_EXAMPLE_DIR, filename), exampledir]) diff --git a/native_client_sdk/src/build_tools/generate_index.py b/native_client_sdk/src/build_tools/generate_index.py new file mode 100644 index 0000000..7a2613b --- /dev/null +++ b/native_client_sdk/src/build_tools/generate_index.py @@ -0,0 +1,106 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +HTML_TOP = ''' +<!-- + Copyright (c) 2012 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> + +<!DOCTYPE html> +<html> +<head> +<style type="text/css"> +dt { + font-weight: bold; +} +dd { + margin-bottom: 12pt; + width: 800px; +} +</style> +<link href="http://code.google.com/css/codesite.css" rel="stylesheet" + type="text/css" /> +<title>Native Client Examples</title> +</head> +<body> +<h1>Native Client Examples</h1> +<dd><p>This page lists all of the examples available in the most recent Native + Client SDK bundle. Each example is designed to teach a few specific Native + Client programming concepts. You will need to setup the build environment + including a path to 'make' which can be found in the 'tools' directory for + Windows, and the variable NACL_SDK_ROOT which points to one of the pepper + bundles found under the SDK install location. Calling make from the examples + directory will build all the projects, while calling make from an individual + example directory will build only that example. +</p></dd> +''' + +HTML_END = ''' +</body> +</html> +''' + +SECTIONS = { + 'API': """ +<h3>Common APIs</h3> +<dd><p>The following set of examples illustrate various Pepper APIs including +audio, 2D, 3D, file I/O, input and urls.</p></dd> + """, + 'Concepts': """ +<h3>Common Concepts</h3> +<dd><p>The following set of examples illustrate various common concepts such as +showing load progress, using Shared Objects (dynamic libraries), +mulithreading...</p></dd> +""", + 'Tools': """ +<h3>Using the Tools</h3> +<dd><p>The following "hello_world" examples, show the basic outline of a Native +Client application. The make files in each of the examples below show a +simple way to build a NaCl application using +<a href="http://www.gnu.org/software/make/manual/make.html">GNU Make</a>. +See the link for further information. +</p></dd> +""", +} + + +class LandingPage(object): + def __init__(self): + self.section_list = ['Tools', 'API', 'Concepts'] + self.section_map = {} + for section in self.section_list: + self.section_map[section] = [] + + def _ExampleDescription(self, index_path, title, details, focus): + return ''' + <dt><a href="%s/index.html">%s</a></dt> + <dd>%s + <p>Teaching focus: %s</p> + </dd> +''' % (index_path, title, details, focus) + + def _GenerateSection(self, section): + out = SECTIONS[section] + for desc in self.section_map[section]: + index_path = desc['DEST'] + '/' + desc['NAME'] + title = desc['TITLE'] + details = desc['DESC'] + focus = desc['FOCUS'] + out += self._ExampleDescription(index_path, title, details, focus) + return out + + def GeneratePage(self): + out = HTML_TOP + for section in self.section_list: + out += self._GenerateSection(section) + out += HTML_END + return out + + def AddDesc(self, desc): + group = desc['GROUP'] + assert group in self.section_list + self.section_map[group].append(desc) + diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py index 1a6c8b0..9be8e02 100755 --- a/native_client_sdk/src/build_tools/generate_make.py +++ b/native_client_sdk/src/build_tools/generate_make.py @@ -7,6 +7,7 @@ import buildbot_common import optparse import os import sys +from generate_index import LandingPage from buildbot_common import ErrorExit from make_rules import MakeRules, SetVar, GenerateCleanRules, GenerateNMFRules @@ -223,7 +224,8 @@ DSC_FORMAT = { 'DATA': (list, '', False), 'TITLE': (str, '', False), 'DESC': (str, '', False), - 'INFO': (str, '', False), + 'FOCUS': (str, '', False), + 'GROUP': (str, '', False), 'EXPERIMENTAL': (bool, [True, False], False) } @@ -564,6 +566,7 @@ def main(argv): master_projects = {} + landing_page = LandingPage() for filename in args: desc = LoadProject(filename, toolchains) if not desc: @@ -578,14 +581,23 @@ def main(argv): if not ProcessProject(srcroot, options.dstroot, desc, toolchains): ErrorExit('\n*** Failed to process project: %s ***' % filename) - # if this is an example update the html + # if this is an example update it's html file. if ShouldProcessHTML(desc): ProcessHTML(srcroot, options.dstroot, desc, toolchains) + # if this is an example, update landing page html file. + if desc['DEST'] == 'examples': + landing_page.AddDesc(desc) + # Create a list of projects for each DEST. This will be used to generate a # master makefile. master_projects.setdefault(desc['DEST'], []).append(desc) + # Generate the landing page text file. + index_html = os.path.join(options.dstroot, 'examples', 'index.html') + with open(index_html, 'w') as fh: + fh.write(landing_page.GeneratePage()) + if options.master: if use_gyp: master_in = os.path.join(SDK_EXAMPLE_DIR, 'Makefile_gyp') @@ -600,3 +612,4 @@ def main(argv): if __name__ == '__main__': sys.exit(main(sys.argv[1:])) + diff --git a/native_client_sdk/src/examples/debugging/example.dsc b/native_client_sdk/src/examples/debugging/example.dsc index 607edf6..9f62127 100644 --- a/native_client_sdk/src/examples/debugging/example.dsc +++ b/native_client_sdk/src/examples/debugging/example.dsc @@ -32,6 +32,7 @@ CHROME_ENV+=NACL_UNTRUSTED_EXCEPTION_HANDLING=1 'DESC': """ Debugging example shows how to use developer only features to enable catching an exception, and then using that to create a stacktrace.""", - 'INFO': 'Debugging, Stacktraces.' + 'FOCUS': 'Debugging, Stacktraces.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/dlopen/example.dsc b/native_client_sdk/src/examples/dlopen/example.dsc index f1af244..d1b7207 100644 --- a/native_client_sdk/src/examples/dlopen/example.dsc +++ b/native_client_sdk/src/examples/dlopen/example.dsc @@ -25,6 +25,7 @@ open and use them at runtime. When the page loads, type in a question and hit enter or click the ASK! button. The question and answer will be displayed in the page under the text entry box. Shared libraries are only available with the GLIBC toolchain.""", - 'INFO': 'Teaching focus: Using shared objects' + 'FOCUS': 'Using shared objects.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/file_histogram/example.dsc b/native_client_sdk/src/examples/file_histogram/example.dsc index dd62e88..1092847 100644 --- a/native_client_sdk/src/examples/file_histogram/example.dsc +++ b/native_client_sdk/src/examples/file_histogram/example.dsc @@ -17,6 +17,7 @@ The File Histogram example demonstrates prompting the user for a file, passing the file contents to NativeClient as a VarArrayBuffer, then drawing a histogram representing the contents of the file to a 2D square. """, - 'INFO': 'Teaching focus: VarArrayBuffer, 2D, File input.' + 'FOCUS': 'VarArrayBuffer, 2D, File input.', + 'GROUP': 'API' } diff --git a/native_client_sdk/src/examples/file_io/example.dsc b/native_client_sdk/src/examples/file_io/example.dsc index 32d128e..b7c4c1a 100644 --- a/native_client_sdk/src/examples/file_io/example.dsc +++ b/native_client_sdk/src/examples/file_io/example.dsc @@ -1,5 +1,5 @@ { - 'TOOLS': ['newlib', 'glibc', 'pnacl'], + 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'TARGETS': [ { 'NAME' : 'file_io', @@ -15,6 +15,7 @@ 'DESC': """ The File IO example demonstrates saving, loading, and deleting files from the persistent file store.""", - 'INFO': 'Teaching focus: File input and output.' + 'FOCUS': 'File input and output.', + 'GROUP': 'API' } diff --git a/native_client_sdk/src/examples/file_io/file_io.cc b/native_client_sdk/src/examples/file_io/file_io.cc index 94c9501..2762fdb 100644 --- a/native_client_sdk/src/examples/file_io/file_io.cc +++ b/native_client_sdk/src/examples/file_io/file_io.cc @@ -27,6 +27,9 @@ #undef min #undef max #undef PostMessage + +// Allow 'this' in initializer list +#pragma warning(disable : 4355) #endif namespace { @@ -213,8 +216,8 @@ class FileIoInstance : public pp::Instance { request->offset += bytes_written; - if (request->offset == request->file_contents.length() || - bytes_written == 0) { + if (static_cast<size_t>(request->offset) == request->file_contents.length() + || bytes_written == 0) { // All bytes have been written, flush the write buffer to complete pp::CompletionCallback callback = callback_factory_.NewCallback( &FileIoInstance::SaveFlushCallback, request); @@ -342,7 +345,8 @@ class FileIoInstance : public pp::Instance { request->offset += bytes_read; - if (request->offset == request->file_contents.length() || bytes_read == 0) { + if (static_cast<size_t>(request->offset) == request->file_contents.length() + || bytes_read == 0) { // Done reading, send content to the user interface PostMessage(pp::Var("DISP|" + request->file_contents)); ShowStatusMessage("Load complete"); diff --git a/native_client_sdk/src/examples/gamepad/example.dsc b/native_client_sdk/src/examples/gamepad/example.dsc index 8c3da70..2d6102e 100644 --- a/native_client_sdk/src/examples/gamepad/example.dsc +++ b/native_client_sdk/src/examples/gamepad/example.dsc @@ -1,5 +1,5 @@ { - 'TOOLS': ['newlib', 'glibc', 'pnacl'], + 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'TARGETS': [ { 'NAME' : 'gamepad', @@ -15,6 +15,7 @@ Attached gamepad values should appear, left to right, once they've been interacted with. Buttons, esp triggers are analog. """, - 'INFO': 'Gamepad interface.' + 'FOCUS': 'Gamepad interface.', + 'GROUP': 'API' } diff --git a/native_client_sdk/src/examples/geturl/example.dsc b/native_client_sdk/src/examples/geturl/example.dsc index fcf7dfc..7fdde7a 100644 --- a/native_client_sdk/src/examples/geturl/example.dsc +++ b/native_client_sdk/src/examples/geturl/example.dsc @@ -17,6 +17,7 @@ The Get URL example demonstrates fetching an URL and then displaying its contents. Clicking the GetURL button will cause a geturl_success.html file to get loaded asynchronously, then displayed in a text box when the load completes.""", - 'INFO': 'Teaching focus: URL loading.' + 'FOCUS': 'URL loading.', + 'GROUP': 'API' } diff --git a/native_client_sdk/src/examples/hello_nacl_mounts/example.dsc b/native_client_sdk/src/examples/hello_nacl_mounts/example.dsc index 41e5587..5ae4ef1 100644 --- a/native_client_sdk/src/examples/hello_nacl_mounts/example.dsc +++ b/native_client_sdk/src/examples/hello_nacl_mounts/example.dsc @@ -14,4 +14,11 @@ 'DEST': 'examples', 'NAME': 'hello_nacl_mounts', 'TITLE': 'Hello, Nacl Mounts!', + 'DESC': """ +The NaCl Mounts example demonstrates mapping standard FILE such as fopen, +fread, fwrite into mounts by linking in the nacl_mounts library. This allows +developers to wrap Pepper API such as the File IO API or URL Loader into +standard blocking calls.""", + 'FOCUS': 'Using NaCl Mounts.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/hello_world/example.dsc b/native_client_sdk/src/examples/hello_world/example.dsc index 32c1cdf..ebefbde 100644 --- a/native_client_sdk/src/examples/hello_world/example.dsc +++ b/native_client_sdk/src/examples/hello_world/example.dsc @@ -17,6 +17,7 @@ Native Client applications. This example loads a Native Client module. The page tracks the status of the module as it load. On a successful load, the module will post a message containing the string "Hello World" back to JavaScript which will display it as an alert.""", - 'INFO': 'Basic HTML, JavaScript, and module architecture.' + 'FOCUS': 'Basic HTML, JavaScript, and module architecture.', + 'GROUP': 'Tools' } diff --git a/native_client_sdk/src/examples/hello_world_gles/example.dsc b/native_client_sdk/src/examples/hello_world_gles/example.dsc index fb5525a..f709497 100644 --- a/native_client_sdk/src/examples/hello_world_gles/example.dsc +++ b/native_client_sdk/src/examples/hello_world_gles/example.dsc @@ -1,5 +1,5 @@ { - 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win'], + 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'TARGETS': [ { 'NAME' : 'hello_world_gles', @@ -24,7 +24,9 @@ The Hello World GLES 2.0 example demonstrates how to create a 3D cube that rotates. This is a simpler example than the tumbler example, and written in C. It loads the assets using URLLoader.""", - 'INFO': 'Teaching focus: 3D graphics, URL Loader.' + 'FOCUS': '3D graphics, URL Loader.', + 'GROUP': 'API' } + diff --git a/native_client_sdk/src/examples/hello_world_interactive/example.dsc b/native_client_sdk/src/examples/hello_world_interactive/example.dsc index 0f9e07c..72b71bb5 100644 --- a/native_client_sdk/src/examples/hello_world_interactive/example.dsc +++ b/native_client_sdk/src/examples/hello_world_interactive/example.dsc @@ -22,6 +22,7 @@ of all Native Client applications. This example loads a Native Client module which uses two way interaction with JavaScript whenever a button is clicked. The NaCl module will respond with the number 42 or the reversed version of the string in the text box when the appropriate button is clicked.""", - 'INFO': 'Basic HTML, JavaScript, C++ PPAPI, and Messaging API.', + 'FOCUS': 'Basic HTML, JavaScript, C++ PPAPI, and Messaging API.', + 'GROUP': 'Tools' } diff --git a/native_client_sdk/src/examples/index.html b/native_client_sdk/src/examples/index.html deleted file mode 100644 index 2bbee85..0000000 --- a/native_client_sdk/src/examples/index.html +++ /dev/null @@ -1,178 +0,0 @@ -<!-- - Copyright (c) 2012 The Chromium Authors. All rights reserved. - Use of this source code is governed by a BSD-style license that can be - found in the LICENSE file. ---> - -<!DOCTYPE html PUBLIC - "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<style type="text/css"> -dt { - font-weight: bold; -} -dd { - margin-bottom: 12pt; - width: 800px; -} -</style> -<link href="http://code.google.com/css/codesite.css" rel="stylesheet" - type="text/css" /> -<title>Native Client Examples</title> -</head> -<body> -<h1>Native Client Examples</h1> -<dd><p>This page lists all of the examples available in the most recent Native - Client SDK bundle. Each example is designed to teach a few specific Native - Client programming concepts. You will need to setup the build environment - including a path to 'make' which can be found in the 'tools' directory for - Windows, and the variable NACL_SDK_ROOT which points to one of the pepper - bundles found under the SDK install location. Calling make from the examples - directory will build all the projects, while calling make from and individual - example directory will build only that example. - </p> -</dd> -<h3>Using the Tools</h3> -<dd><p>The following "hello_world" examples, show the basic outline of a Native -Client application. The make files in each of the examples bellow show a -simple way to build a NaCl application using -<a href="http://www.gnu.org/software/make/manual/make.html">GNU Make</a>. -See the link for further information. -</p></dd> -<dl> - <dt><a href="hello_world/index.html">Hello World</a></dt> - <dd>The Hello World In C example demonstrates the basic structure of all - Native Client applications. This example loads a Native Client module. The - page tracks the status of the module as it load. On a successful load, the - module will post a message containing the string "Hello World" back to - JavaScript which will display it as an alert. - <p>Teaching focus: Basic HTML, JavaScript, and module architecture.</p> - </dd> - <dt><a href="hello_world_interactive/index.html"> - Interactive Hello World in C++</a></dt> - <dd>The Interactive Hello World C++ example demonstrates the basic structure - of all Native Client applications. This example loads a Native Client module - which uses two way interaction with JavaScript whenever a button is clicked. - The NaCl module will respond with the number 42 or the reversed version of the - string in the text box when the appropriate button is clicked. - <p>Teaching focus: Basic HTML, JavaScript, C++ PPAPI, and module - architecture; Messaging API.</p> - </dd> - -<h3>Common APIs</h3> -<dd><p>The following set of examples illustrate various Pepper APIs including -audio, 2D, 3D, file I/O, input and urls.</p></dd> - <dt><a href="sine_synth/index.html">Sine Wave Synthesizer</a></dt> - <dd> The Sine Wave Synthesizer example demonstrates playing sound (a sine - wave). Enter the desired frequency and hit play to start, stop to end. The - frequency box will display "Loading, please wait." while the module loads. - <p>Teaching focus: Audio.</p> - </dd> - - <dt><a href="input_events/index.html">Input Events</a></dt> - <dd> The Input Events example demonstrates how to handle events triggered by - the user. This example allows a user to interact with a square representing a - module instance. Events are displayed on the screen as the user clicks, - scrolls, types, inside or outside of the square. - <p>Teaching focus: Keyboard and mouse input, view change, and focus events.</p> - </dd> - - <dt><a href="pi_generator/index.html">Pi Generator</a></dt> - <dd> The Pi Generator example demonstrates creating a helper thread that - estimate pi using the Monte Carlo method while randomly putting 1,000,000,000 - points inside a 2D square that shares two sides with a quarter circle. - <p>Teaching focus: Thread creation, 2D graphics, view change events.</p> - </dd> - - <dt><a href="hello_world_gles/index.html">Hello World GLES 2.0</a></dt> - <dd> The Hello World GLES 2.0 example demonstrates how to create a 3D cube - that rotates. This is a simpler example than the tumbler example, and - written in C. It loads the assets using URLLoader. - <p>Teaching focus: 3D graphics, URL Loader</p> - </dd> - - <dt><a href="geturl/index.html">Get URL</a></dt> - <dd> The Get URL example demonstrates fetching an URL and then displaying - its contents. - <p>Teaching focus: URL loading.</p> - </dd> - - <dt><a href="file_io/index.html">File I/O</a></dt> - <dd> The File IO example demonstrates saving, loading, and deleting files - from the persistent file store. - - <p>Teaching focus: File input and output.</p> - </dd> - -<h3>Common Concepts</h3> -<dd><p>The following set of examples illustrate various common concepts such as -showing load progress, using Shared Objects (dynamic libraries), -mulithreading...</p></dd> -<dt><a href="dlopen/index.html">Dynamic Library Open (GLIBC)</a></dt> - <dd> The dlopen example demonstrates how build dynamic libraries and then - open and use them at runtime. When the page loads, type in a question and - hit enter or click the ASK! button. The question and answer will be - displayed in the page under the text entry box. - <p>Teaching focus: Using shared objects.</p> - </dd> -<dt><a href="load_progress/index.html">Load Progress</a></dt> - <dd> The Load Progress example demonstrates how to listen for and handle - events that occur while a NaCl module loads. This example listens for - different load event types and dispatches different events to their - respective handler. This example also checks for valid browser version and - shows how to calculate and display loading progress. - - <p>Teaching focus: Progress event handling.</p> - </dd> -<dt><a href="pong/index.html">Pong</a></dt> - <dd> The Pong example demonstrates how to create a basic 2D video game and - how to store application information in a local persistent file. This game - uses up and down arrow keyboard input events to move the paddle. - - <p>Teaching focus: File I/O, 2D graphics, input events.</p> - </dd> - <dt><a href="mt_input_events/index.html">Multi-threaded - Input Events</a></dt> - <dd>The Multithreaded Input Events example combines HTML, Javascript, - and C++ (the C++ is compiled to create a .nexe file). - The C++ shows how to handle input events in a multi-threaded application. - The main thread converts input events to non-pepper events and puts them on - a queue. The worker thread pulls them off of the queue, converts them to a - string, and then uses CallOnMainThread so that PostMessage can be send the - result of the worker thread to the browser. - <p>Teaching focus: Multithreaded event handling.</p> - </dd> - <dt><a href="fullscreen_tumbler/index.html">Full-screen - Tumbler</a></dt> - <dd>This is a modified version of the Tumbler example above that supports - full-screen display. It is in every way identical to Tumbler in - functionality, except that it adds the ability to switch to/from - full-screen display by pressing the Enter key. - <p>Teaching focus: Full-screen</p> - </dd> - <dt><a href="mouselock/index.html">Mouse Lock</a></dt> - <dd> The Mouselock example demonstrates how to use the MouseLock API to hide - the mouse cursor. Mouse lock is only available in full-screen mode. You can - lock and unlock the mouse while in full-screen mode by pressing the Enter key. - - <p>Teaching focus: Mouse lock, Full-screen</p> - </dd> - <dt><a href="websocket/index.html">Websocket</a></dt> - <dd> The Websocket example demonstrates how to use the Websocket API. The - user first connects to the test server: ws://html5rocks.websocket.org/echo by - clicking on the 'Connect'' button. Then hitting Send' will cause the app to - send the message to the server and retrieve the reply. - <p>Teaching focus: Websockets</p> - </dd> - <dt><a href="file_histogram/index.html">File Histogram</a></dt> - <dd> The File Histogram example demonstrates prompting the user for a file, - passing the file contents to NativeClient as a VarArrayBuffer, then drawing a - histogram representing the contents of the file to a 2D square. - <p>Teaching focus: VarArrayBuffer, 2D, File input.</p> - </dd> -</dl> -</body> -</html> diff --git a/native_client_sdk/src/examples/input_events/example.dsc b/native_client_sdk/src/examples/input_events/example.dsc index fdb86c2..69b3800 100644 --- a/native_client_sdk/src/examples/input_events/example.dsc +++ b/native_client_sdk/src/examples/input_events/example.dsc @@ -17,6 +17,7 @@ The Input Events example demonstrates how to handle events triggered by the user. This example allows a user to interact with a square representing a module instance. Events are displayed on the screen as the user clicks, scrolls, types, inside or outside of the square.""", - 'INFO': 'Keyboard and mouse input, view change, and focus events.' + 'FOCUS': 'Keyboard and mouse input, view change, and focus events.', + 'GROUP': 'API', } diff --git a/native_client_sdk/src/examples/load_progress/example.dsc b/native_client_sdk/src/examples/load_progress/example.dsc index 3195b2c..b62d970 100644 --- a/native_client_sdk/src/examples/load_progress/example.dsc +++ b/native_client_sdk/src/examples/load_progress/example.dsc @@ -18,6 +18,7 @@ events that occur while a NaCl module loads. This example listens for different load event types and dispatches different events to their respective handler. This example also checks for valid browser version and shows how to calculate and display loading progress.""", - 'INFO': 'Progress event handling.' + 'FOCUS': 'Progress event handling.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/mouselock/example.dsc b/native_client_sdk/src/examples/mouselock/example.dsc index f98fdcd..133ecec 100644 --- a/native_client_sdk/src/examples/mouselock/example.dsc +++ b/native_client_sdk/src/examples/mouselock/example.dsc @@ -1,5 +1,5 @@ { - 'TOOLS': ['newlib', 'glibc', 'win', 'linux'], + 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'TARGETS': [ { 'NAME' : 'mouselock', @@ -17,6 +17,7 @@ The Mouselock example demonstrates how to use the MouseLock API to hide the mouse cursor. Mouse lock is only available in full-screen mode. You can lock and unlock the mouse while in full-screen mode by pressing the Enter key. """, - 'INFO': 'Teaching focus: Mouse lock, Full-screen.' + 'FOCUS': 'Mouse lock, Full-screen.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/pi_generator/example.dsc b/native_client_sdk/src/examples/pi_generator/example.dsc index 926cb59..f1b78a8 100644 --- a/native_client_sdk/src/examples/pi_generator/example.dsc +++ b/native_client_sdk/src/examples/pi_generator/example.dsc @@ -1,5 +1,5 @@ { - 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win'], + 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'TARGETS': [ { 'NAME' : 'pi_generator', @@ -20,5 +20,6 @@ The Pi Generator example demonstrates creating a helper thread that estimate pi using the Monte Carlo method while randomly putting 1,000,000,000 points inside a 2D square that shares two sides with a quarter circle.""", - 'INFO': 'Thread creation, 2D graphics, view change events.' + 'FOCUS': 'Thread creation, 2D graphics, view change events.', + 'GROUP': 'Concepts' } diff --git a/native_client_sdk/src/examples/sine_synth/example.dsc b/native_client_sdk/src/examples/sine_synth/example.dsc index 87a8d6d..45ba580 100644 --- a/native_client_sdk/src/examples/sine_synth/example.dsc +++ b/native_client_sdk/src/examples/sine_synth/example.dsc @@ -16,6 +16,7 @@ The Sine Wave Synthesizer example demonstrates playing sound (a sine wave). Enter the desired frequency and hit play to start, stop to end. The frequency box will display "Loading, please wait." while the module loads.""", - 'INFO': 'Audio.' + 'FOCUS': 'Audio.', + 'GROUP': 'API', } diff --git a/native_client_sdk/src/examples/websocket/example.dsc b/native_client_sdk/src/examples/websocket/example.dsc index 60abcec..b3b583b 100644 --- a/native_client_sdk/src/examples/websocket/example.dsc +++ b/native_client_sdk/src/examples/websocket/example.dsc @@ -17,6 +17,7 @@ The Websocket example demonstrates how to use the Websocket API. The user first connects to the test server: ws://html5rocks.websocket.org/echo by clicking on the 'Connect'' button. Then hitting Send' will cause the app to send the message to the server and retrieve the reply.""", - 'INFO': 'Websockets' + 'FOCUS': 'Websockets', + 'GROUP': 'API' } |