Subversion Repositories Kolibri OS

Rev

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. } FILEINFO;
  71.  
  72. void  _stdcall InitHeap(int heap_size);
  73. void* _stdcall UserAlloc(int size);
  74. void  _stdcall GetNotify(DWORD *event);
  75.  
  76. void _stdcall CreateThread(void *fn, char *p_stack);
  77. DWORD _stdcall GetMousePos(DWORD rel_type);
  78. int _stdcall   GetService(char *srv_name);
  79. void _stdcall  GetDevInfo(DWORD hSrv,CTRL_INFO *pInfo);
  80. int _stdcall   GetMasterVol(DWORD hSrv,int* vol);
  81. int _stdcall   SetMasterVol(DWORD hSrv, int vol);
  82. DWORD _stdcall CreateBuffer(DWORD hSrv, DWORD format);
  83. int _stdcall   DestroyBuffer(DWORD hSrv, DWORD hBuff);
  84. int _stdcall   SetBuffer(DWORD hSrv, DWORD hBuff,char* buff,
  85.                                DWORD offs, int size);
  86. int _stdcall   PlayBuffer(DWORD hSrv, DWORD hBuff);
  87. int _stdcall   StopBuffer(DWORD hSrv, DWORD hBuff);
  88.  
  89. void _stdcall debug_out_hex(DWORD val);
  90. void debug_out_str(char* str);
  91.  
  92. int _stdcall get_fileinfo(char *name,FILEINFO* pinfo);
  93. int _stdcall read_file (char *name,char*buff,int offset,int count,int *reads);
  94.  
  95. void exit();
  96. int get_key(void);
  97. int get_button_id();
  98. void delay(int val);
  99. int wait_for_event(int time);
  100. int wait_for_event_infinite();
  101. void BeginDraw(void);
  102. void EndDraw(void);
  103. void _stdcall DrawWindow(int x,int y, int sx, int sy,int workcolor,int style,
  104.                                int captioncolor,int windowtype,int bordercolor);
  105. void _stdcall debug_out(int ch);
  106. void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color);
  107. void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
  108. void _stdcall write_text(int x,int y,int color,char* text,int len);
  109.  
  110.