home *** CD-ROM | disk | FTP | other *** search
/ CLIX - Fazer Clix Custa Nix / CLIX-CD.cdr / mac / lib / Mac / QDOffscreen.xs < prev    next >
Text File  |  1998-04-05  |  3KB  |  192 lines

  1. /* $Header: /home/neeri/MacCVS/MacPerl/perl/ext/Mac/ExtUtils/MakeToolboxModule,v 1.1 1997/04/07 20:49:35 neeri Exp 
  2.  *    Copyright (c) 1997 Matthias Neeracher
  3.  *
  4.  *    You may distribute under the terms of the Perl Artistic License,
  5.  *    as specified in the README file.
  6.  *
  7.  * $Log: MakeToolboxModule,v  Revision 1.1  1997/04/07 20:49:35  neeri
  8.  * Synchronized with MacPerl 5.1.4a1
  9.  * 
  10.  */
  11.  
  12. #define MAC_CONTEXT
  13.  
  14. #include "EXTERN.h"
  15. #include "perl.h"
  16. #include "XSUB.h"
  17. #include <Types.h>
  18. #include <QDOffscreen.h>
  19.  
  20. MODULE = Mac::QDOffscreen   PACKAGE = Mac::QDOffscreen
  21.  
  22. =head2 Functions
  23.  
  24. =over 4
  25.  
  26. =item GWORLD = NewGWorld PIXELDEPTH, BOUNDS [, CTABLE [, GDEVICE [, FLAGS]]]
  27.  
  28. =cut
  29. GWorldPtr
  30. NewGWorld(PixelDepth, boundsRect, cTable=nil, aGDevice=nil, flags=0)
  31.     short       PixelDepth
  32.     Rect        &boundsRect
  33.     CTabHandle  cTable
  34.     GDHandle    aGDevice
  35.     long    flags
  36.     CODE:
  37.     gLastMacOSErr =
  38.         NewGWorld(&RETVAL, PixelDepth, &boundsRect, cTable, aGDevice, flags);
  39.     if (gLastMacOSErr) { 
  40.         XSRETURN_UNDEF; 
  41.     }
  42.     OUTPUT:
  43.     RETVAL
  44.  
  45. =item OK = LockPixels PIXMAP
  46.  
  47. =cut
  48. Boolean
  49. LockPixels(pm)
  50.     PixMapHandle    pm
  51.  
  52. =item UnlockPixels PIXMAP
  53.  
  54. =cut
  55. void
  56. UnlockPixels(pm)
  57.     PixMapHandle    pm
  58.  
  59. =item (FLAGS, GWORLD) = UpdateGWorld GWORLD, PIXELDEPTH, BOUNDS [, CTABLE [, GDEVICE [, FLAGS]]]
  60.  
  61. =cut
  62. void
  63. UpdateGWorld(offscreenGWorld, pixelDepth, boundsRect, cTable=nil, aGDevice=nil, flags=0)
  64.     GWorldPtr  &offscreenGWorld
  65.     short       pixelDepth
  66.     Rect       &boundsRect
  67.     CTabHandle  cTable
  68.     GDHandle    aGDevice
  69.     long    flags
  70.     PPCODE:
  71.     {
  72.         long res = 
  73.             UpdateGWorld(&offscreenGWorld, pixelDepth, &boundsRect, cTable, aGDevice, flags);
  74.         EXTEND(sp, 2);
  75.         XS_PUSH(short, res);
  76.         XS_PUSH(GWorldPtr, offscreenGWorld);
  77.     }
  78.  
  79. =item DisposeGWorld GWORLD
  80.  
  81. =cut
  82. void
  83. DisposeGWorld(offscreenGWorld)
  84.     GWorldPtr   offscreenGWorld
  85.  
  86. =item (PORT, GDEV) = GetGWorld()
  87.  
  88. =cut
  89. void
  90. GetGWorld()
  91.     PPCODE:
  92.     {
  93.         CGrafPtr    port;
  94.         GDHandle    gdh;
  95.         
  96.         GetGWorld(&port, &gdh);
  97.         EXTEND(sp, 2);
  98.         XS_PUSH(GrafPtr,   port);
  99.         XS_PUSH(GWorldPtr, gdh);
  100.     }
  101.  
  102. =item SetGWorld PORT, GDEV
  103.  
  104. =cut
  105. void
  106. SetGWorld(port, gdh)
  107.     GrafPtr     port
  108.     GDHandle    gdh
  109.     CODE:
  110.     SetGWorld((CGrafPtr)port, gdh);
  111.  
  112. =item PortChanged PORT
  113.  
  114. =cut
  115. void
  116. PortChanged(port)
  117.     GrafPtr port
  118.  
  119. =item AllowPurgePixels PIXMAP
  120.  
  121. =cut
  122. void
  123. AllowPurgePixels(pm)
  124.     PixMapHandle    pm
  125.  
  126. =item NoPurgePixels PIXMAP
  127.  
  128. =cut
  129. void
  130. NoPurgePixels(pm)
  131.     PixMapHandle    pm
  132.  
  133. =item STATE = GetPixelsState PIXMAP
  134.  
  135. =cut
  136. long
  137. GetPixelsState(pm)
  138.     PixMapHandle    pm
  139.  
  140. =item SetPixelsState PIXMAP, STATE
  141.  
  142. =cut
  143. void
  144. SetPixelsState(pm, state)
  145.     PixMapHandle    pm
  146.     long    state
  147.  
  148. =item Ptr = GetPixBaseAddr PIXMAP
  149.  
  150. =cut
  151. Ptr
  152. GetPixBaseAddr(pm)
  153.     PixMapHandle    pm
  154.  
  155. =item GDEV = GetGWorldDevice GWORLD
  156.  
  157. =cut
  158. GDHandle
  159. GetGWorldDevice(offscreenGWorld)
  160.     GWorldPtr   offscreenGWorld
  161.  
  162. =item DONE = QDDone PORT
  163.  
  164. =cut
  165. Boolean
  166. QDDone(port)
  167.     GrafPtr port
  168.  
  169. =item VERSION = OffscreenVersion()
  170.  
  171. =cut
  172. long
  173. OffscreenVersion()
  174.  
  175. =item 32BIT = PixMap32Bit PIXMAP
  176.  
  177. =cut
  178. Boolean
  179. PixMap32Bit(pmHandle)
  180.     PixMapHandle    pmHandle
  181.  
  182. =item PIXMAP = GetGWorldPixMap GWORLD
  183.  
  184. =cut
  185. PixMapHandle
  186. GetGWorldPixMap(offscreenGWorld)
  187.     GWorldPtr   offscreenGWorld
  188.  
  189. =back
  190.  
  191. =cut
  192.