home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d500 / wiconify.lha / wIconify / wIconSetter.lzh / wIconCutter / Frame.h < prev    next >
C/C++ Source or Header  |  1991-04-19  |  2KB  |  42 lines

  1. /*
  2.  *  FRAME.C     A general-purpose bitmap creating library.  It allows you
  3.  *              to select a portion of any screen by dragging a selection 
  4.  *              rectangle, and returns a bitmap structure that contains
  5.  *              a copy of the selected region.
  6.  *
  7.  *  Copyright 1990 by Davide P. Cervone, all rights reserved.
  8.  *  You may use this code, provided this copyright notice is kept intact.
  9.  */
  10.  
  11. #define SHOW_USAGE      0
  12. #define JUST_EXIT       1
  13. #define FRAME_IT        2
  14.  
  15. #define ONE             1L
  16.  
  17. #define NEWSTRUCT(s,v)  (v=(struct s *)New("v",sizeof(struct s)))
  18. #define FREESTRUCT(s,v) (FreeMem(v,sizeof(struct s)))
  19.  
  20. extern struct IntuitionBase *IntuitionBase;
  21. extern struct GfxBase *GfxBase;
  22. extern struct LayersBase *LayersBase;
  23.  
  24. extern char *program;
  25. extern char *version;
  26. extern char *copyright;
  27. extern char *usage;
  28.  
  29. extern struct Screen *theScreen;        /* the selected screen */
  30. extern UBYTE PlaneMask;                 /* which bitplanes to use */
  31. extern UBYTE theDepth;                  /* the depth of the bitmap */
  32. extern WORD theWidth, theHeight;        /* its width and height */
  33. extern ULONG theModes;                  /* the screen's modes */
  34. extern struct ColorMap *theColorMap;    /* the screen's color map */
  35. extern struct RastPort *theRastPort;    /* a RastPort into the bitmap */
  36. extern struct BitMap theBitMap;         /* the bitmap itself */
  37. extern WORD StartX, StartY;             /* position within the screen */
  38. extern WORD CurrentX, CurrentY;         /* current mouse position */
  39. extern WORD LeftX, TopY;                /* corner of selection rectangle */
  40.  
  41. extern APTR New();                      /* gets memory safely */
  42.