Windowing display system

Abstract: To solve the problem of flashing and to obviate the remapping of images in windowing display systems of the type having storage locations for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and which generate a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and allow at least some of the windows to have a private colourmap which can be copied into the storage locations when the corresponding window is activated, a method of generating a private colourmap for a window is disclosed comprising the steps of: overwriting a selected portion of a copy of the shared colourmap with a user-determined colourmap of the same size as the selected portion to form a modified colourmap; and copying the modified colourmap into an area of storage assigned to the private colourmap for the window.

Description: The invention relates to windowing display systems and, more particularly, to the generation of colourmaps therein. Windowing display systems are known of a type having storage locations for storing a colourmap (or colour lookup table) which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which allow at least some of the windows to have a private colourmap which can be copied into the storage locations when the corresponding window is activated. One example of a system of the above type is the X-Windows system (X-Windows is a trademark of the Massachusetts Institute of Technology). A major problem which occurs in this type of system in a graphics workstation which provides storage locations sufficient to store only one hardware colourmap is known as 'flashing'. The system allows each window the flexibility of having its own private colourmap, but the display hardware allows only one colourmap to be installed at any one time. A colourmap corresponding to each window must be copied into the hardware colourmap each time the window is activated, usually when the display cursor is brought into the bounds of the window. If a private colourmap for a window is used the colours of other windows in the system will change when it is activated. This interference between the colours of the windows is very annoying for the user. To avoid 'flashing', ie the colours used in the windows constantly changing as each window becomes active and installs its own colourmap, the system provides a shared colourmap common to all the windows in the system which can be used by any window by copying the shared colourmap into the hardware colourmap when the window is activated. The pixel value to displayed-colour mapping in this shared colourmap is dynamically determined by the system as particular displayed colours are acquired or released by tasks using the system. This shared colourmap arrangement works as long as the windows do not require the colours to be allocated to specific predefined values in the colourmap. However some tasks in such a display system, such as the presentation of images, do require a unique mapping between pixel values and displayed colour. If the shared colourmap is used for this purpose the image must be remapped before display so that the image pixel values correspond with the values assigned to the required colours in the dynamically generated shared colourmap. This remapping can be a relatively time consuming process, often taking of the order of several seconds for a high resolution image. On the other hand, if a private colourmap is used just for the image then the colour of all the other windows on the display will change when the image window is activated. The user of such a display system is thus caught in a cleft stick: if they don't want the colours of other windows to change when the image window is activated, image display is slow because of the remapping. If they want fast image display, they cannot use the shared colourmap and will get 'flashing'. Some systems also provide for a hybrid colourmap which includes a shared area including colours available to all applications using the system and reserved areas for colours used by particular applications. Such systems are described in EP-A-210 423 and WO92/07349. To solve this problem, the present invention provides a method of generating a private colourmap for a window in a display system of the above type, the method being characterised by the steps of: overwriting a selected portion of a copy of the shared colourmap with a user-determined colourmap of the same size as the selected portion to form a modified colourmap; and copying the modified colourmap into an area of storage assigned to the private colourmap for the window. The invention is based on two observations. 1) Usually only a small proportion of the total available colour cells in the shared colourmap are actually used by other tasks using the system. This is because windows use so many colours in common, e.g. for borders, buttons and text etc. 2) The shared colourmap is not filled randomly. Thus at any time there will usually be a substantial and predictable portion of the shared colourmap free. A portion of a copy of the shared colourmap can thus be overwritten with a user-determined colourmap which can be used for image display. The user can range their images in advance to lie in the range of pixel values set by them in this colourmap and will obtain fast image display with no interference with the colours used in other windows. Preferably, the selected portion is the portion of the shared colourmap which would be filled last in generation of the shared colourmap by the system. The portion is thus selected in such a way that it is known that there is unlikely to be any overlap with the pixel values used by other tasks. For example, in a display system in which the shared colourmap is generated by assigning to a newly required colour the nearest available pixel value to one end of a range of pixel values, the selected portion can end at the other end of the range. In systems such as X-Windows which fill the shared colourmap from the bottom in this way, choosing the top portion of the colourmap for the overwrite colourmap ensures that it is very unlikely that the existing window colours and the overwritten colours will overlap. However, even if there is some overlap, only a few colours in the surrounding windows will be affected when the image window is activated. The performance of the system only degrades gradually as the size of the overwritten colourmap increases, since a greater degree of overlap between existing window colours and the overwrite colourmap leads to other windows being changed to a greater extent while the image continues to be displayed correctly. The size of the user-determined colourmap can be a substantial proportion of the size of the shared colourmap, so that it is sufficiently large to be of use in image display, but so that it is still unlikely that the existing window colours and the overwritten colours will overlap. The invention also provides a method of activating a window in windowing display system of the above type comprising generating a private colourmap for the window using such a method and copying the generated private colourmap into the storage locations. In one embodiment of the invention this method is used only on first activation, ie creation, of a window, the same modified colourmap being copied into the storage locations on subsequent activation of the window. Accordingly, the invention provides a method of creating a window in a windowing display system of the above type, the method including activating the window using the above described method and a method of operating such a windowing display system, the method comprising thus creating a window and then copying the generated private colourmap into the storage locations each time the window is subsequently activated. Viewed from another aspect, the invention provides an image processor for use with a windowing display system of the above type, the image processor comprising logic for assigning an area of storage in a storage device to a window in the display system, and characterised by logic for (a) copying the shared colourmap of the display system into the area of storage, (b) overwriting a selected portion of the copy of the shared colourmap with a user-determined colourmap of the same size as the selected portion to form a modified colourmap, and (c) copying the modified colourmap into an area of storage in the display system assigned to a private colourmap for the window. In one embodiment the image processor takes the form of an image display widget designed for use as part of a client program to interface with an X-Windows server program running on a graphics workstation. The invention also provides a windowing display system including such an image processor. An embodiment of the invention will now be described, by way of example only, with reference to the accompanying drawing wherein: Fig. 1 shows a display system according to the invention; Fig. 2 is a schematic diagram showing parts of the system unit in the embodiment of the invention; Fig. 3 shows a view of the display screen in use; Fig. 4 is a flow diagram showing the main steps of the method of the invention; Fig. 5 is a schematic diagram showing a private colourmap generated using the method of the present invention; Fig. 6 is a diagram illustrating a window hierarchy. Referring to Fig. 1 there is shown a windowing display system comprising display device 10, system unit 20, mouse 30 and keyboard 40. A user interacts with the system via windows 50 displayed on the display device 10. System unit 20 includes display adapter 21 in which is stored a hardware colourmap which determines the colours displayed on display device 10 corresponding to particular pixel values supplied to the display adapter by an application running on the system. Fig. 2 is a schematic diagram showing parts of system unit 20. CPU 22 is connected via bus 23 with Random Access Memory (RAM) 24 and display adapter 21. Display adapter 21 includes storage locations 25 for storing the hardware colourmap. RAM 24 has areas 26 and 27 respectively reserved for the shared colourmap and a private colourmap for an application running on the system. The system generates, in a manner well known in the art, shared colourmap 26, which can be used by a number of different applications, by assigning screen colours to pixel values dynamically in response to a request for a particular colour from an application. Figure 3 shows a typical view of the display device screen in use. It shows a window 60 corresponding to one application and other windows 70 corresponding to other applications running on the system. Window 60 includes a number of other windows, image window 80 and control panel window 90 all of which are associated with the same application. Control panel window 90 includes button windows 100, by means of which the user can interact with the application in a manner well known in the art. In this embodiment, the system is set up so that a window is activated whenever the display cursor moves onto an area of the display on which the window is visible. It will be understood that there are many other ways in which activation of a window could be initiated, such as execution of an instruction in an application or by a specific action, like the pressing of a mouse button, performed by a user. Activation, as used herein, means any process which requires a colourmap corresponding to a window to be installed in the hardware colourmap. In the system, when a window associated with an application is activated, the application can either copy a private colourmap corresponding to the window into the hardware colourmap or can elect to use the shared colourmap 26, which is common to all the windows in the system. If the private colourmap is used then when another window in the system is activated, the colours of the window will change as the colour map the newly activated window is using is copied into the hardware colourmap. If the shared colourmap 26 is used, then the application is constrained to make use of the colour value to pixel value mapping therein, which cannot be determined in advance. On creation of an image window, such as window 80, the steps shown in Figure 4 are performed under program control by the CPU 22. The shared colourmap is copied 130 into an area of storage 28 reserved for the task. This copy of the shared colourmap is then overwritten 140 as shown in Figure 5. The lower part of the map 110 includes the pixel values which have been assigned to colours by the system. The upper part 120 of the map is overwritten by a user-determined colourmap for use in displaying image 80. For example, in this embodiment, which uses 1 byte/pixel windows and 256-entry colourmaps, the upper part 120 can stretch from pixel values 128 to 255 and the lower part from pixel values 0 to 127. This modified copy is then copied 150 into the private colourmap 27 and into the hardware colourmap 25 in display adapter 21. It will be understood, of course, that the term user as used herein can include the application using the display system and the programmer of such an application. In this embodiment of the invention the modified private colourmap is only generated when the image window is created, ie when the window is first activated, the same modified private colourmap being copied into the hardware colourmap on subsequent activation of the window. However, it will be understood that the system could equally be arranged to execute all the above steps every time the window is activated or each time the shared colourmap is changed by another task so that the private colourmap is kept up to date. Colour value assignments in the lower part of the hardware colourmap will be common to other applications running on the system which are using the shared colourmap and colours in the upper part of the hardware colourmap will be assigned to pixel values in a predetermined way for use by the application. As is common in windowing display systems, the windows are arranged in a hierarchy as shown in Fig. 6. Image window 80 and control panel window 90 are children of the background window 60. Button windows 100 are children of control panel window 90. Background window 60 itself is a child of the root window, which is the top window in the display system. In this case, a single image processing application controls background window 60 and all its children. The private colourmap is associated with the background window 60 causing it to be used whenever any of the child windows of background window 60 are activated. This ensures that no colours are changed on the screen whenever the cursor moves between windows 60, 80, 90 or 100. If the cursor moves outside of window 60 only the colours of the image window 80 will change. In this embodiment of the invention the method is carried out using an appropriate computer program running on a general purpose graphics workstation. The program takes the form of an image display widget which is part of a graphics software toolkit package designed to interface application programs to such a workstation. In this particular example it is designed for use as part of a client program to interface with the X-Windows server program, which provides all the function necessary to generate the screen image, including management of the windows and the colourmaps, on the display device. An standard X-windows style interface is provided which allows each application to specify a colourmap of any length up to the length of the X-Windows colourmap and also to specify where that colourmap should be placed in the private copy of the X-Windows shared colourmap. Whilst for the purposes of clarity in this embodiment the client program and the server program have been described running on a single graphics workstation, it will be understood that the client program does not necessarily have to run on the same workstation as the X-windows server program. The server program can run on a graphics workstation on which the screen images are actually displayed, whilst the client can run on another computer which is connected to the graphics workstation via an appropriate data communications network. It should further be noted that the invention could be implemented in hardware, for example as a hardware feature of such a workstation, or indeed could be implemented as any combination of hardware and software.

Claims: A method of generating a private colourmap for a window in a windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which can be copied into the storage locations (25) when the corresponding window is activated, the method being characterised by the steps of: overwriting a selected portion (120) of a copy of the shared colourmap with a user-determined colourmap of the same size as the selected portion to form a modified colourmap; and copying the modified colourmap into an area of storage (27) assigned to the private colourmap for the window. A method as claimed in claim 1 in which the selected portion (120) is the portion of the shared colourmap which would be filled last in generation of the shared colourmap by the system. A method as claimed in claim 1 or claim 2 for a display system in which the shared colourmap is generated by assigning to a newly required colour the nearest available pixel value to one end of a range of pixel values, wherein the selected portion (120) ends at the other end of the range. A method as claimed in any preceding claim wherein the size of the user-determined colourmap is a substantial proportion of the size of the shared colourmap. A method of activating a window in windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which can be copied into the storage locations (25) when the corresponding window is activated, the method comprising generating a private colourmap for the window using a method as claimed in any preceding claim and copying the generated private colourmap into the storage locations (25). A method of creating a window in a windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which can be copied into the storage locations (25) when the corresponding window is activated, the method including activating the window using a method as claimed in claim 5. A method of operating a windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which can be copied into the storage locations (25) when the corresponding window is activated, the method comprising creating a window using a method as claimed in claim 6 and copying the generated private colourmap into the storage locations each time the window is subsequently activated. A method of operating a windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which can be copied into the storage locations (25) when the corresponding window is activated, the method comprising generating a private colourmap for at least one window in the system using a method as claimed in any of claims 1 to 4 each time the shared colourmap is changed. An image processor for use with a windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which is copied into the storage locations (25) when the corresponding window is activated in the display system, the image processor comprising logic for assigning an area of storage (28) in a storage device to a window in the display system, and characterised by logic for (a) copying the shared colourmap of the display system into the area of storage (28), (b) overwriting a selected portion (120) of the copy of the shared colourmap with a user-determined colourmap of the same size as the selected portion to form a modified colourmap, and (c) copying the modified colourmap into an area of storage in the display system assigned to a private colourmap for the window (27). A windowing display system of the type having storage locations (25) for storing a colourmap which determines the colours displayed in the system corresponding to particular pixel values, and means for generating a shared colourmap by assigning screen colours to pixel values dynamically as the screen colours are required by tasks using the system, and which system allows at least some of the windows to have a private colourmap which is copied into the storage locations (25) when the corresponding window is activated in the display system, the system including an image processor as claimed in claim 9.

Inventors: GRIFFITHS EDWARD, GRIFFITHS, EDWARD
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1992
Main classification: G09G5
IPC codes: G09G5, G06F3