home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiniExamples / AppKit / Winfo / wwrap.psw < prev   
Encoding:
Text File  |  1992-12-07  |  2.1 KB  |  78 lines

  1. /*
  2.  * Winfo
  3.  * by Paul S. Kleppner
  4.  *
  5.  * This program may be freely distributed, but not sold.
  6.  * It is provided without warranty of any kind, expressed or
  7.  * implied, as to its fitness for any particular use.
  8.  */
  9.  
  10. /*
  11.  * This file contains DPS wrappers for a number of
  12.  * functions which deal with windows.  We have to write our
  13.  * own wrappers because we are dealing with true DPS window numbers
  14.  * as known by the window server.  The appkit, and the standard wrappers,
  15.  * seem to use "logical" window numbers which are local to each app.
  16.  */
  17.  
  18. // Look up the window at the given location; returns its
  19. // number, and whether or not one was found.
  20. defineps myFindWindow(float x; float y; int where; int initWin;
  21.     |float *lx; float *ly; int *winFound; boolean *didFind)
  22.  
  23.     x y where initWin findwindow
  24.     didFind winFound lx ly
  25. endps
  26.  
  27. // Return alpha value for current window
  28. defineps myCurrentWindowAlpha(int win; |int *alpha)
  29.     win currentwindowalpha alpha
  30. endps
  31.  
  32. // Return bounds of current window
  33. defineps myCurrentWindowBounds(int win; |float *x; float *y;
  34.                 float *w; float *h)
  35.     win currentwindowbounds h w y x
  36. endps
  37.  
  38.  
  39. // Return depth of current window
  40. defineps myCurrentWindowDepth(int win; |int *depth)
  41.     win currentwindowdepth depth
  42. endps
  43.  
  44. // Return depthlimit of current window
  45. defineps myCurrentWindowDepthLimit(int win; |int *depth)
  46.     win currentwindowdepthlimit depth
  47. endps
  48.  
  49. // Returns owner (i.e. context value) for current window
  50. defineps myCurrentOwner(int win; |int *context)
  51.     win currentowner context
  52. endps
  53.  
  54. // Sets level of current window
  55. defineps mySetCurrentWindowLevel(int level)
  56.     level currentwindow setwindowlevel
  57. endps
  58.  
  59. // Sets level of current window
  60. defineps mySetCurrentWindowLevelOfWindow(int win; int level)
  61.     level win setwindowlevel
  62. endps
  63.  
  64. // Returns level of current window
  65. defineps myCurrentWindowLevel(int win; |int *level)
  66.     win currentwindowlevel level
  67. endps
  68.  
  69. // Orders given window on the screen list
  70. defineps myOrderWindow(int place; int otherwin; int win)
  71.     place otherwin win orderwindow
  72. endps
  73.  
  74.  
  75. // Fills window w2 with contents of all windows below level of w1
  76. defineps fillBelowWin(int w1; int w2)
  77.     Below w1 w2 fillwindow
  78. endps