diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h')
| -rw-r--r-- | Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h new file mode 100644 index 00000000..f3f2dde9 --- /dev/null +++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUtil.h @@ -0,0 +1,50 @@ +/******************************************************** +* * +* Copyright (C) Microsoft. All rights reserved. * +* * +********************************************************/ + +// Sentient Client Utility API +// +// Include this to get access to all Utility-related Sentient features. + +#pragma once + +#include "SenClientTypes.h" + + +namespace Sentient +{ + /************************* + ***** Utility Types ***** + *************************/ + + // This function should return the width (in pixels) of a single + // character, and is used to check how many characters can fit on a + // single line of the screen + typedef unsigned int (*SenUtilGetCharacterWidthCallback)( wchar_t character ); + + + /***************************** + ***** Utility Functions ***** + *****************************/ + + // This function takes a multi-line text string, a width (in pixels) that + // a text line can be, and a callback to measure the width of each character. + // It will return the end of the current text line, and the beginning of + // the next text line. Use the beginning of the next text line as input next + // time you call SenUtilWordWrapFindNextLine() + void SenUtilWordWrapFindNextLine( + const wchar_t *startOfThisLine, + unsigned int maxWidth, + SenUtilGetCharacterWidthCallback characterWidthCallback, + const wchar_t **out_endOfThisLine, + const wchar_t **out_beginningOfNextLine ); + + // This returns a SYSTEMTIME set to its earliest possible value. + SYSTEMTIME SenUtilDateTimeMin(); + + // This returns a SYSTEMTIME set to its latest possible value. + SYSTEMTIME SenUtilDateTimeMax(); + +} // namespace Sentient |
