1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: extrapad_Api.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. 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 $Rev:$ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_EXTRAPAD_CTR_EXTRAPAD_API_H_ 17 #define NN_EXTRAPAD_CTR_EXTRAPAD_API_H_ 18 19 #include <nn/types.h> 20 #include <nn/applet.h> 21 22 #ifdef __cplusplus 23 24 namespace nn 25 { 26 namespace extrapad 27 { 28 namespace CTR 29 { 30 31 /* Please see man pages for details 32 33 34 35 */ 36 enum ReturnCode 37 { 38 RETURN_CODE_UNKNOWN = -1, // 39 RETURN_CODE_NONE = 0, // 40 RETURN_CODE_SUCCESS, // 41 42 RETURN_CODE_HOME_BUTTON = 10, // 43 RETURN_CODE_SOFTWARE_RESET, // 44 RETURN_CODE_POWER_BUTTON, // 45 46 RETURN_CODE_MAX_BIT = (s32)(1u << 31) // 47 }; 48 49 /* Please see man pages for details 50 51 52 53 54 */ 55 // Make a structure having a maximum size of 4092 bytes. 56 struct Config 57 { 58 //---------------------------------------- 59 // 60 61 /* Please see man pages for details 62 63 64 65 66 */ 67 bool homeButton; 68 69 /* Please see man pages for details 70 71 72 73 74 */ 75 bool softwareReset; 76 77 u8 pad0[62]; 78 79 80 //---------------------------------------- 81 // 82 83 /* Please see man pages for details 84 85 86 87 88 */ 89 ReturnCode returnCode; 90 91 u8 pad1[60]; 92 }; 93 94 /* Please see man pages for details 95 96 */ 97 struct Parameter 98 { 99 Config config; // 100 }; 101 102 /* Please see man pages for details 103 104 105 106 107 */ 108 void InitializeConfig(Config* pConfig); 109 110 /* Please see man pages for details 111 112 113 114 115 */ 116 void PreloadExtraPadApplet(); 117 118 /* Please see man pages for details 119 120 */ 121 void CancelPreloadExtraPadApplet(); 122 123 /* Please see man pages for details 124 125 126 127 */ 128 void WaitForPreloadExtraPadApplet(); 129 130 /* Please see man pages for details 131 132 133 134 135 136 */ 137 bool IsRegisteredExtraPadApplet(); 138 139 /* Please see man pages for details 140 141 142 143 144 145 146 147 148 */ 149 void StartExtraPadApplet( nn::applet::AppletWakeupState* pWakeupState, Parameter* pParameter ); 150 151 }}} 152 153 #endif // __cplusplus 154 155 #endif // ifndef NN_EXTRAPAD_CTR_EXTRAPAD_API_H_ 156