Subversion Repositories Kolibri OS

Rev

Rev 9552 | Rev 9766 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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