diff options
Diffstat (limited to 'jsdoc/symbols/Karma.html')
-rwxr-xr-x | jsdoc/symbols/Karma.html | 1171 |
1 files changed, 0 insertions, 1171 deletions
diff --git a/jsdoc/symbols/Karma.html b/jsdoc/symbols/Karma.html deleted file mode 100755 index ab80ea6..0000000 --- a/jsdoc/symbols/Karma.html +++ /dev/null @@ -1,1171 +0,0 @@ -<!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" xml:lang="en" lang="en"> - <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <meta name="generator" content="JsDoc Toolkit" /> - - <title>JsDoc Reference - Karma</title> - - <style type="text/css"> - /* default.css */ -body -{ - font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; - width: 800px; -} - -.header -{ - clear: both; - background-color: #ccc; - padding: 8px; -} - -h1 -{ - font-size: 150%; - font-weight: bold; - padding: 0; - margin: 1em 0 0 .3em; -} - -hr -{ - border: none 0; - border-top: 1px solid #7F8FB1; - height: 1px; -} - -pre.code -{ - display: block; - padding: 8px; - border: 1px dashed #ccc; -} - -#index -{ - margin-top: 24px; - float: left; - width: 160px; - position: absolute; - left: 8px; - background-color: #F3F3F3; - padding: 8px; -} - -#content -{ - margin-left: 190px; - width: 600px; -} - -.classList -{ - list-style-type: none; - padding: 0; - margin: 0 0 0 8px; - font-family: arial, sans-serif; - font-size: 1em; - overflow: auto; -} - -.classList li -{ - padding: 0; - margin: 0 0 8px 0; -} - -.summaryTable { width: 100%; } - -h1.classTitle -{ - font-size:170%; - line-height:130%; -} - -h2 { font-size: 110%; } -caption, div.sectionTitle -{ - background-color: #7F8FB1; - color: #fff; - font-size:130%; - text-align: left; - padding: 2px 6px 2px 6px; - border: 1px #7F8FB1 solid; -} - -div.sectionTitle { margin-bottom: 8px; } -.summaryTable thead { display: none; } - -.summaryTable td -{ - vertical-align: top; - padding: 4px; - border-bottom: 1px #7F8FB1 solid; - border-right: 1px #7F8FB1 solid; -} - -/*col#summaryAttributes {}*/ -.summaryTable td.attributes -{ - border-left: 1px #7F8FB1 solid; - width: 140px; - text-align: right; -} - -td.attributes, .fixedFont -{ - line-height: 15px; - color: #002EBE; - font-family: "Courier New",Courier,monospace; - font-size: 13px; -} - -.summaryTable td.nameDescription -{ - text-align: left; - font-size: 13px; - line-height: 15px; -} - -.summaryTable td.nameDescription, .description -{ - line-height: 15px; - padding: 4px; - padding-left: 4px; -} - -.summaryTable { margin-bottom: 8px; } - -ul.inheritsList -{ - list-style: square; - margin-left: 20px; - padding-left: 0; -} - -.detailList { - margin-left: 20px; - line-height: 15px; -} -.detailList dt { margin-left: 20px; } - -.detailList .heading -{ - font-weight: bold; - padding-bottom: 6px; - margin-left: 0; -} - -.light, td.attributes, .light a:link, .light a:visited -{ - color: #777; - font-style: italic; -} - -.fineprint -{ - text-align: right; - font-size: 10px; -} - </style> - </head> - - <body> -<!-- ============================== header ================================= --> - <!-- begin static/header.html --> - <div id="header"> -</div> - <!-- end static/header.html --> - -<!-- ============================== classes index ============================ --> - <div id="index"> - <!-- begin publish.classesIndex --> - <div align="center"><a href="../index.html">Class Index</a> -| <a href="../files.html">File Index</a></div> -<hr /> -<h2>Classes</h2> -<ul class="classList"> - - <li><i><a href="../symbols/_global_.html">_global_</a></i></li> - - <li><a href="../symbols/Karma.html">Karma</a></li> - - <li><a href="../symbols/Karma%23geometry.html">Karma#geometry</a></li> - - <li><a href="../symbols/Karma%23graphics.html">Karma#graphics</a></li> - - <li><a href="../symbols/Karma%23math.html">Karma#math</a></li> - - <li><a href="../symbols/KGraphic.html">KGraphic</a></li> - - <li><a href="../symbols/KGroup.html">KGroup</a></li> - - <li><a href="../symbols/KObject.html">KObject</a></li> - -</ul> -<hr /> - <!-- end publish.classesIndex --> - </div> - - <div id="content"> -<!-- ============================== class title ============================ --> - <h1 class="classTitle"> - - Class Karma - </h1> - -<!-- ============================== class summary ========================== --> - <p class="description"> - - - Represents a Karma (master) object. - - - <br /><i>Defined in: </i> <a href="../symbols/src/js_jquery.karma-0.4.js.html">jquery.karma-0.4.js</a>. - - </p> - -<!-- ============================== constructor summary ==================== --> - - <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class Karma."> - <caption>Class Summary</caption> - <thead> - <tr> - <th scope="col">Constructor Attributes</th> - <th scope="col">Constructor Name and Description</th> - </tr> - </thead> - <tbody> - <tr> - <td class="attributes"> </td> - <td class="nameDescription" > - <div class="fixedFont"> - <b><a href="../symbols/Karma.html#constructor">Karma</a></b>(options) - </div> - <div class="description">Karma</div> - </td> - </tr> - </tbody> - </table> - - -<!-- ============================== properties summary ===================== --> - - - - - - - -<!-- ============================== methods summary ======================== --> - - - - <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class Karma."> - <caption>Method Summary</caption> - <thead> - <tr> - <th scope="col">Method Attributes</th> - <th scope="col">Method Name and Description</th> - </tr> - </thead> - <tbody> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#button">button</a></b>(args) - </div> - <div class="description">A shortcut for calling 'KButton( )'</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#clear">clear</a></b>(x, y, width, height) - </div> - <div class="description">Clears a rectangular area within the canvas</div> - </td> - </tr> - - <tr> - <td class="attributes"><inner> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#-getLanguage">getLanguage</a></b>() - </div> - <div class="description">Gets the language acording to the browser language</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#group">group</a></b>(args) - </div> - <div class="description">A shortcut for calling 'KGroup( )'</div> - </td> - </tr> - - <tr> - <td class="attributes"><inner> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#-i18nWrapper">i18nWrapper</a></b>(options) - </div> - <div class="description">Creates a new Gettext object and returns a shortcut function to localise - defined strings.</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#image">image</a></b>(args) - </div> - <div class="description">A shortcut for calling 'KImage( )'</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#init">init</a></b>(toLoad) - </div> - <div class="description">Attaches an Object of Arrays for preloading.</div> - </td> - </tr> - - <tr> - <td class="attributes"><inner> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#-loadAlternatives">loadAlternatives</a></b>() - </div> - <div class="description">It will attempt to load a language file, the posible languages are defined - on language.alternatives.</div> - </td> - </tr> - - <tr> - <td class="attributes"><inner> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#-localiseContent">localiseContent</a></b>(lang) - </div> - <div class="description">Localises the inline html content and it creates the localised paths for - "images", "sounds" and "videos".</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#main">main</a></b>(cb) - </div> - <div class="description">Main function.</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#size">size</a></b>(width, height) - </div> - <div class="description">Creates a new canvas element.</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#sound">sound</a></b>(args) - </div> - <div class="description">A shortcut for calling 'KSound( )'</div> - </td> - </tr> - - <tr> - <td class="attributes"> </td> - <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#video">video</a></b>(args) - </div> - <div class="description">A shortcut for calling 'KVideo( )'</div> - </td> - </tr> - - </tbody> - </table> - - - - -<!-- ============================== events summary ======================== --> - - -<!-- ============================== constructor details ==================== --> - - <div class="details"><a name="constructor"> </a> - <div class="sectionTitle"> - Class Detail - </div> - - <div class="fixedFont"> - <b>Karma</b>(options) - </div> - - <div class="description"> - Karma - - </div> - - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{String | Object}</span> <b>options</b> - - </dt> - <dd>Constructor arguments</dd> - - <dt> - <span class="light fixedFont">{String | Object}</span> <b>options.container</b> - <i>Optional</i> - </dt> - <dd>Target DIV-class that will contain - any canvas element created using Karma functions</dd> - - <dt> - <span class="light fixedFont">{String}</span> <b>options.language</b> - <i>Optional</i> - </dt> - <dd><ul> - <li>if it's seted: - Karma will assume that the according language file exists and Karma will try - to load it.<li> - <li>if it's not seted: - Karma will localise the content according to the Browser language - </li> - </ul></dd> - - <dt> - <span class="light fixedFont">{Array}</span> <b>options.language.alternatives</b> - <i>Optional</i> - </dt> - <dd>Alternatives for localizing the content. The first has the priority.</dd> - - <dt> - <span class="light fixedFont">{Object}</span> <b>options.i18n</b> - <i>Optional</i> - </dt> - <dd>Object that contains data for i18n.</dd> - - <dt> - <span class="light fixedFont">{Object | String}</span> <b>options.i18n.root</b> - <i>Optional, Default: self</i> - </dt> - <dd>Parent element where the i18n shortcut function will be attached.</dd> - - <dt> - <span class="light fixedFont">{String}</span> <b>options.i18n.shortcut</b> - <i>Optional, Default: _</i> - </dt> - <dd>Shortcut for calling i18n.</dd> - - <dt> - <span class="light fixedFont">{Number}</span> <b>options.fps</b> - <i>Optional, Default: 24</i> - </dt> - <dd>Frames per second at which Karma will perform any refresh action.</dd> - - </dl> - - - - - - - - - </div> - - -<!-- ============================== field details ========================== --> - - -<!-- ============================== method details ========================= --> - - <div class="sectionTitle"> - Method Detail - </div> - - <a name="button"> </a> - <div class="fixedFont"> - - - <b>button</b>(args) - - </div> - <div class="description"> - A shortcut for calling 'KButton( )' - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <b>args</b> - - </dt> - <dd></dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd>KButton#</dd> - - </dl> - - - <hr /> - - <a name="clear"> </a> - <div class="fixedFont"> - - - <b>clear</b>(x, y, width, height) - - </div> - <div class="description"> - Clears a rectangular area within the canvas - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{Number}</span> <b>x</b> - <i>Optional, Default: 0</i> - </dt> - <dd>Start position of x</dd> - - <dt> - <span class="light fixedFont">{Number}</span> <b>y</b> - <i>Optional, Default: 0</i> - </dt> - <dd>Start position of y</dd> - - <dt> - <span class="light fixedFont">{Number}</span> <b>width</b> - <i>Optional, Default: canvas width</i> - </dt> - <dd>Square width</dd> - - <dt> - <span class="light fixedFont">{Number}</span> <b>height</b> - <i>Optional, Default: canvas height</i> - </dt> - <dd>Square height</dd> - - </dl> - - - - - - - - - <hr /> - - <a name="-getLanguage"> </a> - <div class="fixedFont"><inner> - - <span class="light">{Object}</span> - <b>getLanguage</b>() - - </div> - <div class="description"> - Gets the language acording to the browser language - - - </div> - - - - - - - - - <dl class="detailList"> - <dt class="heading">Returns:</dt> - - <dd><span class="light fixedFont">{Object}</span> <br> - lang: countryCode and langCode (if specified) - langCode*: language code represented as xx, example: en.<br> - countryCode*: country code represented as YY, example: US.<br> -optional</dd> - - </dl> - - - - - <hr /> - - <a name="group"> </a> - <div class="fixedFont"> - - - <b>group</b>(args) - - </div> - <div class="description"> - A shortcut for calling 'KGroup( )' - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <b>args</b> - - </dt> - <dd></dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd><a href="../symbols/KGroup.html">KGroup</a></dd> - - </dl> - - - <hr /> - - <a name="-i18nWrapper"> </a> - <div class="fixedFont"><inner> - - <span class="light">{Function}</span> - <b>i18nWrapper</b>(options) - - </div> - <div class="description"> - Creates a new Gettext object and returns a shortcut function to localise - defined strings.<br>We use karma.Gettext.js it's a modification of - <a href=http://jsgettext.berlios.de/doc/html/Gettext.html> - Gettext.js</a> from beril OS. - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{Object}</span> <b>options</b> - - </dt> - <dd>The arguments of the Gettext constructor</dd> - - </dl> - - - - - - <dl class="detailList"> - <dt class="heading">Returns:</dt> - - <dd><span class="light fixedFont">{Function}</span> A generic function to call Gettext functions - The generic function will call a Gettext function according to the number of arguments passed - <table> - <tr> - <th>No. params</th> - <th>Parameters</th> - <th>Gettext function called</th> - </tr> - <tr> - <td>1</td> - <td>msgid</td> - <td>gettext</td> - <tr> - <td>2</td> - <td>context, msgid</td> - <td>pgettext</td> - </tr> - <tr> - <td>3</td> - <td>number, singular, plural</td> - <td>ngettext</td> - </tr> - <tr> - <td>4</td> - <td>number, context, singular, plural</td> - <td>npgettext</td> - </tr> - </table></dd> - - </dl> - - - <dl class="detailList"> - <dt class="heading">Requires:</dt> - - <dd>karma.Gettext.js</dd> - - </dl> - - - - <hr /> - - <a name="image"> </a> - <div class="fixedFont"> - - - <b>image</b>(args) - - </div> - <div class="description"> - A shortcut for calling 'KImage( )' - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <b>args</b> - - </dt> - <dd></dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd>KImage</dd> - - </dl> - - - <hr /> - - <a name="init"> </a> - <div class="fixedFont"> - - <span class="light">{Object}</span> - <b>init</b>(toLoad) - - </div> - <div class="description"> - Attaches an Object of Arrays for preloading. There are 3 valid categories (arrays): -'images' for images, 'sounds' for sounds and 'videos' for video files.<br> -Any object within any category must have an 'id' and 'file' attributes. -Additional attributes will be used as arguments to the constructor of the -corresponding object.<br> -Any media file successfully loaded will be availabe through the 'library'. -The init finishes when all the valid files have finished loading or have -failed on the process.<br> -Please note that the preloadinf will NOT start unless you call 'main' function. - - - </div> - - - - <pre class="code">var k = $.karma ({container: "#karma-main"/}); -k.size(1200, 800); -k.init({ - images: [ - {id: "ball", file: "ball.png", localized : false }, - ], - sounds: [ - {id: "correct", file: "correct.ogg" }, - ] -});//1 image and 1 sound attached to load</pre> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{Object}</span> <b>toLoad</b> - <i>Optional</i> - </dt> - <dd>The Object that has the arrays for preloading.</dd> - - <dt> - <span class="light fixedFont">{Array}</span> <b>toLoad.images</b> - <i>Optional</i> - </dt> - <dd>The images</dd> - - <dt> - <span class="light fixedFont">{Array}</span> <b>toLoad.sounds</b> - <i>Optional</i> - </dt> - <dd>The sounds</dd> - - <dt> - <span class="light fixedFont">{Array}</span> <b>toLoad.videos</b> - <i>Optional</i> - </dt> - <dd>The videos</dd> - - </dl> - - - - - - <dl class="detailList"> - <dt class="heading">Returns:</dt> - - <dd><span class="light fixedFont">{Object}</span> this</dd> - - </dl> - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd><a href="../symbols/Karma.html#main">Karma#main</a></dd> - - </dl> - - - <hr /> - - <a name="-loadAlternatives"> </a> - <div class="fixedFont"><inner> - - <span class="light">{String}</span> - <b>loadAlternatives</b>() - - </div> - <div class="description"> - It will attempt to load a language file, the posible languages are defined - on language.alternatives. - <p>The language file type could be: .po (Pootle) or .json (JSON). The - precedence between file types is defined according to which is defined first - in supportedLangFileTypes. By default Pootle files has precedence over JSON, - files.</p> - - - </div> - - - - - - - - - <dl class="detailList"> - <dt class="heading">Returns:</dt> - - <dd><span class="light fixedFont">{String}</span> The name of the language file loaded. Example: en-US.po</dd> - - </dl> - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd><a href="../symbols/Karma.html">Karma</a></dd> - - </dl> - - - <hr /> - - <a name="-localiseContent"> </a> - <div class="fixedFont"><inner> - - - <b>localiseContent</b>(lang) - - </div> - <div class="description"> - Localises the inline html content and it creates the localised paths for - "images", "sounds" and "videos". - <b>Note:</b>Inline html localisation under development<br> - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{String}</span> <b>lang</b> - - </dt> - <dd>The language that will be used to localise the content</dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd><a href="http://wiki.sugarlabs.org/go/Karma/Bundle_layout"> - Karma Bundle_layout</a></dd> - - </dl> - - - <hr /> - - <a name="main"> </a> - <div class="fixedFont"> - - - <b>main</b>(cb) - - </div> - <div class="description"> - Main function. Any Karma function call should be inside the callback function. -The callback function will be executed when the preloading finishes. - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{Function}</span> <b>cb</b> - - </dt> - <dd>The callback funtion</dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd><a href="../symbols/Karma.html#init">Karma#init</a></dd> - - </dl> - - - <hr /> - - <a name="size"> </a> - <div class="fixedFont"> - - - <b>size</b>(width, height) - - </div> - <div class="description"> - Creates a new canvas element. - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <span class="light fixedFont">{Number}</span> <b>width</b> - <i>Optional, Default: 100</i> - </dt> - <dd>canvas width</dd> - - <dt> - <span class="light fixedFont">{Number}</span> <b>height</b> - <i>Optional, Default: 100</i> - </dt> - <dd>canvas height</dd> - - </dl> - - - - - - - - - <hr /> - - <a name="sound"> </a> - <div class="fixedFont"> - - - <b>sound</b>(args) - - </div> - <div class="description"> - A shortcut for calling 'KSound( )' - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <b>args</b> - - </dt> - <dd></dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd>KSound</dd> - - </dl> - - - <hr /> - - <a name="video"> </a> - <div class="fixedFont"> - - - <b>video</b>(args) - - </div> - <div class="description"> - A shortcut for calling 'KVideo( )' - - - </div> - - - - - <dl class="detailList"> - <dt class="heading">Parameters:</dt> - - <dt> - <b>args</b> - - </dt> - <dd></dd> - - </dl> - - - - - - - - <dl class="detailList"> - <dt class="heading">See:</dt> - - <dd>KVideo</dd> - - </dl> - - - - - - -<!-- ============================== event details ========================= --> - - - <hr /> - </div> - - -<!-- ============================== footer ================================= --> - <div class="fineprint" style="clear:both"> - - Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Mon Aug 31 2009 19:56:09 GMT-0500 (CDT) - </div> - </body> -</html> |