Subversion Repositories Kolibri OS

Rev

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

  1. #ifndef mesys_h
  2. #define mesys_h
  3. #ifdef GNUC
  4. #define stdcall __stdcall
  5. #else
  6. #define stdcall __attribute__ ((__stdcall))
  7. #endif
  8. extern void stdcall _msys_draw_window(int xcoord,int ycoord, int xsize,
  9.                                int ysize,int workcolor,int type,
  10.                                int captioncolor,int windowtype,int bordercolor);
  11. extern int  stdcall _msys_read_file(char* filename,int fileoffset,int size,void* data,
  12.                      int* filesize);
  13. extern int  stdcall _msys_write_file(char* filename,int size,void* data);                
  14. extern void stdcall _msys_run_program(char* filename,char* parameters);                  
  15. extern void stdcall _msys_debug_out(int c);      
  16. extern void debug_out_str(char* str);
  17. extern void stdcall _msys_set_background_size(int xsize,int ysize);
  18. extern void stdcall _msys_write_background_mem(int pos,int color);
  19. extern void stdcall _msys_draw_background(void);
  20. extern void stdcall _msys_set_background_draw_type(int type);
  21. extern void stdcall _msys_background_blockmove(void* src,int bgr_pos, int count);
  22. extern void stdcall _msys_draw_bar(int x, int y, int xsize, int ysize, int color);
  23. extern void stdcall _msys_make_button(int x, int y, int xsize, int ysize, int id, int color);
  24. extern int  stdcall _msys_get_button_id(void);
  25. extern int  stdcall _msys_get_system_clock(void);
  26. extern int  stdcall _msys_get_date(void);
  27. extern void stdcall _msys_delay(int m);
  28. extern void stdcall _msys_dga_get_resolution(int* xres, int* yres, int* bpp, int* bpscan);
  29. extern int  stdcall _msys_wait_for_event_infinite(void);
  30. extern int  stdcall _msys_check_for_event(void);
  31. extern int  stdcall _msys_wait_for_event(int time);
  32. extern void stdcall _msys_set_wanted_events(int ev);
  33. extern void stdcall _msys_exit(void);
  34. extern void stdcall _msys_putimage(int x, int y, int xsize, int ysize, void* image);
  35. extern void stdcall _msys_send_message(int pid, void* msg, int size);
  36. extern void stdcall _msys_define_receive_area(void* area, int size);
  37. extern int  stdcall _msys_get_irq_owner(int irq);
  38. extern int  stdcall _msys_get_data_read_by_irq(int irq, int* size, void* data);
  39. extern int  stdcall _msys_send_data_to_device(int port, unsigned char val);
  40. extern int  stdcall _msys_receive_data_from_device(int port,unsigned char* data);
  41. extern void stdcall _msys_program_irq(void* intrtable, int irq);
  42. extern void stdcall _msys_reserve_irq(int irq);
  43. extern void stdcall _msys_free_irq(int irq);
  44. extern int  stdcall _msys_reserve_port_area(int start,int end);
  45. extern int  stdcall _msys_free_port_area(int start,int end);
  46. extern int  stdcall _msys_get_key(void);
  47. extern void stdcall _msys_set_keyboard_mode(int mode);
  48. extern void stdcall _msys_line(int x1,int y1,int x2,int y2,int color);
  49. extern void stdcall _msys_midi_reset(void);
  50. extern void stdcall _msys_midi_send(int data);
  51. extern int  stdcall _msys_get_pci_version(void);
  52. extern int  stdcall _msys_get_last_pci_bus(void);
  53. extern int  stdcall _msys_get_pci_access_mechanism(void);
  54. extern int  stdcall _msys_pci_read_config_byte(int bus,int dev,int fn,int reg);
  55. extern int  stdcall _msys_pci_read_config_word(int bus,int dev,int fn,int reg);
  56. extern int  stdcall _msys_pci_read_config_dword(int bus,int dev,int fn,int reg);
  57. extern int  stdcall _msys_pci_write_config_byte(int bus,int dev,int fn,int reg,int value);
  58. extern int  stdcall _msys_pci_write_config_word(int bus,int dev,int fn,int reg,int value);
  59. extern int  stdcall _msys_pci_write_config_value(int bus,int dev,int fn,int reg,int value);
  60. extern int  stdcall _msys_putpixel(int x,int y,int color);
  61. #pragma pack(push,1)
  62. typedef struct {
  63.   int cpu_usage;             //+0
  64.   int window_pos_info;       //+4
  65.   short int reserved1;       //+8
  66.   char name[12];             //+10
  67.   int memstart;              //+22
  68.   int memused;               //+26
  69.   int pid;                   //+30
  70.   int winx_start;            //+34
  71.   int winy_start;            //+38
  72.   int winx_size;             //+42
  73.   int winy_size;             //+46
  74.   short int slot_info;       //+50
  75.   short int reserved2;       //+52
  76.   int clientx;               //+54
  77.   int clienty;               //+58
  78.   int clientwidth;           //+62
  79.   int clientheight;          //+66
  80.   unsigned char window_state;//+70
  81.   char reserved3[1024-71];   //+71
  82. } process_table_entry;
  83. #pragma pack(pop)
  84. extern int  stdcall _msys_get_process_table(process_table_entry* proctab,int pid);
  85. extern int  stdcall _msys_get_screen_size(int* x,int* y);
  86. extern void stdcall _msys_sound_load_block(void* blockptr);
  87. extern void stdcall _msys_sound_play_block(void);
  88. extern void stdcall _msys_sound_set_channels(int channels);
  89. extern void stdcall _msys_sound_set_data_size(int size);
  90. extern void stdcall _msys_sound_set_frequency(int frequency);
  91. extern void stdcall _msys_sound_speaker_play(void* data);
  92. extern void stdcall _msys_write_text(int x,int y,int color,char* text,int len);
  93. extern void* stdcall  _msys_start_thread(void (* func_ptr)(void),int stack_size,int* pid);
  94. extern void stdcall _msys_window_redraw(int status);
  95. extern void* malloc(int);
  96. extern void  free(void*);
  97. extern void* realloc(void*,int);
  98. #endif
  99.