home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 320.lha / DiskSpeed_v2.0 / DiskSpeedWindow.h < prev    next >
C/C++ Source or Header  |  1989-12-09  |  5KB  |  155 lines

  1. /*
  2.  *                          DiskSpeed v2.0
  3.  *                                by
  4.  *                           Michael Sinz
  5.  *
  6.  *             Copyright (c) 1989 by MKSoft Development
  7.  *
  8.  *
  9.  * Yes, this is yet another disk speed testing program, but with a few
  10.  * differences.  It was designed to give the most accurate results of the
  11.  * true disk performance in the system.  For this reason many of
  12.  * DiskSpeed's results may look either lower or higher than current disk
  13.  * performance tests.
  14.  *
  15.  * This program was thrown together in a few hours because I needed more
  16.  * accurate and consistent results for disk performance as seen from the
  17.  * application's standpoint.  This program has now served its purpose and
  18.  * I am now giving it to the rest of the Amiga world to play with as long
  19.  * as all of the files remain together in unmodified form.  (That is, the
  20.  * files DiskSpeed, DiskSpeed.info, DiskSpeed.c, DiskSpeedWindow.c,
  21.  * DiskSpeedWindow.h, MakeBoxes.c, MakeBoxes.h, StandardGadgets.c,
  22.  * StandardGadgets.h, RenderInfo.c, RenderInfo.h, DiskSpeed.doc, and
  23.  * MakeFile)
  24.  *
  25.  * Version 2.0 of this program added a few features and cleaned up the
  26.  * user interface.  I hope you like this...
  27.  *
  28.  ******************************************************************************
  29.  *                                          *
  30.  *    Reading legal mush can turn your bain into guacamole!              *
  31.  *                                          *
  32.  *        So here is some of that legal mush:                  *
  33.  *                                          *
  34.  * Permission is hereby granted to distribute this program's source          *
  35.  * executable, and documentation for non-commercial purposes, so long as the  *
  36.  * copyright notices are not removed from the sources, executable or          *
  37.  * documentation.  This program may not be distributed for a profit without   *
  38.  * the express written consent of the author Michael Sinz.              *
  39.  *                                          *
  40.  * This program is not in the public domain.                      *
  41.  *                                          *
  42.  * Fred Fish is expressly granted permission to distribute this program's     *
  43.  * source and executable as part of the "Fred Fish freely redistributable     *
  44.  * Amiga software library."                              *
  45.  *                                          *
  46.  * Permission is expressly granted for this program and it's source to be     *
  47.  * distributed as part of the Amicus Amiga software disks, and the          *
  48.  * First Amiga User Group's Hot Mix disks.                      *
  49.  *                                          *
  50.  ******************************************************************************
  51.  *
  52.  * My DiskSpeedWindow definitions...
  53.  */
  54.  
  55. #define    GADGET_LOW    1
  56. #define    GADGET_MED    2
  57. #define    GADGET_HIGH    4
  58.  
  59. #define    GADGET_START    5
  60. #define    GADGET_SAVE    6
  61. #define    GADGET_PRINT    7
  62.  
  63. #define    GADGET_STRING    8
  64.  
  65. #define    GADGET_REQ    9
  66.  
  67. #define    NUM_BOXES    12
  68. #define    NUM_TEXT    16
  69. #define    NUM_GADGETS    6
  70. #define    NUM_RESULTS    17
  71.  
  72. #define    RESULTS_512_CREATE    0
  73. #define    RESULTS_512_WRITE    1
  74. #define    RESULTS_512_READ    2
  75.  
  76. #define    RESULTS_4096_CREATE    3
  77. #define    RESULTS_4096_WRITE    4
  78. #define    RESULTS_4096_READ    5
  79.  
  80. #define    RESULTS_32768_CREATE    6
  81. #define    RESULTS_32768_WRITE    7
  82. #define    RESULTS_32768_READ    8
  83.  
  84. #define    RESULTS_262144_CREATE    9
  85. #define    RESULTS_262144_WRITE    10
  86. #define    RESULTS_262144_READ    11
  87.  
  88. #define    RESULTS_CREATE        12
  89. #define    RESULTS_OPEN_CLOSE    13
  90. #define    RESULTS_DIR_SCAN    14
  91. #define    RESULTS_DELETE        15
  92.  
  93. #define    RESULTS_SEEK_READ    16
  94.  
  95. struct MyBox
  96. {
  97. struct    Border    Border;
  98.     SHORT    Vectors[5*2];
  99. };
  100.  
  101. struct MyGadget
  102. {
  103. struct    Gadget        Gadget;
  104. struct    IntuiText    IntuiText;
  105. struct    Border        Borders[4];
  106.     USHORT        Vectors1[16];
  107.     USHORT        Vectors2[16];
  108. };
  109.  
  110. struct MyResult
  111. {
  112. struct    IntuiText    IntuiText;
  113.     char        text[10];
  114. };
  115.  
  116. struct MyWindow
  117. {
  118. struct    Window        *Window;
  119. struct    Gadget        *CloseGadget;
  120. struct    Gadget        *FrontBackGadget;
  121. struct    Gadget        *DragGadget;
  122. struct    timeval        StartTime;
  123. struct    timeval        StopTime;
  124. struct    timerequest    TimeReq;
  125. struct    Gadget        Background;
  126. struct    Image        Image_Background;
  127. struct    Gadget        Detail;
  128. struct    MyBox        Details[NUM_BOXES*2];
  129. struct    IntuiText    TextDetails[NUM_TEXT];
  130. struct    MyGadget    MyGadgets[NUM_GADGETS];
  131. struct    MyResult    MyResults[NUM_RESULTS];
  132. struct    Gadget        DeviceGadget;
  133. struct    StringInfo    DeviceGadgetInfo;
  134.     char        DeviceName[32];
  135. struct    Gadget        CommentGadget;
  136. struct    StringInfo    CommentGadgetInfo;
  137.     char        Comment[80];
  138.  
  139. /* For the requester... */
  140. struct    Requester    Req;
  141. struct    Border        ReqBorders[4];
  142. struct    Gadget        ReqGadget;
  143. struct    IntuiText    ReqIText;
  144.     SHORT        ReqVector1[16];
  145.     SHORT        ReqVector2[16];
  146.  
  147. /* Flag for which type of testing... */
  148.     USHORT        TestFlag;
  149. };
  150.  
  151. VOID Write_Results(struct MyWindow *,BPTR);
  152.  
  153. struct MyWindow *OpenMyWindow(struct RenderInfo *);
  154. VOID CloseMyWindow(struct MyWindow *);
  155.