1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     SmTouchPanelStatus.h
4 
5   Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain proprietary
8   information of Nintendo and/or its licensed developers and are protected by
9   national and international copyright laws. They may not be disclosed to third
10   parties or copied or duplicated in any form, in whole or in part, without the
11   prior written consent of Nintendo.
12 
13   The content herein is highly confidential and should be handled accordingly.
14 
15   $Revision: $
16  *---------------------------------------------------------------------------*/
17 #ifndef SM_TOUCHPANEL_STATUS_H_
18 #define SM_TOUCHPANEL_STATUS_H_
19 
20 //#include <nw/demo.h>
21 #include <nn/hid/CTR/hid_TouchPanelReader.h>
22 #include "../include/SmDef.h"
23 
24 
25 //------------------------------------------------------------------------------
26 // �^�b�`�p�l���X�e�[�^�X
27 class SmTouchPanelStatus
28 {
29 public:
30     // �R���X�g���N�^
SmTouchPanelStatus()31     SmTouchPanelStatus()
32     : m_IsGrab( false )
33     {
34 
35     }
36 
37     // hid �̃^�b�`�p�l���X�e�[�^�X���擾����(�X�V�p)
GetHidTouchPanelStatus()38     nn::hid::CTR::TouchPanelStatus* GetHidTouchPanelStatus()
39     {
40         return &touchPanelStatus;
41     }
42 
43     // �͂�
Grab()44     void Grab()
45     {
46         m_IsGrab = true;
47     }
48 
49     // ����
UnGrab()50     void UnGrab()
51     {
52         m_IsGrab = false;
53     }
54 
55     // �͂܂�Ă邩�H
IsGrab()56     bool IsGrab()
57     {
58         return m_IsGrab;
59     }
60 
61     // ���W���擾
GetX()62     u16 GetX()
63     {
64         return touchPanelStatus.x;
65     }
GetY()66     u16 GetY()
67     {
68         return touchPanelStatus.y;
69     }
70 
71 private:
72     nn::hid::CTR::TouchPanelStatus touchPanelStatus;
73 
74     bool    m_IsGrab;
75 };
76 
77 
78 
79 
80 #endif  // SM_TOUCHPANEL_STATUS_H_
81