Subversion Repositories Kolibri OS

Rev

Rev 300 | Go to most recent revision | Blame | 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(DWORD *event);
  70.  
  71. //void _stdcall CreateThread(void *fn, char *p_stack);
  72. DWORD _stdcall GetMousePos(DWORD rel_type);
  73. int _stdcall   GetService(char *srv_name);
  74. void _stdcall  GetDevInfo(DWORD hSrv,CTRL_INFO *pInfo);
  75. int _stdcall   GetMasterVol(DWORD hSrv,int* vol);
  76. int _stdcall   SetMasterVol(DWORD hSrv, int vol);
  77. DWORD _stdcall CreateBuffer(DWORD hSrv, DWORD format);
  78. int _stdcall   DestroyBuffer(DWORD hSrv, DWORD hBuff);
  79. int _stdcall   SetBuffer(DWORD hSrv, DWORD hBuff,char* buff,
  80.                                DWORD offs, int size);
  81. int _stdcall   PlayBuffer(DWORD hSrv, DWORD hBuff);
  82. int _stdcall   StopBuffer(DWORD hSrv, DWORD hBuff);
  83.  
  84. void _stdcall debug_out_hex(DWORD val);
  85. void debug_out_str(char* str);
  86.  
  87. int _stdcall get_fileinfo(const char *name,FILEINFO* pinfo);
  88. int _stdcall read_file (const char *name,char*buff,DWORD offset, DWORD count,DWORD *reads);
  89. int _stdcall write_file(const char *name,char*buff,int offset,int count,int *writes);
  90.  
  91. //void exit();
  92. int _stdcall get_key(int *key);
  93. int _stdcall remap_key(int key);
  94.  
  95. int _cdecl get_button_id();
  96.  
  97. void delay(int val);
  98. int wait_for_event(int time);
  99. int wait_for_event_infinite();
  100. void BeginDraw(void);
  101. void EndDraw(void);
  102. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  103.                                int captioncolor,int windowtype,int bordercolor);
  104. void _stdcall debug_out(int ch);
  105. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  106. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  107. void _stdcall write_text(int x,int y,int color,char* text,int len);
  108.  
  109. #ifdef __cplusplus
  110. extern "C"
  111. }
  112. #endif
  113.