DIRECTORY Imager, Menus, Process, Rope, ScreenCoordsTypes, TIPFriendsTypes, TIPTypes, ViewerClasses, ViewerScreenTypes; ViewerPrivate: CEDAR DEFINITIONS ~ BEGIN Viewer: TYPE ~ ViewerClasses.Viewer; Column: TYPE ~ ViewerClasses.Column; Menu: TYPE ~ Menus.Menu; MouseButton: TYPE ~ ViewerClasses.MouseButton; ROPE: TYPE ~ Rope.ROPE; InitializeHourglass: PROC [ticks: CARDINAL]; TickHourglass: PROC; ProcessEndOpsRegistry: PROC; IconNotify: ViewerClasses.NotifyProc; IconModify: ViewerClasses.ModifyProc; iconTIP: TIPTypes.TIPTable; selectedIcon: Viewer; IconNotifyMouse: PROC [self: Viewer, input: LIST OF REF ANY, device: REF ¬ NIL, user: REF ¬ NIL, display: REF ¬ NIL]; messageWindow: Viewer; menuHLeading: INTEGER = 5; -- white space before first entry menuHSpace: INTEGER = 12; -- white space between entries MarkMenu: PROC [menu: Menu, parent: Viewer, mousePos: ScreenCoordsTypes.TIPScreenCoords]; HitMenu: PROC [menu: Menu, parent: Viewer, mousePos: ScreenCoordsTypes.TIPScreenCoords, button: MouseButton, shift, control: BOOL ¬ FALSE]; ClearMenu: PROC [menu: Menu, parent: Viewer, paint: BOOL ¬ TRUE]; DrawMenu: PROC [menu: Menu, context: Imager.Context, x, y: INTEGER, whatChanged: REF ANY ¬ NIL]; Document: PROC [info: REF ANY, parent: Viewer, clientData: REF ANY ¬ NIL, mouseButton: MouseButton ¬ red, shift, control: BOOL ¬ FALSE]; RootViewerTreeRep: TYPE ~ RECORD [SEQUENCE c: Column OF Viewer]; rootViewerTree: REF RootViewerTreeRep; VMgrPriority: Process.Priority; -- "priorityForeground" in PrincOps, "priorityUserForeground" in PCedar ProcessWindowManagerInput: PROC [self: Viewer, input: LIST OF REF ANY, device: REF ¬ NIL, user: REF ¬ NIL, display: REF ¬ NIL]; DrawCaptionMenu: PROC [v: Viewer, guard: BOOL]; windowMenu: Menu; AcquireWriteLock: PROC [viewer: Viewer]; ReleaseWriteLock: PROC [viewer: Viewer]; AcquireWriteLocks: PROC [v0, v1, v2: Viewer ¬ NIL]; ReleaseWriteLocks: PROC [v0, v1, v2: Viewer ¬ NIL]; AcquireReadLock: PROC [viewer: Viewer]; ReleaseReadLock: PROC [viewer: Viewer]; AcquireReadLocks: PROC [v0, v1, v2: Viewer ¬ NIL]; ReleaseReadLocks: PROC [v0, v1, v2: Viewer ¬ NIL]; AcquireColumnWriteLock: PROC [column: Column]; ReleaseColumnWriteLock: PROC [column: Column]; ColumnWedged: PROC[column: Column] RETURNS[wedged, write: BOOLEAN]; MarkColumnWedged: PROC [column: Column]; MarkColumnUnWedged: PRIVATE PROC [column: Column]; LockViewerTree: PROC; ReleaseViewerTree: PROC; SetOpenLeftWidth: PROC [leftColumnWidth: NAT, screen: Screen ¬ main]; SetOpenBottomY: PROC [bottomY: NAT, screen: Screen ¬ main]; SetMenuHeight: PROC [height: NAT, screen: Screen ¬ main]; SetScrollBarWidth: PROC [width: NAT, screen: Screen ¬ main]; SetWindowBorderSize: PROC [border: NAT, screen: Screen ¬ main]; SetScreenSize: PROC [w, h: NAT, screen: Screen ¬ main]; SetBWScreenSize: PROC [w, h: NAT]; SetColorScreenSize: PROC [w, h: NAT]; Severity: TYPE ~ {fatal, severe, warning, ignorable}; Error: SIGNAL [severity: Severity ¬ fatal, msg: ROPE ¬ NIL]; UserErrorQuery: PROC RETURNS [continue: BOOL]; WindowManagerTIPTable: TIPTypes.TIPTable; MasterButtonProc: TIPFriendsTypes.TIPButtonProc; MasterNotifyProc: TIPFriendsTypes.TIPNotifyProc; CreateDebugButton: PROC []; Screen: TYPE ~ ViewerScreenTypes.Screen; ContextCreatorProc: TYPE ~ ViewerScreenTypes.ContextCreatorProc; CreateContext: PROC [screen: Screen] RETURNS [Imager.Context]; SetCreator: PROC [creator: ContextCreatorProc ¬ NIL, screen: Screen ¬ main] RETURNS [old: ContextCreatorProc]; GetCreatorScreen: PROC [screen: Screen] RETURNS [old: ContextCreatorProc]; ViewerScreen: PROC [viewer: Viewer] RETURNS [Screen]; DisablePainting: PROC [wait: BOOL ¬ TRUE]; EnablePainting: PROC; WaitForPaintingToFinish: PROC; EnableColor: PROC [bitsPerPixel: NAT] RETURNS [BOOL]; DisableColor: PROC; EnableScreen: PROC [screen: Screen] RETURNS [ok: BOOL]; DisableScreen: PROC [screen: Screen]; InvertForMenus: PROC [viewer: Viewer, x, y: INTEGER, w, h: INTEGER]; PaintScreen: PROC [screen: Screen, action: PROC[Imager.Context], suspendCarets: BOOL ¬ TRUE]; PaintWindow: PROC [viewer: Viewer, action: PROC[Imager.Context]]; PaintClient: PROC [viewer: Viewer, action: PROC[Imager.Context]]; GreyScreen: PROC [screen: Screen, x, y, w, h: INTEGER]; ColorScreen: PROC [screen: Screen, color: Imager.Color]; GreyWindow: PROC [viewer: Viewer]; DoWithoutCarets: PROC [sx, sy, w, h: INTEGER, screen: Screen, action: PROC]; CheckForEmergencySaveAllEdits: PROC []; END.  ViewerPrivate.mesa Copyright Ó 1985, 1986, 1987, 1989, 1991 by Xerox Corporation. All rights reserved. Michael Plass, September 29, 1989 2:36:45 pm PDT Doug Wyatt, January 19, 1987 10:56:17 pm PST Bier, December 1, 1988 10:51:31 pm PST Willie-s, October 8, 1991 1:38 pm PDT Christian Jacobi, February 20, 1992 2:36 pm PST HourGlass EndOps IconManager Events directed to icons are intercepted by the input focus machinery and redirected to the icon manager via the following. MessageWindow The system message viewer. MenusPrivate WindowManagerPrivate the current displayed tree, duplicated for each virtual desktop Replaces ViewerPrivate.ProcessWindowResults. ViewerLocks The operations below are the basic locking operations and require considerably more sophistication to use than those in the ViewerLocks interface, because of a number of special arrangements with the Cedar debugger. Please use the call-back operations in ViewerLocks unless you are a window manager wizard. Grant write (exclusive) access to a particular viewer; also acquires a read lock for the viewer column. Release write access to viewer and read access to corresponding column. Grant write (exclusive) access to a set of viewers, sorting them in correct locking order. Release write access to a set of viewers. Provided for convenience. Grant read (shared) access to a particular viewer; also acquires a read lock for the viewer column. Release read access to viewer and read access to corresponding column. Grant read (shared) access to a set of viewers, sorting them in correct locking order. Release read access to a set of viewers. Provided for convenience. Grant write (exclusive) access to a particular column. Logically equivalent to (but not implemented as) acquiring a write lock for all viewers in that column. Release write access to column. The debugger will raise the information signal AMEvents.Debugging when a process takes a breakpoint or gets and uncaught signal. Any client that locks a viewer or column must catch this signal and call MarkColumnWedged, marking the set of columns they have currently locked. Failure to do so may result in deadlock in the event that an uncaught signal or breakpoint is encountered. The debugger will raise the information signal AMEvents.Debugged when a process is aborted from the debugger or when it has proceeded. Any client that locks a viewer or column must catch this signal and call MarkColumnUnWedged, marking the set of columns they have currently locked. Failure to do so may result in deadlock in the event that an uncaught signal or breakpoint is encountered. Grant write (exclusive) access to all viewers and root of viewer tree. Logically equivalent to acquiring a write lock for all columns. Note that the signal ColumnWedged may be raised when this operation is attempted, and the comments above on MarkColumnWedged and MarkColumnUnWedged apply. Release access to viewer tree. ViewerSpecs Sets the vertical boundary between left and right columns. Sets the bottom boundary of the left and right columns. Sets the height of a menu line (and the caption height). Sets the width of scrollbars. Sets the thickness of borders. Sets the dimensions of the specified screen. Sets the dimensions of the black and white screen. Sets the dimensions of the color screen. ImplErrors InputFocus Translates user mouse actions, deciding which TIP table to translate them with. This enables viewers to capture the input focus. Handles all actions once they have been translated by a TIP table. Let the user see the state of the world. Painting Returns a Context for the given screen on the Viewers terminal Forces use of contexts made with the new context creator. Returns the current context creator that is being used for the named screen. Which screen is the viewer currently on? Blocks further painting attempts and returns when all is quiet. Enables painting to begin again. Returns when all is quiet. Enables the color display. Disables the color display. Enable the color display. Returns TRUE if the enable operation succeeded. Disable the given screen. Back door for menus to invert screen areas faster than normal paint mechanism Call action with a context for the entire black-and-white or color screen. Call action with a context for the viewer's window area. Call action with a context for the viewer's client area. Grey the given rectangle on the screen. Color the entire screen with the given color. Grey the viewer's window area. Calls action, ensuring that no carets are visible in the designated screen rectangle. EmergencySaveAllEdits Ê–(cedarcode) style•NewlineDelimiter ™codešÏc™Kšœ ÏeœI™TK™0K™,K™&K™%K™/K™—šÏk ˜ Kšœm˜m—K˜KšÐbl œŸ˜ šœŸ˜K˜KšœŸœ˜$KšœŸœ˜$KšœŸœ˜Kšœ Ÿœ˜.KšŸœŸœŸœ˜—head™ šÏnœŸœ Ÿœ˜,K˜—š¡ œŸœ˜K˜——™š¡œŸœ˜K˜——™ Kš{™{K˜Kš¡ œ˜%K˜Kš¡ œ˜%K˜K˜K˜˜K˜—Kš¡œŸœŸœŸœŸœŸœ ŸœŸœŸœŸœ ŸœŸœ˜uK˜—™ šœ˜Kš™K˜——™ KšœŸœ!˜K™>K™—š¡ œŸœ ŸœŸœ˜nK™9K™—š¡œŸœŸœ˜JK™LK™—š¡ œŸœŸœ ˜5K™(—K˜š¡œŸœŸœŸœ˜*Kš?™?K˜—š¡œŸœ˜Kš ™ K˜—š¡œŸœ˜Kš™K˜—š ¡ œŸœŸœŸœŸœ˜5Kš™K˜—š¡ œŸœ˜Kš™K˜—š¡ œŸœŸœŸœ˜7KšJ™JK˜—š¡ œŸœ˜%Kš™K™—š¡œŸœŸœŸœ˜DKšM™MK˜—š ¡ œŸœŸœ"ŸœŸœ˜^KšJ™JK˜—š¡ œŸœŸœ˜AKš8™8K˜—š¡ œŸœŸœ˜AKš8™8K™—š¡ œŸœŸœ˜7Kš'™'K™—š¡ œŸœ'˜8K™-K˜—š¡ œŸœ˜"Kš™K™—š¡œŸœŸœŸœ˜LK™U——š¡™Kš¡œŸœ˜'—K˜KšŸœ˜—…—„+–