Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gpr_intro(A) — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Introduction to GPR          Introduction to GPR           Introduction to GPR


     Each GPR man page contains:

        ⊕  An abstract of the routine's function

        ⊕  The order of the routine parameters

        ⊕  A brief description of each parameter

        ⊕  A description of the routine's function and use

     If the parameter can be declared using a predefined data type, the
     description contains the phrase "in XXX format", where XXX is the prede-
     fined data type.  Pascal and C programmers, look for this phrase to
     determine how to declare a parameter.

     FORTRAN programmers, look for the phrase that describes the data type in
     atomic terms, such as "This parameter is a 2-byte integer."

     For a complete list of GPR calls, refer to the Standard Graphics Call
     Reference: GPR and CTM.

     A complete description of each GPR data type is given below.  We've
     listed all the GPR data types in alphabetical order.  If you are writing
     GPR programs in Pascal, then all GPR data types are predefined in the
     /sys/ins/gpr.ins.pas file.  If you are writing GPR programs in C, then
     most of the GPR data types are predefined in the
     /usr/apollo/include/gpr.h file.  However, the GPR set data types are not
     predefined; C GPR programmers must learn to simulate these data types.
     If you are writing GPR programs in FORTRAN, then none of the GPR data
     types are predefined; you must learn how to simulate all GPR data types.

     The individual descriptions of each GPR data type explain how to simulate
     the type in FORTRAN (or C if necessary).  In addition, you may find the
     following general notes to be useful.

     _________________________________________________________________
     Simulating Data Types

     Pascal and C both support enumerated variables, but FORTRAN does not.
     However, the DOMAIN system stores enumerated Pascal variables and short
     enum C variables the same way it stores FORTRAN INTEGER*2 variables.
     Therefore, we've simulated enumerated constants in the
     /sys/ins/gpr.ins.ftn insert file by defining INTEGER*2 parameters.

     If a GPR call requires an enumerated variable, you should declare the
     variable in your FORTRAN program as an INTEGER*2.  To set the variable's
     value, you merely specify one of the listed choices and the compiler will
     convert it to the necessary internal representation.

     For example, to simulate a gpr_$display_mode_t variable, you can make the
     following declaration:

          INTEGER*2  my_display_mode_variable

     You can set this variable to any one of the listed choices; for example:

          my_display_mode_variable = gpr_$borrow

     Pascal supports set variables, but C and FORTRAN do not.  However, C and
     FORTRAN programmers can simulate Pascal set variables.  If the base type
     of the Pascal set contains 16 or fewer members, you can simulate the set
     by declaring a 2-byte integer.  If the base type of the set contains
     17-32 members, you can simulate the set by declaring a 4-byte integer.
     If the base type of the set contains more than 32 members, then you must
     use the special set emulation functions to simulate the set.  The
     descriptions in this chapter will tell you which simulation method is
     appropriate for a specific data type.  For full details on set simula-
     tion, see the Programming With General Systems Calls manual.

     Pascal supports record types which are identical to C's structure types.
     However, FORTRAN does not support such a structure.  Nevertheless, you
     can usually use a FORTRAN array variable to simulate a Pascal record/C
     structure variable.  Nearly all GPR record types can be simulated in FOR-
     TRAN by declaring an array of INTEGER*2.  For example, consider our
     description of the gpr_$triangle_t record type:

     _________________________________________________________________________
     |Name of Field | Data type of Field in Pascal/C | Element # in FTN array |
     |______________|________________________________|________________________|
     |p1            | gpr_$position_t                | 1 and 2                |
     |p2            | gpr_$position_t                | 3 and 4                |
     |p3            | gpr_$position_t                | 5 and 6                |
     |winding       | integer16/short int            | 7                      |
     |______________|________________________________|________________________|

          Field Description:

          p1.x_coord
               The x-coordinate of point 1.

          p1.y_coord
               The y-coordinate of point 1.

          p2.x_coord
               The x-coordinate of point 2.

          p2.y_coord
               The y-coordinate of point 2.

          p3.x_coord
               The x-coordinate of point 3.

          p3.y_coord
               The y-coordinate of point 3.

          winding
               The winding number.

     FORTRAN programmers can simulate this type by declaring a variable as a
     7-element array of INTEGER*2's.  After declaring this variable, you can
     then access the x_coord field of p1 by accessing array element 1 and the
     y_coord field of p1 through array element 2.

     Both Pascal and C support pointer types, but standard FORTRAN does not.
     However, you can emulate a pointer variable in Domain FORTRAN by declar-
     ing an INTEGER*4 variable and then writing addresses into it with the
     IADDR function.  (See the Domain FORTRAN Language Reference) manual for
     details.

     _________________________________________________________________
     Constants


 _____________________________________________________________________________________
 |          Mnemonic           |   Value   |               Explanation                |
 |_____________________________|___________|__________________________________________|
 |gpr_$background              | -2        | Pixel value for window background.       |
 |gpr_$black                   | 0         | Color value for black.                   |
 |gpr_$blue                    | 16#0000FF | Color value for blue.                    |
 |gpr_$bmf_major_version       | 1         | Major identifier for a bitmap file.      |
 |gpr_$bmf_minor_version       | 1         | Minor identifier for a bitmap file.      |
 |gpr_$cyan                    | 16#00FFFF | Color value for cyan (blue + green).     |
 |gpr_$default_list_size       | 10        | Default number of elements in            |
 |                             |           | certain arrays.                          |
 |gpr_$green                   | 16#00FF00 | Color value for green.                   |
 |gpr_$highest_plane           | 7         | Max. plane number in a bitmap.           |
 |gpr_$highest_rgb_plane       | 31        | Max. plane number in a true-color        |
 |                             |           | bitmap.                                  |
 |gpr_$magenta                 | 16#FF00FF | Color value for magenta (red + blue).    |
 |gpr_$max_bmf_group           | 0         | Max. number of groups in an external     |
 |                             |           | bitmap.                                  |
 |gpr_$max_x_size              | 8192      | Max. bits in bitmap x dimension.         |
 |gpr_$max_y_size              | 8192      | Max. bits in bitmap y dimension.         |
 |gpr_$nil_attribute_desc      | 0         | Descriptor of nonexistent attributes.    |
 |gpr_$nil_bitmap_desc         | 0         | Descriptor of a nonexistent bitmap.      |
 |gpr_$red                     | 16#FF0000 | Color value for red.                     |
 |gpr_$rop_zeros               | 0         |                                          |
 |gpr_$rop_src_and_dst         | 1         |                                          |
 |gpr_$rop_src_and_not_dst     | 2         |                                          |
 |gpr_$rop_src                 | 3         |                                          |
 |gpr_$rop_not_src_and_dst     | 4         |                                          |
 |gpr_$rop_dst                 | 5         |                                          |
 |gpr_$rop_src_xor_dst         | 6         |                                          |
 |gpr_$rop_src_or_dst          | 7         |                                          |
 |gpr_$rop_not_src_and_not_dst | 8         |                                          |
 |gpr_$rop_src_equiv_ds        | 9         |                                          |
 |gpr_$rop_not_dst             | 10        |                                          |
 |gpr_$rop_src_or_not_dst      | 11        |                                          |
 |gpr_$rop_not_src             | 12        |                                          |
 |gpr_$rop_not_src_or_dst      | 13        |                                          |
 |gpr_$rop_not_src_or_not_ds   | 14        |                                          |
 |gpr_$rop_ones                | 15        |                                          |
 |gpr_$string_size             | 256       | Number of chars in a gpr string.         |
 |gpr_$transparent             | -1        | Pixel value for transparent (no change). |
 |gpr_$white                   | 16#FFFFFF | Color value for white.                   |
 |gpr_$yellow                  | 16#FFFF00 | Color value for yellow (red + green).    |
 |_____________________________|___________|__________________________________________|

     _________________________________________________________________
     Data Types



     gpr_$16bit_character_array_t
          This is a predefined array of unsigned 16-bit integers.  It is used
          by gpr_$text16, gpr_$inq_text16_extent, and gpr_$inq_text16_offset
          to specify an array of 16-bit characters.

     gpr_$accelerator_type_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type holds a unique number
          corresponding to the graphics accelerator processor type.  In Pas-
          cal, FORTRAN, or C, gpr_$accelerator_type_t must be equal to one of
          the following predefined values:

          gpr_$accel_none
               None or not applicable.

          gpr_$accel_1
               3DGA.

     gpr_$access_allocation_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This parameter holds the legal
          pixel cell size, in bits, which is available to a program making
          direct read or write access to the refresh buffer.  In Pascal, FOR-
          TRAN, or C, gpr_$access_allocation_t must be equal to one of the
          following predefined values:

          gpr_$alloc_1
               One bit per pixel cell.

          gpr_$alloc_2
               Two bits per pixel cell.

          gpr_$alloc_4
               Four bits per pixel cell.

          gpr_$alloc_8
               One byte per pixel cell.

          gpr_$alloc_16
               Two bytes per pixel cell.

          gpr_$alloc_32
               Four bytes per pixel cell.

     gpr_$access_mode_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type defines the method of
          accessing an external bitmap.  In Pascal, FORTRAN, or C,
          gpr_$access_mode_t must be equal to one of the following predefined
          values:

          gpr_$create
               Create a file on disk.

          gpr_$update
               Update a file on disk.

          gpr_$write
               Write to a file on disk.

          gpr_$readonly
               Read a file on disk.

     gpr_$access_set_t
          This is a predefined set of gpr_$access_allocation_t type in Pascal.
          C and FORTRAN do not support set types, but you can simulate this
          type by declaring a short int variable in C or an INTEGER*2 variable
          in FORTRAN.  This set has 6 members.  This parameter gives the pos-
          sible legal pixel cell sizes, in bits, which are available to a pro-
          gram making direct read or write access to the refresh buffer.
          Currently, the only supported pixel cell size is one bit.  This
          means that the refresh buffers can only be accessed by plane.  In
          the future, other pixel cell sizes may be supported.

     gpr_$arc_direction_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the direction
          to draw an arc.  In Pascal, FORTRAN, or C, gpr_$arc_direction_t must
          be equal to one of the following predefined values:

          gpr_$arc_ccw
               Draw arc counter-clockwise.

          gpr_$arc_cw
               Draw arc clockwise.

     gpr_$arc_option_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the action to
          take when the end points of the arc are coincident.  In Pascal, FOR-
          TRAN, or C, gpr_$arc_option_t must be equal to one of the following
          predefined values:

          gpr_$arc_draw_none
               Draw nothing.

          gpr_$arc_draw_full
               Draw a full circle.

     gpr_$attribute_desc_t
          This is a predefined unsigned 32-bit integer type in Pascal and C.
          This data type is not predefined by FORTRAN, but you can simulate it
          by declaring an INTEGER*4 variable.  This type identifies an attri-
          bute block.

     gpr_$bitmap_desc_t
          This is a predefined unsigned 32-bit integer type in Pascal and C.
          This data type is not predefined by FORTRAN, but you can simulate it
          by declaring an INTEGER*4 variable.  This type identifies a bitmap.

     gpr_$bmf_group_header_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  This type holds the group header description for an
          external bitmap.  FORTRAN does not support record/structure types,
          but you can simulate this type with the following declarations:


          INTEGER*2 grouparray(8)
          CHARACTER*1 storage_offset
          INTEGER*2 n_sects,pixel_size
          INTEGER*2 allocated_size,bytes_per_line
          INTEGER*4 bytes_per_sect,a_pointer
          EQUIVALENCE (grouparray(1), n_sects)
          EQUIVALENCE (grouparray(2), pixel_size)
          EQUIVALENCE (grouparray(3), allocated_size)
          EQUIVALENCE (grouparray(4), bytes_per_line)
          EQUIVALENCE (grouparray(5), bytes_per_sect)
          EQUIVALENCE (grouparray(7), a_pointer)
          POINTER /a_pointer/ storage_offset

          The diagram below illustrates the gpr_$bmf_group_header_t
          record/structure type:


                   _________________________________________________
                   |Name of Field  | Data type of Field in Pascal/C |
                   |_______________|________________________________|
                   |n_sects        | integer16/short int            |
                   |pixel_size     | integer16/short int            |
                   |allocated_size | integer16/short int            |
                   |bytes_per_line | integer16/short int            |
                   |bytes_per_sect | integer32/long int             |
                   |storage_offset | univ_ptr/*char                 |
                   |_______________|________________________________|

          Field Description:

          n_sects
               The number of sections in a group.

          pixel_size
               The number of bits per pixel in each section of a group.

          allocated_size
               The number of bits that the system uses to store the value of
               one pixel.

          bytes_per_line
               The number of bytes in one row of a bitmap.

          bytes_per_sect
               The value of bytes_per_line multiplied by the height of the
               bitmap. This value must be rounded up to a page boundary, or
               for small bitmaps rounded up to the next largest binary submul-
               tiple of a page.

          storage_offset
               A pointer to the group storage area.

     gpr_$bmf_group_header_array_t
          An array of up to gpr_$max_bmf_group elements.  Each element of the
          array has the data type gpr_$bmf_group_header_t.

     gpr_$color_map_char_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  This type holds the characteristics for the system
          color maps.  FORTRAN does not support record/structure types, but
          you can simulate this type with the following declarations:
          INTEGER*4 num_color_maps
          INTEGER*2 color_map(gpr_$max_physical_color_maps)

     The diagram below illustrates the gpr_$color_map_char_t record/structure
     type:


       __________________________________________________________________________
       |             Name of Field              | Data type of Field in Pascal/C |
       |________________________________________|________________________________|
       |num_color_maps                          | integer32/linteger             |
       |color_map[gpr_$max_physical_color_maps] | gpr_$curr_color_map_status_t   |
       |________________________________________|________________________________|

          Field Description:

          num_color_maps
               The number of color maps on a device.

          color_map[gpr_$max_physical_color_maps]
               The status of the color maps on a device, in
               gpr_$curr_color_map_status_t format.  The index of the
               color_map field is the ID of the color map.
               gpr_$max_physical_color_maps currently equals eight.  In Pas-
               cal, FORTRAN, or C, Each index of color_map must be equal to
               one of the following predefined values:

               gpr_$compatible_color_map -
                    Compatible with the specified pixel format

               gpr_$incompatible_color_map -
                    Incompatible with the specified pixel format

     gpr_$color_map_id_t
          This is a 2-byte integer.  This type specifies the ID of a color
          table.

     gpr_$color_t
          This is a predefined unsigned 32-bit integer type in Pascal and C.
          This data type is not predefined by FORTRAN, but you can simulate it
          by declaring an INTEGER*4 variable.  This type holds the red, green,
          and blue intensity values for one color.

     gpr_$color_vector_t
          This is a predefined 256-element array of gpr_$color_t in Pascal and
          C.  You can simulate this type in FORTRAN by declaring a 256-element
          array of INTEGER*4 variable.  This type stores an array of color
          values.  You can use this data type to store the values that
          comprise your color map.

     gpr_$controller_type_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies a unique
          number corresponding to the display controller type.  In Pascal,
          FORTRAN, or C, gpr_$controller_type_t must be equal to one of the
          following predefined values:

          gpr_$ctl_none
               None or not applicable.

          gpr_$ctl_mono_1
               DN100/400/420/460.

          gpr_$ctl_mono_2
               DN300/320/330.

          gpr_$ctl_color_1
               DN600/660/550/560.

          gpr_$ctl_color_2
               DN580/580-T/590/590-T.

          gpr_$ctl_color_3
               DN570/570A/570-T.

          gpr_$ctl_color_4
               DN3000 1024x800 color.

          gpr_$ctl_mono_4
               DN3000 mono high resolution.

          gpr_$ctl_color_5
               DN3000 1280x1024 color.

          gpr_$ctl_mono_5
               DN3000M mono low  resolution.

          gpr_$ctl_color_6
               DN4000E high resolution

          gpr_$ctl_color_7
               DN3500/DN4500

          gpr_$ctrl_color_10
               Series 10000VS

     gpr_$coordinate_array_t
          This is a predefined 16384-element array of gpr_$coordinate_t in
          Pascal and C.  You can simulate this type in FORTRAN by declaring a
          16384-element array of INTEGER*2 variable.  This type specifies
          several coordinates.  Generally, x coordinates are passed in one
          array and y coordinates are passed in another array.

     gpr_$coordinate_t
          This is a predefined unsigned 16-bit integer in Pascal and C.  This
          data type is not predefined by FORTRAN, but you can simulate it by
          declaring an INTEGER*2 variable.  This type specifies one coordinate
          in a bitmap.

     gpr_$curr_color_map_status_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies whether or not
          a color map is compatible with the specified pixel format.  In Pas-
          cal, FORTRAN, or C, gpr_$curr_color_map_status must be equal to one
          of the following predefined values:

          gpr_$compatible_color_map
               Compatible with the specified pixel format

          gpr_$incompatible_color_map
               Incompatible with the specified pixel format

     gpr_$cursor_mode_set_t
          Used to declare a new element (avail_cursor_modes) in
          gpr_$disp_char_t.  This is a predefined set of gpr_$cursor_mode_t in
          Pascal.  C and FORTRAN do not support set types, but you can simu-
          late this type by declaring a short int variable in C and an
          INTEGER*2 variable in FORTRAN.  It specifies a set of cursor modes.

     gpr_$cursor_mode_t
          Used by gpr_$set_cursor_mode and gpr_$inq_cursor_mode to indicate
          the cursor mode.  This is a predefined enumerated type in Pascal and
          C.  FORTRAN does not support enumerated types, but you can simulate
          this type by declaring an INTEGER*2 variable.  Possible values are:

          gpr_$software_cursor
               Software cursor mode

          gpr_$hardware_cursor
               Hardware cursor mode

     gpr_$decomp_technique_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies a decomposi-
          tion technique.  In Pascal, FORTRAN, or C, gpr_$decomp_technique_t
          must be equal to one of the following predefined values:

          gpr_$fast_traps
               Decomposes polygons into trapezoids using integer arithmetic.

          gpr_$precise_traps
               Decomposes polygons into trapezoids using double integer arith-
               metic.

          gpr_$non_overlapping_tris
               Decomposes polygons into nonoverlapping triangles.

          gpr_$render_exact
               Renders polygons directly without decomposing them into simpler
               polygons.






     gpr_$direction_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the direction
          of movement from one text character position to another in a bitmap.
          In Pascal, FORTRAN, or C, gpr_$direction_t must be equal to one of
          the following predefined values:

          gpr_$up
               Write the text from bottom to top.

          gpr_$down
               Write the text from top to bottom.

          gpr_$left
               Write the text from right to left.

          gpr_$right
               Write the text from left to right.

     gpr_$disp_char_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 31-element array of
          INTEGER*2.  (Note that you can optionally declare a smaller array.)
          The gpr_$disp_char_t type stores display characteristics.  The
          diagram below illustrates the gpr_$disp_char_t data type:


  ___________________________________________________________________________________
  |     Name of Field      | Data type of Field in Pascal/C | Element # in FTN array |
  |________________________|________________________________|________________________|
  |controller_type         | gpr_$controller_type_t         | 1                      |
  |accelerator_type        | gpr_$accelerator_type_t        | 2                      |
  |x_window_origin         | integer16/short int            | 3                      |
  |y_window_origin         | integer16/short int            | 4                      |
  |x_window_size           | integer16/short int            | 5                      |
  |y_window_size           | integer16/short int            | 6                      |
  |x_visible_size          | integer16/short int            | 7                      |
  |y_visible_size          | integer16/short int            | 8                      |
  |x_extension_size        | integer16/short int            | 9                      |
  |y_extension_size        | integer16/short int            | 10                     |
  |x_total_size            | integer16/short int            | 11                     |
  |y_total_size            | integer16/short int            | 12                     |
  |x_pixels_per_cm         | integer16/short int            | 13                     |
  |y_pixels_per_cm         | integer16/short int            | 14                     |
  |n_planes                | integer16/short int            | 15                     |
  |n_buffers               | integer16/short int            | 16                     |
  |delta_x_per_buffer      | integer16/short int            | 17                     |
  |delta_y_per_buffe       | integer16/short int            | 18                     |
  |delta_planes_per_buffer | integer16/short int            | 19                     |
  |mem_overlaps            | gpr_$overlap_set_t             | 20                     |
  |x_zoom_max              | integer16/short int            | 21                     |
  |y_zoom_min              | integer16/short int            | 22                     |
  |video_refresh_rate      | integer16/short int            | 23                     |
  |n_primaries             | integer16/short int            | 24                     |
  |lut_width_per_primary   | integer16/short int            | 25                     |
  |avail_formats           | gpr_$format_set_t              | 26                     |
  |avail_access            | gpr_$access_set_t              | 27                     |
  |access_address_space    | integer16/short int            | 28                     |
  |invert                  | gpr_$disp_invert_t             | 29                     |
  |num_lookup_tables       | integer16/short int            | 30                     |
  |rgb_color               | gpr_$rgb_modes_set_t           | 31                     |
  |default_cursor_mode     | gpr_$cursor_mode_t             | 32                     |
  |avail_cursor_modes      | gpr_$cursor_mode_set_t         | 33                     |
  |n_mult_clips            | integer16/short int            | 34                     |
  |________________________|________________________________|________________________|

          Field Description:

          controller_type
               The type of graphics hardware controller in
               gpr_$controller_type_t format.  For gpr_$no_display mode,
               gpr_$ctl_none is returned.

          accelerator_type
               The type of graphics hardware processing accelerator for the
               node in gpr_$accelerator_type_t format.  For gpr_$no_display
               mode, gpr_$accel_none is returned.

          x_window_origin
               X origin of the frame or window in frame and direct mode
               respectively. For borrow mode and no-display mode the origin is
               (0,0).

          y_window_origin
               Y origin of the frame or window in frame and direct mode
               respectively. For borrow mode and no-display mode the origin is
               (0,0).

          x_window_size
               X dimension of the frame or window in frame and direct mode
               respectively.  For borrow mode this is the x dimension of the
               screen. For no-display mode this is the x dimension of the max-
               imum legal bitmap.

          y_window_size
               Y dimension of the frame or window in frame and direct mode
               respectively.  For borrow mode this is the y dimension of the
               screen. For no-display mode this is the y dimension of the max-
               imum legal bitmap.

          x_visible_size
               X dimension of the visible area of the screen for frame,
               direct, and borrow modes.  For no-display mode this is the x
               dimension of the maximum legal bitmap size.

          y_visible_size
               Y dimension of the visible area of the screen for frame,
               direct, and borrow modes.  For no-display mode this is the y
               dimension of the maximum legal bitmap size.

          x_extension_size
               The maximum x dimension of the bitmap after having been
               extended by gpr_$set_bitmap_dimensions.  For frame, direct and
               no-display modes, this size is the same as x_visible_size.  For
               borrow-mode, this size may be bigger if the device has more
               display memory past the edges of the visible area.

          y_extension_size
               The maximum y dimension of the bitmap after having been
               extended by gpr_$set_bitmap_dimensions.  For frame, direct and
               no-display modes, this size is the same as y_visible_size.  For
               borrow-mode, this size may be bigger if the device has more
               display memory past the edges of the visible area.

          x_total_size
               X dimension of total bitmap memory.  In particular, this is the
               number of addressable pixel positions, in a linear pixel
               addressing space,  between the first pixel of a scan line and
               the first pixel of the next scan line. This value may be larger
               than x_extension_size. For no-display mode this value is the x
               dimension of the maximum legal bitmap.

          y_total_size
               Y dimension of total bitmap memory.  This value may be larger
               than y_extension_size.  For no-display mode this value is the y
               dimension of the maximum legal bitmap.

          x_pixels_per_cm
               The number of physical pixels per centimeter on the screen in
               the x dimension.  For no-display mode, this value is set to
               zero.

          y_pixels_per_cm
               The number of physical pixels per centimeter on the screen in
               the y dimension.  For no-display mode, this value is set to
               zero.

          n_planes
               The maximum number of planes of bitmap memory available on the
               device.  For no-display mode, this parameter is the maximum
               legal bitmap depth.

          n_buffers
               The number of displayable refresh buffers available on the dev-
               ice, in borrow mode.  In frame, direct, and no-display modes,
               this parameter is set to one.

          delta_x_per_buffer
               The "distance" in x, in pixel addresses between refresh buffers
               on a device with more than one buffer, in borrow mode. For
               frame, direct, and no-display modes, and for devices with only
               one buffer, this parameter is set to zero.

          delta_y_per_buffer
               The "distance" in y, in pixel addresses between refresh buffers
               on a device with more than one buffer, in borrow mode. For
               frame, direct, and no-display modes, and for devices with only
               one buffer, this parameter is set to zero.

          delta_planes_per_buffer
               This parameter gives the "distance" in pixel depth between
               refresh buffers on a device with more than one buffer, in bor-
               row mode.  Currently no such device capability is supported,
               but it may be in the future.  For frame, direct, and no-display
               modes, and for devices with only one buffer, this parameter is
               set to zero.

          mem_overlaps
               The kinds of overlap situations that can exist in refresh
               buffer memory in gpr_$overlap_set_t format.

          x_zoom_max
               The maximum pixel-replication zoom factor for x on a device in
               borrow mode.  For frame, direct, and no-display modes, and for
               devices that do not support pixel-replication zoom, these
               parameters are set to 1.

          y_zoom_max
               The maximum pixel-replication zoom factor for y on a device in
               borrow mode.  For frame, direct, and no-display modes, and for
               devices that do not support pixel-replication zoom, these
               parameters are set to 1.

          video_refresh_rate
               The refresh rate of the screen in Hertz. For no-display mode,
               this value is set to zero.

          n_primaries
               The number of independent primary colors supported by the video
               for the device.  For color devices, this value is three; for
               monochrome devices it is one. For no-display mode, this value
               is set to zero.

          lut_width_per_primary
               The value gives the number of bits of precision available in
               each column of a video lookup table (color map) for represent-
               ing the intensity of a primary color in an overall color value.
               If a primary color can only be on or off, this value is one.
               If it can have 16 intensities, this value will be four.  If it
               can have 256 intensities, this value will be eight.  For no-
               display mode, this parameter is set to zero.

          avail_formats
               The set of available interactive or imaging formats available
               on the device in gpr_$format_set_t format.

          avail_access
               The set of legal pixel cell sizes in gpr_$access_set_t format.

          access_address_space
               This parameter gives the amount of address space available for
               making direct access to the refresh buffer of the device, in
               units of 1K-byte pages.  For example, if the address space is
               of a size sufficient to cover 1024 scan lines, each of 1024
               bits, its extent will be 128K bytes, thus the value of this
               parameter will be 128.

          invert
               This parameter is intended for monochromatic devices.  It indi-
               cates how the display manager's INV command is implemented on
               the device in gpr_$disp_invert_t format.

          num_lookup_tables
               This parameter returns the number of lookup tables available on
               this node.  All current Apollo nodes support only 1 lookup
               table.

          rgb_color
               This parameter tells you what kinds of lookup modes are sup-
               ported by the machine, in gpr_$rgb_modes_set_t format.

          default_cursor_mode
               Indicates the device's default cursor mode in
               gpr_$cursor_mode_t format.

          avail_cursor_modes
               Indicates the available cursor modes for the devices in
               gpr_$cursor_mode_set_t format.

          n_mult_clips
               Indicates the maximum number of clip windows you can set at one
               time on the device.

     gpr_$disp_invert_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  which tells you how the Display
          Manager's INV command is implemented on the target monochromatic
          node.  In Pascal, FORTRAN, or C, gpr_$disp_invert_t must be equal to
          one of the following predefined values:

          gpr_$no_invert
               The display is not a monochromatic display or there is no
               display.

          gpr_$invert_simulate
               Color map is simulated in software.

          gpr_$invert_hardware
               Color map is implemented in hardware.

     gpr_$display_config_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the hardware
          configuration.  In Pascal, FORTRAN, or C, gpr_$display_config_t must
          be equal to one of the following predefined values:

          gpr_$bw_800x1024
               A portrait black and white display.

          gpr_$bw_1024x800
               A landscape black and white display.

          gpr_$color_1024x1024x4
               A 1024x1024 four-plane color display.

          gpr_$color_1024x1024x8
               A 1024x1024 eight-plane color display.

          gpr_$color_1024x800x4
               A 1024x800 four-plane color display.

          gpr_$color_1024x800x8
               A 1024x800 eight-plane color display.

          gpr_$color_1280x1024x8
               A 1280x1024 eight-plane color display.

          gpr_$color1_1024x800x8
               A 1024x800 eight-plane color display.

          gpr_$color2_1024x800x4
               A 1024x800 four-plane color display.

          gpr_$bw_1280x1024
               A 1280x1024 black and white display.

          gpr_$color2_1024x800x8
               A 1024x800 eight-plane color display.

          gpr_$color10_1280X1024
               A Series 10000VS 40- or 80-plane color display.

          gpr_$color7_1280x1024
               A DN3500/DN4500, 8- or 40- plane color display.

          gpr_$mono9_2kx1k
               A 1280x1000 or 1000x800 monochrome display.

     gpr_$display_invert_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies how the target
          monochromatic node implements the color map.  In Pascal, FORTRAN, or
          C, gpr_$display_invert_t must be equal to one of the following
          predefined values:

          gpr_$no_invert
               Not applicable, that is, the target node is a color monitor or
               is not a display.

          gpr_$invert_simulate
               The color map is simulated in software.

          gpr_$invert_hardware
               The color map is in hardware.

     gpr_$display_mode_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  In Pascal, FORTRAN, or C,
          gpr_$display_mode_t must be equal to one of the following predefined
          values:

          gpr_$borrow
               Uses the entire screen for a pseudo-color program.

          gpr_$frame
               Uses a frame of the Display Manager for a pseudo-color program.

          gpr_$no_display
               Uses a main-memory bitmap.

          gpr_$direct
               Uses a display-manager window for a pseudo-color program.

          gpr_$borrow_nc
               Uses the entire screen for a pseudo-color program but does not
               clear the bitmap.

          gpr_$direct_rgb
               (New mode.)  Uses a display-manager window for a true-color
               program.

          gpr_$borrow_rgb
               (New mode.)  Uses the entire screen for a true-color program.

          gpr_$borrow_rgb_nc
               (New mode.)  Uses the entire screen for a true-color program
               but does not clear the bitmap.

     gpr_$double_buffer_option_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type tells the system what to
          do to the designated bitmap in a double-buffering application.  In
          Pascal, FORTRAN, or C, gpr_$double_buffer_option_t must be equal to
          one of the following predefined values:

          gpr_$undisturbed_buffer
               Do nothing to the specified bitmap.

          gpr_$clear_buffer
               Clear the option buffer to the color specified by the
               option_value parameter.

          gpr_$copy_buffer
               Copy the display_desc bitmap to the option_desc bitmap.

     gpr_$ec_key_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies which
          eventcount to obtain.  Currently, there is only one possible value
          for gpr_$ec_key_t, and it is called gpr_$input_ec.

     gpr_$event_data_t
          In C, this data type is a union with one member, gpr_$dial, which is
          a structure.  In Pascal, this data type is a variant record with a
          case of gpr_$event_t, which has one possible constant, gpr_$dial.
          For the gpr_$dial constant, the variant record contains a record
          with two fields.  You can simulate this type in FORTRAN by declaring
          a two-element array of INTEGER*4.  This data type specifies the dial
          number and value associated with a dial event.  The table below
          shows the gpr_$dial data type fields:


                              31                           0
                              ______________________________
                              |        dial_number          |
                              |_____________________________|
                              |         dial_value          |
                              ______________________________
                              15                           0


          Field Description:

          dial_number
               The number of the dial, as initialized with the
               dial_server_request command.

          dial_value
               The number to which the dial is turned.

     gpr_$event_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This data type specifies the type
          of input event.  In Pascal, FORTRAN, or C, gpr_$event_t must be
          equal to one of the following predefined values:

          gpr_$keystroke
               When you type a keyboard character.

          gpr_$buttons
               When you press a button on the mouse or bitpad puck.

          gpr_$locator
               When you move the mouse or bitpad puck, or use the touchpad.

          gpr_$locator_update
               Only the most recent location when you move the mouse or bitpad
               puck, or use the touchpad.

          gpr_$entered_window
               When the cursor enters a window in which the GPR bitmap
               resides. Direct mode is required.

          gpr_$left_window
               When the cursor leaves a window in which the GPR bitmap
               resides. Direct mode is required.

          gpr_$locator_stop
               When you stop moving the mouse or bitpad puck, or stop using
               the touchpad.

          gpr_$no_event
               When you do not enter any events.

          gpr_$dial
               A dial box event

          gpr_$pfk
               An LPFK event

          gpr_$coded_keys
               An ASCII or Latin-1 character

          gpr_$function_keys
               A function key

          gpr_$physical_keys
               An untranslated keyboard character

          gpr_$kbd_entered_window
               The keyboard entered the window.  Direct mode is required.

          gpr_$kbd_left_window
               The keyboard left the window.  Direct mode is required.

     gpr_$format_set_t
          This is a predefined set of gpr_$imaging_format_t type in Pascal.  C
          and FORTRAN do not support set types, but you can simulate this type
          by declaring a short int variable in C or an INTEGER*2 variable in
          FORTRAN.  This set has 3 members.  This data type specifies the set
          of interactive or imaging formats available on the device.

     gpr_$horiz_seg_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 3-element array of
          INTEGER*2.  This type defines the left-hand x-coordinate, right-hand
          x-coordinate, and y-position of either the base or roof of a tra-
          pezoid.  The table below shows the gpr_$horiz_seg_t data type
          fields:


              31                                                           0
              ______________________________________________________________
              |                         x_coord_l                           |
              |_____________________________________________________________|
              |                         x_coord_r                           |
              |_____________________________________________________________|
              |                          y_coord                            |
              ______________________________________________________________
              31                                                           0


          Field Description:

          x_coord_l
               The left-hand x-coordinate of the line.

          x_coord_r
               The right-hand x-coordinate of the line.

          y_coord
               The y-coordinate of the line.

     gpr_$imaging_format_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies an imaging or
          interactive display format.  In Pascal, FORTRAN, or C,
          gpr_$imaging_format_t must be equal to one of the following prede-
          fined values:

          gpr_$interactive
               Specifies interactive format.

          gpr_$imaging_1024x1024x8
               Specifies 8-plane mode.

          gpr_$imaging_512x512x24
               Specifies 24-plane mode.

          gpr_$double_bufferx8
               Specifies 8-plane mode with double buffering.

          gpr_$imaging_1280x1024x24
               Specifies 24-planes for borrow mode.

          gpr_$imaging_windowx24
               Specifies 24-plane mode with true color available in a window.

     gpr_$init_options_set_t
          This is a predefined set of gpr_$init_options_t type in Pascal.  C
          and FORTRAN do not support set types, but you can simulate this type
          by declaring a long int variable in C or an INTEGER*4 in FORTRAN.
          This set has 32 members.  This data type specifies the set of
          options for the gpr_$initialize routine.   At the present time,
          unless you want the gpr_$no_clear option, you should set this to a
          null value.

     gpr_$init_options_t
          Initialization options. This is a predefined  enumerated type in
          Pascal and C.  FORTRAN does not support enumerated types, but you
          can simulate this type by declaring an INTEGER*4  variable.  Possi-
          ble values are:

          gpr_$no_clear
               Do not clear the screen.  This may be used in conjunction with
               a display resource type of gpr_$screen.

          gpr_$plane_mode
               This option has not been implemented.

          gpr_$pixel_mode
               This option has not been implemented.

     gpr_$keyset_t
          This is a predefined set of char type in Pascal.  Neither C nor FOR-
          TRAN supports sets, so you must use the set emulation calls to add
          elements to or remove elements from the "set".  You can reserve the
          appropriate amount of space in C by declaring a variable as
          gpr_$keyset_t.  FORTRAN programs can reserve the appropriate amount
          of space by declaring a variable as an 8-element array of INTEGER*4.
          The gpr_$keyset_t type specifies the set of characters that make up
          a keyset associated with the graphics input event types
          gpr_$keystroke and gpr_$buttons.

     gpr_$line_pattern_t
          This is a predefined 4-element array of 2-byte integers in Pascal
          and C.  You can simulate this type in FORTRAN by declaring a 4-
          element array of INTEGER*2 variable.  This type specifies the line-
          pattern to use for line-drawing operations.

     gpr_$linestyle_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the linestyle
          for line-drawing operations.  In Pascal, FORTRAN, or C,
          gpr_$linestyle_t must be equal to one of the following predefined
          values:

          gpr_$solid
               Draw solid lines.

          gpr_$dotted
               Draw dotted lines.

     gpr_$mask_32_t
          This is a predefined unsigned 32-bit integer type in Pascal and C.
          This data type is not predefined by FORTRAN, but you can simulate it
          by declaring an INTEGER*4 variable.  This type specifies a set of
          planes to be used in a 32-bit plane mask.

     gpr_$mask_t
          This is a predefined unsigned 16-bit integer in Pascal and C.  This
          data type is not predefined by FORTRAN, but you can simulate it by
          declaring an INTEGER*2 variable.  This type specifies a set of
          planes to be used in a 16-bit plane mask.

     gpr_$memory_overlap_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the kinds of
          memory overlaps existing between different classes of buffer memory.
          In Pascal, FORTRAN, or C, gpr_$memory_overlap_t must be equal to one
          of the following predefined values:

          gpr_$hdm_with_bitm_ext
               Hidden display memory (HDM), used for loaded text fonts and HDM
               bitmaps, overlaps with the area into which a bitmap can be
               extended by use of the gpr_$set_bitmap_dimensions call.

          gpr_$hdm_with_buffers
               HDM overlaps with extra displayable refresh buffers.

          gpr_$bitm_ext_with_buffers
               The bitmap extension area overlaps with displayable refresh
               buffers.

          gpr_$bitm_ext_with_zbuffer
               The bitmap extension area overlaps with the z buffer.

     gpr_$obscured_opt_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the action to
          be taken when a window is obscured.  In Pascal, FORTRAN, or C,
          gpr_$obscured_opt_t must be equal to one of the following predefined
          values:

          gpr_$ok_if_obs
               Acquire the display even though the window is obscured.

          gpr_$input_ok_if_obs
               Acquire the display and allow input into the window even though
               the window is obscured.

          gpr_$error_if_obs
               Do not acquire the display; return an error message.

          gpr_$pop_if_obs
               Pop the window if it is obscured.

          gpr_$block_if_obs
               Do not acquire the display until the window is popped.

     gpr_$offset_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*2.  This type specifies the width and height of a window.
          The table below shows the gpr_$offset_t data type fields:


                              15                           0
                              ______________________________
                              |           x_size            |
                              |_____________________________|
                              |           y_size            |
                              ______________________________
                              15                           0


          Field Description:

          x_size
               The width of the window in pixels.

          y_size
               The height of the window in pixels.

     gpr_$overlap_set_t
          This is a predefined set of gpr_$memory_overlap_t type in Pascal.  C
          and FORTRAN do not support set types, but you can simulate this type
          by declaring a short int variable in C or an INTEGER*2 variable in
          FORTRAN.  This set has 3 members.  This type specifies a set of
          overlaps between different classes of buffer memory.  Sometimes a
          device comes with extra refresh buffer memory beyond what is used to
          hold the screen image.  There are several recognized purposes for
          particular parts of such memory, and sometimes some memory locations
          may be available for more than one purpose.  If so, the program
          using this memory will have to take care not to use the same memory
          for two different purposes at the same time.  In order to decide
          whether this is a possibility, the program can inspect this parame-
          ter.  For frame, direct and no-display modes, this parameter is set
          to the null set.

     gpr_$pixel_array_t
          This is a predefined 131073-element array of 4-byte integers in Pas-
          cal and C.  You can simulate this type in FORTRAN by declaring a
          131073-element array of INTEGER*4 variable.  This type stores multi-
          ple pixel values.

     gpr_$pixel_format_array_t
          An array of up to gpr_$max_formats elements.  Each element of the
          array has the data type gpr_$pixel_format_t.

     gpr_$pixel_format_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 16-element array of
          INTEGER*4.  This type describes the pixel format of a bitmap.  The
          diagram below illustrates the gpr_$pixel_format_t data type:


     ______________________________________________________________________________
     |  Name of Field    | Data type of Field in Pascal/C | Element # in FTN array |
     |___________________|________________________________|________________________|
     |length             | integer32/long int             | 1                      |
     |pixel_mode         | integer32/long int             | 2                      |
     |image_depth        | integer32/long int             | 3                      |
     |buffer_count       | integer32/long int             | 4                      |
     |red_depth          | integer32/long int             | 5                      |
     |green_depth        | integer32/long int             | 6                      |
     |blue_depth         | integer32/long int             | 7                      |
     |ovlay_mode         | integer32/long int             | 8                      |
     |ovlay_depth        | integer32/long int             | 9                      |
     |ovlay_buffer_count | integer32/long int             | 10                     |
     |z_mode             | integer32/long int             | 11                     |
     |z_depth            | integer32/long int             | 12                     |
     |z_buffer_count     | integer32/long int             | 13                     |
     |alpha_mode         | integer32/long int             | 14                     |
     |alpha_depth        | integer32/long int             | 15                     |
     |alpha_buffer_count | integer32/long int             | 16                     |
     |___________________|________________________________|________________________|

          Although you do not need to set all of the fields, you must set the
          fields sequentially (for example, you cannot set alpha_buffer_count
          without setting all of the fields that precede it).

          Field Description:

          length
               The number of members in this record (excluding this field)
               that you set.  The purpose of this field is to allow the number
               of fields to grow in the future without breaking existing code.

          pixel_mode
               The type of image.  Presently available types are:

               gpr_$pixel_pseudocolor

               gpr_$pixel_truecolor

          image_depth
               Number of planes in the image (red, green, and blue planes or
               pseudo color planes)

          buffer_count
               Number of image buffers

          red_depth
               Number of red planes for true color.

          green_depth
               Number of green planes for true color.

          blue_depth
               Number of blue planes for true color.

          ovlay_mode
               Type of overlay.  Available types are:

               gpr_$ovlay_none
                    No overlays

               gpr_$ovlay_per_buffer
                    One overlay projection per buffer

          ovlay_depth
               Number of overlay planes

          ovlay_buffer_count
               Number of overlay buffers.  Specify 1 for single buffer, 2 for
               double buffer.

          z_mode
               Type of z buffer.  Available types are:

               gpr_$z_none
                    No z planes

               gpr_$z_per_buffer
                    One z projection per buffer

          z_depth
               Number of z planes

          z_buffer_count
               Number of z buffers.  Specify 1 for single buffer, 2 for double
               buffer.

          alpha_mode
               Type of alpha buffer.  Available types are:

               gpr_$alpha_none
                    No alpha planes

               gpr_$alpha_per_buffer
                    One alpha projection per buffer

          alpha_depth
               Number of alpha planes

          alpha_buffer_count
               Number of alpha buffers.  Specify 1 for single buffer, 2 for
               double buffer.

     gpr_$pixel_value_t
          This is a predefined unsigned 32-bit integer type in Pascal and C.
          This data type is not predefined by FORTRAN, but you can simulate it
          by declaring an INTEGER*4 variable.  This type defines an index into
          a color map to identify the color of an individual pixel.

     gpr_$plane_t
          This is a predefined unsigned 16-bit integer in Pascal and C.  This
          data type is not predefined by FORTRAN, but you can simulate it by
          declaring an INTEGER*2 variable.  This type specifies the number of
          planes in a bitmap; this value will fall between 0 and 7 inclusive.

     gpr_$position_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*2.  This type specifies the x and y coordinates of a point
          in a bitmap.  The table below shows the gpr_$position_t data type
          fields:


                              15                           0
                              ______________________________
                              |          x_coord            |
                              |_____________________________|
                              |          y_coord            |
                              ______________________________
                              15                           0


          Field Description:

          x_coord
               The x-coordinate of the point in the bitmap.

          y_coord
               The y-coordinate of the point in the bitmap.

     gpr_$proj_format_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 4-element array of
          INTEGER*4.  This type specifies a projection for a bitmap.  A pro-
          jection is a set of planes that can be grouped together to form a
          display bitmap.  The table below shows the gpr_$proj_format_t data
          type fields:


              31                                                           0
              ______________________________________________________________
              |                           length                            |
              |_____________________________________________________________|
              |                         proj_mode                           |
              |_____________________________________________________________|
              |                        proj_buffer                          |
              |_____________________________________________________________|
              |                          reserved                           |
              ______________________________________________________________
              31                                                           0


          Field Description:

          length
               The number of fields in this record (excluding this field).
               The purpose of this field is to allow the number of fields to
               grow in the future without breaking existing code.

          proj_mode
               The bitmap projection.  The following projection modes are
               available:

               gpr_$proj_mode_argb
                    Alpha, red, green, and blue planes

               gpr_$proj_mode_ovlay
                    Overlay plane(s)

               gpr_$proj_mode_zzzz
                    z planes

          proj_buffer
               The number of the buffer being used for the projection.  This
               can be 1 or 2 for a device with double buffering.  For a device
               that does not offer double buffering, this can only be 1.

     gpr_$raster_op_array_t
          This is a predefined 8-element array of gpr_$raster_op_t in Pascal
          and C.  You can simulate this type in FORTRAN by declaring an 8-
          element array of INTEGER*2 variable.  This type stores multiple ras-
          ter operation opcodes.

     gpr_$raster_op_t
          This is a predefined unsigned 16-bit integer in Pascal and C.  This
          data type is not predefined by FORTRAN, but you can simulate it by
          declaring an INTEGER*2 variable.  This type specifies raster opera-
          tion opcodes.

     gpr_$resource_type_t
          Used by gpr_$initialize and gpr_$inq_pixel_formats to identify the
          type of display resource in which the application will run.  This
          data type takes the place of the display modes used for gpr_$init.
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  Possible values are:

          gpr_$memory_bitmap
               A main memory bitmap.  This has no effect on the screen.

          gpr_$pad_id
               A display-manager window

          gpr_$pad_frame_id
               A display-manager frame

          gpr_$screen
               The entire screen

          gpr_$x_window_id
               An X window

     gpr_$rgb_modes_set_t
          This is a predefined set of gpr_$rgb_modes_t type in Pascal.  C and
          FORTRAN do not support set types, but you can simulate this type by
          declaring a short int variable in C or an INTEGER*2 variable in FOR-
          TRAN.  This set has 2 members.

     gpr_$rgb_modes_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the kinds of
          red, green, and blue lookup supported by the target hardware.  In
          Pascal, FORTRAN, or C, gpr_$rgb_modes_t must be equal to one of the
          following predefined values:

          gpr_$rgb_none
               All current nodes except the DN590 will return this value.  It
               indicates that only pseudo-color lookup is available on the
               node.  That is, the node views a pixel's color as an index into
               the color table.

          gpr_$rgb_24
               The DN590 node will return this value.  It indicates that 24-
               bit true-color lookup is available on the node.  That is, the
               node can view a pixel's color as three separate indices into
               the color table.

     gpr_$rgb_plane_t
          This is a predefined unsigned 16-bit integer in Pascal and C.  This
          data type is not predefined by FORTRAN, but you can simulate it by
          declaring an INTEGER*2 variable.  This type specifies the number of
          planes in a bitmap; this value will fall between 0 and 31 inclusive.

     gpr_$rhdm_pr_t
          This is a predefined pointer type in both Pascal and C.  Pascal
          predefines this type as:


                                          gpr_$rhdm_pr_t = ^PROCEDURE;

          C predefines this type as:


                                          typdef void (*gpr_$rhdm_pr_t)();

          In FORTRAN, you can simulate the gpr_$rhdm_pr_t data type by declar-
          ing an INTEGER*4 variable, and then using the IADDR function to
          store the starting address of a refresh operation.  Regardless of
          the language, this type serves as a pointer to a routine that
          refreshes hidden display memory.

     gpr_$rop_prim_set_elems_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies the primitives
          to which raster operations apply.  In Pascal, FORTRAN, or C,
          gpr_$rop_prim_set_elems_t must be equal to one of the following
          predefined values:

          gpr_$rop_blt
               Apply raster operations to block transfers.

          gpr_$rop_line
               Apply raster operations to unfilled line primitives.

          gpr_$rop_fill
               Apply raster operations to filled primitives.

     gpr_$rop_prim_set_t
          This is a predefined set of gpr_$rop_prim_set_elems_t type in Pas-
          cal.  C and FORTRAN do not support set types, but you can simulate
          this type by declaring a short int variable in C or an INTEGER*2
          variable in FORTRAN.  This set has 3 members.  This type specifies
          the set of primitives that can have a raster operation established
          with gpr_$raster_op_prim_set.  In addition, this set specifies the
          primitives for which a raster operation can be returned with
          gpr_$inq_raster_ops.

     gpr_$rwin_pr_t
          This is a predefined pointer type in both Pascal and C.  Pascal
          predefines this type as:


            gpr_$rwin_pr_t=^PROCEDURE(IN unobscured:boolean; IN pos_change:boolean);

          C predefines this type as:


            typdef void (*gpr_$rwin_pr_t)();

          In FORTRAN, you can simulate the gpr_$rwin_pr_t data type by declar-
          ing an INTEGER*4 variable, and then using the IADDR function to
          store the starting address of a refresh operation.  Regardless of
          the language, this type serves as a pointer to a routine that
          refreshes a window.

     gpr_$string_t
          This is a predefined 256-element string in Pascal and C.  It is not
          a predefined type in FORTRAN, but you can simulate this type by
          declaring a character*256 variable.

     gpr_$trap_list_t
          This is a predefined 10-element array of gpr_$trap_t type in Pascal
          and C.  This data type is meant to serve as an example.  You will
          probably want to define your own array of gpr_$trap_t with the
          appropriate number of elements for your application.  FORTRAN does
          not predefine the gpr_$trap_list_t data type, but you can simulate
          it by declaring the following variable:
             integer*2  gpr_$trap_list_t(10,4)

     gpr_$trap_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 6-element array of
          INTEGER*2.  This type specifies the coordinates of the top and bot-
          tom line segments of a trapezoid.  The table below shows the
          gpr_$trap_t data type fields:


                              15                           0
                              ______________________________
                              |            top              |
                              |_____________________________|
                              |            bot              |
                              ______________________________
                              15                           0


          Field Description:

          top.x_coord_l
               The left-hand x-coordinate of the top line.

          top.x_coord_r
               The right-hand x-coordinate of the top line.

          top.y_coord
               The y-coordinate of the top line.

          bot.x_coord_l
               The left-hand x-coordinate of the bottom line.

          bot.x_coord_r
               The right-hand x-coordinate of the bottom line.

          bot.y_coord
               The y-coordinate of the bottom line.

     gpr_$triangle_fill_criteria_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*2.  This type specifies the filling criterion to use on
          polygons decomposed into triangles or polygons rendered with
          gpr_$render_exact.  The table below shows the
          gpr_$triangle_fill_criteria_t data type fields:


                              15                           0
                              ______________________________
                              |         wind_type           |
                              |_____________________________|
                              |         winding_no          |
                              ______________________________
                              15                           0


          Field Description:

          wind_type
               The type of fill criterion to use in gpr_$winding_set_t format.

          winding_no
               The winding number to be used when the wind_type is
               gpr_$specific.

     gpr_$triangle_list_t
          This is a predefined 10-element array of gpr_$triangle_t type in
          Pascal and C.  This data type is meant to serve as an example.  You
          will probably want to define your own array of gpr_$triangle_t type
          with the appropriate number of elements for your application.  FOR-
          TRAN does not predefine the gpr_$triangle_t data type, but you can
          simulate it by declaring the following variable:
             integer*2  gpr_$triangle_t(10,7)

     gpr_$triangle_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 7-element array of
          INTEGER*2.  This type specifies the coordinates of a triangle.  The
          diagram below shows the gpr_$triangle_t data type:


       _________________________________________________________________________
       |Name of Field | Data type of Field in Pascal/C | Element # in FTN array |
       |______________|________________________________|________________________|
       |p1            | gpr_$position_t                | 1 and 2                |
       |p2            | gpr_$position_t                | 3 and 4                |
       |p3            | gpr_$position_t                | 5 and 6                |
       |winding       | integer16/short int            | 7                      |
       |______________|________________________________|________________________|

          Field Description:

          p1.x_coord
               The x-coordinate of point 1.

          p1.y_coord
               The y-coordinate of point 1.

          p2.x_coord
               The x-coordinate of point 2.

          p2.y_coord
               The y-coordinate of point 2.

          p3.x_coord
               The x-coordinate of point 3.

          p3.y_coord
               The y-coordinate of point 3.

          winding
               The winding number.

     gpr_$version_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*2.  This type specifies the version number of an external
          bitmap header.  The table below shows the gpr_$version_t data type
          fields:


                              15                           0
                              ______________________________
                              |           major             |
                              |_____________________________|
                              |           minor             |
                              ______________________________
                              15                           0


          Note that C uses the names gpr_$major and gpr_$minor in
               place of major and minor.  Field Description:

          major (gpr_$major in C)
               The major version number.

          minor (gpr_$minor in C)
               The minor version number.

     gpr_$video_format_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*4.  This type determines which buffer of a bitmap is
          displayed.  The table below shows the fields of the
          gpr_$video_format_t data type.


              31                                                           0
              ______________________________________________________________
              |                           length                            |
              |_____________________________________________________________|
              |                        video_buffer                         |
              ______________________________________________________________
              31                                                           0


          Field Description:

          length
               The number of fields in this record (excluding this field).
               The purpose of this field is to allow the number of fields to
               grow in the future without breaking existing code.

          video_buffer
               The buffer being displayed.  This can be 1 or 2 for a device
               with double buffering.  For a device that does not offer double
               buffering, this can only be 1.

     gpr_$winding_set_t
          This is a predefined enumerated type in Pascal and C.  FORTRAN does
          not support enumerated types, but you can simulate this type by
          declaring an INTEGER*2 variable.  This type specifies a fill cri-
          terion.  In Pascal, FORTRAN, or C, gpr_$winding_set_t must be equal
          to one of the following predefined values:

          gpr_$parity
               Apply a parity fill.

          gpr_$nonzero
               Apply a nonzero fill.

          gpr_$specific
               Fill areas with a specific winding number.

     gpr_$window_list_t
          This is a predefined 10-element array of gpr_$window_t type in Pas-
          cal and C.  This data type is meant to serve as an example.  You
          will probably want to define your own array of gpr_$window_t type
          with the appropriate number of elements for your application.  FOR-
          TRAN does not predefine the gpr_$window_t data type, but you can
          simulate it by declaring the following variable:

       integer*2  gpr_$window_list_t(10,4)

     gpr_$window_t
          This is a predefined record type in Pascal and a predefined struc-
          ture type in C.  FORTRAN does not support record/structure types,
          but you can simulate this type by declaring a 2-element array of
          INTEGER*2.  This type defines a rectangular section of a bitmap.
          x_coord and y_coord specify the coordinates of the top left-hand
          corner of a rectangle.  x_size and y_size specify the width and
          height of the rectangle.  The diagram below shows the gpr_$window_t
          data type:


       _________________________________________________________________________
       |Name of Field | Data type of Field in Pascal/C | Element # in FTN array |
       |______________|________________________________|________________________|
       |window_base   | gpr_$position_t                | 1 and 2                |
       |window_size   | gpr_$offset_t                  | 3 and 4                |
       |______________|________________________________|________________________|

          Field Description:

          window_base.x_coord
               The x-coordinate of the top left-hand corner of the window.

          window_base.y_coord
               The y-coordinate of the top left-hand corner of the window.

          window_size.x_size
               The width of the widow in pixels.

          window_size.y_size
               The height of the window in pixels.

     status_$t
          This is a predefined variant record in Pascal and a predefined union
          in C.  FORTRAN does not predefine status_$t, but you can simulate it
          by declaraing an INTEGER*4 variable.  All GPR calls return a status
          code into a status_$t variable.  You can read this status code to
          determne the success or failure of the preceding GPR call.


              31                                                           0
              ______________________________________________________________
              |                            all                              |
              ______________________________________________________________
              31                                                           0

          OR


              31  30                      24  23                          16
              ______________________________________________________________
              |f |          subsys           |             modc             |
              |_____________________________________________________________|
              |                            code                             |
              ______________________________________________________________
              15                                                           0


          Field Description:

          all  All 32 bits in the status code.

          fail The fail bit.  If this bit is set, the error was not within the
               scope of the module invoked, but occurred within a lower-level
               module (bit 31).

          subsys
               The subsystem that encountered the error (bits 24 - 30).

          modc The module that encountered the error (bits 16 - 23).

          code A signed number that identifies the type of error that occurred
               (bits 0 - 15).
     _________________________________________________________________
     Errors

     gpr_$already_initialized
          Graphics primitives are already initialized; you tried to call
          gpr_$init more than once.

     gpr_$arc_overflow_16bit_bounds
          Distance between points on arc exceeds the allowable 16 bits of pre-
          cision.

     gpr_$array_not_sorted
          Array must be in ascending order.

     gpr_$bad_attribute_block
          The attribute block descriptor is incorrect.

     gpr_$bad_bitmap
          The bitmap descriptor is incorrect.

     gpr_$bad_decomp_tech
          Invalid decomposition technique.

     gpr_$bad_font_file
          Font file is incorrect.

     gpr_$bitmap_is_read_only
          Bitmap is read-only and you have tried to write to it.  You may want
          to change the access parameter on the gpr_$open_bitmap_file to
          gpr_$update or gpr_$write.

     gpr_$bitmap_not_a_file_bitmap
          Attempting to set or inquire a bitmap file color map when you have
          not passed a bitmap descriptor to an external bitmap.

     gpr_$cant_deallocate
          You cannot deallocate this bitmap.

     gpr_$cant_mix_modes
          You cannot mix display modes; for example, borrow and direct.

     gpr_$character_not_in_font
          Character is not in a font.

     gpr_$coord_out_of_bounds
          Coordinate value is out of bounds.

     gpr_$dest_out_of_bounds
          Destination window origin is out of bitmap bounds.

     gpr_$dimension_too_big
          The bitmap dimension is too big.

     gpr_$dimension_too_small
          The bitmap dimension is too small.

     gpr_$display_not_acq
          Display has not been acquired.  You can acquire the display with the
          gpr_$acquire_display routine.

     gpr_$duplicate_points
          Duplicate points are illegal.

     gpr_$empty_rop_prim_set
          Raster operation primitive set is empty.

     gpr_$font_table_full
          Font table is full.

     gpr_$font_is_read_only
          The following calls cannot be used to modify a read-only font:
          gpr_$set_space_size, gpr_$set_horizontal_spacing, and
          gpr_$set_character_width.

     gpr_$illegal_fill_pattern
          Illegal bitmap for a fill pattern.

     gpr_$illegal_fill_scale
          Fill pattern scale must be one.

     gpr_$illegal_for_frame
          Operation is illegal for DM frame.

     gpr_$illegal_for_pixel_bitmap
          You cannot call a GPR draw, fill, or text routine in a pixel-
          oriented bitmap.

     gpr_$illegal_pattern_length
          The length of a line pattern must be less than 64 and greater than
          0.

     gpr_$illegal_pixel_value
          Pixel value range is illegal.

     gpr_$illegal_software_version
          Pad is not compatible with current software version.

     gpr_$illegal_text_path
          Value is not in gpr_$direction_t.

     gpr_$illegal_when_imaging
          Operation is illegal in imaging format.

     gpr_$incorrect_alignment
          Bitmap layout specifications do not satisfy GPR alignment con-
          straints.

     gpr_$incorrect_decomp_tech
          Attempting to close a polygon and return a set of trapezoids when
          the decomposition technique is not set to one of the trapezoid tech-
          niques or attempting to close a polygon and return a set of trian-
          gles when the decomposition technique is not set to
          non_overlapping_tris.

     gpr_$input_buffer_overflow
          The system has discarded some input events because the input buffer
          overflowed.  The input buffer can currently hold 256 events.  To
          avoid this problem, your program should read the input buffer more
          frequently.

     gpr_$internal_error
          This is an internal error.

     gpr_$invalid_color_map
          The color map is invalid.

     gpr_$invalid_font_id
          Font id is invalid.

     gpr_$invalid_imaging_format
          Format is invalid for display hardware.

     gpr_$invalid_plane
          The plane number is invalid.

     gpr_$invalid_raster_op
          The raster operation value is invalid.

     gpr_$invalid_virtual_device_id
          Invalid virtual device identification number.

     gpr_$kbd_not_acq
          Keyboard has not been acquired.

     gpr_$must_borrow_display
          You must borrow the display for this operation.

     gpr_$must_have_display
          Display must be acquired.

     gpr_$must_release_display
          You must release the display for this operation.

     gpr_$no_attributes_defined
          No attributes are defined for the bitmap.

     gpr_$no_color_map_in_file
          Attempting to inquire a bitmap file color map when you have not
          passed a bitmap descriptor to an external bitmap.

     gpr_$no_input_enabled
          No input events are enabled.

     gpr_$no_more_fast_buffers
          You cannot allocate another buffer bitmap.

     gpr_$no_more_space
          No more bitmap space is available.

     gpr_$no_reset_decomp_in_pgon
          Cannot set the decomposition technique between gpr_$start_pgon and
          gpr_$close_return_pgon, gpr_$close_fill_pgon, or
          gpr_$close_return_pgon_tri.

     gpr_$not_in_direct_mode
          Display is not in direct mode.

     gpr_$not_in_polygon
          No polygon is being defined.

     gpr_$not_initialized
          Primitives are not initialized.

     gpr_$rop_sets_not_equal
          Raster operations sets are not equal.

     gpr_$source_out_of_bounds
          Source window origin is out of bitmap bounds.

     gpr_$specific_nonzero_only
          Must specify a winding number when the fill criterion is
          gpr_$specific.

     gpr_$style_call_not_active
          You cannot call gpr_$set_linestyle if you have previously called
          gpr_$set_draw_pattern.

     gpr_$unable_to_rotate_font
          Rotated character cannot fit into allocated character space.

     gpr_$window_obscured
          Window is obscured.

     gpr_$window_out_of_bounds
          Window origin is out of bitmap bounds.

     gpr_$wrong_display_hardware
          The display hardware is wrong for this operation.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026