Subversion Repositories Kolibri OS

Rev

Rev 324 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. #ifdef __cplusplus
  3. extern "C"
  4. {
  5. #endif
  6.  
  7.  
  8. #define FONT0          0x00000000
  9. #define FONT1          0x10000000
  10.  
  11. #define BT_NORMAL      0x00000000
  12. #define BT_NOFRAME     0x20000000
  13. #define BT_HIDE        0x40000000
  14. #define BT_DEL         0x80000000
  15.  
  16. #define EV_REDRAW      1
  17. #define EV_KEY         2
  18. #define EV_BUTTON      3
  19.  
  20. #define REL_SCREEN     0
  21. #define REL_WINDOW     1
  22.  
  23. #define FILE_NOT_FOUND 5
  24. #define FILE_EOF       6
  25.  
  26.  
  27. typedef unsigned int DWORD;
  28. typedef unsigned short int WORD;
  29.  
  30. typedef struct
  31. {  DWORD pci_cmd;
  32.    DWORD irq;
  33.    DWORD glob_cntrl;
  34.    DWORD glob_sta;
  35.    DWORD codec_io_base;
  36.    DWORD ctrl_io_base;
  37.    DWORD codec_mem_base;
  38.    DWORD ctrl_mem_base;
  39.    DWORD codec_id;
  40. } CTRL_INFO;
  41.  
  42. typedef struct
  43. {   DWORD       cmd;
  44.     DWORD       offset;
  45.     DWORD       r1;
  46.     DWORD       count;
  47.     DWORD       buff;
  48.     char        r2;
  49.     char       *name;
  50. } FILEIO;
  51.  
  52. typedef struct
  53. {   DWORD    attr;
  54.     DWORD    flags;
  55.     DWORD    cr_time;
  56.     DWORD    cr_date;
  57.     DWORD    acc_time;
  58.     DWORD    acc_date;
  59.     DWORD    mod_time;
  60.     DWORD    mod_date;
  61.     DWORD    size;
  62.     DWORD    size_high;
  63. } FILEINFO;
  64.  
  65. void  _stdcall InitHeap(int heap_size);
  66. void* _stdcall UserAlloc(int size);
  67. int   _stdcall UserFree(void* p);
  68.  
  69. void  _stdcall GetNotify(void *event);
  70.  
  71. void _stdcall CreateThread(void *fn, char *p_stack);
  72.  
  73. DWORD _stdcall GetMousePos(DWORD rel_type);
  74.  
  75. void _stdcall debug_out_hex(DWORD val);
  76. void debug_out_str(char* str);
  77.  
  78. int _stdcall get_fileinfo(const char *name,FILEINFO* pinfo);
  79. int _stdcall read_file (const char *name,char*buff,DWORD offset, DWORD count,DWORD *reads);
  80. int _stdcall write_file(const char *name,char*buff,int offset,int count,int *writes);
  81.  
  82. //void exit();
  83. int _stdcall get_key(int *key);
  84. int _stdcall remap_key(int key);
  85.  
  86. int _cdecl get_button_id();
  87.  
  88. void delay(int val);
  89. int wait_for_event(int time);
  90. int wait_for_event_infinite();
  91. void BeginDraw(void);
  92. void EndDraw(void);
  93.  
  94. void _stdcall GetScreenSize(int *x, int*y);
  95. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  96.                                int captioncolor,int windowtype,int bordercolor);
  97. void _stdcall debug_out(int ch);
  98. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  99. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  100. void _stdcall write_text(int x,int y,int color,char* text,int len);
  101.  
  102. #ifdef __cplusplus
  103. extern "C"
  104. }
  105. #endif
  106.