-
Declaration:
- function Gpm_AnyDouble(EventType : longint) : boolean;
-
Description:
- Gpm_AnyDouble returns True if EventType contains the GPM_DOUBLE flag, False otherwise.
-
Errors:
- None.
-
See also:
- Gpm__StrictSingle (132), Gpm__AnySingle (126), Gpm__StrictDouble (132), Gpm__StrictTriple
(133), Gpm__AnyTriple (126)
-
Declaration:
- function Gpm_AnySingle(EventType : longint) : boolean;
-
Description:
- Gpm_AnySingle returns True if EventType contains the GPM_SINGLE flag, False otherwise.
-
Errors:
-
-
See also:
- Gpm__StrictSingle (132), Gpm__AnyDoubmle (126), Gpm__StrictDouble (132),
Gpm__StrictTriple (133), Gpm__AnyTriple (126)
-
Declaration:
- function Gpm_AnyTriple(EventType : longint) : boolean;
-
Description:
-
-
Errors:
-
-
See also:
- Gpm__StrictSingle (132),
Gpm__AnyDoubmle (126), Gpm__StrictDouble (132), Gpm__StrictTriple (133), Gpm__AnySingle
(126)
-
Declaration:
- function Gpm_Close:longint;cdecl;external;
-
Description:
- Gpm_Close closes the current connection, and pops the connection stack; this means that
the previous connection becomes active again.
The function returns -1 if the current connection is not the last one, and it returns 0 if the
current connection is the last one.
-
Errors:
- None.
-
See also:
- Gpm__Open (130)
for an example, see Gpm__GetEvent (127).
-
Declaration:
- function Gpm_FitValues(var x,y:longint):longint;cdecl;external;
-
Description:
- Gpm_fitValues changes x and y so they fit in the visible screen. The actual mouse pointer
is not affected by this function.
-
Errors:
- None.
-
See also:
- Gpm__FitValuesM (127),
-
Declaration:
- function Gpm_FitValuesM(var x,y:longint;
margin:longint):longint;cdecl;external;
-
Description:
- Gpm_FitValuesM chnages x and y so they fit in the margin indicated by margin. If margin
is -1, then the values are fitted to the screen. The actual mouse pointer is not affected by
this function.
-
Errors:
- None.
-
See also:
- Gpm__FitValues (127),
-
Declaration:
- function Gpm_GetEvent(var Event:TGpmEvent):longint;cdecl;external;
-
Description:
- Gpm_GetEvent Reads an event from the file descriptor gpm_fd. This file is only for internal
use and should never be called by a client application.
It returns 1 on succes, and -1 on failue.
-
Errors:
- On error, -1 is returned.
-
See also:
- seeflGpm__GetSnapshotGpmGetSnapshot
Listing: gpmex/gpmex.pp
-
Declaration:
- function Gpm_GetLibVersion(var where:longint):pchar;cdecl;external;
-
Description:
- Gpm_GetLibVersion returns a pointer to a version string, and returns in where an integer
representing the version. The version string represents the version of the gpm library.
The return value is a pchar, which should not be dealloacted, i.e. it is not on the heap.
-
Errors:
- None.
-
See also:
- Gpm__GetServerVersion (129)
-
Declaration:
- function Gpm_GetServerVersion(var where:longint):pchar;cdecl;external;
-
Description:
- Gpm_GetServerVersion returns a pointer to a version string, and returns in where an
integer representing the version. The version string represents the version of the gpm server
program.
The return value is a pchar, which should not be dealloacted, i.e. it is not on the heap.
-
Errors:
- If the gpm program is not present, then the function returns Nil
-
See also:
- Gpm__GetLibVersion (129)
-
Declaration:
- function Gpm_GetSnapshot(var Event:TGpmEvent):longint;cdecl;external;
-
Description:
- Gpm_GetSnapshot returns the picture that the server has of the current situation in Event. This
call will not read the current situation from the mouse file descriptor, but returns a buffered
version. The meaning of the fields is as follows:
-
x,y
- current position of the cursor.
-
dx,dy
- size of the window.
-
vc
- number of te virtual console.
-
modifiers
- keyboard shift state.
-
buttons
- buttons which are currently pressed.
-
clicks
- number of clicks (0,1 or 2).
The function returns the number of mouse buttons, or -1 if this information is not available.
-
Errors:
- None.
-
See also:
- Gpm__GetEvent (127)
-
Declaration:
- function Gpm_LowerRoi(which:PGpmRoi; after:PGpmRoi):PGpmRoi;cdecl;external;
-
Description:
- Gpm_LowerRoi lowers the region of interest which after after. If after is Nil, the region
of interest is moved to the bottom of the stack.
The return value is the new top of the region-of-interest stack.
-
Errors:
- None.
-
See also:
- Gpm__RaiseRoi (131), Gpm__PopRoi (131), Gpm__PushRoi (131)
-
Declaration:
- function Gpm_Open(var Conn:TGpmConnect;
Flag:longint):longint;cdecl;external;
-
Description:
- Gpm_Open opens a new connection to the mouse server. The connection is described by the fields
of the conn record:
-
EventMask
- A bitmask of the events the program wants to receive.
-
DefaultMask
- A bitmask to tell the library which events get their default treatment (text
selection).
-
minMod
- the minimum amount of modifiers needed by the program.
-
maxMod
- the maximum amount of modifiers needed by the program.
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.
-
Errors:
- On Error, the return value is -1.
-
See also:
- Gpm__Open (130)
for an example, see Gpm__GetEvent (127).
-
Declaration:
- function Gpm_PopRoi(which:PGpmRoi):PGpmRoi;cdecl;external;
-
Description:
- Gpm_PopRoi pops the topmost region of interest from the stack. It returns the next element
on the stack, or Nil if the current element was the last one.
-
Errors:
- None.
-
See also:
- Gpm__RaiseRoi (131), Gpm__LowerRoi (130), Gpm__PushRoi (131)
-
Declaration:
- function Gpm_PushRoi(x1:longint; y1:longint; X2:longint; Y2:longint;
mask:longint; fun:TGpmHandler; xtradata:pointer):PGpmRoi;cdecl;external;
-
Description:
- Gpm_PushRoi puts a new region of interest on the stack. The region of interest is defined
by a rectangle described by the corners (X1,Y1) and (X2,Y2).
The mask describes which events the handler fun will handle; ExtraData will be put in the
xtradata field of the TGPM__Roi record passed to the fun handler.
-
Errors:
- None.
-
See also:
- Gpm__RaiseRoi (131), Gpm__PopRoi (131), Gpm__LowerRoi (130)
-
Declaration:
- function Gpm_RaiseRoi(which:PGpmRoi;
before:PGpmRoi):PGpmRoi;cdecl;external;
-
Description:
- Gpm_RaiseRoi raises the region of interest which till it is on top of region before. If before
is nil then the region is put on top of the stack. The returned value is the top of the stack.
-
Errors:
- None.
-
See also:
- Gpm__PushRoi (131), Gpm__PopRoi (131), Gpm__LowerRoi (130)
-
Declaration:
- function Gpm_Repeat(millisec:longint):longint;cdecl;external;
-
Description:
- Gpm_Repeat returns 1 of no mouse event arrives in the next millisec miiliseconds, it
returns 0 otherwise.
-
Errors:
- None.
-
See also:
- Gpm__GetEvent (127)
-
Declaration:
- function Gpm_StrictDouble(EventType : longint) : boolean;
-
Description:
- Gpm_StrictDouble returns true if EventType contains only a doubleclick event, False
otherwise.
-
Errors:
- None.
-
See also:
- Gpm__StrictSingle (132), Gpm__AnyTriple (126), Gpm__AnyDouble (126), Gpm__StrictTriple
(133), Gpm__AnySingle (126)
-
Declaration:
- function Gpm_StrictSingle(EventType : longint) : boolean;
-
Description:
- Gpm_StrictDouble returns True if EventType contains only a singleclick event, False
otherwise.
-
Errors:
- None.
-
See also:
- Gpm__AnyTriple (126), Gpm__StrictDouble (132), Gpm__AnyDouble (126), Gpm__StrictTriple
(133), Gpm__AnySingle (126)
-
Declaration:
- function Gpm_StrictTriple(EventType : longint) : boolean;
-
Description:
- Gpm_StrictTriple returns true if EventType contains only a triple click event, False
otherwise.
-
Errors:
- None.
-
See also:
- Gpm__AnyTriple (126), Gpm__StrictDouble (132), Gpm__AnyDouble (126), Gpm__StrictSingle
(132), Gpm__AnySingle (126)