diff options
Diffstat (limited to 'docs/jsdoc/symbols/Karma.html')
-rwxr-xr-x | docs/jsdoc/symbols/Karma.html | 550 |
1 files changed, 117 insertions, 433 deletions
diff --git a/docs/jsdoc/symbols/Karma.html b/docs/jsdoc/symbols/Karma.html index ab80ea6..91067e0 100755 --- a/docs/jsdoc/symbols/Karma.html +++ b/docs/jsdoc/symbols/Karma.html @@ -191,6 +191,26 @@ ul.inheritsList <li><i><a href="../symbols/_global_.html">_global_</a></i></li> + <li><a href="../symbols/jQuery.html">jQuery</a></li> + + <li><a href="../symbols/jQueryanonymous-KGraphic.html">jQueryanonymous-KGraphic</a></li> + + <li><a href="../symbols/jQueryanonymous-KGroup.html">jQueryanonymous-KGroup</a></li> + + <li><a href="../symbols/jQueryanonymous-KImage.html">jQueryanonymous-KImage</a></li> + + <li><a href="../symbols/jQueryanonymous-KMedia.html">jQueryanonymous-KMedia</a></li> + + <li><a href="../symbols/jQueryanonymous-KObject.html">jQueryanonymous-KObject</a></li> + + <li><a href="../symbols/jQueryanonymous-KRectangle.html">jQueryanonymous-KRectangle</a></li> + + <li><a href="../symbols/jQueryanonymous-KShape.html">jQueryanonymous-KShape</a></li> + + <li><a href="../symbols/jQueryanonymous-KSound.html">jQueryanonymous-KSound</a></li> + + <li><a href="../symbols/jQueryanonymous-KSurface.html">jQueryanonymous-KSurface</a></li> + <li><a href="../symbols/Karma.html">Karma</a></li> <li><a href="../symbols/Karma%23geometry.html">Karma#geometry</a></li> @@ -199,12 +219,6 @@ ul.inheritsList <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 --> @@ -224,7 +238,7 @@ ul.inheritsList 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>. + <br /><i>Defined in: </i> <a href="../symbols/src/jquery.karma.js.html">jquery.karma.js</a>. </p> @@ -275,120 +289,72 @@ ul.inheritsList <tbody> <tr> - <td class="attributes"> </td> + <td class="attributes"><static> </td> <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#button">button</a></b>(args) + <div class="fixedFont">Karma.<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="attributes"><static> </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 class="fixedFont">Karma.<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="attributes"><static> </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 class="fixedFont">Karma.<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="attributes"><static> </td> <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#-loadAlternatives">loadAlternatives</a></b>() + <div class="fixedFont">Karma.<b><a href="../symbols/Karma.html#.init">init</a></b>(toLoad) </div> - <div class="description">It will attempt to load a language file, the posible languages are defined - on language.alternatives.</div> + <div class="description"></div> </td> </tr> <tr> - <td class="attributes"><inner> </td> + <td class="attributes"><static> </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 class="fixedFont">Karma.<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="attributes"><static> </td> <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#size">size</a></b>(width, height) + <div class="fixedFont">Karma.<b><a href="../symbols/Karma.html#.sound">sound</a></b>(args) </div> - <div class="description">Creates a new canvas element.</div> + <div class="description">A shortcut for calling 'KSound( )'</div> </td> </tr> <tr> - <td class="attributes"> </td> + <td class="attributes"><static> </td> <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#sound">sound</a></b>(args) + <div class="fixedFont">Karma.<b><a href="../symbols/Karma.html#.surface">surface</a></b>(options) </div> - <div class="description">A shortcut for calling 'KSound( )'</div> + <div class="description">A shortcut for calling 'KSurface(.</div> </td> </tr> <tr> - <td class="attributes"> </td> + <td class="attributes"><static> </td> <td class="nameDescription"> - <div class="fixedFont"><b><a href="../symbols/Karma.html#video">video</a></b>(args) + <div class="fixedFont">Karma.<b><a href="../symbols/Karma.html#.video">video</a></b>(args) </div> <div class="description">A shortcut for calling 'KVideo( )'</div> </td> @@ -436,51 +402,14 @@ ul.inheritsList <span class="light fixedFont">{String | Object}</span> <b>options.container</b> <i>Optional</i> </dt> - <dd>Target DIV-class that will contain + <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> + <dd></dd> </dl> @@ -503,11 +432,11 @@ ul.inheritsList Method Detail </div> - <a name="button"> </a> - <div class="fixedFont"> - + <a name=".button"> </a> + <div class="fixedFont"><static> - <b>button</b>(args) + <span class="light">{Object}</span> + <span class="light">Karma.</span><b>button</b>(args) </div> <div class="description"> @@ -534,113 +463,30 @@ ul.inheritsList - - <dl class="detailList"> - <dt class="heading">See:</dt> + <dt class="heading">Returns:</dt> - <dd>KButton#</dd> + <dd><span class="light fixedFont">{Object}</span> new instance of KButton object</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 class="heading">See:</dt> - <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> + <dd>KButton</dd> </dl> - - - - - - <hr /> - <a name="-getLanguage"> </a> - <div class="fixedFont"><inner> + <a name=".group"> </a> + <div class="fixedFont"><static> <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) + <span class="light">Karma.</span><b>group</b>(args) </div> <div class="description"> @@ -667,103 +513,30 @@ optional</dd> - - - <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> + <dd><span class="light fixedFont">{Object}</span> new instance of KGroup object</dd> </dl> + <dl class="detailList"> - <dt class="heading">Requires:</dt> + <dt class="heading">See:</dt> - <dd>karma.Gettext.js</dd> + <dd>KGroup</dd> </dl> - <hr /> - <a name="image"> </a> - <div class="fixedFont"> - + <a name=".image"> </a> + <div class="fixedFont"><static> - <b>image</b>(args) + <span class="light">{Object}</span> + <span class="light">Karma.</span><b>image</b>(args) </div> <div class="description"> @@ -790,6 +563,13 @@ optional</dd> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + + <dd><span class="light fixedFont">{Object}</span> new instance of KImage object</dd> + + </dl> + <dl class="detailList"> @@ -802,42 +582,21 @@ optional</dd> <hr /> - <a name="init"> </a> - <div class="fixedFont"> + <a name=".init"> </a> + <div class="fixedFont"><static> <span class="light">{Object}</span> - <b>init</b>(toLoad) + <span class="light">Karma.</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> @@ -881,71 +640,19 @@ k.init({ - <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> + <a name=".main"> </a> + <div class="fixedFont"><static> - <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) + <span class="light">Karma.</span><b>main</b>(cb) </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> + Main function. Any Karma function call should be inside the callback function. +The callback function will be executed when the preloading finishes. </div> @@ -957,10 +664,10 @@ k.init({ <dt class="heading">Parameters:</dt> <dt> - <span class="light fixedFont">{String}</span> <b>lang</b> + <span class="light fixedFont">{Function}</span> <b>cb</b> </dt> - <dd>The language that will be used to localise the content</dd> + <dd>The callback funtion</dd> </dl> @@ -973,24 +680,22 @@ k.init({ <dl class="detailList"> <dt class="heading">See:</dt> - <dd><a href="http://wiki.sugarlabs.org/go/Karma/Bundle_layout"> - Karma Bundle_layout</a></dd> + <dd><a href="../symbols/Karma.html#.init">Karma#init</a></dd> </dl> <hr /> - <a name="main"> </a> - <div class="fixedFont"> - + <a name=".sound"> </a> + <div class="fixedFont"><static> - <b>main</b>(cb) + <span class="light">{Object}</span> + <span class="light">Karma.</span><b>sound</b>(args) </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. + A shortcut for calling 'KSound( )' </div> @@ -1002,10 +707,10 @@ The callback function will be executed when the preloading finishes. <dt class="heading">Parameters:</dt> <dt> - <span class="light fixedFont">{Function}</span> <b>cb</b> + <b>args</b> </dt> - <dd>The callback funtion</dd> + <dd></dd> </dl> @@ -1013,69 +718,34 @@ The callback function will be executed when the preloading finishes. - - <dl class="detailList"> - <dt class="heading">See:</dt> + <dt class="heading">Returns:</dt> - <dd><a href="../symbols/Karma.html#init">Karma#init</a></dd> + <dd><span class="light fixedFont">{Object}</span> new instance of KSound object</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 class="heading">See:</dt> - <dt> - <span class="light fixedFont">{Number}</span> <b>height</b> - <i>Optional, Default: 100</i> - </dt> - <dd>canvas height</dd> + <dd>KSound</dd> </dl> - - - - - - <hr /> - <a name="sound"> </a> - <div class="fixedFont"> + <a name=".surface"> </a> + <div class="fixedFont"><static> - - <b>sound</b>(args) + <span class="light">{Object}</span> + <span class="light">Karma.</span><b>surface</b>(options) </div> <div class="description"> - A shortcut for calling 'KSound( )' + A shortcut for calling 'KSurface(.. )'. </div> @@ -1087,7 +757,7 @@ The callback function will be executed when the preloading finishes. <dt class="heading">Parameters:</dt> <dt> - <b>args</b> + <b>options</b> </dt> <dd></dd> @@ -1098,23 +768,30 @@ The callback function will be executed when the preloading finishes. + <dl class="detailList"> + <dt class="heading">Returns:</dt> + + <dd><span class="light fixedFont">{Object}</span> new instance of KSurface object</dd> + + </dl> + <dl class="detailList"> <dt class="heading">See:</dt> - <dd>KSound</dd> + <dd>KSurface</dd> </dl> <hr /> - <a name="video"> </a> - <div class="fixedFont"> + <a name=".video"> </a> + <div class="fixedFont"><static> - - <b>video</b>(args) + <span class="light">{Object}</span> + <span class="light">Karma.</span><b>video</b>(args) </div> <div class="description"> @@ -1141,6 +818,13 @@ The callback function will be executed when the preloading finishes. + <dl class="detailList"> + <dt class="heading">Returns:</dt> + + <dd><span class="light fixedFont">{Object}</span> new instance of KVideo object</dd> + + </dl> + <dl class="detailList"> @@ -1165,7 +849,7 @@ The callback function will be executed when the preloading finishes. <!-- ============================== 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) + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.0 on Mon Sep 14 2009 20:12:59 GMT-0500 (CDT) </div> </body> </html> |