|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 17693 (0x451d)
Types: TextFile
Names: »V«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
└─⟦0c20f784e⟧ »DATA«
└─⟦1abbe589f⟧
└─⟦059497ac5⟧
└─⟦this⟧
with Xlbt_Arithmetic;
use Xlbt_Arithmetic;
with Xlbt_Basic;
use Xlbt_Basic;
with Xlbt_Color;
use Xlbt_Color;
with Xlbt_String;
use Xlbt_String;
with Xlbt_Visual;
use Xlbt_Visual;
package Xlbp_Color is
------------------------------------------------------------------------------
-- X Library Colors
--
-- Xlbp_Color - Used to work with colors by name.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
-- Copyright 1985 - 1989 by the Massachusetts Institute of Technology
--
-- All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the names of MIT or Rational not be
-- used in advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- MIT and Rational disclaim all warranties with regard to this software,
-- including all implied warranties of merchantability and fitness, in no
-- event shall MIT or Rational be liable for any special, indirect or
-- consequential damages or any damages whatsoever resulting from loss of use,
-- data or profits, whether in an action of contract, negligence or other
-- tortious action, arising out of or in connection with the use or performance
-- of this software.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- X_Color control routines
------------------------------------------------------------------------------
procedure X_Alloc_Color (Display : X_Display;
Colormap : X_Colormap;
Color : in out X_Color;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Color - Specifies or returns the values actually used in the color map.
-- Status - Receives Successful or Failed.
--
-- Allocates a read-only color map entry corresponding to the closest red,
-- green, and blue values supported by the hardware. The pixel value of
-- color closest to the specified RGB elements supported by the hardware and
-- the actual RGB values used are returned in Color.
------------------------------------------------------------------------------
procedure X_Alloc_Color_Cells (Display : X_Display;
Colormap : X_Colormap;
Contiguous : Boolean;
Planes : out X_Plane_Mask_Array;
Pixels : out X_Pixel_Array;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Contiguous - Specifies True if the planes must be contiguous.
-- Planes - Receives an array of planes masks.
-- Pixels - Receives an array of pixel values.
-- Status - Receives Successful or Failed.
--
-- Allocates read/write color cells. The number of planes and or colors
-- can be zero; indicated by passing a null array to either parameter.
------------------------------------------------------------------------------
procedure X_Alloc_Color_Planes (Display : X_Display;
Colormap : X_Colormap;
Contiguous : Boolean;
Pixels : out X_Pixel_Array;
N_Reds : U_Short;
N_Greens : U_Short;
N_Blues : U_Short;
R_Mask : out X_Red_Color_Mask;
G_Mask : out X_Green_Color_Mask;
B_Mask : out X_Blue_Color_Mask;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Contiguous - Specifies True if the planes must be contiguous.
-- Pixels - Receives an array of pixel values.
-- N_Reds - Specifies the number of red colors/shades.
-- N_Greens - Specifies the number of green colors/shades.
-- N_Blues - Specifies the number of blue colors/shades.
-- R_Mask - Receives the red color bit mask.
-- G_Mask - Receives the green color bit mask.
-- B_Mask - Receives the blue color bit mask.
-- Status - Receives Successful or Failed.
--
-- Allocates read/write color resources for Direct_Color visual types.
------------------------------------------------------------------------------
procedure X_Alloc_Named_Color (Display : X_Display;
Colormap : X_Colormap;
Colorname : X_String;
Visual_Color : out X_Color;
Exact_Color : out X_Color;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Colorname - Specifies the color name string (e.g. "red") whose color
-- definition is desired.
-- Visual_Color - Receives the closest RGB value provided by the hardware.
-- Exact_Color - Receives the exact RGB values.
-- Status - Receives Successful or Failed.
--
-- Looks up the named color with respect to the screen that is associated
-- with the specified color map. Both the exact data base definition and
-- the closest color supported by the screen are returned. You should use
-- ISO-Latin-1 encoding and upper/lower case does not matter.
------------------------------------------------------------------------------
procedure X_Free_Colors (Display : X_Display;
Colormap : X_Colormap;
Pixels : X_Pixel_Array;
Planes : X_Plane_Mask);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Pixels - Specifies all of the pixel values to free.
-- Planes - Specifies all of the plane masks to free.
--
-- Frees the cells represented by the Pixels entries. The Planes arguments
-- should not have any bits in common with any of the pixels.
------------------------------------------------------------------------------
procedure X_Lookup_Color (Display : X_Display;
Colormap : X_Colormap;
Colorname : X_String;
Visual_Color : out X_Color;
Exact_Color : out X_Color;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Colorname - Specifies the color name string (e.g. "red") whose color
-- definition is desired.
-- Visual_Color - Receives the closest RGB values provided by the hardware.
-- Exact_Color - Receives the exact RGB values.
-- Status - Receives Successful or Failed.
--
-- Attempts to find the color in the map.
------------------------------------------------------------------------------
procedure X_Parse_Color (Display : X_Display;
Colormap : X_Colormap;
Colorname : X_String;
Color : out X_Color;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Colorname - Specifies the color name string. Upper/lower case characters
-- are acceptable.
-- Color - Receives the exact colors for later use and sets Do_Red,
-- Do_Green, and Do_Blue for later use.
-- Status - Receives Successful or Failed.
--
-- Parses a standard color name and returns the RGB components suitable for
-- allocating or storing in a color map.
------------------------------------------------------------------------------
procedure X_Query_Color (Display : X_Display;
Colormap : X_Colormap;
Color : in out X_Color);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Color - Specifies or receives the RGB values for the pixel specified.
--
-- Queries the RGB values for a specific pixel value.
------------------------------------------------------------------------------
procedure X_Query_Colors (Display : X_Display;
Colormap : X_Colormap;
Colors : in out X_Color_Array);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Colors - Specifies all of the pixel values queried.
--
-- Queries the RGB values for a series pixel values.
------------------------------------------------------------------------------
procedure X_Store_Color (Display : X_Display;
Colormap : X_Colormap;
Color : X_Color);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Color - Specifies the color map entry to change
--
-- Changes a single color map entry. If the color map is an installed map
-- for its screen then the changes are visible immediately.
------------------------------------------------------------------------------
procedure X_Store_Colors (Display : X_Display;
Colormap : X_Colormap;
Colors : X_Color_Array);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Colors - Specifies an array of color definitions to be stored.
--
-- Changes the color map entries of the pixel values specified by the
-- X_Color_Rec entries in the array. If the color map is an installed map
-- for its screen then the changes are visible immediately.
------------------------------------------------------------------------------
procedure X_Store_Named_Color (Display : X_Display;
Colormap : X_Colormap;
Name : X_String;
Pixel : X_Pixel;
Flags : X_Color_Flags);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
-- Name - Specifies the name of the color (e.g. "red").
-- Pixel - Specifies the color map entry to change.
-- Flags - Specifies any combination of Do_Red, Do_Green, and Do_Blue.
--
-- Changes a single color map entry according to any or all of the RGB values
-- for the named color.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- X_Colormap control routines
------------------------------------------------------------------------------
function X_Copy_Colormap_And_Free
(Display : X_Display;
Source_Colormap : X_Colormap) return X_Colormap;
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Source_Colormap - Specifies the ID of the color map to be copied.
--
-- Create a new color map of the same visual type and for the same screen as
-- the Source_Colormap argument and returns the new color map ID.
-- Moves all of the client's existing allocation from the color map to the new
-- color map with their color values intact and their read-only or writable
-- characteristics intact and frees those entries in the old color map. Color
-- values in other entries in the new color map are undefined.
-- If the color map was created with Alloc_All then the new color map is
-- created with Alloc_All and all entries are copied and freed in the old map.
------------------------------------------------------------------------------
function X_Create_Colormap (Display : X_Display;
Window : X_Window;
Visual : X_Visual;
Allocate : X_Colormap_Alloc) return X_Colormap;
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to use.
-- Visual - Specifies the visual type to use.
-- Allocate - Specifies the color map entries to be allocated; Alloc_None or
-- Alloc_All.
--
-- Creates and returns a color map of the specified visual type for the screen
-- on which the specified window resides and associates the color map ID with
-- it. X_Create_Colormap operates on an X_Visual structure whose members
-- contain information about the color mapping that is possible. Note that
-- this does not set the color map for the specified window; Window is used
-- only to determine the correct screen.
------------------------------------------------------------------------------
procedure X_Free_Colormap (Display : X_Display;
Colormap : in out X_Colormap);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap- Specifies the Colormap to free.
--
-- Deletes the association between the color map ID and the color map.
-- However, this function has no effect on the default color map for a screen.
-- If Colormap is an installed map for a screen then it is uninstalled. If
-- Colormap is defined as the color map for a window then the color map for
-- that window is changed to None_X_Colormap. (The colors displayed for a
-- window with a color map of None_X_Colormap are not defined by X.)
------------------------------------------------------------------------------
procedure X_Install_Colormap (Display : X_Display;
Colormap : X_Colormap);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
--
-- Installs the color map as the active color map for the map's associated
-- screen.
------------------------------------------------------------------------------
function X_List_Installed_Colormaps (Display : X_Display;
Win : X_Window) return X_Colormap_List;
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
--
-- Returns the list of all currently installed color maps associated with
-- the screen of the specified window. The order of the list is not
-- significant.
--
-- Remember to free the list with Free_X_Colormap_List after use.
------------------------------------------------------------------------------
procedure X_Set_Window_Colormap (Display : X_Display;
Window : X_Window;
Colormap : X_Colormap);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to use.
-- Colormap - Specifies the new color map.
--
-- Sets the color map for the specified window.
------------------------------------------------------------------------------
procedure X_Uninstall_Colormap (Display : X_Display;
Colormap : X_Colormap);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Colormap - Specifies the color map to use.
--
-- Uninstalls the color map as the active color map for the map's associated
-- screen.
------------------------------------------------------------------------------
end Xlbp_Color;