/*---------------------------------------------------------------------------* Project: Horizon File: Util.h Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 46365 $ *---------------------------------------------------------------------------*/ #ifndef NN_COMMON_SCENE_UTIL_H_ #define NN_COMMON_SCENE_UTIL_H_ #include #include "TextWriter.h" #include "Gui.h" #define AOC_PANIC_IF_FAILED(result) NN_UTIL_PANIC_IF_FAILED(result) namespace scene { /* Please see man pages for details */ u32 wstrlen(const wchar_t* pText); /* Please see man pages for details */ u32 wtoi(const wchar_t* pText); /* Please see man pages for details */ void SetupMemory(u32 deviceMemorySize); /* Please see man pages for details */ void ReleaseMemory(); /* Please see man pages for details */ nn::fnd::ExpHeap* GetHeap(); /* Please see man pages for details */ void* Allocate(size_t size, s32 alignment = 4); /* Please see man pages for details */ void Free(void* pBuffer); /* Please see man pages for details */ void SetTitle(const wchar_t* pTitle, size_t length); void DrawTitle(TextWriter* pTextWriter); void DrawTitleForApplet(TextWriter* pTextWriter); void DrawTitleForApplication(TextWriter* pTextWriter); /* Please see man pages for details */ void DrawSceneId(TextWriter* pTextWriter, const wchar_t* pSceneId); /* Please see man pages for details */ void DrawResult(TextWriter* pTextWriter, const nn::Result& result); /* Please see man pages for details */ void DrawBusyIcon(TextWriter* pTextWriter, u16 x, u16 y, u32 counter); /* Please see man pages for details */ void DrawConfirmMessage(TextWriter* pTextWriter, const wchar_t* pMessage1, const wchar_t* pMessage2); /* Please see man pages for details */ nn::fnd::DateTime GetDateTimeFromUnixTime(s64 unixTime); /* Please see man pages for details */ void AddLButton(scene::ControlManager* pManager, u32 id, const wchar_t* pCaption); /* Please see man pages for details */ void AddRButton(scene::ControlManager* pManager, u32 id, const wchar_t* pCaption); /* Please see man pages for details */ void AddYesNoButtons(scene::ControlManager* pManager, u32 idYes, u32 idNo, const wchar_t* pCaptionYes = L"はい", const wchar_t* pCaptionNo = L"いいえ"); } #endif // NN_COMMON_SCENE_UTIL_H_