6 #ifndef _INC_cAppConsole_H
7 #define _INC_cAppConsole_H
17 #if ! defined(UNDER_CE)
55 static const COUNT_t k_MAX_CONSOLE_LINES = 500;
59 #elif defined(__linux__)
68 bool m_bConsoleParent;
69 int m_iAllocConsoleCount;
75 void CheckConsoleMode() noexcept;
76 bool AttachConsoleSync();
81 bool HasConsoleParent() noexcept
85 return m_bConsoleParent;
90 return m_eConsoleType;
100 bool AttachOrAllocConsole(
bool bAttachElseAlloc =
true);
101 void ReleaseConsole();
103 HRESULT WriteStrErr(
const char* pszText);
104 HRESULT WriteStrOut(
const char* pszText);
106 HRESULT SetKeyModes(
bool bEchoMode =
true,
bool bEnterMode =
true);
107 int get_KeyReadQty()
const;
115 const HRESULT hRes = WriteStrOut(pszStr);
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define HRESULT_WIN32_C(x)
a constant LSTATUS/error_status_t with no check, unlike HRESULT_FROM_WIN32()
Definition: HResult.h:79
#define FAILED(x)
Definition: HResult.h:30
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define CHEAPOBJECT_IMPL
Definition: cHeapObject.h:32
#define UNITTEST2_PREDEF(x)
Definition: cUnitTestDecl.h:19
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cAppConsole.h:47
HRESULT WriteString(const wchar_t *pszStr) override
Definition: cAppConsole.h:120
AppCon_TYPE get_ConsoleMode() noexcept
Definition: cAppConsole.h:87
HRESULT WriteString(const char *pszStr) override
Definition: cAppConsole.h:111
bool isConsoleMode() noexcept
Definition: cAppConsole.h:92
Definition: cSingleton.h:127
Definition: cStream.h:126
Definition: cThreadLock.h:498
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
AppStd_TYPE
Definition: cAppConsole.h:24
@ AppStd_QTY
Definition: cAppConsole.h:30
@ AppStd_stdin
stdin (&__iob_func()[0]) -> GetStdHandle(STD_INPUT_HANDLE) = STDIN_FILENO
Definition: cAppConsole.h:27
@ AppStd_stdout
stdout (&__iob_func()[1]) -> GetStdHandle(STD_OUTPUT_HANDLE) = STDOUT_FILENO
Definition: cAppConsole.h:28
@ AppStd_stderr
stderr (&__iob_func()[2]) -> GetStdHandle(STD_ERROR_HANDLE) = STDERR_FILENO
Definition: cAppConsole.h:29
size_t COUNT_t
like size_t but a count of things that might NOT be bytes. ASSUME unsigned. _countof(x)
Definition: Index.h:32
AppCon_TYPE
Definition: cAppConsole.h:33
@ AppCon_NONE
Definition: cAppConsole.h:38
@ AppCon_Proc
Process was build as _CONSOLE mode. stdin,stdout already setup.
Definition: cAppConsole.h:39
@ AppCon_Attach
Attached to parent console. must call FreeConsole()
Definition: cAppConsole.h:40
@ AppCon_UNKNOWN
Definition: cAppConsole.h:37
@ AppCon_Create
Created my own console. must call FreeConsole()
Definition: cAppConsole.h:41
const char *__stdcall StrArg< char >(const char *pszStr) noexcept
Definition: StrArg.h:63