mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
+ Added examples
This commit is contained in:
parent
f3ee8d8432
commit
c0994cb17c
38
docs/gpm.tex
38
docs/gpm.tex
@ -1,5 +1,25 @@
|
|||||||
|
%
|
||||||
|
% $Id$
|
||||||
|
% This file is part of the FPC documentation.
|
||||||
|
% Copyright (C) 1997, by Michael Van Canneyt
|
||||||
|
%
|
||||||
|
% The FPC documentation is free text; you can redistribute it and/or
|
||||||
|
% modify it under the terms of the GNU Library General Public License as
|
||||||
|
% published by the Free Software Foundation; either version 2 of the
|
||||||
|
% License, or (at your option) any later version.
|
||||||
|
%
|
||||||
|
% The FPC Documentation is distributed in the hope that it will be useful,
|
||||||
|
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
% Library General Public License for more details.
|
||||||
|
%
|
||||||
|
% You should have received a copy of the GNU Library General Public
|
||||||
|
% License along with the FPC documentation; see the file COPYING.LIB. If not,
|
||||||
|
% write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
% Boston, MA 02111-1307, USA.
|
||||||
|
%
|
||||||
\chapter{The GPM unit}
|
\chapter{The GPM unit}
|
||||||
|
\FPCexampledir{gpmex}
|
||||||
\section{Introduction}
|
\section{Introduction}
|
||||||
The \file{GPM} unit implements an interface to file{libgpm}, the console
|
The \file{GPM} unit implements an interface to file{libgpm}, the console
|
||||||
program for mouse handling. This unit was created by Peter Vreman, and
|
program for mouse handling. This unit was created by Peter Vreman, and
|
||||||
@ -67,12 +87,10 @@ TGpmEvent = record
|
|||||||
buttons : byte;
|
buttons : byte;
|
||||||
modifiers : byte;
|
modifiers : byte;
|
||||||
vc : word;
|
vc : word;
|
||||||
dx : integer;
|
dx : word;
|
||||||
dy : integer;
|
dy : word;
|
||||||
x : integer;
|
x : word;
|
||||||
y : integer;
|
y : word;
|
||||||
wdx : integer;
|
|
||||||
wdy : integer;
|
|
||||||
EventType : TGpmEType;
|
EventType : TGpmEType;
|
||||||
clicks : longint;
|
clicks : longint;
|
||||||
margin : TGpmMargin;
|
margin : TGpmMargin;
|
||||||
@ -198,6 +216,8 @@ None.
|
|||||||
\seefl{Gpm\_Open}{GpmOpen}
|
\seefl{Gpm\_Open}{GpmOpen}
|
||||||
\end{functionl}
|
\end{functionl}
|
||||||
|
|
||||||
|
for an example, see \seefl{Gpm_GetEvent}{GpmGetEvent}.
|
||||||
|
|
||||||
\begin{functionl}{Gpm\_FitValues}{GpmFitValues}
|
\begin{functionl}{Gpm\_FitValues}{GpmFitValues}
|
||||||
\Declaration
|
\Declaration
|
||||||
function Gpm\_FitValues(var x,y:longint):longint;cdecl;external;
|
function Gpm\_FitValues(var x,y:longint):longint;cdecl;external;
|
||||||
@ -238,6 +258,8 @@ On error, -1 is returned.
|
|||||||
seefl{Gpm\_GetSnapshot}{GpmGetSnapshot}
|
seefl{Gpm\_GetSnapshot}{GpmGetSnapshot}
|
||||||
\end{functionl}
|
\end{functionl}
|
||||||
|
|
||||||
|
\FPCexample{gpmex}
|
||||||
|
|
||||||
\begin{functionl}{Gpm\_GetLibVersion}{GpmGetLibVersion}
|
\begin{functionl}{Gpm\_GetLibVersion}{GpmGetLibVersion}
|
||||||
\Declaration
|
\Declaration
|
||||||
function Gpm\_GetLibVersion(var where:longint):pchar;cdecl;external;
|
function Gpm\_GetLibVersion(var where:longint):pchar;cdecl;external;
|
||||||
@ -338,6 +360,8 @@ On Error, the return value is -1.
|
|||||||
\seefl{Gpm\_Open}{GpmOpen}
|
\seefl{Gpm\_Open}{GpmOpen}
|
||||||
\end{functionl}
|
\end{functionl}
|
||||||
|
|
||||||
|
for an example, see \seefl{Gpm_GetEvent}{GpmGetEvent}.
|
||||||
|
|
||||||
\begin{functionl}{Gpm\_PopRoi}{GpmPopRoi}
|
\begin{functionl}{Gpm\_PopRoi}{GpmPopRoi}
|
||||||
\Declaration
|
\Declaration
|
||||||
function Gpm\_PopRoi(which:PGpmRoi):PGpmRoi;cdecl;external;
|
function Gpm\_PopRoi(which:PGpmRoi):PGpmRoi;cdecl;external;
|
||||||
|
Loading…
Reference in New Issue
Block a user