home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 206.lha / Grab_Pointer / test.c < prev    next >
C/C++ Source or Header  |  1988-12-28  |  653b  |  37 lines

  1. #include <exec/types.h>
  2. #include <exec/exec.h>
  3. #include <intuition/intuitionbase.h>
  4. #include <functions.h>
  5.  
  6. #include "pointer.h"
  7.  
  8. #define NULL 0L
  9.  
  10. struct IntuitionBase *IntuitionBase;
  11.  
  12. main()
  13. {
  14. int i ;
  15. char *window ;
  16.  
  17. IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",1L);
  18.  
  19. if( IntuitionBase == NULL )
  20.    {
  21.    printf("Can't open intuition.library !!!\n");
  22.    exit() ;
  23.    }
  24.  
  25. window = (char *)IntuitionBase->ActiveWindow ;
  26.  
  27. SetPointer(window,&NewPointer,
  28.             (long)NEWPOINTER_H,
  29.             (long)NEWPOINTER_W,
  30.             (long)NEWPOINTER_XOFF,
  31.             (long)NEWPOINTER_YOFF) ;
  32.  
  33. Delay(1000L) ;
  34.  
  35. ClearPointer(window) ;
  36. }
  37.