2021-05-25 17:41:10 +02:00
|
|
|
/*
|
|
|
|
This is adapded thunk for console.obj sys library
|
2022-04-15 11:11:49 +02:00
|
|
|
.h is equal to svn:\programs\develop\libraries\console\console_en.txt
|
2021-05-25 17:41:10 +02:00
|
|
|
|
|
|
|
Adapted for tcc by Siemargl, 2016
|
|
|
|
|
|
|
|
*/
|
|
|
|
#ifndef _CONIO_H_
|
|
|
|
#define _CONIO_H_
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
console.obj exports the following functions
|
|
|
|
*/
|
|
|
|
|
2022-04-15 11:11:49 +02:00
|
|
|
typedef unsigned int dword; /* 32-bit unsigned integer */
|
2021-05-25 17:41:10 +02:00
|
|
|
typedef unsigned short word; /* 16-bit unsigned integer */
|
|
|
|
|
|
|
|
#define CON_WINDOW_CLOSED 0x200
|
2022-04-15 11:11:49 +02:00
|
|
|
#define CON_COLOR_BLUE 0x01
|
|
|
|
#define CON_COLOR_GREEN 0x02
|
|
|
|
#define CON_COLOR_RED 0x04
|
|
|
|
#define CON_COLOR_BRIGHT 0x08
|
2021-05-25 17:41:10 +02:00
|
|
|
/* background color */
|
|
|
|
|
2022-04-15 11:11:49 +02:00
|
|
|
#define CON_BGR_BLUE 0x10
|
|
|
|
#define CON_BGR_GREEN 0x20
|
|
|
|
#define CON_BGR_RED 0x40
|
2021-05-25 17:41:10 +02:00
|
|
|
#define CON_BGR_BRIGHT 0x80
|
|
|
|
/* output controls */
|
|
|
|
|
|
|
|
#define CON_IGNORE_SPECIALS 0x100
|
|
|
|
|
2022-05-09 20:19:05 +02:00
|
|
|
extern int _FUNC(con_init)(void);
|
|
|
|
extern int _FUNC(con_init_opt)(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title);
|
|
|
|
extern void __stdcall _FUNC((*con_exit))(int bCloseWindow);
|
2022-04-15 11:11:49 +02:00
|
|
|
extern void __stdcall _FUNC((*con_set_title))(const char* title);
|
|
|
|
extern void __stdcall _FUNC((*con_write_asciiz))(const char* str);
|
|
|
|
extern void __stdcall _FUNC((*con_write_string))(const char* str, dword length);
|
2022-01-12 19:09:37 +01:00
|
|
|
extern int __cdecl _FUNC((*con_printf))(const char* format, ...);
|
2022-04-15 11:11:49 +02:00
|
|
|
extern dword __stdcall _FUNC((*con_get_flags))(void);
|
|
|
|
extern dword __stdcall _FUNC((*con_set_flags))(dword new_flags);
|
|
|
|
extern int __stdcall _FUNC((*con_get_font_height))(void);
|
|
|
|
extern int __stdcall _FUNC((*con_get_cursor_height))(void);
|
|
|
|
extern int __stdcall _FUNC((*con_set_cursor_height))(int new_height);
|
|
|
|
extern int __stdcall _FUNC((*con_getch))(void);
|
|
|
|
extern word __stdcall _FUNC((*con_getch2))(void);
|
|
|
|
extern int __stdcall _FUNC((*con_kbhit))(void);
|
|
|
|
extern char* __stdcall _FUNC((*con_gets))(char* str, int n);
|
|
|
|
typedef int __stdcall _FUNC (*con_gets2_callback)(int keycode, char** pstr, int* pn, int* ppos);
|
|
|
|
extern char* __stdcall _FUNC((*con_gets2))(con_gets2_callback callback, char* str, int n);
|
|
|
|
extern void __stdcall _FUNC((*con_cls))();
|
|
|
|
extern void __stdcall _FUNC((*con_get_cursor_pos))(int* px, int* py);
|
|
|
|
extern void __stdcall _FUNC((*con_set_cursor_pos))(int x, int y);
|
2022-05-09 20:19:05 +02:00
|
|
|
extern int _FUNC(__con_is_load);
|
2021-05-25 17:41:10 +02:00
|
|
|
|
|
|
|
#endif
|