Subversion Repositories Kolibri OS

Rev

Rev 576 | 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. #define EV_IPC         7
  20.  
  21. #define REL_SCREEN     0
  22. #define REL_WINDOW     1
  23.  
  24. #define FILE_NOT_FOUND 5
  25. #define FILE_EOF       6
  26.  
  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 InitHeap(int heap_size);
  67. void* _stdcall UserAlloc(int size);
  68. int   _stdcall UserFree(void* p);
  69.  
  70. void  _stdcall GetNotify(void *event);
  71.  
  72. void _stdcall CreateThread(void *fn, char *p_stack);
  73.  
  74. DWORD _stdcall GetMousePos(DWORD rel_type);
  75.  
  76. void _stdcall debug_out_hex(DWORD val);
  77. void debug_out_str(char* str);
  78.  
  79. int _stdcall get_fileinfo(const char *name,FILEINFO* pinfo);
  80. int _stdcall create_file(const char *name);
  81. int _stdcall read_file (const char *name,char*buff,DWORD offset, DWORD count,DWORD *reads);
  82. int _stdcall write_file(const char *name,char*buff,int offset,int count,int *writes);
  83.  
  84. //void exit();
  85. int _stdcall get_key(int *key);
  86. int _stdcall remap_key(int key);
  87.  
  88. int _cdecl get_button_id();
  89.  
  90. void delay(int val);
  91. int wait_for_event(int time);
  92. int wait_for_event_infinite();
  93. void BeginDraw(void);
  94. void EndDraw(void);
  95.  
  96. void _stdcall GetScreenSize(int *x, int*y);
  97. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  98.                                int captioncolor,int windowtype,int bordercolor);
  99. void _stdcall debug_out(int ch);
  100. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  101. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  102. void _stdcall write_text(int x,int y,int color,char* text,int len);
  103.  
  104. //Asper [
  105. void debug_out_str(const char* str);
  106. void ResizeReplaceWindow (DWORD x, DWORD y, DWORD w, DWORD h);
  107. void set_event_mask(int mask);
  108. void ipc_init(char *buf, int bufsize);
  109. int ipc_send_msg(int PID, char *msg);
  110. //] Asper
  111.  
  112. #ifdef __cplusplus
  113. extern "C"
  114. }
  115. #endif
  116.