console functions for windows ports More...
#include "../../common/common.h"
#include "win_local.h"
Go to the source code of this file.
Data Structures | |
struct | sysConsole_t |
Defines | |
#define | CONSOLE_WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_CLIPCHILDREN|WS_GROUP) |
#define | CONSOLE_WINDOW_CLASS_NAME GAME_TITLE" Console" |
#define | CONSOLE_WINDOW_NAME CONSOLE_WINDOW_CLASS_NAME |
#define | MAX_OUTPUT 32768 |
#define | MAX_PRINTMSG 8192 |
Functions | |
int | SV_CountPlayers (void) |
Returns the number of spawned players. | |
static void | Sys_ConsoleLoop (qboolean error) |
Dispatch window messages. | |
const char * | Sys_ConsoleInput (void) |
Handles input for the console window. | |
void | Sys_ConsoleOutput (const char *text) |
void | Sys_Backtrace (void) |
On platforms supporting it, print a backtrace. | |
void | Sys_Error (const char *error,...) |
void | Sys_ShowConsole (qboolean show) |
static LONG WINAPI | Sys_ConsoleProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
static LONG WINAPI | Sys_ConsoleEditProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
void | Sys_ConsoleShutdown (void) |
Shutdown the console. | |
void | Sys_ConsoleInit (void) |
Initialize the console input (tty mode if possible). | |
Variables | |
static sysConsole_t | sys_console |
console functions for windows ports
Definition in file win_console.c.
#define CONSOLE_WINDOW_CLASS_NAME GAME_TITLE" Console" |
Definition at line 30 of file win_console.c.
Referenced by Sys_ConsoleInit(), and Sys_ConsoleShutdown().
#define CONSOLE_WINDOW_NAME CONSOLE_WINDOW_CLASS_NAME |
Definition at line 35 of file win_console.c.
Referenced by Sys_ConsoleInit().
#define CONSOLE_WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_CLIPCHILDREN|WS_GROUP) |
Definition at line 29 of file win_console.c.
Referenced by Sys_ConsoleInit().
#define MAX_OUTPUT 32768 |
Definition at line 38 of file win_console.c.
Referenced by Sys_ConsoleOutput().
#define MAX_PRINTMSG 8192 |
Definition at line 39 of file win_console.c.
Referenced by Sys_ConsoleOutput().
int SV_CountPlayers | ( | void | ) |
Returns the number of spawned players.
Definition at line 851 of file sv_main.c.
Referenced by Sys_ConsoleProc().
void Sys_Backtrace | ( | void | ) |
On platforms supporting it, print a backtrace.
Definition at line 161 of file win_console.c.
Referenced by Com_Error(), and Sys_Error().
static LONG WINAPI Sys_ConsoleEditProc | ( | HWND | hWnd, | |
UINT | uMsg, | |||
WPARAM | wParam, | |||
LPARAM | lParam | |||
) | [static] |
Definition at line 301 of file win_console.c.
References sysConsole_t::cmdBuffer, Com_ConsoleCompleteCommand(), Com_Printf(), sysConsole_t::defInputProc, sysConsole_t::defOutputProc, sysConsole_t::hWndInput, sysConsole_t::hWndOutput, and MAXCMDLINE.
Referenced by Sys_ConsoleInit().
void Sys_ConsoleInit | ( | void | ) |
Initialize the console input (tty mode if possible).
Definition at line 375 of file win_console.c.
References CONSOLE_WINDOW_CLASS_NAME, CONSOLE_WINDOW_NAME, CONSOLE_WINDOW_STYLE, sysConsole_t::defInputProc, sysConsole_t::defOutputProc, global_hInstance, sysConsole_t::hBrushInput, sysConsole_t::hBrushMsg, sysConsole_t::hBrushOutput, sysConsole_t::hFont, sysConsole_t::hFontBold, sysConsole_t::hWnd, sysConsole_t::hWndClear, sysConsole_t::hWndCopy, sysConsole_t::hWndInput, sysConsole_t::hWndMsg, sysConsole_t::hWndOutput, sysConsole_t::hWndQuit, MAXCMDLINE, qtrue, Sys_ConsoleEditProc(), Sys_ConsoleProc(), and Sys_ShowConsole().
Referenced by main(), Sys_TTYConsoleSigCont(), and WinMain().
const char* Sys_ConsoleInput | ( | void | ) |
Handles input for the console window.
NULL
if there is no input in the input box Definition at line 92 of file win_console.c.
References sysConsole_t::cmdBuffer, MAXCMDLINE, Q_strncpyz(), qfalse, and Sys_ConsoleLoop().
Referenced by SV_Frame().
static void Sys_ConsoleLoop | ( | qboolean | error | ) | [static] |
Dispatch window messages.
Definition at line 71 of file win_console.c.
References Sys_Quit().
Referenced by Sys_ConsoleInput(), and Sys_Error().
void Sys_ConsoleOutput | ( | const char * | text | ) |
Definition at line 115 of file win_console.c.
References sysConsole_t::hWndOutput, len, MAX_OUTPUT, MAX_PRINTMSG, and sysConsole_t::outLen.
Referenced by Com_vPrintf(), and Sys_Error().
static LONG WINAPI Sys_ConsoleProc | ( | HWND | hWnd, | |
UINT | uMsg, | |||
WPARAM | wParam, | |||
LPARAM | lParam | |||
) | [static] |
Definition at line 226 of file win_console.c.
References sysConsole_t::flashColor, sysConsole_t::hBrushInput, sysConsole_t::hBrushMsg, sysConsole_t::hBrushOutput, sysConsole_t::hWnd, sysConsole_t::hWndClear, sysConsole_t::hWndCopy, sysConsole_t::hWndInput, sysConsole_t::hWndMsg, sysConsole_t::hWndOutput, sysConsole_t::hWndQuit, SV_CountPlayers(), and Sys_Quit().
Referenced by Sys_ConsoleInit().
void Sys_ConsoleShutdown | ( | void | ) |
Shutdown the console.
Definition at line 348 of file win_console.c.
References CONSOLE_WINDOW_CLASS_NAME, sysConsole_t::defInputProc, sysConsole_t::defOutputProc, global_hInstance, sysConsole_t::hBrushInput, sysConsole_t::hBrushMsg, sysConsole_t::hBrushOutput, sysConsole_t::hFont, sysConsole_t::hFontBold, sysConsole_t::hWnd, sysConsole_t::hWndInput, sysConsole_t::hWndOutput, and sysConsole_t::timerActive.
Referenced by Sys_Error(), and Sys_Quit().
void Sys_Error | ( | const char * | error, | |
... | ||||
) |
Definition at line 165 of file win_console.c.
References sysConsole_t::hWnd, sysConsole_t::hWndInput, sysConsole_t::hWndMsg, Mem_Shutdown(), Q_vsnprintf(), qtrue, Sys_Backtrace(), Sys_ConsoleLoop(), Sys_ConsoleOutput(), Sys_ShowConsole(), Sys_Sleep(), and sysConsole_t::timerActive.
void Sys_ShowConsole | ( | qboolean | show | ) |
Definition at line 206 of file win_console.c.
References sysConsole_t::hWnd, sysConsole_t::hWndInput, and sysConsole_t::hWndOutput.
Referenced by Qcommon_Init(), Sys_ConsoleInit(), Sys_ConsoleInput(), Sys_ConsoleOutput(), and Sys_Error().
sysConsole_t sys_console [static] |
Definition at line 64 of file win_console.c.