[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

Chapter 1. Control Subroutines

The control subroutines allow your application to have access to and control over the graphical resources available when using the graPHIGS API (*)

You can open and close the graPHIGS API and invoke the diagnostic trace for debugging.

When an application opens the graPHIGS API, a nucleus, which is the collection of resources available to your application, is connected to your application. When you connect the nucleus, you can create resources, such as workstations, structure stores, and font directories for use by your application. You can connect several application processes to the nucleus. Using the attach subroutines, several application processes share resources. Using message subroutines, application processes communicate with each other. In addition, your application can control the timing of when the graPHIGS API sends buffered transactions to the nucleus for processing.

Also invoke these subroutines to affect the timing of update operations and to explicitly control the update and redraw operations on a workstation.

These subroutines do not store or modify graphics data.

GPATR - Attach Resource

GPATR (type, id, ncid, rid, pass)

Purpose

Use GPATR to allow your application the use of resources created by other application processes that are connected to the specified nucleus. Use this subroutine when several application processes in different nodes (such as a host application and a Distributed Application Process [DAP]) share access and control of the same resource (such as a workstation or structure store)

The id parameter specifies an identifier to be assigned by your application to the attached resource. For example, if the type parameter specifies 1=WORKSTATION , then the application uses the specified id as the workstation identifier (wsid) of the attached workstation. Similarly, for the other resource types, the id parameter is used as the structure store identifier (ssid), image board identifier (ibid), font directory identifier (fdid), or archive file identifier (arid) respectively.

The rid parameter is obtained by the application process that created the resource by issuing the Inquire Nucleus Resource Identifier (GPQNCR) subroutine. It is the resource identifier assigned by the nucleus to the resource when it was created. The application process must then provide the assigned identifier (rid) and any required password (pass) to your application process for use by this subroutine.

If the specified resource type is 1=WORKSTATION , then the current workstation state is set to Workstation Open (WSOP)

If the specified resource type is 2=STRUCTURE_STORE , then the current structure state is set to Structure Store Open (SSOP) After attaching to the specified structure store, your application must issue the Select Structure Store (GPSSS) subroutine before any editing of the structure store is allowed.

If the specified resource type is 5=ARCHIVE_FILE , then the current archive state is set to Archive Open (AROP)

Parameters

type -- specified by user, fullword integer

Resource type (1=WORKSTATION, 2=STRUCTURE_STORE, 3=IMAGE_BOARD, 4=FONT_DIRECTORY, 5=ARCHIVE_FILE )

id -- specified by user, fullword integer

Identifier to be assigned to the resource.

ncid -- specified by user, fullword integer

Nucleus identifier.

rid -- specified by user, fullword integer

Nucleus resource identifier.

pass -- specified by user, fullword integer

Resource password.

Error Codes

24
SPECIFIED WORKSTATION IDENTIFIER ALREADY IS IN USE
202
SPECIFIED NUCLEUS DOES NOT EXIST
211
RESOURCE TYPE IS INVALID
212
SPECIFIED RESOURCE IDENTIFIER DOES NOT EXIST
213
SPECIFIED PASSWORD IS INCORRECT
219
SPECIFIED ARCHIVE FILE IDENTIFIER ALEADY IN USE
221
SPECIFIED STRUCTURE STORE IDENTIFIER ALREADY IS IN USE
231
SPECIFIED IMAGE BOARD IDENTIFIER ALREADY IS IN USE
241
SPECIFIED FONT DIRECTORY IDENTIFIER ALREADY IS IN USE

Related Subroutines

GPCRFD
Create Font Directory
GPCRIB
Create Image Board
GPCRSS
Create Structure Store
GPCRWS
Create Workstation
GPDTR
Detach Resource
GPOPAR
Open Archive File
GPQATR
Inquire List of Attached Resources
GPQNCR
Inquire Nucleus Resource Identifier
GPSSS
Select Structure Store

RCP code

201341697 (X'0C003B01')


[ Previous | Next | Contents | Glossary | Home | Search ]