1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7<title>GetHomeButtonState</title>
8  </head>
9  <body>
10<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/applet/Overview.html">applet</a>::<a href="../../../nn/applet/CTR/Overview.html">CTR</a>::GetHomeButtonState</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14<a href="../../../nn/applet/CTR/HomeButtonState.html">AppletHomeButtonState</a> GetHomeButtonState(
15     void
16);
17</pre>
18    </div>
19<h2>Parameters</h2>
20    <div class="section">
21<p>None.</p>
22    </div>
23<h2>Return Values</h2>
24<div class="section">Returns the state. </div>
25<h2>Description</h2>
26    <div class="section">
27<p>Gets the state of the HOME Button.</p><!-- write here --><P>
28This function can obtain the following values.
29</P><TABLE><THEAD><TR><TH>Value</TH><TH>Description</TH></TR></THEAD><TR><TD>nn::applet::CTR::HOME_BUTTON_NONE</TD><TD>Normal Use</TD></TR><TR><TD>nn::applet::CTR::HOME_BUTTON_SINGLE_PRESSED</TD><TD>Single button press detected.</TD></TR><TR><TD>nn::applet::CTR::HOME_BUTTON_DOUBLE_PRESSED</TD><TD>Double-click detected. (See Note 1.)</TD></TR></TABLE><P>
30For any state other than <CODE>nn::applet::CTR::HOME_BUTTON_NONE</CODE>, you must call the <a href="../../../nn/applet/CTR/ProcessHomeButton.html"><CODE>nn::applet::CTR::ProcessHomeButton</CODE></a> function after the application has run the necessary processing.
31</P><P>
32However, do not use this function's return value directly to determine if HOME Button processing is required. For that purpose, call the <a href="../../../nn/applet/CTR/IsExpectedToProcessHomeButton.html"><CODE>nn::applet::CTR::IsExpectedToProcessHomeButton</CODE></a> function instead. This takes into account not only the importance of transitioning to the HOME Menu because of a HOME Button press but also similar requests to transition to the HOME Menu from other applets.
33</P><P>
34Once the state value changes to something other than <CODE>nn::applet::CTR::HOME_BUTTON_NONE</CODE>, it stays in that state until you clear this by calling the <a href="../../../nn/applet/CTR/ClearHomeButtonState.html"><CODE>nn::applet::CTR::ClearHomeButtonState</CODE></a> function.(The <a href="../../../nn/applet/CTR/ClearHomeButtonState.html"><CODE>nn::applet::CTR::ClearHomeButtonState</CODE></a> function sets the state back to <CODE>applet::HOME_BUTTON_NONE</CODE>.
35</P><P>
36<B>Note 1:</B>
37</P><P>
38In CTR SDK 4.0 and later versions, the double-click is no longer returned. No matter how the button is pressed, the information is returned as a single button press. The double-click definition remains for purposes of compatibility, but in the future might be deleted.
39</P></div>
40<h2>Revision History</h2>
41    <div class="section">
42      <dl class="history">
43        <dt>2012/02/01</dt>
44<dd>Noted that in CTR SDK 4.0 and later versions the double-click is no longer returned.<br />
45        </dd>
46        <dt>2010/12/01</dt>
47<dd>Added details.
48        </dd>
49        <dt>2010/11/10</dt>
50<dd>Initial version.<br />
51        </dd>
52      </dl>
53    </div>
54  <hr><p>CONFIDENTIAL</p></body>
55</html>