Terminal.cppm 883 B

123456789101112131415161718192021222324252627282930313233
  1. export module Core.Terminal;
  2. export import Core.Vector;
  3. export namespace Core {
  4. void enterAlternativeTerminal() noexcept;
  5. void leaveAlternativeTerminal() noexcept;
  6. IntVector2 getTerminalSize() noexcept;
  7. void clearTerminal() noexcept;
  8. void clearTerminalLine() noexcept;
  9. void hideCursor() noexcept;
  10. void showCursor() noexcept;
  11. void resetCursor() noexcept;
  12. void moveCursorLeft(int i) noexcept;
  13. void moveCursorRight(int i) noexcept;
  14. void moveCursorUp(int i) noexcept;
  15. void moveCursorDown(int i) noexcept;
  16. bool enterRawTerminal() noexcept;
  17. bool leaveRawTerminal() noexcept;
  18. u64 getRawChar() noexcept;
  19. bool isSpecialChar(u64 u) noexcept;
  20. struct SpecialChar {
  21. u64 key = 0;
  22. bool control = 0;
  23. bool shift = 0;
  24. bool alt = 0;
  25. };
  26. SpecialChar convertToSpecialChar(u64 u) noexcept;
  27. }