home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 October / Gamestar_77_2005-10_dvd.iso / Utility / attsetup.exe / plugins / api / vc++ / plugins.h
Text File  |  2005-05-11  |  6KB  |  191 lines

  1. //
  2. // API for ATI Tray Tools
  3. // C++ version
  4. // (c) 2004 Ray Adams
  5. //
  6. //
  7. //
  8. //
  9. //
  10.  
  11. #define ATT_Sign 0x4154544C
  12.         //Plugin type
  13. #define        PL_STD 0       // standard plugin
  14. #define        PL_RunTime 1   //Run Time plugin
  15. #define        PL_OSD 2   //Run Time plugin
  16.  
  17. #define         atc_getversion 1
  18.         //Get ATT Version
  19.         //inData = 0
  20.         //outData pointer to word , hi byte - HI Version, low byte = Low version
  21.  
  22. #define        atc_getDriverRegKey 2
  23.         //Get currect registry path for catalyst driver
  24.         //inData=0
  25.         //outData = PChar,
  26.         //must be allocated in plugin and have enought space to store path, >=255 will be enought
  27.  
  28. #define        atc_IsLDInstalled 3
  29.         //Check if low lever driver was installed
  30.         //inData=0
  31.         //outData = pointer to byte
  32.         // 1 = yes
  33.         // 2 = no
  34.  
  35. #define        atc_inb 4
  36. #define        atc_inw 5
  37. #define        atc_ind 6
  38.         //read Byte/Word/Dword from port
  39.         //inData = pointer to TPortIO port
  40.         //outData = pointer to dword, result
  41. #define        atc_outb 7
  42. #define        atc_outw 8
  43. #define        atc_outd 9
  44.         //write Byte/Word/Dword to port
  45.         //inData = pointer to TPortIO record
  46.         //      port to write
  47.         //      value to write
  48.         //outData = pointer to dword, result
  49.  
  50. #define        atc_getPCIBusDataB 10
  51. #define        atc_getPCIBusDataW 11
  52. #define        atc_getPCIBusDataD 12
  53.  
  54.         //read Byte/Word/Dword from PCI registers
  55.         //inData = pointer to TPCIIO record
  56.         //     used only bus,device,func, offset
  57.         //outData = pointer to dword, result
  58.  
  59. #define        atc_getClocks 13
  60.         //read current clocks
  61.         //inData = 0
  62.         //outData = pointer to dword
  63.         //hi part : memory
  64.         //lo part : GPU
  65.  
  66. #define        atc_setClocks 14
  67.         //set clocks. PLEASE BE CAREFUL!!!
  68.         //inData = 0
  69.         //outData = pointer to dword (4 bytes)
  70.         //hi part : memory
  71.         //lo part : GPU
  72.  
  73. #define        atc_ReadDefaultClocks 15
  74.         //read default clocks from BIOS
  75.         //inData = 0
  76.         //outData = pointer to dword
  77.         //hi part : memory
  78.         //lo part : GPU
  79. #define        atc_MapMemory 16
  80.         //Map frame buffer from physical address space to linear
  81.         //inData = pointer to TMemoryMapping
  82.         //outData = pointer to dword (variable with address of mapped memory)
  83. #define        atc_UnMapMemory 17
  84.         //Unmap IO memory
  85.         //inData = pointer to variable returned by atc_MapMemory
  86.         //outData = 0
  87. #define        atc_MRRReadB 18
  88.         //Read byte from MMR
  89.         //inData = pointer to word as offset in MMR
  90.         //outDate = pointer to byte
  91. #define        atc_MRRReadW 19
  92.         //Read byte from MMR
  93.         //inData = pointer to word as offset in MMR
  94.         //outDate = pointer to word
  95. #define        atc_MRRReadD 20
  96.         //Read byte from MMR
  97.         //inData = pointer to word as offset in MMR
  98.         //outDate = pointer to dword
  99. #define        atc_MRRWriteB 21
  100.         //Writebyte from MMR
  101.         //inData = pointer to word as offset in MMR
  102.         //outDate = pointer to byte (value to write)
  103. #define        atc_MRRWriteW 22
  104.         //Write word to MMR
  105.         //inData = pointer to word as offset in MMR
  106.         //outDate = pointer to word (value to write)
  107. #define        atc_MRRWriteD 23
  108.         //Write dword to MMR
  109.         //inData = pointer to word as offset in MMR
  110.         //outDate = pointer to dword (value to write)
  111.  
  112. #define atc_setPCIBusDataB 24
  113. #define atc_setPCIBusDataW 25
  114. #define atc_setPCIBusDataD 26
  115.  
  116.         //write Byte/Word/Dword from PCI registers
  117.         //inData = pointer to TPCIIO record
  118.         //     used all values: bus,device,func, offset, value
  119.         //outData = nothing
  120.  
  121. #define  atc_VIDBusDataB 27
  122. #define  atc_VIDBusDataW 28
  123. #define  atc_VIDBusDataD 29
  124.         //Read registers from current video card
  125.         //inData - register
  126.         //outData - pointer to variable to receive value from registers
  127.  
  128.  
  129. #define  atc_tmsupport 30
  130.         //Read data from temperature sensore
  131.         //inData - void
  132.         //outData - pointer to TMonSuport struct
  133.  
  134. typedef struct tagTPortIO {
  135.          UINT port;
  136.          DWORD value;
  137. } TPortIO, *PPortIO;
  138.  
  139. typedef struct tagTPCIIO {
  140.          char bus,device,func,offset;
  141.          DWORD value;
  142. } TPCIIO, *PPCIIO;
  143.  
  144. typedef struct tagTPlugInfo {
  145.          DWORD Sign;    //std 4 chars to identify itself as a ATT plugin
  146.          char Menu_Text[51]; // text for menu
  147.          char PluginType; //type of plugin reserved must be PL_STD
  148. } TPlugInfo, *PPlugInfo;
  149.  
  150. typedef struct tagMemoryMapping {
  151.          DWORD addr; //address of memory for mapping
  152.          DWORD size; //size of memory to map
  153. } TMemoryMapping, *PMemoryMapping;
  154.  
  155. typedef struct tagTMonSuport {
  156.         DWORD SensorSupported;//0 if not supported
  157.         char SensorName[10]; //sensor name
  158.         DWORD TempGpu;
  159.         DWORD TempEnv;
  160.         DWORD FanDuty;
  161.  
  162. } TMonSuport, *PMonSuport;
  163.  
  164. typedef void (STDAPICALLTYPE*  lppget_plug_info)(PPlugInfo Data);
  165. typedef void (STDAPICALLTYPE*  lppatt_proc)(UINT ACommand, void* inData, void* outData);
  166. typedef void (STDAPICALLTYPE*  lppexec_plugin)(HWND Win_Handle, void* ATT_Proc);
  167.  
  168. //////////////////////////////////
  169. //Only for Run Time plugins
  170. //ATT Will execute this function before terminate.
  171. //////////////////////////////////
  172. typedef void (STDAPICALLTYPE*  lppdone_plugin)();
  173.  
  174. //////////////////////////////////
  175. //ATT will execute this function after resuming from suspend/hibernate mode
  176. //Plug-In must decide waht to do at this time.
  177. //if you don't need any actions just create dummy procedure
  178. //////////////////////////////////
  179. typedef void (STDAPICALLTYPE*  lppsuspend_restore)();
  180.  
  181. //////////////////////////////////
  182. //Run Configuration for plugin
  183. //////////////////////////////////
  184. typedef void (STDAPICALLTYPE*  lppconfig_plugin)(HWND Win_Handle);
  185.  
  186. /////////////////////////////////
  187. // Only for OSD Plugins
  188. /////////////////////////////////
  189. typedef void (STDAPICALLTYPE*  lppget_osd_string)(char* osd_string);
  190.  
  191.