Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef _CONIO_H_
  2. #define _CONIO_H_
  3.  
  4. #include <stdint.h>
  5.  
  6. #define CON_WINDOW_CLOSED 0x200
  7. #define CON_COLOR_BLUE 0x01
  8. #define CON_COLOR_GREEN 0x02
  9. #define CON_COLOR_RED 0x04
  10. #define CON_COLOR_BRIGHT 0x08
  11. /* background color */
  12.  
  13. #define CON_BGR_BLUE 0x10
  14. #define CON_BGR_GREEN 0x20
  15. #define CON_BGR_RED 0x40
  16. #define CON_BGR_BRIGHT 0x80
  17. /* output controls */
  18.  
  19. #define CON_IGNORE_SPECIALS 0x100
  20.  
  21. #define __con_api __attribute__((stdcall)) __attribute__((dllimport))
  22.  
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27.  
  28. int   __con_api con_init(uint32_t wnd_width, uint32_t wnd_height, uint32_t scr_width, uint32_t scr_height, const char* title);
  29. void  __con_api con_exit(int bCloseWindow);
  30. void  __con_api  con_set_title(const char* title);
  31. void  __con_api con_write_asciiz(const char* str);
  32. void  __con_api con_write_string(const char* str, uint32_t length);
  33. uint32_t __con_api con_get_flags(void);
  34. uint32_t __con_api con_set_flags(uint32_t new_flags);
  35. int   __con_api con_get_font_height(void);
  36. int   __con_api con_get_cursor_height(void);
  37. int   __con_api con_set_cursor_height(int new_height);
  38. int   __con_api con_getch(void);
  39. uint16_t  __con_api con_getch2(void);
  40. int   __con_api con_kbhit(void);
  41. char* __con_api con_gets(char* str, int n);
  42. typedef int __con_api (*con_gets2_callback)(int keycode, char** pstr, int* pn, int* ppos);
  43. char*  __con_api con_gets2(con_gets2_callback callback, char* str, int n);
  44. void  __con_api con_cls(void);
  45. void  __con_api con_get_cursor_pos(int* px, int* py);
  46. void  __con_api con_set_cursor_pos(int x, int y);
  47.  
  48. #ifdef __cplusplus
  49. };
  50. #endif
  51.  
  52. #endif
  53.