[ Home ]

console_win.c File Reference

Interface to console window [UNIX]. More...

#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include "../console.h"
#include "../../common/platform.h"
#include "../../common/common_utils.h"
#include "../../string/wtstring.h"

Include dependency graph for console_win.c:


Functions

PUBLIC wtBoolean ConsoleWindow_Init (void)
 Initialize hooks to console window.
PUBLIC void ConsoleWindow_Shutdown (void)
 Remove hooks to console window.
PUBLIC void CWaitForConsoleKeyInput (void)
 Wait for user input on console window.
PUBLIC void CPrintMsg (W32 textColour, const char *msg,...)
 Print formatted output to the console output stream.
PUBLIC void CProgressBar (void)
 Print progress spinner to console output stream.

Variables

PRIVATE HANDLE hConsoleScrnBuffer = INVALID_HANDLE_VALUE
PRIVATE HANDLE hStdin = INVALID_HANDLE_VALUE
PRIVATE char oldConsoleTitle [MAX_PATH]
PRIVATE DWORD nOldTitleSize
WORD wBGColourAttribute = 0
DWORD saveOldMode
const char * APPLICATION_STRING
const char * VERSION_STRING
PRIVATE const char progressText [4] = { '|', '/', '-', '\\' }
PRIVATE W32 index = 0

Detailed Description

Interface to console window [UNIX].

Interface to console window [Windows].

Author:
Michael Liebscher
Date:
2007
Note:
When doing a port these functions need to be converted.
Author:
Michael Liebscher
Date:
2006
Note:
When doing a port these functions need to be converted.

Function Documentation

PUBLIC wtBoolean ConsoleWindow_Init ( void   ) 

Initialize hooks to console window.

Returns:
On success true, otherwise false.

Here is the call graph for this function:

Here is the caller graph for this function:

PUBLIC void ConsoleWindow_Shutdown ( void   ) 

Remove hooks to console window.

Returns:
Nothing.

Here is the caller graph for this function:

PUBLIC void CPrintMsg ( W32  textColour,
const char *  msg,
  ... 
)

Print formatted output to the console output stream.

Parameters:
[in] textColour Text colour [ TC_RED, TC_GREEN, TC_BLUE, TC_WHITE, TC_CYAN, TC_YELLOW, TC_MAGENTA ]
[in] msg Format control.
[in] ... Optional arguments.
Returns:
Nothing.

Here is the caller graph for this function:

PUBLIC void CProgressBar ( void   ) 

Print progress spinner to console output stream.

Returns:
Nothing.

PUBLIC void CWaitForConsoleKeyInput ( void   ) 

Wait for user input on console window.

Returns:
Nothing.

Here is the caller graph for this function: