org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A68BE34-5C07-4008-A886-A20D92669E05.html
author Eugene Ostroukhov <eugeneo@symbian.org>
Fri, 11 Jun 2010 13:33:03 -0700
changeset 372 1e408ee32d8a
parent 229 716254ccbcc0
permissions -rw-r--r--
Added templates for WRT 1.1 platform services


<!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" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="lightoff()"/><meta name="DC.Relation" scheme="URI" content="GUID-63189AAF-B987-450D-B605-A75921D2E61D"/><meta name="DC.Relation" scheme="URI" content="GUID-D66AB112-1BC4-4A88-AFCF-1CDBB94366B7"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-1A678A11-0BDD-4F64-9F40-013F6CDB81D7"/><meta name="DC.Relation" scheme="URI" content="GUID-318BD3F5-D351-4BC2-8F4F-6E096A56CD54"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-7A68BE34-5C07-4008-A886-A20D92669E05"/><title>lightoff() </title><script type="text/javascript">
      function initPage() {}
    </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-7A68BE34-5C07-4008-A886-A20D92669E05">lightoff()</h1><div>
<p><strong>Syntax:</strong></p>
<pre class="codeblock" id="GUID-807F2D3F-CB66-413E-8F06-FA13963FEB54">[void] sysinfo.lightoff(String lighttarget, Int duration, Int fadeout)</pre>
<p><strong>Description:</strong></p>
<p>The <code>lightoff</code> method switches the specified target light off for the specified duration.</p>
<p><strong>Argument:</strong></p>
<ul>
<li><p><code>lighttarget</code>:</p>

<p>Defines which target light should be turned off. Use one of the supported target light properties to specify a target light.</p>

</li>
<li><p><code>duration</code>:</p>

<p>Defines the period during which the target light is switched off. The period is measured in milliseconds.</p>
<p>After the duration expires, the light state of the target will be changed to whatever state was caused by the last infinite time duration call. If there has not been a previous infinite time duration call in a session, the default state determined by the inactivity timer (system backlight timeout) is used.</p>
<p>If <code>duration</code> is <a href="GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2.html#GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2"><code>lightinfiniteduration</code></a>, the target light can be turned on only when some other light control method is called.</p>

</li>
<li><p><code>fadeout</code>:</p>

<p>If <code>true</code>, target lights will not turn off instantly but fade-out smoothly instead. If <code>false</code>, target lights will be turned off immediately.</p>

</li>
</ul>
<div class="note"><p><strong class="note_title">Note: </strong>All devices might not support fade-out, in which case the device will behave in its default manner.</p>
</div>
<p><strong>Return value:</strong></p>
<p>This method does not return a value.</p>
<p><strong>Example code:</strong></p>
<pre class="codeblock" id="GUID-5F266902-60F8-432B-8FFB-EDEB7E09FC98">function callLightOff()
{
   // get the Embed element reference
   var sysinfo = document.embeds[0];
   /*********************
   call lightoff() method, which turns off the light 
   of all displays and keyboard for 5 seconds of duration 
   and using fading out mode
   *********************/
   var target =  sysinfo.lighttargetsystem;
   var duration = 5000; // 5 seconds
   sysinfo.lightoff(target, duration, true);
}
</pre>
</div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>