home *** CD-ROM | disk | FTP | other *** search
- /*
- * Winfo
- * by Paul S. Kleppner
- *
- * This program may be freely distributed, but not sold.
- * It is provided without warranty of any kind, expressed or
- * implied, as to its fitness for any particular use.
- */
-
- /*
- * WinInfo class. This is the controlling object of the application.
- */
-
- #import <objc/Object.h>
- #import <appkit/graphics.h>
-
-
- // The winfo struct holds information about a particular window.
-
- struct winfo {
- int num; // window number (server's value, not appkit's)
- NXRect place; // location of window on screen
- int hasAlpha; // YES if has alpha value
- int depth; // depth of window
- int depthLimit; // depthlimit of window
- int bytes; // number of bytes used to store the window
- int type; // window backing type
- int level; // level on screen
- int context; // DisplayPostscript context
- BOOL origOnScreen; // YES if window was originally on screen
- BOOL onScreenNow; // YES if window is on screen now
- BOOL isMe; // YES if this is one of Winfo's own windows
- };
-
- @interface WinInfo:Object
- {
- BOOL activeFlag; // YES if active (i.e. start button is pressed)
- BOOL offScreenMode; // YES if off-screen windows should be shown
- BOOL allContexts; // YES if windows in all contexts should be shown
-
- id myFont; // display font
- int numWins; // number of existing windows
- int *windowList; // array of all DPS window numbers
- int numOnScreen; // number of existing windows on screen
- int *onScreenList; // array of on-screen DPS window numbers
- struct winfo *wpList; // array of info about each window
-
- BOOL highlightAlpha; // YES if windows w/alpha should be highlighted
- BOOL highlightDepth; // YES if windows w/depth > 1 should be highlighted
- BOOL showNonretained; // YES if windows w/depth > 1 should be highlighted
- int displayMode; // OUTLINEMODE, CONTENTSMODE, TRANSPARENTMODE
-
- id displayWin; // id of full-size window in which display is created
- int selectedContext; // context number for currently selected window
- struct winfo *reportedWindow; // Last window to be reported on...
-
- id reportPanel; // id of report panel
- id timeDelay; // time delay field
-
- id repBox; // box surrounding all fields
- id repContext; // context
- id repSize; // size
- id repAlpha; // alpha
- id repDepth; // depth
- id repDepthLimit; // depth limit
- id repBackingStore; // backing store
- id repType; // type
- id allWindowsField; // title of box
-
- id repTotal; // total for context
- id repTotalBackingStore; // total amount of backing store
-
- id repAllTotal; // total for all contexts
- id repAllTotalBackingStore; // total amount of backing store
-
- }
-
-
- - startStop:sender;
- - start:sender;
- - stop:sender;
- - changeHighlightOptions:sender;
- - changeDisplayOptions:sender;
- - changeOffScreenOptions:sender;
- - showAllWindows;
- - showOutlineWindow:(struct winfo *)wp;
- - (struct winfo *) mapPointToWindow:(NXPoint *)p;
- - clearReport;
- - showReportFor:(struct winfo *)wp;
- - (void)showReportSummaryForAll;
- - (int) trueWinNumberFor:win;
- - clearOffScreen;
- - moveOnScreen:(BOOL)how forContext:(int)context;
- - (struct winfo *) findWinfoByNumber:(int)wnum;
- - buildWindowList;
- - buildOnScreenList;
- - (void)getDepthName:(NXWindowDepth)depth into:(char *)buffer;
- @end
-