ellis@EDDIE.MIT.EDU@siemens.UUCP (02/25/87)
Standard X Window Properties which should be set by X Applications Ellis Cohen Mark Biggers Joe Camaratta Siemens RTL Tiled Window Project Siemens Research & Technology Laboratories 105 College Road East Princeton NJ 08540-6668 ...!siemens!ellis (uucp) ellis@siemens.siemens-rtl.com (csnet) Ellis.Cohen@a.gp.cs.cmu.edu (arpa) 25 February 1987 X Applications may set X Window properties which may be examined by a window manager. In this note, we list what we believe are standard window properties which can or should be set by every application and the reasons for each. A separate note, "The Role of a Window Manager for X" provides more detailed justifications for these properties. This list is based on our experience building the Siemens RTL Tiled Window Manager which runs under SunView and is now being ported to X. 1. Identification This list of strings are used for identifying a window to the user, for setting default properties from a profile, and for seting initial locations and properties from a saved layout file. 1. WindowClass Type: STRING8 Meaning: The "class" of a window -- used for setting default window properties from a profile. Classes could be emacs, dbx, clock, etc. 2. WindowInfo Type: STRING8 Meaning: Information about the application or its current state which is optionally placed in the header of an open window, its icon, and in the menu of closed windows. 3. Command Type: STRING8 Meaning: The command used to start the application. 4. Identification Type: STRING8 Meaning: A string which is useful in distinguishing two instances of the same application. Saved in configuration files and used to associate the right set of window properties with the appropriate instance of an application upon startup. Also optionally appears in the window header and icon. 5. Hostname Type: STRING8 Meaning: Machine on which application is running -- this OUGHT to be available directly from the X server. 2. Dimensions Window managers which control layout, especially those which tile, may make use of constraints on window dimensions. These include the minimum and maximum size of the window body, the desired size (which should be achieved if the space is not needed to satisfy other windows' minimum sizes), and the minimum and maximum aspect ratios. For windows which prefer discrete sizes, a list of reasonable heights and widths may be specified, or a height or width increment may be provided. 1. MinHeight Type: CARD16 Meaning: Minimum height of the window body 2. MinWidth Type: CARD16 Meaning: Minimum width of the window body 3. MaxHeight Type: CARD16 Meaning: Maximum height of the window body 4. MaxWidth Type: CARD16 Meaning: Maximum width of the window body 5. DesiredHeight Type: CARD16 Meaning: Desired height of the window body 6. DesiredWidth Type: CARD16 Meaning: Desired width of the window body 7. ReasonableHeights Type: LISTofCARD16 Meaning: A list of reasonable heights in increasing order. Intermediate heights may be set by the window manager, but will generally be avoided. 8. ReasonableWidths Type: LISTofCARD16 Meaning: A list of reasonable widths in increasing order. Intermediate widths may be set by the window manager, but will generally be avoided. 9. IncrHeight Type: CARD16 Meaning: A multiple of this may be added to MinHeight to get a list of reasonable heights. 10. IncrWidth Type: CARD16 Meaning: A multiple of this may be added to MinWidth to get a list of reasonable widths. 11. MinAspect Type: CARD32 Meaning: Minimum acceptable aspect ratio -- (2^16 * height)/width 12. MaxAspect Type: CARD32 Meaning: Maximum acceptable aspect ratio -- (2^16 * height)/width 3. Icons Icons may be drawn automatically by a window manager. However, we can allow applications to handle the drawing of icons in two ways: - Either the application can provide a list of PIXMAPs (which can be updated by the application if necessary) and an index which is used to select one of the PIXMAPs as the icon contents. - Or, it can draw the icon contents directly into a window -- this can either be the same as the main window or a different window. 1. IconPixmaps Type: LISTofPIXMAP Meaning: A list of PIXMAPs to be used as icon contents. 2. IconPixmapIndex Type: CARD16 Meaning: Used to select the k'th IconPixmap as the icon contents. A value of zero tells the window manager to produce a default icon instead of using one of the PIXMAPs. If there are n IconPixmaps, then a value of i*(n+1) + k, uses the k'th IconPixmap, but highlights it in the i'th way. An i of 1 reverses the icon. Other i's are to be determined. 3. IconWindow Type: WINDOW Meaning: The id of a window in which the contents of the icon will be drawn by the application. If the id of the IconWindow is the same as the window to which it is attached, then the same window will be used for drawing when the window is open and for drawing the contents of the icon. 4. Dialogue Windows Some window managers may wish to manage dialogue windows in connection with the parent window over which it is popped up. 1. DialogueParent Type: WINDOW Meaning: The id of the parent application window of this popup/dialogue window.