with Claw.Fonts;
package Claw.Capabilities is
    --
    -- CLAW - Class Library for Ada and Windows.
    --
    -- This package contains queries about canvas objects.
    --
    -- Copyright 1996, 1997  R.R. Software, Inc.
    -- P.O. Box 1512, Madison WI  53701
    -- All rights reserved.
    -- Windows is a registered trademark of Microsoft.
    --

    pragma Elaborate_Body; -- Insure that the body is elaborated before anyone
			   -- can call CLAW.

  type Question_Type is (
    Driver_Version,	-- Device driver version
    Horizontal_Size,	-- Horizontal size in millimeters
    Vertical_Size,	-- Vertical size in millimeters
    Horizontal_Width,	-- Horizontal width in pixels
    Vertical_Width,	-- Vertical width in pixels
    Bits_per_Pixel,	-- Number of bits per pixel
    Planes,		-- Number of planes
    Number_of_Brushes,	-- Number of brushes the device has
    Number_of_Pens,	-- Number of pens the device has
    Number_of_Fonts,	-- Number of fonts the device has
    Number_of_Colors,	-- Number of colors the device supports
    Device_Descriptor_Size,	-- Size required for device descriptor
    Aspect_X,		-- Length of the X leg
    Aspect_Y,		-- Length of the Y leg
    Aspect_XY,		-- Length of the hypotenuse
    Logical_Pixels_X,	-- Logical pixels/inch in X
    Logical_Pixels_Y,	-- Logical pixels/inch in Y
    Color_Resolution,	-- Actual bits/pixel color resolution
			-- If Palette is True in Raster_Capabilities_Type:
    Size_Palette,	--   # of system palette entries
    Number_Reserved,	--   # of reserved system palette entries
    Physical_Width,	-- Physical Width in device units
    Physical_Height,	-- Physical Height in device units
    Physical_Offset_X,	-- Physical Printable Area x margin
    Physical_Offset_Y,	-- Physical Printable Area y margin
    Scaling_Factor_X,	-- Scaling factor x
    Scaling_Factor_Y);	-- Scaling factor y

  for Question_Type use (
    Driver_Version	=>  0,	-- Device driver version
    Horizontal_Size	=>  4,	-- Horizontal size in millimeters
    Vertical_Size	=>  6,	-- Vertical size in millimeters
    Horizontal_Width	=>  8,	-- Horizontal width in pixels
    Vertical_Width	=> 10,	-- Vertical width in pixels
    Bits_per_Pixel	=> 12,	-- Number of bits per pixel
    Planes		=> 14,	-- Number of planes
    Number_of_Brushes	=> 16,	-- Number of brushes the device has
    Number_of_Pens	=> 18,	-- Number of pens the device has
    Number_of_Fonts	=> 22,	-- Number of fonts the device has
    Number_of_Colors	=> 24,	-- Number of colors the device supports
    Device_Descriptor_Size => 26,-- Size required for device descriptor
    Aspect_X		=> 40,	-- Length of the X leg
    Aspect_Y		=> 42,	-- Length of the Y leg
    Aspect_XY		=> 44,	-- Length of the hypotenuse
    Logical_Pixels_X	=> 88,	-- Logical pixels/inch in X
    Logical_Pixels_Y	=> 90,	-- Logical pixels/inch in Y
    Color_Resolution	=>100,	-- Actual bits/pixel color resolution
				-- If Palette is True in Raster_Capabilities_Type:
    Size_Palette	=>104,	--   # of system palette entries
    Number_Reserved	=>106,	--   # of reserved system palette entries
    Physical_Width	=>110,	-- Physical Width in device units
    Physical_Height	=>111,	-- Physical Height in device units
    Physical_Offset_X	=>112,	-- Physical Printable Area x margin
    Physical_Offset_Y	=>113,	-- Physical Printable Area y margin
    Scaling_Factor_X	=>114,	-- Scaling factor x
    Scaling_Factor_Y	=>115);	-- Scaling factor y
  for Question_Type'Size use 32;

  type Technology_Type is (
    Plotter,	    -- Vector plotter
    Raster_Display, -- Raster display
    Raster_Printer, -- Raster printer
    Raster_Camera,  -- Raster camera
    Character_Stream,-- Character-stream, PLP
    Metafile,	    -- Metafile, VDM
    Display_File);  -- Display-file

  for Technology_Type use (
    Plotter		=> 0, -- Vector plotter
    Raster_Display	=> 1, -- Raster display
    Raster_Printer	=> 2, -- Raster printer
    Raster_Camera	=> 3, -- Raster camera
    Character_Stream	=> 4, -- Character-stream, PLP
    Metafile		=> 5, -- Metafile, VDM
    Display_File	=> 6);-- Display-file
  for Technology_Type'Size use 32;

  type Clipping_Capabilities_Type is (
    None,      -- No clipping of output
    Rectangle, -- Output clipped to rects
    Region);   -- Can clip to regions

  for Clipping_Capabilities_Type use (
    None       => 0,  -- No clipping of output
    Rectangle  => 1,  -- can clip to rectangles
    Region     => 2); -- Can clip to regions
  for Clipping_Capabilities_Type'Size use 32;

  type Raster_Capabilities_Type is record
    Bit_Blt      : Boolean;  -- Can do standard BLT.
    Banding_Needed:Boolean;  -- Device requires banding support
    Scaling_Needed:Boolean;  -- Device requires scaling support
    Bitmap64     : Boolean;  -- Device can support >64K bitmap
    Save_Bitmap  : Boolean;  -- Can save/restore bitmap to display
    DI_Bitmap    : Boolean;  -- Supports DIB to memory
    Palette      : Boolean;  -- Supports a palette
    DIB_to_Device: Boolean;  -- Supports DIBits_to_Device
    Big_Font     : Boolean;  -- Supports >64K fonts
    Stretch_Blt  : Boolean;  -- Supports Stretch_Blt
    Flood_Fill   : Boolean;  -- Supports Flood_Fill
    Stretch_DIB  : Boolean;  -- Supports Stretch_DIBits
    OP_DX_Output : Boolean;  -- Supports Dx array of ExtTextOut
    DD_Bitmaps   : Boolean;  -- Supports device dependent bitmaps
    Dummy        : Boolean;  -- Compiler workaround
  end record;

  for Raster_Capabilities_Type use record
    Bit_Blt        at 0 range  0 ..  0;  -- Can do standard BLT.
    Banding_Needed at 0 range  1 ..  1;  -- Device requires banding support
    Scaling_Needed at 0 range  2 ..  2;  -- Device requires scaling support
    Bitmap64       at 0 range  3 ..  3;  -- Device can support >64K bitmap
    Save_Bitmap    at 0 range  6 ..  6;  -- Can save/restore bitmap to display
    DI_Bitmap      at 0 range  7 ..  7;  -- Supports DIB to memory
    Palette        at 0 range  8 ..  8;  -- Supports a palette
    DIB_to_Device  at 0 range  9 ..  9;  -- Supports DIBits_To_Device
    Big_Font       at 0 range 10 .. 10;  -- Supports >64K fonts
    Stretch_Blt	   at 0 range 11 .. 11;  -- Supports StretchBlt
    Flood_Fill     at 0 range 12 .. 12;  -- Supports Flood_Fill
    Stretch_DIB    at 0 range 13 .. 13;  -- Supports StretchDIBits
    OP_DX_Output   at 0 range 14 .. 14;  -- Supports Dx array of ExtTextOut
    DD_Bitmaps     at 0 range 15 .. 15;  -- Supports device dependent bitmaps
    Dummy          at 0 range 31 .. 31;  -- Compiler workaround
  end record;
  for Raster_Capabilities_Type'Size use 32;

  type Curve_Capabilities_Type is record
    Circles    : Boolean;  -- Can do circles
    Pie        : Boolean;  -- Can do pie wedges
    Chord      : Boolean;  -- Can do chord arcs
    Ellipses   : Boolean;  -- Can do ellipese
    Wide       : Boolean;  -- Can do wide lines
    Styled     : Boolean;  -- Can do styled lines
    Wide_Styled: Boolean;  -- Can do wide styled lines
    Interiors  : Boolean;  -- Can do interiors
    Round_Rect : Boolean;  -- Can do rounded rectangles
    Dummy      : Boolean;  -- Compiler workaround
  end record;

  for Curve_Capabilities_Type use record
    Circles     at 0 range  0 ..  0;  -- Can do circles
    Pie         at 0 range  1 ..  1;  -- Can do pie wedges
    Chord       at 0 range  2 ..  2;  -- Can do chord arcs
    Ellipses    at 0 range  3 ..  3;  -- Can do ellipese
    Wide        at 0 range  4 ..  4;  -- Can do wide lines
    Styled      at 0 range  5 ..  5;  -- Can do styled lines
    Wide_Styled at 0 range  6 ..  6;  -- Can do wide styled lines
    Interiors   at 0 range  7 ..  7;  -- Can do interiors
    Round_Rect  at 0 range  8 ..  8;  -- Can do rounded rectangles
    Dummy       at 0 range 31 .. 31;  -- compiler workaround
  end record;
  for Curve_Capabilities_Type'Size use 32;

  type Line_Capabilities_Type is record
    Poly_Line   : Boolean;  -- Can do polylines
    Marker      : Boolean;  -- Can do markers
    Poly_Marker : Boolean;  -- Can do polymarkers
    Wide        : Boolean;  -- Can do wide lines
    Styled      : Boolean;  -- Can do styled lines
    Wide_Styled : Boolean;  -- Can do wide styled lines
    Interiors   : Boolean;  -- Can do interiors
    Dummy       : Boolean;  -- compiler workaround
  end record;

  for Line_Capabilities_Type use record
    Poly_Line   at 0 range  1 ..  1;  -- Can do polylines
    Marker      at 0 range  2 ..  2;  -- Can do markers
    Poly_Marker at 0 range  3 ..  3;  -- Can do polymarkers
    Wide        at 0 range  4 ..  4;  -- Can do wide lines
    Styled      at 0 range  5 ..  5;  -- Can do styled lines
    Wide_Styled at 0 range  6 ..  6;  -- Can do wide styled lines
    Interiors   at 0 range  7 ..  7;  -- Can do interiors
    Dummy       at 0 range 31 .. 31;  -- compiler workaround
  end record;
  for Line_Capabilities_Type'size use 32;

  type Polygonal_Capabilities_Type is record
    Polygon     : Boolean;  -- Can do polygons
    Rectangle   : Boolean;  -- Can do rectangles
    Winding_Polygon : Boolean;  -- Can do winding polygons
    Scanline    : Boolean;  -- Can do scanlines
    Wide        : Boolean;  -- Can do wide borders
    Styled      : Boolean;  -- Can do styled borders
    Wide_Styled : Boolean;  -- Can do wide styled borders
    Interiors   : Boolean;  -- Can do interiors
    Dummy       : Boolean;  -- compiler workaround
  end record;

  for Polygonal_Capabilities_Type use record
    Polygon     at 0 range  0 ..  0;  -- Can do polygons
    Rectangle   at 0 range  1 ..  1;  -- Can do rectangles
    Winding_Polygon at 0 range  2 ..  2;  -- Can do winding polygons
    Scanline    at 0 range  3 ..  3;  -- Can do scanlines
    Wide        at 0 range  4 ..  4;  -- Can do wide borders
    Styled      at 0 range  5 ..  5;  -- Can do styled borders
    Wide_Styled at 0 range  6 ..  6;  -- Can do wide styled borders
    Interiors   at 0 range  7 ..  7;  -- Can do interiors
    Dummy       at 0 range 31 .. 31;  -- compiler workaround
  end record;
  for Polygonal_Capabilities_Type'Size use 32;

  type Text_Capabilities_Type is record
    OP_CHARACTER : Boolean;  -- can do character output precision
    OP_STROKE    : Boolean;  -- Can do stroke output precision
    CP_STROKE    : Boolean;  -- Can do stroke clip precision
    CR_90        : Boolean;  -- Can do 90 degree rotation
    CR_ANY       : Boolean;  -- Can do an character rotation
    SF_X_YINDEP  : Boolean;  -- Can scale x,y independently
    SA_DOUBLE    : Boolean;  -- Can do doubled characters
    SA_INTEGER   : Boolean;  -- Can do integer multiples for characters
    SA_CONTIN    : Boolean;  -- Can do any scaling for characters
    EA_DOUBLE    : Boolean;  -- Can do double weight characters
    IA_ABLE      : Boolean;  -- Can italicize
    UA_ABLE      : Boolean;  -- Can underline
    SO_ABLE      : Boolean;  -- Can draw strikeouts
    RA_ABLE      : Boolean;  -- Can do raster fonts
    VA_ABLE      : Boolean;  -- Can do vector fonts
    RESERVED     : Boolean := false;
    SCROLLBLT    : Boolean;  -- cannot scroll using bitblt ???
    Dummy        : Boolean;  -- compiler workaround
  end record;

  for Text_Capabilities_Type use record
    OP_CHARACTER at 0 range  0 ..  0;  -- can do character output precision
    OP_STROKE    at 0 range  1 ..  1;  -- Can do stroke output precision
    CP_STROKE    at 0 range  2 ..  2;  -- Can do stroke clip precision
    CR_90        at 0 range  3 ..  3;  -- Can do 90 degree rotation
    CR_ANY       at 0 range  4 ..  4;  -- Can do an character rotation
    SF_X_YINDEP  at 0 range  5 ..  5;  -- Can scale x,y independently
    SA_DOUBLE    at 0 range  6 ..  6;  -- Can do doubled characters
    SA_INTEGER   at 0 range  7 ..  7;  -- Can do integer multiples for characters
    SA_CONTIN    at 0 range  8 ..  8;  -- Can do any scaling for characters
    EA_DOUBLE    at 0 range  9 ..  9;  -- Can do double weight characters
    IA_ABLE      at 0 range 10 .. 10;  -- Can italicize
    UA_ABLE      at 0 range 11 .. 11;  -- Can underline
    SO_ABLE      at 0 range 12 .. 12;  -- Can draw strikeouts
    RA_ABLE      at 0 range 13 .. 13;  -- Can do raster fonts
    VA_ABLE      at 0 range 14 .. 14;  -- Can do vector fonts
    RESERVED     at 0 range 15 .. 15;
    SCROLLBLT    at 0 range 16 .. 16;  -- cannot scroll using bitblt ???
    Dummy        at 0 range 31 .. 31;  -- compiler workaround
  end record;
  for Text_Capabilities_Type'Size use 32;

    function Numeric_Capabilities (Easel : in Claw.Root_Canvas_Type'Class;
                                   Question: in Question_Type) return Claw.int;
	-- Return the Question capability value for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Technology (Easel : in Claw.Root_Canvas_Type'Class)
       return Technology_Type;
	-- Return the device classification information for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Clipping_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
	return Clipping_Capabilities_Type;
	-- Return the clipping capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Raster_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
        return Raster_Capabilities_Type;
	-- Return the raster capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Curve_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
        return Curve_Capabilities_Type;
	-- Return the curve capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Line_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
        return Line_Capabilities_Type;
	-- Return the line capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Polygonal_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
        return Polygonal_Capabilities_Type;
	-- Return the polygonal capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    function Text_Capabilities (Easel : in Claw.Root_Canvas_Type'Class)
        return Text_Capabilities_Type;
	-- Return the text capabilities for Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.

    type Text_Metrics_Type is record
       Height             : Claw.Int;
       Ascent             : Claw.Int;
       Descent            : Claw.Int;
       Internal_Leading   : Claw.Int;
       External_Leading   : Claw.Int;
       Ave_Char_Width     : Claw.Int;
       Max_Char_Width     : Claw.Int;
       Weight             : Claw.Int;
       Overhang           : Claw.Int;
       Digitized_Aspect_X : Claw.Int;
       Digitized_Aspect_Y : Claw.Int;
       First_Char         : Claw.Byte;
       Last_Char          : Claw.Byte;
       Default_Char       : Claw.Byte;
       Break_Char         : Claw.Byte;
       Italic             : Claw.Byte;
       Underlined         : Claw.Byte;
       Struckout          : Claw.Byte;
       Pitch_and_Family   : Claw.Byte;
       Charset            : Claw.Byte;
    end record;
    -- pragma Convention(C, Text_Metrics_Type);

    procedure Get_Text_Metrics (Easel : in Claw.Root_Canvas_Type'Class;
				Metrics : out Text_Metrics_Type);
	-- Set Metrics to the text metrics for the currently selected font in
	-- Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.
	--	Windows_Error if Windows detects an error.

    function Get_Text_Extent (Easel : in Claw.Root_Canvas_Type'Class;
                              Text  : in String) return Size_Type;
	-- Return a Size representing the size of the Text string when it
	-- it drawn on Easel.
	-- Raises:
	--	Not_Valid_Error if Easel is not valid.
	--	Windows_Error if Windows detects an error.

    -- Get_System_Metrics queries.
    type System_Metrics_Type is (
	Screen_Width,		-- Screen width in pixels.
	Screen_Height,		-- Screen height in pixels.
	Vertical_Scrollbar_Width,--Width of a vertical scrollbar in pixels.
	Horizontal_Scrollbar_Height,--Height of a horizontal scrollbar in pixels.
	Caption_Height,		-- Height of a caption in pixels.
	Border_Width,		-- Width of a window border in pixels.
	Border_Height,		-- Height of a window border in pixels.
	Fixed_Frame_Width,	-- Width of a fixed window frame in pixels.
        Fixed_Frame_Height,	-- Height of a fixed window frame in pixels.
	Vertical_Thumb_Height,	-- Height of the thumb box in a vertical scrollbar in pixels.
	Horizontal_Thumb_Width,	-- Width of the thumb box in a horitzontal scrollbar in pixels.
	Icon_Width,		-- Default width of an icon in pixels.
	Icon_Height,		-- Default height of an icon in pixels.
	Cursor_Width,		-- Width of an cursor in pixels.
	Cursor_Height,		-- Height of an cursor in pixels.
	Menu_Height,		-- Height of a menu bar in pixels.
	Full_Screen_Width,	-- Width of the client area of a full screen window, in pixels.
	Full_Screen_Height,	-- Height of the client area of a full screen window, in pixels.
	Kanji_Window_Height,	-- Height of the kanji window (if available) in pixels.
	Mouse_Present,		-- Zero if no mouse, nonzero otherwise.
	Vertical_Arrow_Height,	-- Height of the arrow on a vertical scrollbar in pixels.
	Horizontal_Arrow_Width,	-- Width of the arrow on a horizontal scrollbar in pixels.
	Debug_Version,		-- Nonzero if the debugging version of Windows is installed, zero otherwise.
	Swap_Mouse_Buttons,	-- Nonzero if the meanings of the mouse buttons are swapped, zero otherwise.
	Minimum_Width,		-- Minimum width of a window in pixels.
	Minimum_Height,		-- Minimum height of a window in pixels.
	Resize_Button_Width,	-- Width of the sizing button in a window's caption in pixels.
	Resize_Button_Height,	-- Height of the sizing button in a window's caption in pixels.
        Sizable_Frame_Width,	-- Width of the frame of a resizable window, in pixels.
        Sizable_Frame_Height,	-- Height of the frame of a resizable window, in pixels.
	Minimum_Tracking_Width,	-- Minimum width of a window when dragging its frame, in pixels.
	Minimum_Tracking_Height,-- Minimum height of a window when dragging its frame, in pixels.
	Double_Click_Width,	-- Width of a double click (the second click must be at least this close to the first).
	Double_Click_Height,	-- Height of a double click (the second click must be at least this close to the first).
	Icon_Spacing_Width,	-- Width of icon spacing in pixels.
	Icon_Spacing_Height,	-- Height of icon spacing in pixels.
	Menu_Drop_Alignment,	-- Nonzero if drop down menus are right aligned, zero otherwise.
	Pen_Windows,		-- Nonzero if pen extensions are installed, zero otherwise.
	DBCS_Enabled,		-- Nonzero if a double byte character set Windows is installed, zero otherwise.
	Mouse_Buttons,		-- Number of mouse buttons, zero if no mouse.
		-- Items below here are supported only in Windows 4.x:
	Security_Present,	-- Nonzero if security is present.
	Edge_Width,		-- Width of a 3D window border in pixels.
	Edge_Height,		-- Height of a 3D window border in pixels.
	Minimized_Spacing_Width,-- Width of grid cell for minimized windows.
	Minimized_Spacing_Height,-- Height of grid for minimized windows.
	Small_Icon_Width,	-- Width of small icon.
	Small_ICon_Height,	-- Height of small icon.
	Small_Caption_Height,	-- Height of a small caption.
	Small_Caption_Button_Width, -- Width of a small caption button.
	Small_Caption_Button_Height, -- Height of a small caption button.
	Menu_Button_Width,	-- Width of a menu bar button.
        Menu_Button_Height,	-- Height of a menu bar button.
	Window_Arrangement,	-- How minimized windows are arranged.
	Minimized_Window_Width,	-- Width of a normal minimized window.
	Minimized_Window_Height,-- Height of a normal minimized window.
	Maximum_Tracking_Width,	-- Maximum width of a window when dragging its frame, in pixels.
	Maximum_Tracking_Height,-- Maximum height of a window when dragging its frame, in pixels.
	Maximized_Window_Width,	-- Width of a maximized window.
	Maximized_Window_Height,-- Height of a maximized window.
	Network_Present,	-- Bit 0 is set is a network is present.
	Clean_Boot,		-- Boot type: 0 - Normal boot; 1 - Fail-safe boot;
				--	      2 - Fail-safe boot with network.
	Minimum_Drag_Width,	-- Minimum distance the mouse has to move before a drag starts.
	Minimum_Drag_Height,	-- Minimum distance the mouse has to move before a drag starts.
	Show_Sounds,		-- Nonzero if the application should provide visual feedback
				-- in cases where only a sound would normally be produced.
	Menu_Checkmark_Width,	-- Width of a menu checkmark.
	Menu_Checkmark_Height,	-- Height of a menu checkmark.
	Slow_Machine,		-- Nonzero if this is a slow machine.
	Mideastern_Languages_Enabled); -- Nonzero if Hebrew/Arabic languages are enabled.

    for System_Metrics_Type use (
	Screen_Width	=> 0,
	Screen_Height	=> 1,
	Vertical_Scrollbar_Width => 2,
	Horizontal_Scrollbar_Height => 3,
	Caption_Height	=> 4,
	Border_Width	=> 5,
	Border_Height	=> 6,
	Fixed_Frame_Width => 7, -- Width of a fixed, nonresizable frame in pixels.
        Fixed_Frame_Height => 8, -- Height of a fixed, nonresizable frame in pixels.
	Vertical_Thumb_Height => 9,
	Horizontal_Thumb_Width => 10,
	Icon_Width	=> 11,
	Icon_Height	=> 12,
	Cursor_Width	=> 13,
	Cursor_Height	=> 14,
	Menu_Height	=> 15,
	Full_Screen_Width => 16,
	Full_Screen_Height => 17,
	Kanji_Window_Height => 18,
	Mouse_Present	=> 19,
	Vertical_Arrow_Height => 20,
	Horizontal_Arrow_Width => 21,
	Debug_Version => 22,
	Swap_Mouse_Buttons => 23,
	Minimum_Width	=> 28,
	Minimum_Height	=> 29,
	Resize_Button_Width => 30,
	Resize_Button_Height => 31,
	Sizable_Frame_Width	=> 32,
        Sizable_Frame_Height	=> 33,
	Minimum_Tracking_Width => 34,
	Minimum_Tracking_Height => 35,
	Double_Click_Width => 36,
	Double_Click_Height => 37,
	Icon_Spacing_Width => 38,
	Icon_Spacing_Height => 39,
	Menu_Drop_Alignment => 40,
	Pen_Windows	=> 41,
	DBCS_Enabled	=> 42,
	Mouse_Buttons	=> 43,
	Security_Present => 44,
	Edge_Width	=> 45,
	Edge_Height	=> 46,
	Minimized_Spacing_Width => 47,
	Minimized_Spacing_Height => 48,
	Small_Icon_Width => 49,
	Small_Icon_Height => 50,
	Small_Caption_Height => 51,
	Small_Caption_Button_Width => 52,
	Small_Caption_Button_Height => 53,
	Menu_Button_Width => 54,
        Menu_Button_Height => 55,
        Window_Arrangement => 56,
	Minimized_Window_Width => 57,
	Minimized_Window_Height => 58,
	Maximum_Tracking_Width => 59,
	Maximum_Tracking_Height => 60,
	Maximized_Window_Width => 61,
	Maximized_Window_Height => 62,
	Network_Present	=> 63,
	Clean_Boot	=> 67,
	Minimum_Drag_Width => 68,
	Minimum_Drag_Height => 69,
	Show_Sounds	=> 70,
	Menu_Checkmark_Width => 71,
	Menu_Checkmark_Height => 72,
	Slow_Machine	=> 73,
	Mideastern_Languages_Enabled => 74);

    for System_Metrics_Type'Size use 32;


    function Get_System_Metrics (Query : System_Metrics_Type) return Int;
        -- Get the specific system metric specified by Query.  System
	-- metrics are the sizes of various items that Windows displays.

    type How_Set_System_Parameters_Type is
	(Local_Only, Update_Configuration, Global_Change, Update_and_Global_Change);
	-- If Update_Configuration is used, the change is written into the
	-- appropriate .INI file (otherwise the change affects just this
	-- session); if Global_Change is used, the change is broadcast to all
	-- top-level windows.  Update_and_Global_Change does both.

    type Boolean_System_Parameters_Type is
	(Plus_Extension_Installed,
	 Warning_Beeper,
	 Screen_Saver_Active,
	 Icon_Titles_Wrap,
	 Popup_Menus_Left_Aligned,
	 Drag_Full_Windows, -- Only supported on Windows 4.x, and only when Plus is installed.
	 Keyboard_Preference, -- Only supported on Windows 4.x; user prefers Keyboard to Mouse.
	 Screen_Reader_Active, -- Only supported on Windows 4.x; user has screen reader software installed (for blind users).
	 Font_Smoothing_Active, -- Only supported on Windows 4.x, and only when Plus is installed.
	 Mouse_Button_Swap, -- False resets to normal.
	 Show_Sounds, -- use Get_System_Metrics to read.
	 Pen_Windows_Active, -- Only supported on Windows 4.x
	 Low_Power_Active,-- Only supported on Windows 4.x (screen saving mode)
	 Power_Off_Active);-- Only supported on Windows 4.x (screen saving mode)

    subtype Readable_Boolean_System_Parameters_Type is
	Boolean_System_Parameters_Type range Plus_Extension_Installed .. Font_Smoothing_Active;
    subtype Writable_Boolean_System_Parameters_Type is
	Boolean_System_Parameters_Type range Warning_Beeper .. Power_Off_Active;

    type Integer_System_Parameters_Type is
	(Border_Sizing_Factor,
	 Keyboard_Repeat_Speed,
	 Keyboard_Delay,
	 Screen_Saver_Timeout,    -- in Seconds
	 Sizing_Grid_Granularity,
	 Mouse_Trails,		  -- Windows 4.x only; 0 or 1 disables, more is length of trail.
	 Icon_Horizontal_Spacing, -- in Pixels
	 Icon_Vertical_Spacing,   -- in Pixels
	 Double_Click_Width,      -- in Pixels
	 Double_Click_Height,     -- in Pixels
	 Double_Click_Timeout,    -- in Milliseconds
	 Drag_Height,		  -- in Pixels, Windows 4.x only.  use Get_System_Metrics to read.
	 Drag_Width,	          -- in Pixels, Windows 4.x only.  use Get_System_Metrics to read.
	 Low_Power_Timeout,	  -- in Seconds, Windows 4.x only.
	 Power_Off_Timeout);	  -- in Seconds, Windows 4.x only.

    subtype Readable_Integer_System_Parameters_Type is
	Integer_System_Parameters_Type range Border_Sizing_Factor .. Mouse_Trails;
    subtype Writable_Integer_System_Parameters_Type is
	Integer_System_Parameters_Type range Border_Sizing_Factor .. Power_Off_Timeout;


    function Get_System_Parameters (What : in Readable_Boolean_System_Parameters_Type)
		return Boolean;
	-- Return the value indicated by What.
	-- Raises Windows_Error if an error occurs.

    function Get_System_Parameters (What : in Readable_Integer_System_Parameters_Type)
		return Int;
	-- Return the value indicated by What.
	-- Raises Windows_Error if an error occurs.

    procedure Set_System_Parameters (What  : in Writable_Boolean_System_Parameters_Type;
				     Value : in Boolean;
				     How   : in How_Set_System_Parameters_Type);
	-- Set the value indicated by What.  How determines what the set affects.
	-- Raises Windows_Error if an error occurs.

    procedure Set_System_Parameters (What  : in Writable_Integer_System_Parameters_Type;
				     Value : in Int;
				     How   : in How_Set_System_Parameters_Type);
	-- Set the value indicated by What.  How determines what the set affects.
	-- Raises Windows_Error if an error occurs.

    function Get_Work_Area return Rectangle_Type;
	-- Return the work area.  Usage Note: Claw_Rectangles.Workspace_Area
	-- returns this value on all systems.
	-- Raises Windows_Error if an error occurs (including calling this
	-- on Windows 3.x).

    procedure Set_Work_Area (To : in Rectangle_Type;
			     How   : in How_Set_System_Parameters_Type);
	-- Set the work area to To.
	-- Raises Windows_Error if an error occurs.

    type System_Fonts_Type is (Icon_Title, Caption, Small_Caption,
		Menu, Status, Message_Box);

    function Get_System_Font (What : in System_Fonts_Type) return Claw.Fonts.Logical_Font_Type;
	-- Return the font information indicated by What.
	-- Raises:
	--	Windows_Error if an error occurs.
	--	Not_Supported error if running on Window 3.x and What /= Icon_Title.

    procedure Set_System_Font (What  : in System_Fonts_Type;
			       To    : in Claw.Fonts.Logical_Font_Type;
			       How   : in How_Set_System_Parameters_Type);
	-- Set the value indicated by What.  How determines what the set affects.
	-- Raises:
	--	Windows_Error if an error occurs.
	--	Not_Supported error if running on Window 3.x and What /= Icon_Title.


end Claw.Capabilities;