Helper Application Database File

This document describes the purpose and format of the PiHelperAppDB.txt file.

Purpose

The PiHelperAppDB.txt file is a database containing helper application descriptions. Helper applications are programs that can be launched through mechanisms in the Cosmo Create and Cosmo Worlds plug-in architecture.

Format

The format of the file is line-oriented and very simple. The file should contain zero or more application description blocks, each beginning with "Begin" and ending with "End." Within the block, each line describes a single attribute of the application description. The line consists of the field's ID, followed by a colon and then the value of the attribute.

Begin
  ID: com.sgi.cosmo.photoshop
  UINAME: Photoshop
  REPTYPE: PiUnixApp
  FLAVOR: Editor
  EXECUTABLE: photoshop
  ARGS: -open %f
  PIXMAP: photoshop.xpm
  NATIVE: PhotoshopDocument
  FILETYPES: PhotoshopDocument GIFImageFile TIFFImage SGIImage
End

Field Meanings

PiUnixApp launching

PiUnixApp uses the EXECUTABLE and ARGS fields of its application description when it launches the application.

Since the application is used by a PiEditSession to edit a file on the disk, the arguments can be parameterized by information about that file (similar to a mailcap file). The basic input is the file to be operated on. Different parameters are available to provide information about different parts of it.

File-Centric Parameters

Some programs require both an input and an output file. We provide %copy and %COPY for these programs. If the PiUnixApp sees one of these parameters, it copies the input file to a temporary file in the same directory and sets %copy and %COPY appropriately.

Window Mapping Parameter

Put %wr in your args only if you support -xrm args. You probably support them if you pass your arguments to XtInitialize.