1 /*---------------------------------------------------------------------------*
2 
3 Copyright (C) Nintendo.  All rights reserved.
4 
5 These coded instructions, statements, and computer programs contain
6 proprietary information of Nintendo of America Inc. and/or Nintendo
7 Company Ltd., and are protected by Federal copyright law.  They may
8 not be disclosed to third parties or copied or duplicated in any form,
9 in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 
13 //------------------------------------------------------------------------------
14 /** @file  swkbd_SoundTypes.h
15 *   @brief  Definitions for keyboard library sound constants.
16 */
17 //------------------------------------------------------------------------------
18 #ifndef NN_SWKBD_SOUND_TYPES_H_
19 #define NN_SWKBD_SOUND_TYPES_H_
20 
21 /**
22 @namespace  nn
23 The <tt>nn</tt> namespace.
24 
25 @namespace  nn::swkbd
26 The <tt>swkbd</tt> namespace.
27 */
28 
29 namespace nn {
30 //------------------------------------------------------------------------------
31 namespace swkbd {
32 /** @ingroup  enum
33 * Sound types.
34 */
35 enum Se
36 {
37     cSe_KeyGlyph_Down       ///< When a glyph key is pressed.
38     , cSe_KeyGlyph_Up         ///< When a glyph key is released.
39     , cSe_KeyDelete_Down      ///< When the DELETE key is pressed.
40     , cSe_KeyDelete_Up        ///< When the DELETE key is released.
41     , cSe_KeyEnter_Down       ///< When the ENTER key is pressed.
42     , cSe_KeyEnter_Up         ///< When the ENTER key is released.
43     , cSe_KeyChange_Down      ///< When the Change key is pressed.
44     , cSe_KeyChange_Up        ///< When the Change key is released
45     , cSe_KeyCapsOn_Down      ///< When the CAPS LOCK key is pressed while On.
46     , cSe_KeyCapsOn_Up        ///< When the CAPS LOCK key is released while On.
47     , cSe_KeyCapsOff_Down     ///< When the CAPS LOCK key is pressed while Off.
48     , cSe_KeyCapsOff_Up       ///< When the CAPS LOCK key is released while Off.
49     , cSe_KeyError            ///< When a character cannot be input.
50     , cSe_KeyTab_Down         ///< When the TAB key is pressed.
51     , cSe_BtnArrow_Down       /// When an arrow key is pressed.
52     , cSe_BtnArrow_Up         /// When an arrow key is released.
53     , cSe_BtnCopy_Down        ///< When the Copy key is pressed.
54     , cSe_BtnCopy_Up          ///< When the Copy key is released.
55     , cSe_BtnModeChange_Down  ///< When the switch keyboard window call-up key is pressed.
56     , cSe_BtnModeOpen_Down    /// When the switch keyboard key is pressed.
57     , cSe_BtnModeOpen_Up      /// When the switch keyboard key is released.
58     , cSe_BtnModeClose_Down   ///< When the switch keyboard window close key is pressed.
59     , cSe_BtnModeClose_Up     ///< When the switch keyboard window close key is released.
60     , cSe_BtnFinishOk_Down    /// When the OK button is pressed.
61     , cSe_BtnFinishOk_Up      /// When the OK button is released.
62     , cSe_BtnFinishNg_Down    ///< When the Cancel button is pressed.
63     , cSe_BtnFinishNg_Up      ///< When the Cancel button is released.
64     , cSe_TapholdOpen         ///< When the tap hold window is opened.
65     , cSe_TapholdClose        ///< When the tap hold window is closed.
66     , cSe_SelectCursor        ///< When the selection cursor selects a button.
67     , cSe_SelectDpd           ///< When the DPD selects a button.
68     , cSe_SelectCancel        ///< When a selection is canceled.
69     , cSe_TextArea_Down       ///< When a text cursor is moved by touching.
70     , cSe_TextArea_Move       ///< When a selection is dragged by the text cursor.
71     , cSe_AppearKeyboard      ///< When the keyboard appears.
72     , cSe_Max
73 };
74 
75 /** @defgroup sound  Sound Customization API
76 * Features for customizing sounds.
77 *
78 * @{
79 */
80 /**
81 * Interface class for producing sounds.
82 *
83 * If you want to change the sounds, override this class and set using the <tt>SetUserSoundObj</tt> function.
84 *
85 */
86 class ISoundObj
87 {
88 public:
ISoundObj()89     ISoundObj() { }
~ISoundObj()90     virtual ~ISoundObj() { }
91 
92 /**
93 * Produces sounds.
94 *
95 * @param[in] id  The event ID.
96 * @param[in] controller_type  The controller type.
97 * @return  If <tt>false</tt>, the default process is executed.
98 */
99     virtual bool trigSe( Se id, ControllerType controller_type ) = 0;
100 };
101 /** @} */
102 
103 
104 /** @ingroup  enum
105 * Controller event types.
106 */
107 enum ControllerEvent
108 {
109     cControllerEvent_Rumble     ///< When the controller rumbles.
110     , cControllerEvent_Max
111 };
112 
113 /** @defgroup controller_event  Controller Customization API
114 * These features customize things like controller rumble.
115 *
116 * @{
117 */
118 
119 /**
120 * Interface class for processing controller events.
121 *
122 * To rumble the controller, set the derived class of the implemented rumble process in the <tt>trig</tt> function using the <tt>SetUserControllerEventObj</tt> function.
123 *
124 */
125 class IControllerEventObj
126 {
127 public:
IControllerEventObj()128     IControllerEventObj() { }
~IControllerEventObj()129     virtual ~IControllerEventObj() { }
130 
131 /**
132 * Processes controller events.
133 *
134 * @param[in] id  The event ID.
135 * @param[in] controller_type  The controller type.
136 * @return  If <tt>false</tt>, the default process is executed.
137 */
138     virtual bool trig( ControllerEvent id, ControllerType controller_type ) = 0;
139 };
140 /** @} */
141 
142 //------------------------------------------------------------------------------
143 }   // namespace swkbd
144     //------------------------------------------------------------------------------
145 } // namespace nn
146 
147 #endif  /* NN_SWKBD_SOUND_TYPES_H_ */
148 
149