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