home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 240.lha / FixIntuition / FixIntuition.c < prev    next >
C/C++ Source or Header  |  1989-05-06  |  927b  |  45 lines

  1. #include <proto/exec.h>
  2. #include <exec/libraries.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #include <proto/dos.h>
  7. #include <proto/intuition.h> /* be sure LockIBase, UnlockIBase, ViewAddress */
  8. #include <intuition/intuitionbase.h>
  9. #include <graphics/view.h>
  10.  
  11. /***********
  12. /*
  13. /* Using Lattice 5.0X : lc -v -O -cf FixIntuition
  14. /* Blink with FixIntuition.lnk
  15. /*
  16. /************/
  17. void main(void);
  18.  
  19. void main()
  20. {
  21.  ULONG lock;
  22.  struct View *view;
  23.  struct ViewPort *vp;
  24.  
  25.   if (!(IntuitionBase = 
  26.    (struct IntuitionBase *)OpenLibrary("intuition.library",33L)))
  27.     {
  28.      exit(0);
  29.     }
  30.   if (IntuitionBase->LibNode.lib_Version > 35)
  31.    {
  32.     CloseLibrary((struct Library *)IntuitionBase);
  33.     exit(0);
  34.    }
  35.   while(1)
  36.    {
  37.     lock = LockIBase( 4L );
  38.     view = ViewAddress();
  39.     for(vp=view->ViewPort;vp;vp = vp->Next)
  40.      if (vp->Modes & VP_HIDE) vp->DHeight = 0;
  41.     UnlockIBase(lock);
  42.     Delay(15L);
  43.    }
  44. }
  45.