Subversion Repositories Kolibri OS

Rev

Rev 205 | Blame | Last modification | View Log | Download | RSS feed

  1. //
  2. //   This file is part of the AC97 mp3 player.
  3. //   (C) copyright Serge 2006
  4. //   email: infinity_sound@mail.ru
  5. //
  6. //   This program is free software; you can redistribute it and/or modify
  7. //   it under the terms of the GNU General Public License as published by
  8. //   the Free Software Foundation; either version 2 of the License, or
  9. //   (at your option) any later version.
  10. //
  11. //   This program is distributed in the hope that it will be useful,
  12. //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. //   GNU General Public License for more details.
  15.  
  16. #define FONT0          0x00000000
  17. #define FONT1          0x10000000
  18.  
  19. #define BT_NORMAL      0x00000000
  20. #define BT_NOFRAME     0x20000000
  21. #define BT_HIDE        0x40000000
  22. #define BT_DEL         0x80000000
  23.  
  24. #define EV_REDRAW      1
  25. #define EV_KEY         2
  26. #define EV_BUTTON      3
  27.  
  28. #define REL_SCREEN     0
  29. #define REL_WINDOW     1
  30.  
  31. #define FILE_NOT_FOUND 5
  32. #define FILE_EOF       6
  33.  
  34.  
  35. typedef unsigned int DWORD;
  36. typedef unsigned short int WORD;
  37.  
  38. typedef struct
  39. {  DWORD pci_cmd;
  40.    DWORD irq;
  41.    DWORD glob_cntrl;
  42.    DWORD glob_sta;
  43.    DWORD codec_io_base;
  44.    DWORD ctrl_io_base;
  45.    DWORD codec_mem_base;
  46.    DWORD ctrl_mem_base;
  47.    DWORD codec_id;
  48. } CTRL_INFO;
  49.  
  50. typedef struct
  51. {   DWORD       cmd;
  52.     DWORD       offset;
  53.     DWORD       r1;
  54.     DWORD       count;
  55.     DWORD       buff;
  56.     char        r2;
  57.     char       *name;
  58. } FILEIO;
  59.  
  60. typedef struct
  61. {   DWORD    attr;
  62.     DWORD    flags;
  63.     DWORD    cr_time;
  64.     DWORD    cr_date;
  65.     DWORD    acc_time;
  66.     DWORD    acc_date;
  67.     DWORD    mod_time;
  68.     DWORD    mod_date;
  69.     DWORD    size;
  70.     DWORD    size_high;
  71. } FILEINFO;
  72.  
  73. void  _stdcall InitHeap(int heap_size);
  74. void* _stdcall UserAlloc(int size);
  75. void  _stdcall GetNotify(DWORD *event);
  76.  
  77. void _stdcall CreateThread(void *fn, char *p_stack);
  78. DWORD _stdcall GetMousePos(DWORD rel_type);
  79. int _stdcall   GetService(char *srv_name);
  80. void _stdcall  GetDevInfo(DWORD hSrv,CTRL_INFO *pInfo);
  81. int _stdcall   GetMasterVol(DWORD hSrv,int* vol);
  82. int _stdcall   SetMasterVol(DWORD hSrv, int vol);
  83. DWORD _stdcall CreateBuffer(DWORD hSrv, DWORD format);
  84. int _stdcall   DestroyBuffer(DWORD hSrv, DWORD hBuff);
  85. int _stdcall   SetBuffer(DWORD hSrv, DWORD hBuff,char* buff,
  86.                                DWORD offs, int size);
  87. int _stdcall   PlayBuffer(DWORD hSrv, DWORD hBuff);
  88. int _stdcall   StopBuffer(DWORD hSrv, DWORD hBuff);
  89.  
  90. void _stdcall debug_out_hex(DWORD val);
  91. void debug_out_str(char* str);
  92.  
  93. int _stdcall get_fileinfo(char *name,FILEINFO* pinfo);
  94. int _stdcall read_file (char *name,char*buff,int offset,int count,int *reads);
  95.  
  96. void exit();
  97. int _cdecl get_key(void);
  98. int _cdecl get_button_id();
  99. void delay(int val);
  100. int wait_for_event(int time);
  101. int wait_for_event_infinite();
  102. void BeginDraw(void);
  103. void EndDraw(void);
  104. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  105.                                int captioncolor,int windowtype,int bordercolor);
  106. void _stdcall debug_out(int ch);
  107. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  108. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  109. void _stdcall write_text(int x,int y,int color,char* text,int len);
  110.  
  111.