Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. #ifndef NULL
  3. #define NULL ((void*)0)
  4. #endif
  5.  
  6. #define EVENT_REDRAW              0x00000001
  7. #define EVENT_KEY                 0x00000002
  8. #define EVENT_BUTTON              0x00000004
  9. #define EVENT_END_REQUEST         0x00000008
  10. #define EVENT_DESKTOP_BACK_DRAW   0x00000010
  11. #define EVENT_MOUSE_CHANGE        0x00000020
  12. #define EVENT_IPC                         0x00000040
  13. #define EVENT_MOUSE_CURSOR_MASK   0x40000000
  14. #define EVENT_MOUSE_WINDOW_MASK   0x80000000
  15.  
  16. #define SHM_OPEN                0
  17. #define SHM_OPEN_ALWAYS 0x04
  18. #define SHM_CREATE              0x08
  19. #define SHM_READ                0x00
  20. #define SHM_WRITE               0x01
  21.  
  22. #define E_NOTFOUND      5
  23. #define E_ACCESS        10
  24. #define E_NOMEM         30
  25. #define E_PARAM         33
  26.  
  27. #define FILENAME_MAX    1024
  28.  
  29. #define BT_DEL      0x80000000
  30. #define BT_HIDE     0x40000000
  31. #define BT_NOFRAME  0x20000000
  32.  
  33. #define evReDraw  1
  34. #define evKey     2
  35. #define evButton  3
  36. #define evMouse   6
  37. #define evNetwork 8
  38.  
  39. #define ASCII_KEY_LEFT  176
  40. #define ASCII_KEY_RIGHT 179
  41. #define ASCII_KEY_DOWN  177
  42. #define ASCII_KEY_UP    178
  43. #define ASCII_KEY_HOME  180
  44. #define ASCII_KEY_END   181
  45. #define ASCII_KEY_PGDN  183
  46. #define ASCII_KEY_PGUP  184
  47.  
  48. #define ASCII_KEY_BS    8
  49. #define ASCII_KEY_TAB   9
  50. #define ASCII_KEY_ENTER 13
  51. #define ASCII_KEY_ESC   27
  52. #define ASCII_KEY_DEL   182
  53. #define ASCII_KEY_INS   185
  54. #define ASCII_KEY_SPACE 032
  55.  
  56. #pragma pack(push,1)
  57. typedef struct
  58. {
  59. unsigned        p00;
  60. unsigned        p04;
  61. char            *p08;
  62. unsigned        p12;
  63. unsigned        p16;
  64. char            p20;
  65. char            *p21;
  66. } kol_struct70;
  67. #pragma pack(pop)
  68.  
  69.  
  70. #pragma pack(push,1)
  71. typedef struct
  72. {
  73. unsigned        p00;
  74. char            p04;
  75. char            p05[3];
  76. unsigned        p08;
  77. unsigned        p12;
  78. unsigned        p16;
  79. unsigned        p20;
  80. unsigned        p24;
  81. unsigned        p28;
  82. unsigned long long      p32;
  83. unsigned        p40;
  84. } kol_struct_BDVK;
  85. #pragma pack(pop)
  86.  
  87.  
  88. #pragma pack(push,1)
  89. typedef struct
  90. {
  91. char    *name;
  92. void    *data;
  93. } kol_struct_import;
  94. #pragma pack(pop)
  95.  
  96.  
  97. void kol_exit();
  98. void kol_sleep(unsigned d);
  99. void kol_wnd_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned cs, unsigned b, char *t);
  100. void kol_wnd_caption(char *s);
  101. void kol_event_mask(unsigned e);
  102. unsigned kol_event_wait();
  103. unsigned kol_event_wait_time(unsigned time);
  104. unsigned kol_event_check();
  105. void kol_paint_start();
  106. void kol_paint_end();
  107. void kol_paint_pixel(unsigned x, unsigned y, unsigned c);
  108. void kol_paint_bar(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c);
  109. void kol_paint_line(unsigned x1, unsigned y1, unsigned x2, unsigned y2, unsigned c);
  110. void kol_paint_string(unsigned x, unsigned y, char *s, unsigned c);
  111. void kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d);
  112. void kol_paint_image_pal(unsigned x, unsigned y, unsigned w, unsigned h, char *buf, unsigned bits, unsigned palette);
  113. unsigned kol_key_get();
  114. unsigned kol_key_control();
  115. void kol_key_lang_set(unsigned lang);
  116. unsigned kol_key_lang_get();
  117. void kol_key_mode_set(unsigned mode);
  118. unsigned kol_key_mode_get();
  119. void kol_paint_image_24(unsigned x, unsigned y, unsigned w, unsigned h, char *d);
  120. unsigned kol_btn_get();
  121. void kol_btn_type(unsigned t);
  122. unsigned kol_mouse_pos();
  123. unsigned kol_mouse_posw();
  124. unsigned kol_mouse_btn();
  125. void kol_board_putc(char c);
  126. void kol_board_puts(char *s);
  127. void kol_board_puti(int n);
  128. int kol_file_70(kol_struct70 *k);
  129. kol_struct_import* kol_cofflib_load(char *name);
  130. void* kol_cofflib_procload (kol_struct_import *imp, char *name);
  131. unsigned kol_cofflib_procnum (kol_struct_import *imp);
  132. void kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n);
  133. unsigned kol_system_end(unsigned param);
  134. unsigned kol_system_cpufreq();
  135. unsigned kol_system_mem();
  136. unsigned kol_system_memfree();
  137. unsigned kol_system_time_get();
  138. unsigned kol_system_date_get();
  139. void kol_path_file2dir(char *dir, char *fname);
  140. void kol_path_full(char *full, char *fname);
  141. void kol_screen_wait_rr();
  142. void kol_screen_get_size(unsigned *w, unsigned *h);
  143. unsigned kol_skin_height();
  144. unsigned kol_thread_start(unsigned start, unsigned stack);
  145. unsigned kol_time_tick();
  146. unsigned kol_sound_speaker(char data[]);
  147. unsigned kol_process_info(unsigned slot, char buf1k[]);
  148. int kol_process_kill_pid(unsigned process);
  149. void kol_get_kernel_ver(char buff16b[]);
  150. int kol_kill_process(unsigned process);
  151. int kol_buffer_open(char name[], int mode, int size, char **buf);
  152. void  kol_buffer_close(char name[]);
  153. int kol_clip_num();
  154. char* kol_clip_get(int n);
  155. int kol_clip_set(int n, char buffer[]);
  156. void kol_btn_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned d, unsigned c);
  157.  
  158. void kos_blit(int dstx, int dsty, int w, int h, int srcx,
  159.         int srcy,int srcw, int srch, int stride, char *d);
  160. int kos_random(int num);
  161. int kos_get_mouse_wheels(void);
  162. void kos_screen_max(int* x, int* y);
  163. int kos_get_key();
  164. void kos_text(int x, int y, int color, const char* text, int len);
  165.