Subversion Repositories Kolibri OS

Rev

Rev 550 | Rev 711 | Go to most recent revision | 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. #if 0
  27.  
  28. typedef unsigned int DWORD;
  29. typedef unsigned short int WORD;
  30.  
  31. typedef struct
  32. {  DWORD pci_cmd;
  33.    DWORD irq;
  34.    DWORD glob_cntrl;
  35.    DWORD glob_sta;
  36.    DWORD codec_io_base;
  37.    DWORD ctrl_io_base;
  38.    DWORD codec_mem_base;
  39.    DWORD ctrl_mem_base;
  40.    DWORD codec_id;
  41. } CTRL_INFO;
  42.  
  43. typedef struct
  44. {   DWORD       cmd;
  45.     DWORD       offset;
  46.     DWORD       r1;
  47.     DWORD       count;
  48.     DWORD       buff;
  49.     char        r2;
  50.     char       *name;
  51. } FILEIO;
  52.  
  53. typedef struct
  54. {   DWORD    attr;
  55.     DWORD    flags;
  56.     DWORD    cr_time;
  57.     DWORD    cr_date;
  58.     DWORD    acc_time;
  59.     DWORD    acc_date;
  60.     DWORD    mod_time;
  61.     DWORD    mod_date;
  62.     DWORD    size;
  63.     DWORD    size_high;
  64. } FILEINFO;
  65.  
  66. void  _stdcall GetNotify(void *event);
  67.  
  68. void _stdcall CreateThread(void *fn, char *p_stack);
  69.  
  70. DWORD _stdcall GetMousePos(DWORD rel_type);
  71.  
  72. void _stdcall debug_out_hex(DWORD val);
  73. void debug_out_str(char* str);
  74.  
  75. int _stdcall get_fileinfo(const char *name,FILEINFO* pinfo);
  76. int _stdcall read_file (const char *name,char*buff,DWORD offset, DWORD count,DWORD *reads);
  77. int _stdcall write_file(const char *name,char*buff,int offset,int count,int *writes);
  78.  
  79. //void exit();
  80. int _stdcall get_key(int *key);
  81. int _stdcall remap_key(int key);
  82.  
  83. int _cdecl get_button_id();
  84.  
  85. //void delay(int val);
  86.  
  87. int wait_for_event(int time);
  88. int wait_for_event_infinite();
  89. void BeginDraw(void);
  90. void EndDraw(void);
  91.  
  92. void _stdcall GetScreenSize(int *x, int*y);
  93. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  94.                                int captioncolor,int windowtype,int bordercolor);
  95. void _stdcall debug_out(int ch);
  96. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  97. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  98. void _stdcall write_text(int x,int y,int color,char* text,int len);
  99.  
  100. #endif
  101.  
  102. unsigned init_heap(void);
  103.  
  104. #pragma aux init_heap =   \
  105.             "mov EAX, 68" \
  106.             "mov EBX, 11" \
  107.             "int 0x40"    \
  108.             value [EAX] \
  109.             modify [ EBX ];
  110.  
  111. void *user_alloc(unsigned size);
  112.  
  113. void *user_alloc(unsigned size);
  114.  
  115. #pragma aux user_alloc = \
  116.             "mov EAX, 68" \
  117.             "mov EBX, 12" \
  118.             "int 0x40"    \
  119.             parm [ ECX ] value [EAX] \
  120.             modify [ EBX ];
  121.  
  122. unsigned user_free(void *);
  123.  
  124. #pragma aux user_free =   \
  125.             "mov EAX, 68" \
  126.             "mov EBX, 13" \
  127.             "int 0x40"    \
  128.             parm [ ECX ] value [EAX] \
  129.             modify [ EBX ];
  130.  
  131. #ifdef __cplusplus
  132. extern "C"
  133. }
  134. #endif
  135.