FreeBASIC  0.91.0
fb_private_console.h File Reference
#include <windows.h>
Include dependency graph for fb_private_console.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _FB_CONSOLE_CTX
 

Macros

#define __fb_in_handle   fb_hConsoleGetHandle( TRUE )
 
#define __fb_out_handle   fb_hConsoleGetHandle( FALSE )
 
#define FB_CON_CORRECT_POSITION()
 
#define FB_CONSOLE_WINDOW_EMPTY()
 

Typedefs

typedef void(* fb_FnProcessMouseEvent )(const MOUSE_EVENT_RECORD *pEvent)
 
typedef struct _FB_CONSOLE_CTX FB_CONSOLE_CTX
 

Functions

int fb_hConsoleTranslateKey (char AsciiChar, WORD wVsCode, WORD wVkCode, DWORD dwControlKeyState, int bEnhancedKeysOnly)
 Translates an ASCII character, Virtual scan code and Virtual key code to a single QB-compatible keyboard code. More...
 
int fb_hVirtualToScancode (int vkey)
 
void fb_InitConsoleWindow (void)
 
FBCALL void fb_hRestoreConsoleWindow (void)
 
FBCALL void fb_hUpdateConsoleWindow (void)
 Remembers the current console window coordinates. More...
 
FBCALL void fb_hConvertToConsole (int *left, int *top, int *right, int *bottom)
 
FBCALL void fb_hConvertFromConsole (int *left, int *top, int *right, int *bottom)
 
FBCALL void fb_ConsoleLocateRaw (int row, int col, int cursor)
 
FBCALL void fb_ConsoleGetScreenSize (int *cols, int *rows)
 
void fb_ConsoleGetMaxWindowSize (int *cols, int *rows)
 
void fb_ConsoleGetScreenSizeEx (HANDLE hConsole, int *cols, int *rows)
 
int fb_ConsoleGetRawYEx (HANDLE hConsole)
 
int fb_ConsoleGetRawXEx (HANDLE hConsole)
 
void fb_ConsoleGetRawXYEx (HANDLE hConsole, int *col, int *row)
 
void fb_ConsoleLocateRawEx (HANDLE hConsole, int row, int col, int cursor)
 
int fb_ConsoleGetColorAttEx (HANDLE hConsole)
 
void fb_ConsoleColorEx (HANDLE hConsole, int fc, int bc)
 
void fb_ConsoleClearViewRawEx (HANDLE hConsole, int x1, int y1, int x2, int y2)
 
void fb_hConsoleGetWindow (int *left, int *top, int *cols, int *rows)
 
int fb_ConsoleProcessEvents (void)
 
int fb_hConsoleGetKey (int full)
 
int fb_hConsolePeekKey (int full)
 
void fb_hConsolePutBackEvents (void)
 
HANDLE fb_hConsoleGetHandle (int is_input)
 
void fb_hConsoleResetHandles (void)
 
int fb_ConsoleGetRawX (void)
 
int fb_ConsoleGetRawY (void)
 
HANDLE fb_hConsoleCreateBuffer (void)
 

Variables

FB_CONSOLE_CTX __fb_con
 

Macro Definition Documentation

#define __fb_in_handle   fb_hConsoleGetHandle( TRUE )

Definition at line 47 of file fb_private_console.h.

#define __fb_out_handle   fb_hConsoleGetHandle( FALSE )

Definition at line 48 of file fb_private_console.h.

#define FB_CON_CORRECT_POSITION ( )
Value:
do { \
fb_ConsolePrintBufferEx( NULL, 0, FB_PRINT_FORCE_ADJUST ); \
} while (0)

Definition at line 50 of file fb_private_console.h.

#define FB_CONSOLE_WINDOW_EMPTY ( )
Value:
((__fb_con.window.Left==__fb_con.window.Right) \
|| (__fb_con.window.Top==__fb_con.window.Bottom))

Definition at line 56 of file fb_private_console.h.

Typedef Documentation

typedef void(* fb_FnProcessMouseEvent)(const MOUSE_EVENT_RECORD *pEvent)

Definition at line 3 of file fb_private_console.h.

Function Documentation

void fb_ConsoleClearViewRawEx ( HANDLE  hConsole,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 6 of file io_cls.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_ConsoleColorEx ( HANDLE  hConsole,
int  fc,
int  bc 
)

Definition at line 17 of file io_color.c.

Here is the call graph for this function:

int fb_ConsoleGetColorAttEx ( HANDLE  hConsole)

Definition at line 60 of file io_color.c.

Here is the caller graph for this function:

void fb_ConsoleGetMaxWindowSize ( int *  cols,
int *  rows 
)

Definition at line 96 of file io_window.c.

int fb_ConsoleGetRawX ( void  )

Definition at line 12 of file io_getx.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_ConsoleGetRawXEx ( HANDLE  hConsole)

Definition at line 4 of file io_getx.c.

Here is the caller graph for this function:

void fb_ConsoleGetRawXYEx ( HANDLE  hConsole,
int *  col,
int *  row 
)

Definition at line 4 of file io_getxy.c.

Here is the caller graph for this function:

int fb_ConsoleGetRawY ( void  )

Definition at line 12 of file io_gety.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_ConsoleGetRawYEx ( HANDLE  hConsole)

Definition at line 4 of file io_gety.c.

Here is the caller graph for this function:

FBCALL void fb_ConsoleGetScreenSize ( int *  cols,
int *  rows 
)

Definition at line 22 of file io_screensize.c.

Here is the call graph for this function:

void fb_ConsoleGetScreenSizeEx ( HANDLE  hConsole,
int *  cols,
int *  rows 
)

Definition at line 6 of file io_screensize.c.

Here is the caller graph for this function:

FBCALL void fb_ConsoleLocateRaw ( int  row,
int  col,
int  cursor 
)

Definition at line 50 of file io_locate.c.

Here is the call graph for this function:

void fb_ConsoleLocateRawEx ( HANDLE  hConsole,
int  row,
int  col,
int  cursor 
)

Definition at line 27 of file io_locate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_ConsoleProcessEvents ( void  )

Definition at line 386 of file io_input.c.

Here is the call graph for this function:

Here is the caller graph for this function:

HANDLE fb_hConsoleCreateBuffer ( void  )

Definition at line 6 of file io_pageset.c.

Here is the caller graph for this function:

HANDLE fb_hConsoleGetHandle ( int  is_input)

Definition at line 8 of file io_gethnd.c.

Here is the caller graph for this function:

int fb_hConsoleGetKey ( int  full)

Definition at line 229 of file io_input.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hConsoleGetWindow ( int *  left,
int *  top,
int *  cols,
int *  rows 
)

Definition at line 145 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hConsolePeekKey ( int  full)

Definition at line 234 of file io_input.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hConsolePutBackEvents ( void  )

Definition at line 239 of file io_input.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hConsoleResetHandles ( void  )

Definition at line 35 of file io_gethnd.c.

Here is the caller graph for this function:

int fb_hConsoleTranslateKey ( char  AsciiChar,
WORD  wVsCode,
WORD  wVkCode,
DWORD  dwControlKeyState,
int  bEnhancedKeysOnly 
)

Translates an ASCII character, Virtual scan code and Virtual key code to a single QB-compatible keyboard code.

Returns
-1 if key not translatable

Definition at line 434 of file io_input.c.

Here is the caller graph for this function:

FBCALL void fb_hConvertFromConsole ( int *  left,
int *  top,
int *  right,
int *  bottom 
)

Definition at line 125 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL void fb_hConvertToConsole ( int *  left,
int *  top,
int *  right,
int *  bottom 
)

Definition at line 105 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL void fb_hRestoreConsoleWindow ( void  )

Definition at line 67 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL void fb_hUpdateConsoleWindow ( void  )

Remembers the current console window coordinates.

This function remembers the current console window coordinates. This is required because some applications showing using a SAA interface doesn't use WIDTH first to reduce the console screen buffer size which means that the scroll bar of the console window is always visible/accessible which also implies that the user might scroll up and down while the application is running.

When this library would always use the current console window coordinates, the application might show trash when the user scrolled up or down the buffer. But this is not what we want so we're only updating the console window coordinates under the following conditions:

  • Initialization
  • After screen buffer size change (using WIDTH)
  • After printing text

Definition at line 44 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hVirtualToScancode ( int  vkey)

Definition at line 71 of file io_multikey.c.

Here is the caller graph for this function:

void fb_InitConsoleWindow ( void  )

Definition at line 56 of file io_window.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

FB_CONSOLE_CTX __fb_con

Definition at line 9 of file hinit.c.