[Overview][Constants][Types][Procedures and functions][Variables][Index] | Reference for unit 'gpm' (#rtl)

# gpm_open

Open connection to GPM server.

## Declaration

Source position: gpm.pp line 185

`function gpm_open(`
`var conn: Tgpm_connect;`
`flag: LongInt`
`):LongInt;`

## Description

Gpm_Open opens a new connection to the mouse server. The connection is described by the fields of the conn record of type TGPMConnect.

if Flag is 0, then the application only receives events that come from its own terminal device. If it is negative it will receive all events. If the value is positive then it is considered a console number to which to connect.

The return value is -1 on error, or the file descriptor used to communicate with the client. Under an X-Term the return value is -2.

for an example, see Gpm_GetEvent.

## Errors

On Error, the return value is -1.

## See also

Gpm_Open |  | Open connection to GPM server.

Documentation generated on: Feb 26 2014