home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / postscript / part01 / source / null.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-10-27  |  2.2 KB  |  98 lines

  1. /*
  2.  * Copyright (C) Rutherford Appleton Laboratory 1987
  3.  * 
  4.  * This source may be copied, distributed, altered or used, but not sold for profit
  5.  * or incorporated into a product except under licence from the author.
  6.  * It is not in the public domain.
  7.  * This notice should remain in the source unaltered, and any changes to the source
  8.  * made by persons other than the author should be marked as such.
  9.  * 
  10.  *    Crispin Goswell @ Rutherford Appleton Laboratory caag@uk.ac.rl.vd
  11.  */
  12. #include "main.h"
  13. #include "graphics.h"
  14. #include "canon.h"
  15.  
  16. struct hardware *InitHardware ()
  17.  {
  18.     InitTransfer (1);
  19.     
  20.     return NULL;
  21.  }
  22.  
  23. static struct hardware *NewHardware (bits, width, height, flags) char *bits; int width, height, flags;
  24.  {
  25.      struct hardware *d = (struct hardware *) Malloc (sizeof (struct hardware));
  26.      
  27.      d->hard.addr = bits;
  28.      d->flags = flags;
  29.      d->aux = d->clip = NULL;
  30.      d->extent = NewDevicePoint (width, height);
  31.      
  32.      return d;
  33.  }
  34.  
  35. struct hardware *NewWindowHardware (width, height) int width, height;
  36.  {
  37.      return NewHardware (NULL, width, height, ISWIN);
  38.  }
  39.  
  40. struct hardware *NewBitmapHardware (width, height) int width, height;
  41.  {
  42.      return NewHardware (NULL, width, height, 0);
  43.  }
  44.  
  45. static void DestroyBits (b) char *b;
  46.  {
  47.  }
  48.  
  49. void DestroyHardware (dev) struct hardware *dev;
  50.  {
  51.      if (dev == NULL)
  52.          return;
  53.      DestroyBits (dev->hard.addr);
  54.      if (dev->aux)
  55.          DestroyHardware (dev->aux);
  56.      Free ((char *) dev);
  57.  }
  58.  
  59. struct hardware *HardwareFromString (st, width, height) char *st; int width, height;
  60.  {
  61.      Free (st);
  62.      return NewHardware (NULL, width, height, 0);
  63.  }
  64.  
  65. char *StringFromHardware (dev) struct hardware *dev;
  66.  {
  67.      return Malloc ((dev->extent.dx + 7) / 8 *dev->extent.dy);
  68.  }
  69.  
  70. void UpdateControl (h, flag) struct hardware *h; int flag;
  71.  {
  72.  }
  73.  
  74. void RasterTile (from, to, toPoint, extent, rop)
  75.     struct hardware *from, *to;
  76.     DevicePoint toPoint, extent;
  77.     int rop;
  78.  {
  79.  }
  80.  
  81. void BitBlt (from, to, fromPoint, toPoint, extent, rop)
  82.     struct hardware *from, *to;
  83.     DevicePoint fromPoint, toPoint, extent;
  84.     int rop;
  85.  {
  86.  }
  87.  
  88. void BitBltLine (h, fromPoint, toPoint, rop) 
  89.       struct hardware *h;
  90.     DevicePoint fromPoint, toPoint;
  91.     int rop;
  92.  {
  93.  }
  94.  
  95. void BitBltBlob (to, top, height, left, right, rop) struct hardware *to; int top, height, *left, *right, rop;
  96.  {
  97.  }
  98.