Building a DEC GKS Device Handler System

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Introduction

  1.1     Writing Handlers for Your Devices

  1.2     Device Handlers

  2      How GKS Works

  2.1     The GKS System
    2.1.1      Inquiries
    2.1.2      Transformations
    2.1.3      Input
    2.1.4      Output

  2.2     Communication Between the Kernel and Your Handler
    2.2.1      DEC GKS Data Types
    2.2.2      Parameter Passing

  3      Building a Device Handler System

  3.1     Learning About Your Device

  3.2     Hardcopy Output Devices

  3.3     Building WDT Structures
    3.3.1      LIST_LINETYPES
    3.3.2      PREDEF_PLINE_BUNDLES
    3.3.3      LIST_MARKERS
    3.3.4      PREDEF_PMARK_BUNDLES
    3.3.5      LIST_FONT_INFORMATION
    3.3.6      TEXT_BUNDLES
    3.3.7      FILL_BUNDLES
    3.3.8      HATCH_STYLE
    3.3.9      PATT_BUNDLES
    3.3.10     COLOR_BUNDLES
    3.3.11     LIST_OF_GDP
    3.3.12     LIST_OF_ESCAPES
    3.3.13     PET_ARRAY
    3.3.14     INPUT_DEVICE_CHARACTERISTICS
    3.3.15     CHARACTER_INFO
    3.3.16     CHOICE_LIST
    3.3.17     ECHO_AREA_ARRAY
    3.3.18     ECHO_AREA_SET
    3.3.19     APPLICATION_PET_MAP_LIST

  3.4     Building the Workstation Description Table
    3.4.1      Building the Workstation Description Table for an MO Device Handler

  3.5     Sample Workstation Description Table

  4      Device Handler Functions

  4.1     Parameter Passing

  4.2     Message and Constant Files

  4.3     Supporting Several Devices with a Single Handler

  4.4     Developing the Local Data Area Table

  4.5     Reentrance

  4.6     Opening the Workstation
    4.6.1      INQUIRE LOCAL DATA
    4.6.2      WORKSTATION INITIALIZATION

  4.7     Closing the Workstation
    4.7.1      WORKSTATION EXIT

  4.8     Required Output Functions
    4.8.1      CLEAR WORKSTATION
    4.8.2      DRAW LINE
      4.8.2.1      ASF Flags
      4.8.2.2      Multiple Line Types
      4.8.2.3      Multiple Line Widths
    4.8.3      SET COLOR INDEX

  4.9     Optional Output Functions
    4.9.1      DRAW CELL ARRAY
    4.9.2      DRAW FILL AREA
      4.9.2.1      ASF Flags
    4.9.3      DRAW GDP
    4.9.4      DRAW MARKER
      4.9.4.1      ASF Flags
    4.9.5      HIGHLIGHT EXTENT
    4.9.6      DRAW TEXT
      4.9.6.1      ASF Flags
    4.9.7      Set Clipping
    4.9.8      SET PATTERN REPRESENTATION
    4.9.9      SET COLOR REPRESENTATION

  4.10    Supplemental Text Functions
    4.10.1     INQUIRE FONT DESCRIPTION
    4.10.2     SET REALIZED TEXT

  4.11    Output Utility Function
    4.11.1     WS_MANAGER_UPDATE_VIEWPORT

  4.12    Input Functions
    4.12.1     HANDLER INPUT
    4.12.2     HANDLER INPUT QIO
    4.12.3     WS_MANAGER_UPDATE_INPUT

  4.13    Optional Input Functions
    4.13.1     Input Arc
    4.13.2     Input Circle
    4.13.3     Input Ellipse
    4.13.4     INPUT LINE
    4.13.5     Input Markers
    4.13.6     Input Options
    4.13.7     STROKE Logical Input Devices
    4.13.8     Input Text
    4.13.9     Set Input Text
    4.13.10    INITIALIZE HANDLER INPUT

  4.14    Other Optional Functions
    4.14.1     INQUIRE PIXEL ARRAY
    4.14.2     ESCAPE
    4.14.3     Suggested Escape Functions
      4.14.3.1     GKS$K_INQ_GDP_EXTENT
      4.14.3.2     GKS$K_ESC_BELL
      4.14.3.3     GKS$K_ESC_CLEAR_REGION
      4.14.3.4     GKS$K_ESC_CLEAR_INPUT
    4.14.4     FREE WDT
    4.14.5     FLUSH OUTPUT
    4.14.6     MESSAGE
    4.14.7     INQ_WSDT

  5      Assembling Your Device Handler

  5.1     Building the Device Function Table

  5.2     Linking Your Handler

  5.3     Defining Device Handler Logical Names
    5.3.1      Handler Logical Names
    5.3.2      Adding Logical Names to GKSTARTUP.COM

  A   Device Handler Function Examples

  A.1     Data Structures

  A.2     Control Functions

  A.3     Output Functions

  A.4     Input Functions

  A.5     Inquiry Functions

  A.6     Attribute Functions

  A.7     DFT Macro

  A.8     Linking Command Procedure

  EXAMPLES

  3-1        WDT Structure for a Digital VT125

  5-1        Sample DFT-Building Macro

  FIGURES

  1-1        The Application, GKS Kernel, and Handlers

  1-2        Device Handler Diagram

  4-1        X and Y Vectors

  4-2        Pixel Array Dimensions

  TABLES

  2-1        GKS State Lists and Description Tables

  2-2        GKS Coordinate Systems

  2-3        DEC GKS Data Types

  2-4        Passing Mechanisms for DEC GKS Data Types

  3-1        Device Handler Workstation Description Table Structure

  3-2        Device Handler WDT Structure for an MO Device Handler

  4-1        Required and Optional Functions by Workstation Type

  4-2        GKSMSGS and GKSDEFS File Extensions

  4-3        Local Data Area Table Elements for All Workstation Types

  4-4        Local Data Area Table Contents for INPUT and OUTIN Handlers

  4-5        Local Data Area Table Contents for OUTIN and OUTPUT Handlers

  4-6        ASF FLAGS-Bit Assignments

  4-7        ASF FLAGS-Bit Assignments

  4-8        ASF FLAGS-Bit Assignments

  4-9        ASF FLAGS-Bit Assignments

  4-10       Input Codes

  5-1        Keywords for DFT Functions