home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiniExamples / AppKit / Winfo / WinInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-08  |  3.2 KB  |  99 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.  * WinInfo class.  This is the controlling object of the application.
  12.  */
  13.  
  14. #import <objc/Object.h>
  15. #import <appkit/graphics.h>
  16.  
  17.  
  18. // The winfo struct holds information about a particular window.
  19.  
  20. struct winfo {
  21.   int num;            // window number (server's value, not appkit's)
  22.   NXRect place;            // location of window on screen
  23.   int hasAlpha;            // YES if has alpha value
  24.   int depth;            // depth of window
  25.   int depthLimit;        // depthlimit of window
  26.   int bytes;            // number of bytes used to store the window
  27.   int type;            // window backing type
  28.   int level;            // level on screen
  29.   int context;            // DisplayPostscript context
  30.   BOOL origOnScreen;        // YES if window was originally on screen
  31.   BOOL onScreenNow;        // YES if window is on screen now
  32.   BOOL isMe;            // YES if this is one of Winfo's own windows
  33. };
  34.  
  35. @interface WinInfo:Object
  36. {
  37.   BOOL activeFlag;    // YES if active (i.e. start button is pressed)
  38.   BOOL offScreenMode;    // YES if off-screen windows should be shown
  39.   BOOL allContexts;    // YES if windows in all contexts should be shown
  40.  
  41.   id myFont;        // display font
  42.   int numWins;        // number of existing windows
  43.   int *windowList;    // array of all DPS window numbers
  44.   int numOnScreen;    // number of existing windows on screen
  45.   int *onScreenList;    // array of on-screen DPS window numbers
  46.   struct winfo *wpList;    // array of info about each window
  47.  
  48.   BOOL highlightAlpha;    // YES if windows w/alpha should be highlighted
  49.   BOOL highlightDepth;    // YES if windows w/depth > 1 should be highlighted
  50.   BOOL showNonretained;    // YES if windows w/depth > 1 should be highlighted
  51.   int displayMode;    // OUTLINEMODE, CONTENTSMODE, TRANSPARENTMODE
  52.  
  53.   id displayWin;    // id of full-size window in which display is created
  54.   int selectedContext;    // context number for currently selected window
  55.   struct winfo *reportedWindow;    // Last window to be reported on...
  56.  
  57.   id reportPanel;        // id of report panel
  58.   id timeDelay;            // time delay field
  59.  
  60.   id repBox;            // box surrounding all fields
  61.   id repContext;        // context
  62.   id repSize;            // size
  63.   id repAlpha;            // alpha
  64.   id repDepth;            // depth
  65.   id repDepthLimit;        // depth limit
  66.   id repBackingStore;        // backing store
  67.   id repType;            // type
  68.   id allWindowsField;        // title of box
  69.  
  70.   id repTotal;            // total for context
  71.   id repTotalBackingStore;    // total amount of backing store
  72.  
  73.   id repAllTotal;        // total for all contexts
  74.   id repAllTotalBackingStore;    // total amount of backing store
  75.  
  76. }
  77.  
  78.  
  79. - startStop:sender;
  80. - start:sender;
  81. - stop:sender;
  82. - changeHighlightOptions:sender;
  83. - changeDisplayOptions:sender;
  84. - changeOffScreenOptions:sender;
  85. - showAllWindows;
  86. - showOutlineWindow:(struct winfo *)wp;
  87. - (struct winfo *) mapPointToWindow:(NXPoint *)p;
  88. - clearReport;
  89. - showReportFor:(struct winfo *)wp;
  90. - (void)showReportSummaryForAll;
  91. - (int) trueWinNumberFor:win;
  92. - clearOffScreen;
  93. - moveOnScreen:(BOOL)how forContext:(int)context;
  94. - (struct winfo *) findWinfoByNumber:(int)wnum;
  95. - buildWindowList;
  96. - buildOnScreenList;
  97. - (void)getDepthName:(NXWindowDepth)depth into:(char *)buffer;
  98. @end
  99.