DIRECTORY Imager USING [Context], Menus USING [Menu, MouseButton], Process USING [Priority, priorityForeground], Rope USING [ROPE], TIPPrivate USING [TIPClient], TIPUser USING [TIPScreenCoords, TIPTable], ViewerClasses USING [Column, ModifyProc, NotifyProc, Viewer]; ViewerPrivate: CEDAR DEFINITIONS ~ BEGIN Viewer: TYPE ~ ViewerClasses.Viewer; Column: TYPE ~ ViewerClasses.Column; Menu: TYPE ~ Menus.Menu; MouseButton: TYPE ~ Menus.MouseButton; ROPE: TYPE ~ Rope.ROPE; InitializeHourglass: PROC [ticks: CARDINAL]; TickHourglass: PROC; ProcessEndOpsRegistry: PROC; IconNotify: ViewerClasses.NotifyProc; IconModify: ViewerClasses.ModifyProc; iconTIP: TIPUser.TIPTable; selectedIcon: Viewer; messageWindow: Viewer; menuHLeading: INTEGER = 5; -- white space before first entry menuHSpace: INTEGER = 12; -- white space between entries MarkMenu: PROC [menu: Menu, parent: Viewer, mousePos: TIPUser.TIPScreenCoords]; HitMenu: PROC [menu: Menu, parent: Viewer, mousePos: TIPUser.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: REF ANY, clientData: REF ANY _ NIL, mouseButton: MouseButton _ red, shift, control: BOOL _ FALSE]; rootViewerTree: ARRAY Column OF Viewer; VMgrPriority: Process.Priority = Process.priorityForeground; ProcessWindowResults: ViewerClasses.NotifyProc; 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 [NAT]; SetOpenBottomY: PROC [NAT]; SetMenuHeight: PROC [NAT]; SetScrollBarWidth: PROC [NAT]; SetWindowBorderSize: PROC [NAT]; 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]; EnableInput: PROC; inputEnabled: READONLY BOOL; focusTIP: TIPPrivate.TIPClient; WindowManagerTIPTable: TIPUser.TIPTable; Screen: TYPE ~ {bw, color}; ContextCreatorProc: TYPE ~ PROC [screen: Screen] RETURNS [Imager.Context]; CreateContext: ContextCreatorProc; SetCreator: PROC [creator: ContextCreatorProc _ NIL] RETURNS [old: ContextCreatorProc]; ViewerScreen: PROC [viewer: Viewer] RETURNS [Screen] ~ INLINE { RETURN[IF viewer.column=color AND NOT viewer.iconic THEN color ELSE bw] }; DisablePainting: PROC [wait: BOOL _ TRUE]; EnablePainting: PROC; WaitForPaintingToFinish: PROC; EnableColor: PROC [bitsPerPixel: NAT] RETURNS [BOOL]; DisableColor: PROC; 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]; GreyWindow: PROC [viewer: Viewer]; END.  ViewerPrivate.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Doug Wyatt, April 21, 1985 3:48:40 pm PST Michael Plass, June 3, 1985 9:44:19 am PDT 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 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 black and white screen. Sets the dimensions of the color screen. ImplErrors InputFocus Call at init to enable input from TIP. Type-ahead lost up to this point. Wizards only, please. keyboard input enable flag InputFocus TIP Client. Painting a terminal may have both black-and-white and color screens Returns a Context for the given screen on the Viewers terminal Forces use of contexts made with the new context creator. 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. 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. Grey the viewer's window area. ÊE– "Mesa" style˜codešÏc™Kšœ Ïmœ1™K™—š¡ œŸœ ŸœŸœ˜WK™9K™—š¡ œŸœŸœ ˜4KšœŸœŸœŸœŸœŸœŸœŸœ˜UK™(K™—K˜š¡œŸœŸœŸœ˜*Kš?™?K˜—š¡œŸœ˜Kš ™ K˜—š¡œŸœ˜Kš™K˜—š ¡ œŸœŸœŸœŸœ˜5Kš™K˜—š¡ œŸœ˜Kš™K˜—š¡œŸœŸœŸœ˜BKšM™MK˜—š ¡ œŸœŸœ"ŸœŸœ˜^KšJ™JK˜—š¡ œŸœŸœ˜AKš8™8K˜—š¡ œŸœŸœ˜AKš8™8—K˜š¡ œŸœŸœ˜7Kš'™'K˜—š¡ œŸœ˜"Kš™—K˜—K˜KšŸœ˜—…—†%k