DIRECTORY Rope USING [ROPE], Xl USING [BOOL3, Connection, Event, Geometry, nullWindow, Size, TQ, TimeStamp, Window], XTkShellWidgetTypes USING [ICCCMHints], XTk USING [Mapping, Widget, WidgetNotifyProc, WidgetSpec]; XTkShellWidgets: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE = Rope.ROPE; Geometry: TYPE = Xl.Geometry; Widget: TYPE = XTk.Widget; WidgetNotifyProc: TYPE = XTk.WidgetNotifyProc; WidgetSpec: TYPE = XTk.WidgetSpec; ShellWidget: TYPE = Widget; IsShell: PROC [w: XTk.Widget] RETURNS [BOOL]; CreateShell: PROC [widgetSpec: WidgetSpec ¬ [], child: Widget ¬ NIL, windowHeader: ROPE ¬ NIL, iconName: ROPE ¬ NIL, className: ATOM ¬ NIL, packageName: ROPE ¬ NIL, shortName: ROPE ¬ NIL, rootTQ: Xl.TQ ¬ NIL, dontQueryGeometry: BOOL ¬ FALSE, deletionProtocol: BOOL ¬ TRUE, focusProtocol: BOOL ¬ TRUE, standardMigration: BOOL ¬ TRUE] RETURNS [ShellWidget]; BindScreenShell: PROC [shell: ShellWidget, connection: REF ¬ NIL, parentWindow: Xl.Window ¬ Xl.nullWindow]; ForgetScreenShell: PROC [shell: ShellWidget]; RegisterCallWMDeleteWindow: PROC [shell: ShellWidget, proc: WidgetNotifyProc, registerData: REF ¬ NIL]; RegisterCallConnectionDied: PROC [shell: ShellWidget, proc: WidgetNotifyProc, registerData: REF ¬ NIL]; RegisterCallWindowDied: PROC [shell: ShellWidget, proc: WidgetNotifyProc, registerData: REF ¬ NIL]; SetShellChild: PROC [shell: ShellWidget, child: Widget]; RealizeShell: PROC [shell: ShellWidget, geometry: Xl.Geometry ¬ [], mapping: XTk.Mapping ¬ mapped, reConsiderChildren: BOOL ¬ TRUE]; ForkRealizeShell: PROC [shell: ShellWidget, geometry: Xl.Geometry ¬ [], mapping: XTk.Mapping ¬ mapped, reConsiderChildren: BOOL ¬ TRUE]; DestroyShell: PROC [shell: ShellWidget]; ApplicationClassName: PROC [shell: ShellWidget] RETURNS [className: ATOM]; SetFocusMethod: PROC [shell: ShellWidget, focusProtocol, inputHint: Xl.BOOL3 ¬ illegal]; SetFocus: PROC [shell: ShellWidget, time: Xl.TimeStamp, child: REF ¬ NIL]; SetFocusTarget: PROC [shell: ShellWidget, child: REF ¬ NIL, time: Xl.TimeStamp ¬ [0]]; FocusTime: PROC [shell: ShellWidget] RETURNS [Xl.TimeStamp]; OpenIcon: PROC [shell: ShellWidget]; Iconify: PROC [shell: ShellWidget]; WithDraw: PROC [shell: ShellWidget]; SetHeader: PROC [shell: ShellWidget, header: ROPE]; SetIconName: PROC [shell: ShellWidget, header: ROPE]; TrackColorMap: PROC [shell: ShellWidget, w: Widget]; GetHints: PROC [shell: ShellWidget] RETURNS [REF ICCCMHints]; UpdateHints: PROC [shell: ShellWidget]; ICCCMHints: TYPE = XTkShellWidgetTypes.ICCCMHints; CreateInteroperabilityShell: PROC [widgetSpec: WidgetSpec ¬ [], child: Widget ¬ NIL, className: ATOM ¬ NIL, rootTQ: Xl.TQ ¬ NIL ] RETURNS [ShellWidget]; BindInteroperabilityShell: PROC [shell: ShellWidget, connection: Xl.Connection, foreignParent: Xl.Window]; END. BXTkShellWidgets.mesa Copyright Σ 1988, 1989, 1990, 1991, 1992 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, October 18, 1988 10:46:22 am PDT Christian Jacobi, April 8, 1992 2:47 pm PDT Shell widgets are widgets which do not have normal parent widgets. The typical shell widgets are those which do the window manager conventions. Shell widgets ShellWidget won't be garbage collected between realization and destruction Returns true if w is shell or subclass of shell Creates a shell widget, subject to window management. rootTQ: if not defaulted must watch locking order! shortName: used for look ups packageName: e.g. used for finding files deletionProtocol: interactive enable of DestroyShell [using WM DELETE WINDOW protocol]. focusProtocol: enables FocusTarget [using WM TAKE FOCUS protocol]. Creates connection and binds screen. connection: If not a Xl.Connection, one is made up. atom, NIL: Check external for a server name and create connection. rope: Create connection to this server. May raise Xl.connectionNotCreated. Unrealizes shell and forgets screen. Registers proc to be called in case of a window manager request to delete the window. Default behaviour is to destroy the widget; but note that this is invoked only when deletionProtocol is TRUE. Procedure may deny the deletion. Unregisters previous proc. Not monitored. callData=$wmDeleteWindow Registers proc to be called on rootTQ in case of unexpected dying connection (after stopping interactions). Default behaviour is to destroy the widget. Procedure must forget the screen. Unregisters previous proc. Not monitored. callData=$connectionDied Registers proc to be called on rootTQ in case of unexpected destroyWindow event (after stopping interactions). Default behaviour is to destroy the widget. Procedure must forget the screen. Unregisters previous proc. Not monitored. callData=$destroyNotify Changes child of shell; destroys previous one. Acquires lock and builds the widget tree (starts configuration). If no screen has been bound, one is made up. May raise Xl.connectionNotCreated. Forks and calls RealizeShell (start configuration). Destroys the widget tree Destroys the widget tree Input Focus according to ICCCM Sets the input method hints according to ICCCM focusProtocol: Usage of WM_TAKE_FOCUS protocol inputHint: WM_HINTS InputHint flag No input: No keyboard input expected (focusProtocol: false, inputHint: false) Passive: Expects input but does not set input focus (focusProtocol: false, inputHint: true) Locally active: Client sets input focus when it is in one of his windows (focusProtocol: true, inputHint: true) Globally active: Client sets input focus even when it belonged to another clients window (focusProtocol: true, inputHint: false) Some window managers read flags only on transition from withdrawn state. Actively sets the input focus to child if time is valid and advances time. child a Widget, REF Window or NIL (child=NIL: use current focus target of shell) (child#NIL: set focus target of shell and input focus) Delayed: If shell gets WM_TAKE_FOCUS message (or a SetFocus with NIL child) shell will then set (forward) focus to child. child a Widget, REF Window or NIL time: If used then restricts operation to valid times. Time is not advanced. Useful only if ICCCM WM_TAKE_FOCUS protocol is enabled. Returns TimeStamp of last WM_TAKE_FOCUS message or SetFocus to shell. Window state according to ICCCM Top level windows are in either normal state (open) Iconic state or withdrawn state. These routines do not cache the state and therefore might generate request to the server even if not absolutely necessary. Don't rely on result: Interactive actions of user through window manager could change state at any time. These procedures do not cause realization but might be delayed if a shell hasn't been realized. Opens iconic or withdrawn widget. Fancy map request. Iconifies open or withdrawn widget. Puts open or iconic window into withdrawn state. Fancy unmap request. Withdrawn state is particularly interesting since on transition from it the window manager really must read the windows properties. Other ICCCM stuff Conveniance procedure assigning WM NAME property. Some window managers might consider change only on transition from withdrawn state. Conveniance procedure assigning WM ICON_NAME property. Some window managers might consider change only on transition from withdrawn state. Makes the necessary ICCCM compliant mumbojumbo so window managers will know to install w's color map. Returns associated fields for ICCCM hints. Cache for properties! Will be put onto property before first mapping. Cedar convention: whenever data covered by ICCCMHints is modified, change it also in hints (So next client will set all the fields correctly). Eventually makes sure ICCCMHints are forwarded to server Interoperability widgets Creates an interoperability shell widget. Grafting interoperability shell as child of an X window of an unknown connection. Warning: there is no control whether foreignParent just disappears with or without its connection... Κ]•NewlineDelimiter –(cedarcode) style˜codešœ™Kšœ ΟeœI™TKšœ=™=K™+K™—šΟk œ˜ Kšœžœžœ˜Kšœžœžœ1žœ˜XKšœžœ˜'Kšœžœ1˜:K˜—KšΟnœžœž ˜"Kšœžœ˜K™K™KšœD™DšœL™LK˜Kšžœžœžœ˜Kšœ žœ˜Kšœžœ˜Kšœžœ˜.Kšœ žœ˜"—˜K˜—šΟb ™ K˜šœ žœ ˜KšœJ™JK˜—šŸœžœžœžœ˜-K™/—K˜š0Ÿ œžœ/žœžœžœ žœžœ žœžœžœžœ žœžœ žœžœžœžœžœžœžœžœžœžœžœ˜γKšΟc5™5Kšœ3™3Kšœ™Kšœ(™(Kšœ>Οzœ’œ™WKšœ-’œ’œ™CK™—šŸœžœ"žœžœ+˜kKšœ$™$šœ5™5K™CK™(Kšœ"™"—K™—šŸœžœ˜-Kšœ$™$K™—šŸœžœ<žœžœ˜gKšœ‘œœ‘Bœ‘œ ‘™¬K™—šŸœžœ<žœžœ˜gKš œ‘— ‘*œ‘œ ‘ œ™‚K™—šŸœžœ<žœžœ˜cKš œ‘š ‘*œ‘œ ‘ œ ™„—K˜šŸ œžœ%˜8Kš‘.™.K˜—šŸ œžœežœžœ˜„Kš‘@™@Kš‘8œ‘™PK™—šŸœžœežœžœ˜ˆKš‘Ÿ ‘™3K™—šŸ œžœ˜(Kšœ™K™—šŸœžœžœ žœ˜JKšœ™K™—K˜—š  Ÿ™K˜šŸœžœ3žœ ˜Xšœ.™.Jšœ.™.Jšœ#™#—šœ ™ Jšœ™J™(—šœ ™ Jšœ+™+J™'—šœ™Kšœ9™9K™&—šœ™JšœI™IJ™'—J™IK˜—šŸœžœ1žœžœ˜JJšœJ™Jšœ"™"Jšœ.™.Jšœ6™6—J™—šŸœžœžœžœ˜VJšœz™zJšœ!™!JšœM™MJšœ8™8J™—šŸ œžœžœ˜œ‘ ™QKšœd™dK™——Kšžœ˜K˜K˜—…— ΰ%