Subversion Repositories Kolibri OS

Rev

Rev 9811 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8745 turbocat 1
/*
2
This is adapded thunk for console.obj sys library
9766 turbocat 3
.h is equal to svn:\programs\develop\libraries\console\console_en.txt
8745 turbocat 4
 
5
Adapted for tcc by Siemargl, 2016
6
 
7
*/
8
#ifndef _CONIO_H_
9
#define _CONIO_H_
10
 
11
#include 
12
 
13
/*
14
console.obj exports the following functions
15
*/
16
 
9766 turbocat 17
typedef unsigned int dword;  /* 32-bit unsigned integer */
8745 turbocat 18
typedef unsigned short word; /* 16-bit unsigned integer */
19
 
20
#define CON_WINDOW_CLOSED 0x200
9766 turbocat 21
#define CON_COLOR_BLUE    0x01
22
#define CON_COLOR_GREEN   0x02
23
#define CON_COLOR_RED     0x04
24
#define CON_COLOR_BRIGHT  0x08
8745 turbocat 25
/* background color */
26
 
9766 turbocat 27
#define CON_BGR_BLUE   0x10
28
#define CON_BGR_GREEN  0x20
29
#define CON_BGR_RED    0x40
8745 turbocat 30
#define CON_BGR_BRIGHT 0x80
31
/* output controls */
32
 
33
#define CON_IGNORE_SPECIALS 0x100
34
 
9812 Coldy 35
DLLAPI int con_init(void);
36
DLLAPI int con_init_opt(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title);
37
extern void __stdcall _FUNC(*con_exit)(int bCloseWindow);
9766 turbocat 38
extern void __stdcall _FUNC((*con_set_title))(const char* title);
39
extern void __stdcall _FUNC((*con_write_asciiz))(const char* str);
40
extern void __stdcall _FUNC((*con_write_string))(const char* str, dword length);
9620 turbocat 41
extern int __cdecl _FUNC((*con_printf))(const char* format, ...);
9766 turbocat 42
extern dword __stdcall _FUNC((*con_get_flags))(void);
43
extern dword __stdcall _FUNC((*con_set_flags))(dword new_flags);
44
extern int __stdcall _FUNC((*con_get_font_height))(void);
45
extern int __stdcall _FUNC((*con_get_cursor_height))(void);
46
extern int __stdcall _FUNC((*con_set_cursor_height))(int new_height);
47
extern int __stdcall _FUNC((*con_getch))(void);
48
extern word __stdcall _FUNC((*con_getch2))(void);
49
extern int __stdcall _FUNC((*con_kbhit))(void);
50
extern char* __stdcall _FUNC((*con_gets))(char* str, int n);
51
typedef int __stdcall _FUNC (*con_gets2_callback)(int keycode, char** pstr, int* pn, int* ppos);
52
extern char* __stdcall _FUNC((*con_gets2))(con_gets2_callback callback, char* str, int n);
53
extern void __stdcall _FUNC((*con_cls))();
54
extern void __stdcall _FUNC((*con_get_cursor_pos))(int* px, int* py);
55
extern void __stdcall _FUNC((*con_set_cursor_pos))(int x, int y);
9812 Coldy 56
extern int __con_is_load;
8745 turbocat 57
 
58
#endif