1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-09 20:21:45 +00:00
nxdumptool/source/ui.h
2018-06-21 20:46:17 -04:00

62 lines
1.3 KiB
C

#pragma once
#ifndef __UI_H__
#define __UI_H__
#define FILENAME_BUFFER_SIZE (1024 * 32) // 32 KiB
#define FILENAME_MAX_CNT 2048
typedef enum {
resultNone,
resultShowMainMenu,
resultShowXciDumpMenu,
resultDumpXci,
resultShowRawPartitionDumpMenu,
resultDumpRawPartition,
resultShowPartitionDataDumpMenu,
resultDumpPartitionData,
resultShowViewGameCardFsMenu,
resultShowViewGameCardFsGetList,
resultShowViewGameCardFsBrowser,
resultViewGameCardFsBrowserCopyFile,
resultDumpGameCardCertificate,
resultExit
} UIResult;
typedef enum {
stateMainMenu,
stateXciDumpMenu,
stateDumpXci,
stateRawPartitionDumpMenu,
stateDumpRawPartition,
statePartitionDataDumpMenu,
stateDumpPartitionData,
stateViewGameCardFsMenu,
stateViewGameCardFsGetList,
stateViewGameCardFsBrowser,
stateViewGameCardFsBrowserCopyFile,
stateDumpGameCardCertificate
} UIState;
void uiFill(int x, int y, int width, int height, u8 r, u8 g, u8 b);
void uiDrawString(const char* string, int x, int y, u8 r, u8 g, u8 b);
void uiStatusMsg(const char* fmt, ...);
void uiUpdateStatusMsg();
void uiPleaseWait();
void uiUpdateFreeSpace();
void uiInit();
void uiDeinit();
void uiSetState(UIState state);
UIState uiGetState();
void uiClearScreen();
void uiPrintHeadline();
UIResult uiLoop(u32 keysDown);
#endif