org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <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="lightblink()"/><meta name="DC.Relation" scheme="URI" content="GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA"/><meta name="DC.Relation" scheme="URI" content="GUID-7A68BE34-5C07-4008-A886-A20D92669E05"/><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-63189AAF-B987-450D-B605-A75921D2E61D"/><title>lightblink() </title><script type="text/javascript">
       
     5       function initPage() {}
       
     6     </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-63189AAF-B987-450D-B605-A75921D2E61D">lightblink()</h1><div>
       
     7 <p><strong>Syntax:</strong></p>
       
     8 <pre class="codeblock" id="GUID-B73FA3EB-984A-47FA-8A37-2562FF0A5BA6">[void] sysinfo.lightblink(String lighttarget, Int duration, Int onduration, Int offduration, Int intensity)</pre>
       
     9 <p><strong>Description:</strong></p>
       
    10 <p>The <code>lightblink</code> method switches the specified target light on and off (blinking) for the specified duration with the brightness defined by a specified light intensity.</p>
       
    11 <p><strong>Argument:</strong></p>
       
    12 <ul>
       
    13 <li><p><code>lighttarget</code>:</p>
       
    14 
       
    15 <p>Defines which target light should be blinking. Use one of the supported target light properties to specify a target light.</p>
       
    16 
       
    17 </li>
       
    18 <li><p><code>duration</code>:</p>
       
    19 
       
    20 <p>Defines the period during which the target light is set to blink. The period is measured in milliseconds.</p>
       
    21 <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>
       
    22 <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 stopped blinking only when some other light control method is called.</p>
       
    23 <p>Duration can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a>.</p>
       
    24 
       
    25 </li>
       
    26 <li><p><code>onduration</code>:</p>
       
    27 
       
    28 <p>Defines the period during which the target light is switched on in every blinking cycle. The period is measured in milliseconds. </p>
       
    29 <p><code>onduration</code> argument can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a>. </p>
       
    30 <p><code>onduration</code> argument can be the device default cycle duration <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. However, if either <code>onduration</code> or <code>offduration</code> is <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>, both arguments must be <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. </p>
       
    31 
       
    32 </li>
       
    33 </ul>
       
    34 <div class="note"><p><strong class="note_title">Note: </strong>Some devices might not support variable blinking cycle times, in which case the default value will be substituted.</p>
       
    35 </div>
       
    36 <ul>
       
    37 <li><p><code>offduration</code>:</p>
       
    38 
       
    39 <p>Defines the period during which the target light is switched off in every blinking cycle. The period is measured in milliseconds.</p>
       
    40 <p><code>offduration</code> argument can have the maximum value of <a href="GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html#GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40"><code>lightmaxduration</code></a></p>
       
    41 <p><code>offduration</code> argument can be the device default cycle duration <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. However, if either <code>onduration</code> or <code>offduration</code> is <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>, both must be <a href="GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html#GUID-3ED63699-D71D-479A-A191-F7145271CCBC"><code>lightdefaultcycletime</code></a>. </p>
       
    42 
       
    43 </li>
       
    44 </ul>
       
    45 <div class="note"><p><strong class="note_title">Note: </strong>Some devices might not support variable blinking cycle times, in which case the default value will be substituted.</p>
       
    46 </div>
       
    47 <ul>
       
    48 <li><p><code>intensity</code>:</p>
       
    49 
       
    50 <p>Defines the intensity (brightness) of the target light when it is switched on.</p>
       
    51 <p>Use the <a href="GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA.html#GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA"><code>lightminintensity</code></a> and the <a href="GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314.html#GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314"><code>lightmaxintensity</code></a> to detect the range of supported light intensity, and use any value between the range to avoid providing an invalid intensity value.</p>
       
    52 <p><code>intensity</code> argument can have the device default value <a href="GUID-F51B8923-8A46-49A0-B307-E84194904454.html#GUID-F51B8923-8A46-49A0-B307-E84194904454"><code>lightdefaultintensity</code></a>. </p>
       
    53 
       
    54 </li>
       
    55 </ul>
       
    56 <div class="note"><p><strong class="note_title">Note: </strong>All devices might not support a user-defined intensity, in which case the device will behave in its default manner.</p>
       
    57 </div>
       
    58 <p><strong>Return value:</strong></p>
       
    59 <p>This method does not return a value.</p>
       
    60 <p><strong>Remarks:</strong></p>
       
    61 <p>Switching the mobile device lights on consumes energy. Therefore, it is recommended that you carefully consider the need for using the lights.</p>
       
    62 <p><strong>Example code:</strong></p>
       
    63 <pre class="codeblock" id="GUID-514C6452-9E38-49A3-AFD0-73741213E1A2">function callLightBlink()
       
    64 {
       
    65    // get the Embed element reference
       
    66    var sysinfo = document.embeds[0];
       
    67    /*********************
       
    68    call lightblink() method, which turns on and off the light 
       
    69    of all displays and keyboard with a defined duration 
       
    70    and using the default blinking cycle time with the device 
       
    71    default light intensity
       
    72    *********************/
       
    73    var target =  sysinfo.lighttargetsystem;
       
    74    var duration = 5000; // 5 seconds
       
    75    var onDur = sysinfo. lightdefaultcycletime;
       
    76    var offDur = sysinfo. lightdefaultcycletime;
       
    77    var intensity = sysinfo.lightdefaultintensity;
       
    78    sysinfo.lightblink(target, duration, onDur, offDur, intensity);
       
    79 }</pre>
       
    80 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>