home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 092.lha / Small / small6.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-21  |  1.4 KB  |  55 lines

  1. echo ; /*
  2.  
  3.  lc -cwusf -v -sc=__MERGED -M -y small6.c
  4.  blink small6.o LIB lib:amiga.lib DEFINE _stdout=_echo SD SC ND MAP small6.map
  5.  quit
  6.  
  7.   
  8.    The above code will compile and link this source if you EXECUTE small.c
  9.  
  10.    This example does away with all other code but what you see in this
  11.    module.  It is based on techniques used by Gordon Keener 
  12.    and John Toebes in programs distributed with the Lattice 4.0 compiler.           
  13.    
  14.    */
  15.  
  16. #include "exec/types.h"
  17. #include "exec/exec.h" 
  18.  
  19. #include "intuition/intuition.h"
  20. #include "intuition/intuitionbase.h"
  21.  
  22. #include "proto/intuition.h"
  23. #include "proto/exec.h"
  24.  
  25. struct  IntuitionBase *IntuitionBase;
  26.  
  27. static struct IntuiText text = {3,4,JAM1, 0, 0,NULL,"lets get small", NULL};
  28. static struct NewWindow NW = {50,50,200,40,-1,-1,CLOSEWINDOW,
  29.                               WINDOWCLOSE | WINDOWDRAG,
  30.                               NULL,NULL,"small",NULL,NULL,200,40,200,40,
  31.                               WBENCHSCREEN};
  32. static struct Window *W;
  33.  
  34. void small6 ()
  35.  
  36. {
  37.  
  38.    IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0);
  39.  
  40.    if (IntuitionBase != NULL )
  41.       {
  42.  
  43.       W = ( struct Window * ) OpenWindow ( &NW );    
  44.  
  45.       if ( W != NULL )
  46.          {
  47.          PrintIText ( W->RPort, &text, 5,10 );
  48.          Wait ( 1<<W->UserPort->mp_SigBit );
  49.          CloseWindow ( W );
  50.          }
  51.  
  52.       CloseLibrary ( ( APTR )IntuitionBase );
  53.       }
  54. }
  55.