
 /* FileReq_EXP V1.00                                          */
 /* FREEWARE.                                                  */
 /* (c) 1992 by Andreas R. Kleinert.                           */
 /* Demonstrates use of the "ak_gen0.library"'s FileRequester. */
 /* Also opening of windows is demonstrated.                   */


#include "IAK:AK_GEN0.h"          /* "IAK:" is include path-assign */

void main(long argc, char **argv) /* MAIN */
{
 struct Window *tst_win = N;
 char *fptr = N;

 IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library", 0);

  /* will always be open because of version==0 */


 AKBase = (struct AKBase *) OpenLibrary("ak_gen0.library", 35);
 if(AKBase)
  {
   tst_win = AK_Window( 0, 0, 640, 256, 1, 2, N, (ACTIVATE|WINDOWSIZING|NOCAREREFRESH|SIMPLE_REFRESH), N, N, "Test-Window", N, N, 640, 256, 640, 256, WBENCHSCREEN);
   if(tst_win)
    {
     fptr = AK_FileRequest(50, 20, CURRENT_SCREEN, tst_win, WBENCHSCREEN);

     if(fptr) FreeMem(fptr, AK_FILEREQ_STRING_LEN); /* free string returned by function */ 
                                                    /* may be NULL (check out !)        */
     CloseWindow(tst_win);
    }

   CloseLibrary((APTR) AKBase);
  }else
  {
   printf("\n Can't open \42ak_gen0.library\42 V35+ !\n");
  }

 CloseLibrary((APTR) IntuitionBase);

 exit(0);
}
