* cdecl added

This commit is contained in:
Tomas Hajny 2000-01-09 21:01:59 +00:00
parent c4153b1ff9
commit 2d90c8f390
4 changed files with 352 additions and 290 deletions

View File

@ -1,32 +1,34 @@
{Set tabsize to 4.}
{****************************************************************************
$Id$
KBDCALLS interface unit
FPK-Pascal Runtime Library for OS/2
Free Pascal Runtime Library for OS/2
Copyright (c) 1999-2000 by Florian Kl„mpfl
Copyright (c) 1999-2000 by Danil Mantione
Copyright (c) 1999-2000 by Daniel Mantione
Copyright (c) 1999-2000 by Tomas Hajny
The FPK-Pascal runtime library is distributed under the Library GNU Public
The Free Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the FPK Pascal compiler,
this, and that is, when you compile a program with the Free Pascal Compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This is an official, unmodified FPK Pascal source code file.>
<This is an official, unmodified Free Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal is distributed in the hope that it will be useful,
Free Pascal 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
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with FPK-Pascal; see the file COPYING.LIB. If not, write to
along with Free Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@ -51,10 +53,10 @@ Changelog:
Coding style:
I have tried to use the same coding style as Danil Mantione in unit
I have tried to use the same coding style as Daniel Mantione in unit
DOSCALLS, although I can't say I would write it the same way otherwise
(I would write much more spaces myself, at least). Try to use it as well,
please. Original note by Danil Mantione follows:
please. Original note by Daniel Mantione follows:
It may be well possible that coding style feels a bit strange to you.
@ -67,9 +69,9 @@ Coding style:
interface
{***************************************************************************}
{$ifdef FPK}
{$packrecords 1}
{$endif FPK}
{$IFDEF FPC}
{$PACKRECORDS 1}
{$ENDIF FPC}
const
{return codes / error constants (those marked with * shouldn't occur under
@ -1236,7 +1238,7 @@ KR_* constants}
* There can be only one KbdRegister call outstanding for each session without
an intervening KbdDeRegister. KbdDeRegister must be issued by the same
process that issued the KbdRegister.}
function KbdRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word;
function KbdRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word; cdecl;
function KbdRegister(ModuleName,ProcName:string;FnMask:cardinal):word;
{Deregister a keyboard subsystem previously registered within a session - only
@ -1246,7 +1248,7 @@ the process that issued the KbdRegister may issue KbdDeRegister.}
411 Error_Kbd_Deregister
464 Error_Kbd_Detached
504 Error_Kbd_Extended_SG}
function KbdDeRegister:word;
function KbdDeRegister:word; cdecl;
{Return a character data record from the keyboard.}
{Key - see TKbdKeyInfo record type, WaitFlag - see IO_Wait and IO_NoWait
@ -1277,7 +1279,7 @@ constants, KbdHandle is the default keyboard (0) or a logical keyboard.}
from executing. If polling must be used and a minimal amount of other
processing is being performed, the thread should periodically yield to the
CPU by issuing a DosSleep call for an interval of at least 5 milliseconds.}
function KbdCharIn(var Key:TKbdKeyInfo;WaitFlag,KbdHandle:word):word;
function KbdCharIn(var Key:TKbdKeyInfo;WaitFlag,KbdHandle:word):word; cdecl;
{Return any available character data record from the keyboard
without removing it from the buffer.}
@ -1308,7 +1310,7 @@ or a logical keyboard.}
from executing. If polling must be used and a minimal amount of other
processing is being performed, the thread should periodically yield the CPU
by issuing a DosSleep call for an interval of at least 5 milliseconds.}
function KbdPeek(var Key:TKbdKeyInfo;KbdHandle:word):word;
function KbdPeek(var Key:TKbdKeyInfo;KbdHandle:word):word; cdecl;
{Read a character string (character codes only) from the keyboard.}
{CharBuf is a buffer for returned characters, LenInOut - see TStringInBuf
@ -1344,9 +1346,9 @@ default keyboard (0) or a logical keyboard.}
* KbdStringIn completes when the handle has access to the physical keyboard
(focus), or is equal to zero and no other handle has the focus.}
function KbdStringIn(var CharBuf;var LenInOut:TStringInBuf;WaitFlag:word;
KbdHandle:word):word;
KbdHandle:word):word; cdecl;
function KbdStringIn(CharBuf:PChar;LenInOutP:PStringInBuf;WaitFlag:word;
KbdHandle:word):word;
KbdHandle:word):word; cdecl;
{Clear the keystroke buffer.}
{KbdHandle is the default keyboard (0) or a logical keyboard.}
@ -1360,7 +1362,7 @@ function KbdStringIn(CharBuf:PChar;LenInOutP:PStringInBuf;WaitFlag:word;
{Remarks:
* KbdFlushBuffer completes when the handle has access to the physical
keyboard (focus), or is equal to zero and no other handle has the focus.}
function KbdFlushBuffer(KbdHandle:word):word;
function KbdFlushBuffer(KbdHandle:word):word; cdecl;
{Set the characteristics of the keyboard.}
{Status - see TKbdInfo record type, KbdHandle is the default keyboard (0) or
@ -1378,7 +1380,7 @@ a logical keyboard.}
{Remarks:
* Shift return (bit 8 in sysstate) must be disabled in ASCII mode.
* KbdSetStatus is ignored for a Vio-windowed application.}
function KbdSetStatus(var Status:TKbdInfo;KbdHandle:word):word;
function KbdSetStatus(var Status:TKbdInfo;KbdHandle:word):word; cdecl;
{Get the current state of the keyboard.}
{Status - see TKbdInfo record type, KbdHandle is the default keyboard (0) or
@ -1400,7 +1402,7 @@ a logical keyboard.}
Character
* KbdGetStatus completes only when the handle has access to the physical
keyboard (focus) or the handle is 0 and no other handle has the focus.}
function KbdGetStatus(var Status:TKbdInfo;KbdHandle:word):word;
function KbdGetStatus(var Status:TKbdInfo;KbdHandle:word):word; cdecl;
{Set the code page used to translate key strokes received from the keyboard for
current process.}
@ -1419,7 +1421,7 @@ otherwise, KbdHandle is the default keyboard (0) or a logical keyboard.}
{Remarks:
* Keyboard code page support is not available without the DEVINFO=KBD
statement in the CONFIG.SYS file.}
function KbdSetCp(Reserved,CodePage,KbdHandle:word):word;
function KbdSetCp(Reserved,CodePage,KbdHandle:word):word; cdecl;
{Query the code page being used to translate scan codes to ASCII characters.}
{Reserved must be set to 0. The keyboard support returns the current code
@ -1439,6 +1441,7 @@ the default keyboard (0) or a logical keyboard.}
indicates the code page translation table in use is the ROM code page
translation table provided by the hardware.}
function KbdGetCp(Reserved:cardinal;var CodePage:word;KbdHandle:word):word;
cdecl;
{Create a new logical keyboard.}
{Handle for the new logical keyboard returned in KbdHandle.}
@ -1456,7 +1459,7 @@ function KbdGetCp(Reserved:cardinal;var CodePage:word;KbdHandle:word):word;
KbdGetFocus wait until focus available on handle 0
KbdOpen get a logical keyboard handle
KbdFreeFocus give up the focus on handle 0}
function KbdOpen(var KbdHandle:word):word;
function KbdOpen(var KbdHandle:word):word; cdecl;
{Close the existing logical keyboard identified by the keyboard handle}
{KbdHandle is the default keyboard (0) or a logical keyboard}
@ -1474,7 +1477,7 @@ function KbdOpen(var KbdHandle:word):word;
KbdGetFocus wait until focus available on handle 0
KbdClose close a logical keyboard handle
KbdFreeFocus give up the focus on handle 0}
function KbdClose(KbdHandle:word):word;
function KbdClose(KbdHandle:word):word; cdecl;
{Bind the logical keyboard to the physical keyboard.}
{KbdHandle is the default keyboard (0) or a logical keyboard}
@ -1484,7 +1487,7 @@ function KbdClose(KbdHandle:word):word;
445 Error_Kbd_Focus_Required
464 Error_Kbd_Detached
504 Error_Kbd_Extended_SG}
function KbdGetFocus(WaitFlag,KbdHandle:word):word;
function KbdGetFocus(WaitFlag,KbdHandle:word):word; cdecl;
{Free the logical-to-physical keyboard bond created by KbdGetFocus.}
{KbdHandle is the default keyboard (0) or a logical keyboard}
@ -1498,7 +1501,7 @@ function KbdGetFocus(WaitFlag,KbdHandle:word):word;
* KbdFreeFocus may be replaced by issuing KbdRegister. Unlike other keyboard
subsystem functions, the replaced KbdFreeFocus is called only if there is
an outstanding focus.}
function KbdFreeFocus(KbdHandle:word):word;
function KbdFreeFocus(KbdHandle:word):word; cdecl;
{Synchronize access from a keyboard subsystem to the keyboard device driver.}
{WaitFlag - see IO_Wait and IO_NoWait constants (wait / don't wait for access
@ -1512,7 +1515,7 @@ to the device driver.}
be issued by a keyboard subsystem if it intends to issue a DosDevIOCtl or
access dynamically shared data. KbdSynch does not protect globally shared
data from threads in other sessions.}
function KbdSynch (WaitFlag:word):word;
function KbdSynch (WaitFlag:word):word; cdecl;
{Raise the priority of the foreground keyboard's thread.}
{Possible return codes:
@ -1525,7 +1528,7 @@ function KbdSynch (WaitFlag:word):word;
threads lose their priority boost.
* This function should only be issued by a Keyboard Subsystem during
KbdCharIn or KbdStringIn processing.}
function KbdSetFgnd:word;
function KbdSetFgnd:word; cdecl;
{Return the attached keyboard's hardware-generated identification value.}
{HWID is a pointer to the caller's data area, see TKbdHWID, KbdHandle is the
@ -1546,11 +1549,11 @@ default keyboard (0) or a logical keyboard.}
keyboard is attached.
* This function is of particular usefulness for applications providing Custom
Translate Tables and mapping keyboard layouts.}
function KbdGetHWID(var HWID:TKbdHWID;KbdHandle:word):word;
function KbdGetHWID(var HWID:TKbdHWID;KbdHandle:word):word; cdecl;
{Undocumented in official IBM documentation}
function KbdSetHWID(var HWID:TKbdHWID;KbdHandle:word):word;
function KbdSetHWID(HWIDP:PKbdHWID;KbdHandle:word):word;
function KbdSetHWID(var HWID:TKbdHWID;KbdHandle:word):word; cdecl;
function KbdSetHWID(HWIDP:PKbdHWID;KbdHandle:word):word; cdecl;
{Translate scan codes with shift states into ASCII codes.}
{TransData - see TKbdTransData, KbdHandle is the default keyboard (0) or a
@ -1571,7 +1574,7 @@ logical keyboard.}
The KbdXlate function is intended to be used for translating a particular
scan code for a given shift state. The KbdXlate function is not intended
to be a replacement for the OS/2 system keystroke translation function.}
function KbdXlate(var TransData:TKbdTrans;KbdHandle:word):word;
function KbdXlate(var TransData:TKbdTrans;KbdHandle:word):word; cdecl;
{Install, on the specified handle, the translate table which this call points
to. This translate table affects only this handle.}
@ -1595,9 +1598,9 @@ logical keyboard.}
one of the system translate tables. If memory is dynamically allocated by
the caller for the translate table and is freed before the KbdSetCp is
performed, KbdSetCp and future translations may fail.}
function KbdSetCustXt(var XLateTbl:TXLateTbl;KbdHandle:word):word;
function KbdSetCustXt(var CodePage:word;KbdHandle:word):word;
function KbdSetCustXt(var XLateTblP:pointer;KbdHandle:word):word;
function KbdSetCustXt(var XLateTbl:TXLateTbl;KbdHandle:word):word; cdecl;
function KbdSetCustXt(var CodePage:word;KbdHandle:word):word; cdecl;
function KbdSetCustXt(var XLateTblP:pointer;KbdHandle:word):word; cdecl;
(* Following routines are not supported
@ -1616,7 +1619,7 @@ implementation
{***************************************************************************}
function KbdRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word;
function KbdRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word; cdecl;
external 'EMXWRAP' index 208;
{external 'KBDCALLS' index 8;}
@ -1629,100 +1632,107 @@ begin
KbdRegister:=KbdRegister(@ModuleName[1],@ProcName[1],FnMask);
end;
function KbdDeRegister:word;
function KbdDeRegister:word; cdecl;
external 'EMXWRAP' index 220;
{external 'KBDCALLS' index 20;}
function KbdCharIn(var Key:TKbdKeyInfo;WaitFlag,KbdHandle:word):word;
function KbdCharIn(var Key:TKbdKeyInfo;WaitFlag,KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 204;
{external 'KBDCALLS' index 4;}
function KbdPeek(var Key:TKbdKeyInfo;KbdHandle:word):word;
function KbdPeek(var Key:TKbdKeyInfo;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 222;
{external 'KBDCALLS' index 22;}
function KbdStringIn(var CharBuf;var LenInOut:TStringInBuf;WaitFlag:word;
KbdHandle:word):word;
KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 209;
{external 'KBDCALLS' index 9;}
function KbdStringIn(CharBuf:PChar;LenInOutP:PStringInBuf;WaitFlag:word;
KbdHandle:word):word;
KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 209;
{external 'KBDCALLS' index 9;}
function KbdFlushBuffer(KbdHandle:word):word;
function KbdFlushBuffer(KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 213;
{external 'KBDCALLS' index 13;}
function KbdSetStatus(var Status:TKbdInfo;KbdHandle:word):word;
function KbdSetStatus(var Status:TKbdInfo;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 211;
{external 'KBDCALLS' index 11;}
function KbdGetStatus(var Status:TKbdInfo;KbdHandle:word):word;
function KbdGetStatus(var Status:TKbdInfo;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 210;
{external 'KBDCALLS' index 10;}
function KbdSetCp(Reserved,CodePage,KbdHandle:word):word;
function KbdSetCp(Reserved,CodePage,KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 205;
{external 'KBDCALLS' index 5;}
function KbdGetCp(Reserved:cardinal;var CodePage:word;KbdHandle:word):word;
cdecl;
external 'EMXWRAP' index 203;
{external 'KBDCALLS' index 3;}
function KbdOpen(var KbdHandle:word):word;
function KbdOpen(var KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 223;
{external 'KBDCALLS' index 23;}
function KbdClose(KbdHandle:word):word;
function KbdClose(KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 217;
{external 'KBDCALLS' index 17;}
function KbdGetFocus(WaitFlag,KbdHandle:word):word;
function KbdGetFocus(WaitFlag,KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 212;
{external 'KBDCALLS' index 12;}
function KbdFreeFocus(KbdHandle:word):word;
function KbdFreeFocus(KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 218;
{external 'KBDCALLS' index 18;}
function KbdSynch (WaitFlag:word):word;
function KbdSynch (WaitFlag:word):word; cdecl;
external 'EMXWRAP' index 207;
{external 'KBDCALLS' index 7;}
function KbdSetFgnd:word;
function KbdSetFgnd:word; cdecl;
external 'EMXWRAP' index 221;
{external 'KBDCALLS' index 21;}
function KbdGetHWID(var HWID:TKbdHWID;KbdHandle:word):word;
function KbdGetHWID(var HWID:TKbdHWID;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 224;
{external 'KBDCALLS' index 24;}
function KbdSetHWID(var HWID:TKbdHWID;KbdHandle:word):word;
function KbdSetHWID(var HWID:TKbdHWID;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 225;
{external 'KBDCALLS' index 25;}
function KbdSetHWID(HWIDP:PKbdHWID;KbdHandle:word):word;
function KbdSetHWID(HWIDP:PKbdHWID;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 225;
{external 'KBDCALLS' index 25;}
function KbdXlate(var TransData:TKbdTrans;KbdHandle:word):word;
function KbdXlate(var TransData:TKbdTrans;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 214;
{external 'KBDCALLS' index 14;}
function KbdSetCustXt(var XLateTbl:TXLateTbl;KbdHandle:word):word;
function KbdSetCustXt(var XLateTbl:TXLateTbl;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 201;
{external 'KBDCALLS' index 1;}
function KbdSetCustXt(var CodePage:word;KbdHandle:word):word;
function KbdSetCustXt(var CodePage:word;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 201;
{external 'KBDCALLS' index 1;}
function KbdSetCustXt(var XLateTblP:pointer;KbdHandle:word):word;
function KbdSetCustXt(var XLateTblP:pointer;KbdHandle:word):word; cdecl;
external 'EMXWRAP' index 201;
{external 'KBDCALLS' index 1;}
end.
{
$Log$
Revision 1.9 2000-01-09 21:01:59 hajny
* cdecl added
}

View File

@ -1,32 +1,34 @@
{Set tabsize to 4.}
{****************************************************************************
$Id$
MONCALLS interface unit
FPK-Pascal Runtime Library for OS/2
Free Pascal Runtime Library for OS/2
Copyright (c) 1999-2000 by Florian Kl„mpfl
Copyright (c) 1999-2000 by Danil Mantione
Copyright (c) 1999-2000 by Daniel Mantione
Copyright (c) 1999-2000 by Tomas Hajny
The FPK-Pascal runtime library is distributed under the Library GNU Public
The Free Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the FPK Pascal compiler,
this, and that is, when you compile a program with the Free Pascal Compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This is an official, unmodified FPK Pascal source code file.>
<This is an official, unmodified Free Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal is distributed in the hope that it will be useful,
Free Pascal 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
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with FPK-Pascal; see the file COPYING.LIB. If not, write to
along with Free Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@ -51,10 +53,10 @@ Changelog:
Coding style:
I have tried to use the same coding style as Danil Mantione in unit
I have tried to use the same coding style as Daniel Mantione in unit
DOSCALLS, although I can't say I would write it the same way otherwise
(I would write much more spaces myself, at least). Try to use it as well,
please. Original note by Danil Mantione follows:
please. Original note by Daniel Mantione follows:
It may be well possible that coding style feels a bit strange to you.
@ -67,32 +69,32 @@ Coding style:
interface
{***************************************************************************}
uses strings;
uses Strings;
{$ifdef FPK}
{$packrecords 1}
{$endif FPK}
{$IFDEF FPC}
{$PACKRECORDS 1}
{$ENDIF FPC}
const
{return codes / error constants (those marked with * shouldn't occur)}
NO_ERROR = 0;
ERROR_NOT_ENOUGH_MEMORY = 8;
ERROR_OPEN_FAILED = 110;
ERROR_MONITORS_NOT_SUPPORTED = 165;
ERROR_MON_INVALID_PARMS = 379;
ERROR_MON_INVALID_DEVNAME = 380;
ERROR_MON_INVALID_HANDLE = 381;
ERROR_MON_BUFFER_TOO_SMALL = 382;
ERROR_MON_BUFFER_EMPTY = 383;
ERROR_MON_DATA_TOO_LARGE = 384;
ERROR_MON_BAD_BUFFER = 730; {*}
ERROR_MON_CHAIN_HANDLE = 32784; {*}
ERROR_MON_NOT_REGISTERED = 32785; {*}
No_Error = 0;
Error_Not_Enough_Memory = 8;
Error_Open_Failed = 110;
Error_Monitors_Not_Supported = 165;
Error_Mon_Invalid_Parms = 379;
Error_Mon_Invalid_DevName = 380;
Error_Mon_Invalid_Handle = 381;
Error_Mon_Buffer_Too_Small = 382;
Error_Mon_Buffer_Empty = 383;
Error_Mon_Data_Too_Large = 384;
Error_Mon_Bad_Buffer = 730; {*}
Error_Mon_Chain_Handle = 32784; {*}
Error_Mon_Not_Registered = 32785; {*}
{WaitFlag}
IO_WAIT =0; {The monitor thread that issues DosMonRead wishes to block}
IO_Wait =0; {The monitor thread that issues DosMonRead wishes to block}
{until a data record is available in its input buffer.}
IO_NOWAIT =1; {The monitor thread that issues DosMonRead does not wish}
IO_NoWait =1; {The monitor thread that issues DosMonRead does not wish}
{to block when its input buffer is empty.}
@ -100,8 +102,8 @@ const
this process are flushed and closed.}
{MonHandle - device handle returned from a previous DosMonOpen call.}
{Possible return codes:
0 NO_ERROR
381 ERROR_MON_INVALID_HANDLE}
0 No_Error
381 Error_Mon_Invalid_Handle}
{Remarks:
* A single process may register one or more monitors with a character device
using the same device handle returned from a previous DosMonOpen call.
@ -119,15 +121,15 @@ this process are flushed and closed.}
* For a detailed description of this call see the chapter "Character Device
Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And
Device Support Volume 1.}
function DosMonClose(MonHandle:word):word;
function DosMonClose(MonHandle:word):word; cdecl;
{Gain access to a character device data stream.}
{DevName - device name, monitor handle returned in MonHandle.}
{Possible return codes:
0 NO_ERROR
110 ERROR_OPEN_FAILED
379 ERROR_MON_INVALID_PARMS
380 ERROR_MON_INVALID_DEVNAME}
0 No_Error
110 Error_Open_Failed
379 Error_Mon_Invalid_Parms
380 Error_Mon_Invalid_DevName}
{Remarks:
* Only one DosMonOpen call is necessary per device per process. That is,
several DosMonReg calls can be made using the same monitor handle to the
@ -138,7 +140,7 @@ function DosMonClose(MonHandle:word):word;
* For a detailed description of this call see the chapter "Character Device
Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And
Device Support Volume 1.}
function DosMonOpen(DevName:PChar;var MonHandle:word):word;
function DosMonOpen(DevName:PChar;var MonHandle:word):word; cdecl;
function DosMonOpen(DevName:string;var MonHandle:word):word;
{Wait for a data record, move it from the input buffer of a registered
@ -149,16 +151,16 @@ DataBuf - data area in the calling process address space that the data from the
monitor's input buffer is read into, ByteCount - on input size of the DataBuf,
on return number of bytes of data moved.}
{Possible return codes:
0 NO_ERROR
379 ERROR_MON_INVALID_PARMS
382 ERROR_MON_BUFFER_TOO_SMALL
383 ERROR_MON_BUFFER_EMPTY}
0 No_Error
379 Error_Mon_Invalid_Parms
382 Error_Mon_Buffer_Too_Small
383 Error_Mon_Buffer_Empty}
{Remarks:
* For a detailed description of this call see the chapter "Character Device
Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And
Device Support Volume 1.}
function DosMonRead(var InBuf;WaitFlag:word;var DataBuf;
var ByteCount:word):word;
var ByteCount:word):word; cdecl;
{Establish an input and output buffers to monitor an I/O stream for a character
device.}
@ -177,12 +179,12 @@ bellow), Index - device specific value, for the keyboard it pertains to the
session you wish to register a monitor on, for the printer it pertains to the
data or code page monitor chain.}
{Possible return codes:
0 NO_ERROR
8 ERROR_NOT_ENOUGH_MEMORY
165 ERROR_MONITORS_NOT_SUPPORTED
379 ERROR_MON_INVALID_PARMS
381 ERROR_MON_INVALID_HANDLE
382 ERROR_MON_BUFFER_TOO_SMALL}
0 No_Error
8 Error_Not_Enough_Memory
165 Error_Monitors_Not_Supported
379 Error_Mon_Invalid_Parms
381 Error_Mon_Invalid_Handle
382 Error_Mon_Buffer_Too_Small}
{Remarks:
* PosCode meaning:
0 DEFAULT (no position preference) and one thread for data movement
@ -206,6 +208,7 @@ data or code page monitor chain.}
Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And
Device Support Volume 1.}
function DosMonReg(MonHandle:word;var InBuf,OutBuf;PosCode,Index:word):word;
cdecl;
{Move a filtered data record from the monitor's private data area into the
monitor's output buffer.}
@ -214,15 +217,15 @@ containing a filtered data record of length ByteCount, this filtered data
record is moved into the monitor's output buffer by this call, ByteCount - size
of the data record.}
{Possible return codes:
0 NO_ERROR
8 ERROR_NOT_ENOUGH_MEMORY
379 ERROR_MON_INVALID_PARMS
384 ERROR_MON_DATA_TOO_LARGE}
0 No_Error
8 Error_Not_Enough_Memory
379 Error_Mon_Invalid_Parms
384 Error_Mon_Data_Too_Large}
{Remarks:
* For a detailed description of the use of this call see the chapter
"Character Device Monitors" in the IBM Operating System/2 Version 1.2 I/O
Subsystems And Device Support Volume 1.}
function DosMonWrite(var OutBuf,DataBuf;ByteCount:word):word;
function DosMonWrite(var OutBuf,DataBuf;ByteCount:word):word; cdecl;
{***************************************************************************}
@ -230,11 +233,11 @@ implementation
{***************************************************************************}
function DosMonClose(MonHandle:word):word;
function DosMonClose(MonHandle:word):word; cdecl;
external 'EMXWRAP' index 403;
{external 'MONCALLS' index 3;}
function DosMonOpen(DevName:PChar;var MonHandle:word):word;
function DosMonOpen(DevName:PChar;var MonHandle:word):word; cdecl;
external 'EMXWRAP' index 404;
{external 'MONCALLS' index 4;}
@ -256,18 +259,25 @@ begin
end;
function DosMonRead(var InBuf;WaitFlag:word;var DataBuf;
var ByteCount:word):word;
var ByteCount:word):word; cdecl;
external 'EMXWRAP' index 402;
{external 'MONCALLS' index 2;}
function DosMonReg(MonHandle:word;var InBuf,OutBuf;PosCode,Index:word):word;
cdecl;
external 'EMXWRAP' index 405;
{external 'MONCALLS' index 5;}
function DosMonWrite(var OutBuf,DataBuf;ByteCount:word):word;
function DosMonWrite(var OutBuf,DataBuf;ByteCount:word):word; cdecl;
external 'EMXWRAP' index 401;
{external 'MONCALLS' index 1;}
end.

{
$Log$
Revision 1.5 2000-01-09 21:01:59 hajny
* cdecl added
}

View File

@ -1,32 +1,34 @@
{Set tabsize to 4.}
{****************************************************************************
$Id$
MOUCALLS interface unit
FPK-Pascal Runtime Library for OS/2
Free Pascal Runtime Library for OS/2
Copyright (c) 1999-2000 by Florian Kl„mpfl
Copyright (c) 1999-2000 by Danil Mantione
Copyright (c) 1999-2000 by Daniel Mantione
Copyright (c) 1999-2000 by Tomas Hajny
The FPK-Pascal runtime library is distributed under the Library GNU Public
The Free Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the FPK Pascal compiler,
this, and that is, when you compile a program with the Free Pascal Compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This is an official, unmodified FPK Pascal source code file.>
<This is an official, unmodified Free Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal is distributed in the hope that it will be useful,
Free Pascal 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
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with FPK-Pascal; see the file COPYING.LIB. If not, write to
along with Free Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@ -34,7 +36,9 @@
unit MouCalls;
{ Interface library to MOUCALLS.DLL (through EMXWRAP.DLL)
{ Interface library to MOUCALLS.DLL (through EMXWRAP.DLL; C calling convention
- cdecl - must be used for EMXWRAP, whereas direct MOUCALLS calls would need
16-bit Pascal calling convention with thunking instead).
Variant records and aliases for some record types created to maintain highest
possible level of compatibility with other existing OS/2 compilers.
@ -51,10 +55,10 @@ Changelog:
Coding style:
I have tried to use the same coding style as Danil Mantione in unit
I have tried to use the same coding style as Daniel Mantione in unit
DOSCALLS, although I can't say I would write it the same way otherwise
(I would write much more spaces myself, at least). Try to use it as well,
please. Original note by Danil Mantione follows:
please. Original note by Daniel Mantione follows:
It may be well possible that coding style feels a bit strange to you.
@ -67,9 +71,9 @@ Coding style:
interface
{***************************************************************************}
{$ifdef FPK}
{$packrecords 1}
{$endif FPK}
{$IFDEF FPC}
{$PACKRECORDS 1}
{$ENDIF FPC}
const
{return codes / error constants (those marked with * shouldn't occur under
@ -342,7 +346,7 @@ being registered - see MR_MOU* constants.}
MouSetDevStatus 15h
* A registered mouse sybsystem must leave the stack, on exit, in the exact
state it was received.}
function MouRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word;
function MouRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word; cdecl;
function MouRegister(ModuleName,ProcName:string;FnMask:cardinal):word;
{Deregister a mouse subsystem previously registered within a session.}
@ -361,7 +365,7 @@ function MouRegister(ModuleName,ProcName:string;FnMask:cardinal):word;
* After the owning process has released the subsystem with a MouDeRegister
call, any other process in the session may issue a MouRegister and therefore
modify the mouse support for the entire session.}
function MouDeRegister:word;
function MouDeRegister:word; cdecl;
{Direct the mouse driver to flush (empty) the mouse event queue and the monitor
chain data for the session.}
@ -372,7 +376,7 @@ chain data for the session.}
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
505 ERROR_MOU_EXTENDED_SG}
function MouFlushQue(MouHandle:word):word;
function MouFlushQue(MouHandle:word):word; cdecl;
{Query the mouse driver to determine the current row and column coordinate
position of the mouse pointer.}
@ -392,7 +396,7 @@ handle from a previous MouOpen call.}
outside the LVB image extent, the coordinates of the nearest LVB cell are
returned. In either case, the LVB is scrolled until the reported LVB cell
appears within the view window.}
function MouGetPtrPos(var MouPtr:TPtrLoc;MouHandle:word):word;
function MouGetPtrPos(var MouPtr:TPtrLoc;MouHandle:word):word; cdecl;
{Direct the mouse driver to set a new row and column coordinate position for
the mouse pointer.}
@ -414,7 +418,7 @@ handle from a previous MouOpen call.}
is directed into a defined collision area, the pointer image is not drawn
until either the pointer is moved outside the collision area or the collision
area is released by the MouDrawPtr call.}
function MouSetPtrPos(const MouPtr:TPtrLoc;MouHandle:word):word;
function MouSetPtrPos(const MouPtr:TPtrLoc;MouHandle:word):word; cdecl;
{Set the pointer shape and size to be used as the mouse device pointer image
for all applications in a session.}
@ -465,9 +469,9 @@ MouHandle is the mouse device handle from a previous MouOpen call.}
shape on all currently supported bit planes in that session. For text modes,
row and column offset must equal 0.}
function MouSetPtrShape(var ImageBuf;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
function MouSetPtrShape(ImageBuf:pointer;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
{Get (copy) the mouse pointer shape for the session.}
{The pointer bit image is returned in ImageBuf (see MouSetPtrShape description
@ -516,9 +520,9 @@ the mouse device handle from a previous MouOpen call.}
* The pointer shape may be set by the application with MouSetPtrShape or may
be the default image provided by the installed Pointer Device Driver.}
function MouGetPtrShape(var ImageBuf;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
function MouGetPtrShape(ImageBuf:pointer;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
{Return status flags for the installed mouse device driver.}
{The current status flag settings for the installed mouse device driver are
@ -532,7 +536,7 @@ a previous MouOpen call.}
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
505 ERROR_MOU_EXTENDED_SG}
function MouGetDevStatus(var Status:word;MouHandle:word):word;
function MouGetDevStatus(var Status:word;MouHandle:word):word; cdecl;
{Return the number of buttons supported on the installed mouse driver.}
{Number of physical buttons (1..3) returned in ButtonCount, MouHandle is
@ -543,7 +547,7 @@ the mouse device handle from a previous MouOpen call.}
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
505 ERROR_MOU_EXTENDED_SG}
function MouGetNumButtons(var ButtonCount:word;MouHandle:word):word;
function MouGetNumButtons(var ButtonCount:word;MouHandle:word):word; cdecl;
{Return the number of mickeys in each centimeter for the installed mouse
driver.}
@ -556,7 +560,7 @@ the mouse device handle from a previous MouOpen call.}
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
505 ERROR_MOU_EXTENDED_SG}
function MouGetNumMickeys(var MickeyCnt:word;MouHandle:word):word;
function MouGetNumMickeys(var MickeyCnt:word;MouHandle:word):word; cdecl;
{Read an event from the mouse device FIFO event queue.}
{The mouse event queue is returned in Event, WaitFlag determines the action to
@ -601,7 +605,7 @@ device handle from a previous MouOpen call.}
coordinates or relative mouse motion in mickeys. See MouSetDevStatus for
additional information.}
function MouReadEventQue(var Event:TMouEventInfo;var WaitFlag:word;
MouHandle:word):word;
MouHandle:word):word; cdecl;
{Return the current status for the mouse device driver event queue.}
{Mouse queue status returned in MouseQInfo, MouHandle is the mouse device
@ -612,7 +616,7 @@ handle from a previous MouOpen call.}
466 ERROR_MOU_DETACHED
501 ERROR_MOUSE_NO_CONSOLE
505 ERROR_MOU_EXTENDED_SG}
function MouGetNumQueEl(var MouseQInfo:TMouQueInfo;MouHandle:word):word;
function MouGetNumQueEl(var MouseQInfo:TMouQueInfo;MouHandle:word):word; cdecl;
{Return the current value of the mouse event queue mask.}
{The current mouse device driver's event mask (as previously set by
@ -629,7 +633,7 @@ a previous MouOpen call.}
505 ERROR_MOU_EXTENDED_SG}
{Remarks:
* Buttons are logically numbered from left to right.}
function MouGetEventMask(var EventMask:word;MouHandle:word):word;
function MouGetEventMask(var EventMask:word;MouHandle:word):word; cdecl;
{Assign a new event mask to the current mouse device driver.}
{EventMask contains the mask indicating what mouse events are to be placed on
@ -651,7 +655,7 @@ MouHandle is the mouse device handle from a previous MouOpen call.}
* Setting a bit in the event mask means that the associated event is reported
on the mouse FIFO event queue. See MouReadEventQue for examples of event
mask use.}
function MouSetEventMask(var EventMask:word;MouHandle:word):word;
function MouSetEventMask(var EventMask:word;MouHandle:word):word; cdecl;
{Return scaling factors for the current mouse device (a pair of 1-word
values).}
@ -669,7 +673,7 @@ the mouse device handle from a previous MouOpen call.}
for the session. If the screen is operating in text mode, the scaling units
are relative to characters. If the screen is operating in graphics mode,
the scaling units are relative to pels.}
function MouGetScaleFact(var Scale:TScaleFact;MouHandle:word):word;
function MouGetScaleFact(var Scale:TScaleFact;MouHandle:word):word; cdecl;
{Assign to the current mouse device driver a new pair of 1-word scaling
factors.}
@ -692,7 +696,7 @@ factors.}
for the mouse that is a ratio of the number of mickeys required to move
the cursor 8 pixels on the screen. The sensitivity determines at what rate
the cursor moves on the screen.}
function MouSetScaleFact(const Scale:TScaleFact;MouHandle:word):word;
function MouSetScaleFact(const Scale:TScaleFact;MouHandle:word):word; cdecl;
{Open the mouse device for the current session.}
{DriverName contains the name of the pointer draw device driver to be used as
@ -735,7 +739,7 @@ handle is returned in MouHandle.}
Base Mouse Subsystem can detect a change in display configurations. This form
of the MouOpen call is not recommended for applications. Applications should
either send the name of the pointer draw device driver or nil.}
function MouOpen(DriverName:PChar;var MouHandle:word):word;
function MouOpen(DriverName:PChar;var MouHandle:word):word; cdecl;
function MouOpen(DriverName:string;var MouHandle:word):word;
{Close the mouse device for the current session.}
@ -750,7 +754,7 @@ function MouOpen(DriverName:string;var MouHandle:word):word;
* MouClose closes the mouse device for the current session and removes the
mouse device driver handle from the list of valid open mouse device
handles.}
function MouClose(MouHandle:word):word;
function MouClose(MouHandle:word):word; cdecl;
{Notify the mouse device driver that the area defined by the passed parameters
if for exclusive use of the application. This area is defined as the
@ -775,7 +779,7 @@ handle from a previous MouOpen call.}
* The MouDrawPtr command effectively cancels the MouRemovePtr command
and allows the pointer to be drawn anywhere on the screen, until a new
MouRemovePtr command is issued.}
function MouRemovePtr(var ProtectArea:TNoPtrRect;MouHandle:word):word;
function MouRemovePtr(var ProtectArea:TNoPtrRect;MouHandle:word):word; cdecl;
{Notify the mouse device driver that an area previously restricted
to the pointer image is now available to the mouse device driver.}
@ -796,7 +800,7 @@ to the pointer image is now available to the mouse device driver.}
after MouOpen is issued, the collision area is defined as the size of the
display. A MouDrawPtr is issued to begin pointer drawing after the
MouOpen.}
function MouDrawPtr(MouHandle:word):word;
function MouDrawPtr(MouHandle:word):word; cdecl;
{Set the mouse device driver status flags for the installed mouse device
driver.}
@ -825,7 +829,7 @@ from a previous MouOpen call.}
operations. By setting this status flag, the mouse device driver does not
call the pointer draw device driver. The application must draw any required
pointer image on the screen.}
function MouSetDevStatus(var Status:word;MouHandle:word):word;
function MouSetDevStatus(var Status:word;MouHandle:word):word; cdecl;
{Initialize mouse pointer draw support for DOS mode.}
{Name of the Pointer Draw Device Driver used as the pointer-image drawing
@ -860,7 +864,7 @@ device driver must be included in the CONFIG.SYS file at system start-up time.}
and the offset portion is non-zero, the offset portion identifies the
power-up display configuration. However, this isn't possible in the current
implementation (using 32-bit wrap-around function supplied in EMXWRAP.DLL).}
function MouInitReal(DriverName:PChar):word;
function MouInitReal(DriverName:PChar):word; cdecl;
function MouInitReal(DriverName:string):word;
{Synchronize the mouse subsystem with the mouse device driver.}
@ -876,11 +880,13 @@ being free - see MOU_NOWAIT and MOU_WAIT constants.}
to access dynamically modifiable shared data for each session or if it
intends to issue a DosDevIOCtl. MouSynch does not protect globally shared
data from threads in other sessions.}
function MouSynch(WaitFlag:word):word;
function MouSynch(WaitFlag:word):word; cdecl;
function MouGetThreshold(var MouThreshold:TThreshold;MouHandle:word):word;
cdecl;
function MouSetThreshold(var MouThreshold:TThreshold;MouHandle:word):word;
cdecl;
(*
following two functions are undocumented and not present within C header files:
@ -902,7 +908,7 @@ implementation
{***************************************************************************}
function MouRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word;
function MouRegister(ModuleName,ProcName:PChar;FnMask:cardinal):word; cdecl;
external 'EMXWRAP' index 324;
{external 'MOUCALLS' index 24;}
@ -915,80 +921,80 @@ begin
MouRegister:=MouRegister(@ModuleName[1],@ProcName[1],FnMask);
end;
function MouDeRegister:word;
function MouDeRegister:word; cdecl;
external 'EMXWRAP' index 314;
{external 'MOUCALLS' index 14;}
function MouFlushQue(MouHandle:word):word;
function MouFlushQue(MouHandle:word):word; cdecl;
external 'EMXWRAP' index 307;
{external 'MOUCALLS' index 7;}
function MouGetPtrPos(var MouPtr:TPtrLoc;MouHandle:word):word;
function MouGetPtrPos(var MouPtr:TPtrLoc;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 319;
{external 'MOUCALLS' index 19;}
function MouSetPtrPos(const MouPtr:TPtrLoc;MouHandle:word):word;
function MouSetPtrPos(const MouPtr:TPtrLoc;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 321;
{external 'MOUCALLS' index 21;}
function MouSetPtrShape(ImageBuf:pointer;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
external 'EMXWRAP' index 302;
{external 'MOUCALLS' index 2;}
function MouSetPtrShape(var ImageBuf;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
external 'EMXWRAP' index 302;
{external 'MOUCALLS' index 2;}
function MouGetPtrShape(var ImageBuf;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
external 'EMXWRAP' index 301;
{external 'MOUCALLS' index 1;}
function MouGetPtrShape(ImageBuf:pointer;var ImageInfo:TPtrShape;
MouHandle:word):word;
MouHandle:word):word; cdecl;
external 'EMXWRAP' index 301;
{external 'MOUCALLS' index 1;}
function MouGetDevStatus(var Status:word;MouHandle:word):word;
function MouGetDevStatus(var Status:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 322;
{external 'MOUCALLS' index 22;}
function MouGetNumButtons(var ButtonCount:word;MouHandle:word):word;
function MouGetNumButtons(var ButtonCount:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 308;
{external 'MOUCALLS' index 8;}
function MouGetNumMickeys(var MickeyCnt:word;MouHandle:word):word;
function MouGetNumMickeys(var MickeyCnt:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 303;
{external 'MOUCALLS' index 3;}
function MouReadEventQue(var Event:TMouEventInfo;var WaitFlag:word;
MouHandle:word):word;
MouHandle:word):word; cdecl;
external 'EMXWRAP' index 320;
{external 'MOUCALLS' index 20;}
function MouGetNumQueEl(var MouseQInfo:TMouQueInfo;MouHandle:word):word;
function MouGetNumQueEl(var MouseQInfo:TMouQueInfo;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 313;
{external 'MOUCALLS' index 13;}
function MouGetEventMask(var EventMask:word;MouHandle:word):word;
function MouGetEventMask(var EventMask:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 315;
{external 'MOUCALLS' index 15;}
function MouSetEventMask(var EventMask:word;MouHandle:word):word;
function MouSetEventMask(var EventMask:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 316;
{external 'MOUCALLS' index 16;}
function MouGetScaleFact(var Scale:TScaleFact;MouHandle:word):word;
function MouGetScaleFact(var Scale:TScaleFact;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 306;
{external 'MOUCALLS' index 6;}
function MouSetScaleFact(const Scale:TScaleFact;MouHandle:word):word;
function MouSetScaleFact(const Scale:TScaleFact;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 311;
{external 'MOUCALLS' index 11;}
function MouOpen(DriverName:PChar;var MouHandle:word):word;
function MouOpen(DriverName:PChar;var MouHandle:word):word; cdecl;
external 'EMXWRAP' index 317;
{external 'MOUCALLS' index 17;}
@ -1013,23 +1019,23 @@ begin
end;
end;
function MouClose(MouHandle:word):word;
function MouClose(MouHandle:word):word; cdecl;
external 'EMXWRAP' index 309;
{external 'MOUCALLS' index 9;}
function MouRemovePtr(var ProtectArea:TNoPtrRect;MouHandle:word):word;
function MouRemovePtr(var ProtectArea:TNoPtrRect;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 318;
{external 'MOUCALLS' index 18;}
function MouDrawPtr(MouHandle:word):word;
function MouDrawPtr(MouHandle:word):word; cdecl;
external 'EMXWRAP' index 326;
{external 'MOUCALLS' index 26;}
function MouSetDevStatus(var Status:word;MouHandle:word):word;
function MouSetDevStatus(var Status:word;MouHandle:word):word; cdecl;
external 'EMXWRAP' index 326;
{external 'MOUCALLS' index 26;}
function MouInitReal(DriverName:PChar):word;
function MouInitReal(DriverName:PChar):word; cdecl;
external 'EMXWRAP' index 327;
{external 'MOUCALLS' index 27;}
@ -1054,15 +1060,17 @@ begin
end;
end;
function MouSynch(WaitFlag:word):word;
function MouSynch(WaitFlag:word):word; cdecl;
external 'EMXWRAP' index 323;
{external 'MOUCALLS' index 23;}
function MouGetThreshold(var MouThreshold:TThreshold;MouHandle:word):word;
cdecl;
external 'EMXWRAP' index 329;
{external 'MOUCALLS' index 29;}
function MouSetThreshold(var MouThreshold:TThreshold;MouHandle:word):word;
cdecl;
external 'EMXWRAP' index 330;
{external 'MOUCALLS' index 30;}
@ -1079,3 +1087,10 @@ external 'MOUCALLS' index 10;
end.
{
$Log$
Revision 1.7 2000-01-09 21:01:59 hajny
* cdecl added
}

View File

@ -1,32 +1,34 @@
{Set tabsize to 4.}
{****************************************************************************
$Id$
VIOCALLS interface unit
FPK-Pascal Runtime Library for OS/2
Free Pascal Runtime Library for OS/2
Copyright (c) 1999-2000 by Florian Kl„mpfl
Copyright (c) 1999-2000 by Danil Mantione
Copyright (c) 1999-2000 by Daniel Mantione
Copyright (c) 1999-2000 by Tomas Hajny
The FPK-Pascal runtime library is distributed under the Library GNU Public
The Free Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the FPK Pascal compiler,
this, and that is, when you compile a program with the Free Pascal Compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This is an official, unmodified FPK Pascal source code file.>
<This is an official, unmodified Free Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal is distributed in the hope that it will be useful,
Free Pascal 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
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with FPK-Pascal; see the file COPYING.LIB. If not, write to
along with Free Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@ -51,10 +53,10 @@ Changelog:
Coding style:
I have tried to use the same coding style as Danil Mantione in unit
I have tried to use the same coding style as Daniel Mantione in unit
DOSCALLS, although I can't say I would write it the same way otherwise
(I would write much more spaces myself, at least). Try to use it as well,
please. Original note by Danil Mantione follows:
please. Original note by Daniel Mantione follows:
It may be well possible that coding style feels a bit strange to you.
@ -68,9 +70,9 @@ Coding style:
interface
{***************************************************************************}
{$ifdef FPK}
{$packrecords 1}
{$endif FPK}
{$IFDEF FPC}
{$PACKRECORDS 1}
{$ENDIF FPC}
const
@ -610,151 +612,160 @@ type
function VioRegister(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal):word;
cdecl;
function VioRegister(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal):word;
function VioGlobalReg(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal;
Return:word):word;
Return:word):word; cdecl;
function VioGlobalReg(ModuleName,ProcName:string;FnMask1,FnMask2:cardinal;
Return:word):word;
function VioDeRegister:word;
function VioDeRegister:word; cdecl;
function VioGetBuf(var LVBAddr:pointer;var LVBLength:word;VioHandle:word):word;
cdecl;
function VioGetCurPos(var Row,Column:word;VioHandle:word):word;
function VioGetCurPos(var Row,Column:word;VioHandle:word):word; cdecl;
function VioSetCurPos(Row,Column,VioHandle:word):word;
function VioSetCurPos(Row,Column,VioHandle:word):word; cdecl;
function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word;
function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word;
function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word;
function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word;
function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word;
function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word; cdecl;
function VioReadCellStr(var Buf;var BufLen:word;
Row,Column,VioHandle:word):word;
Row,Column,VioHandle:word):word; cdecl;
function VioReadCharStr(var Buf;var BufLen:word;
Row,Column,VioHandle:word):word;
Row,Column,VioHandle:word):word; cdecl;
function VioWrtCellStr(CellStr:pointer;Len,Row,Column,VioHandle:word):word;
cdecl;
function VioWrtCharStr(CharStr:pointer;Len,Row,Column,VioHandle:word):word;
cdecl;
function VioScrollDn(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioScrollUp(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioScrollLf(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioScrollRt(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioWrtNAttr(var Attr:byte;Times,Row,Column,VioHandle:word):word;
cdecl;
function VioWrtNCell(var Cell:word;Times,Row,Column,VioHandle:word):word;
cdecl;
function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word;
function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word; cdecl;
function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word;
function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word; cdecl;
function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word;
function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word; cdecl;
function VioWrtCharStrAtt(CharStr:pointer;Len,Row,Column:word;var Attr:byte;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioCheckCharType(var CharType:word;Row,Column,VioHandle:word):word;
cdecl;
function VioShowBuf(BufOfs,Len,VioHandle:word):word;
function VioShowBuf(BufOfs,Len,VioHandle:word):word; cdecl;
function VioSetAnsi(Mode,VioHandle:word):word;
function VioSetAnsi(Mode,VioHandle:word):word; cdecl;
function VioGetAnsi(var Mode:word;VioHandle:word):word;
function VioGetAnsi(var Mode:word;VioHandle:word):word; cdecl;
function VioPrtSc(VioHandle:word):word;
function VioPrtSc(VioHandle:word):word; cdecl;
function VioPrtScToggle(VioHandle:word):word;
function VioPrtScToggle(VioHandle:word):word; cdecl;
(*
function VioRedrawSize(var RedrawSize:cardinal):word;
*)
function VioSavRedrawWait(RequestType:word;var NotifyType:word;
Reserved:word):word;
Reserved:word):word; cdecl;
function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word;
function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word; cdecl;
function VioModeWait(RequestType:word;var NotifyType:word;Reserved:word):word;
cdecl;
function VioModeUndo(Ownership,KillThread,Reserved:word):word;
function VioModeUndo(Ownership,KillThread,Reserved:word):word; cdecl;
function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word;
function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word; cdecl;
function VioScrUnLock(VioHandle:word):word;
function VioScrUnLock(VioHandle:word):word; cdecl;
function VioPopUp(var OptionFlags:word;VioHandle:word):word;
function VioPopUp(var OptionFlags:word;VioHandle:word):word; cdecl;
function VioEndPopUp(VioHandle:word):word;
function VioEndPopUp(VioHandle:word):word; cdecl;
function VioGetConfig(ConfigId:word;var VideoConfig:TVioConfigInfo;
VioHandle:word):word;
VioHandle:word):word; cdecl;
function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word;
function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word;
function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word;
function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word; cdecl;
function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word;
function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word; cdecl;
function VioGetState(var State;VioHandle:word):word;
function VioGetState(var State;VioHandle:word):word; cdecl;
function VioSetState(var State;VioHandle:word):word;
function VioSetState(var State;VioHandle:word):word; cdecl;
function VioAssociate(DC:cardinal;VPS:word):word;
function VioAssociate(DC:cardinal;VPS:word):word; cdecl;
function VioCreateLogFont(var FAtAttrs:TFAttrs;LLCId:longint;var Name:TStr8;
VPS:word):word;
VPS:word):word; cdecl;
function VioCreatePS(var VPS:word;Depth,Width,Format,Attrs:integer;
Reserved:word):word;
Reserved:word):word; cdecl;
function VioDeleteSetId(LLCId:longint;VPS:word):word;
function VioDeleteSetId(LLCId:longint;VPS:word):word; cdecl;
function VioDestroyPS(VPS:word):word;
function VioDestroyPS(VPS:word):word; cdecl;
function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word;
function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word; cdecl;
function VioGetOrg(var Row,Column:integer;VPS:word):word;
function VioGetOrg(var Row,Column:integer;VPS:word):word; cdecl;
function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
MetricsLength:longint;var Fonts:longint;FaceName:PChar;
flOptions:cardinal;VPS:word):word;
flOptions:cardinal;VPS:word):word; cdecl;
function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
MetricsLength:longint;var Fonts:longint;FaceName:string;
flOptions:cardinal;VPS:word):word;
function VioQuerySetIds(var allCIds:longint;var Names:TStr8;
var alTypes:longint;Count:longint;VPS:word):word;
var alTypes:longint;Count:longint;VPS:word):word; cdecl;
function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word;
function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word; cdecl;
function VioSetOrg(Row,Column:integer;VPS:word):word;
function VioSetOrg(Row,Column:integer;VPS:word):word; cdecl;
function VioShowPS(Depth,Width,offCell:integer;VPS:word):word;
function VioShowPS(Depth,Width,offCell:integer;VPS:word):word; cdecl;
{Default message processing for AVio PS's - imported from PMVIOP.DLL}
function WinDefAVioWindowProc(WND:cardinal;Msg:word;mp1,mp2:cardinal):pointer;
cdecl;
(* Following routines are not supported
@ -787,6 +798,7 @@ implementation
function VioRegister(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal):word;
cdecl;
external 'EMXWRAP' index 145;
{external 'VIOCALLS' index 45;}
@ -800,7 +812,7 @@ begin
end;
function VioGlobalReg(ModuleName,ProcName:PChar;FnMask1,FnMask2:cardinal;
Return:word):word;
Return:word):word; cdecl;
external 'EMXWRAP' index 170;
{external 'VIOCALLS' index 70;}
@ -815,126 +827,132 @@ begin
Return);
end;
function VioDeRegister:word;
function VioDeRegister:word; cdecl;
external 'EMXWRAP' index 106;
{external 'VIOCALLS' index 6;}
function VioGetBuf(var LVBAddr:pointer;var LVBLength:word;VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 131;
{external 'VIOCALLS' index 31;}
function VioGetCurPos(var Row,Column:word;VioHandle:word):word;
function VioGetCurPos(var Row,Column:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 109;
{external 'VIOCALLS' index 9;}
function VioSetCurPos(Row,Column,VioHandle:word):word;
function VioSetCurPos(Row,Column,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 115;
{external 'VIOCALLS' index 15;}
function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word;
function VioGetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 127;
{external 'VIOCALLS' index 27;}
function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word;
function VioSetCurType(var CurData:TVioCursorInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 132;
{external 'VIOCALLS' index 32;}
function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word;
function VioGetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 121;
{external 'VIOCALLS' index 21;}
function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word;
function VioSetMode(var Mode:TVioModeInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 122;
{external 'VIOCALLS' index 22;}
function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word;
function VioGetPhysBuf(var PBData:TVioPhysBuf;Reserved:word):word; cdecl;
external 'EMXWRAP' index 102;
{external 'VIOCALLS' index 2;}
function VioReadCellStr(var Buf;var BufLen:word;
Row,Column,VioHandle:word):word;
Row,Column,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 124;
{external 'VIOCALLS' index 24;}
function VioReadCharStr(var Buf;var BufLen:word;
Row,Column,VioHandle:word):word;
Row,Column,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 130;
{external 'VIOCALLS' index 30;}
function VioWrtCellStr(CellStr:pointer;Len,Row,Column,VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 110;
{external 'VIOCALLS' index 10;}
function VioWrtCharStr(CharStr:pointer;Len,Row,Column,VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 113;
{external 'VIOCALLS' index 13;}
function VioScrollDn(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 147;
{external 'VIOCALLS' index 47;}
function VioScrollUp(TopRow,LeftCol,BotRow,RightCol,Lines:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 107;
{external 'VIOCALLS' index 7;}
function VioScrollLf(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 144;
{external 'VIOCALLS' index 44;}
function VioScrollRt(TopRow,LeftCol,BotRow,RightCol,Col:word;var Cell:word;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 112;
{external 'VIOCALLS' index 12;}
function VioWrtNAttr(var Attr:byte;Times,Row,Column,VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 126;
{external 'VIOCALLS' index 26;}
function VioWrtNCell(var Cell:word;Times,Row,Column,VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 152;
{external 'VIOCALLS' index 52;}
function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word;
function VioWrtNChar(var Ch:byte;Times,Row,Column,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 153;
{external 'VIOCALLS' index 53;}
function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word;
function VioWrtNChar(var Ch:char;Times,Row,Column,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 153;
{external 'VIOCALLS' index 53;}
function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word;
function VioWrtTTY(CharStr:pointer;Len,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 119;
{external 'VIOCALLS' index 19;}
function VioWrtCharStrAtt(CharStr:pointer;Len,Row,Column:word;var Attr:byte;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 148;
{external 'VIOCALLS' index 48;}
function VioCheckCharType(var CharType:word;Row,Column,VioHandle:word):word;
cdecl;
external 'EMXWRAP' index 175;
{external 'VIOCALLS' index 75;}
function VioShowBuf(BufOfs,Len,VioHandle:word):word;
function VioShowBuf(BufOfs,Len,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 143;
{external 'VIOCALLS' index 43;}
function VioSetAnsi(Mode,VioHandle:word):word;
function VioSetAnsi(Mode,VioHandle:word):word; cdecl;
external 'EMXWRAP' index 105;
{external 'VIOCALLS' index 5;}
function VioGetAnsi(var Mode:word;VioHandle:word):word;
function VioGetAnsi(var Mode:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 103;
{external 'VIOCALLS' index 3;}
function VioPrtSc(VioHandle:word):word;
function VioPrtSc(VioHandle:word):word; cdecl;
external 'EMXWRAP' index 108;
{external 'VIOCALLS' index 8;}
function VioPrtScToggle(VioHandle:word):word;
function VioPrtScToggle(VioHandle:word):word; cdecl;
external 'EMXWRAP' index 150;
{external 'VIOCALLS' index 50;}
@ -945,102 +963,103 @@ function VioRedrawSize(var RedrawSize:cardinal):word;
*)
function VioSavRedrawWait(RequestType:word;var NotifyType:word;
Reserved:word):word;
Reserved:word):word; cdecl;
external 'EMXWRAP' index 125;
{external 'VIOCALLS' index 25;}
function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word;
function VioSavRedrawUndo(Ownership,KillThread,Reserved:word):word; cdecl;
external 'EMXWRAP' index 128;
{external 'VIOCALLS' index 28;}
function VioModeWait(RequestType:word;var NotifyType:word;Reserved:word):word;
cdecl;
external 'EMXWRAP' index 137;
{external 'VIOCALLS' index 37;}
function VioModeUndo(Ownership,KillThread,Reserved:word):word;
function VioModeUndo(Ownership,KillThread,Reserved:word):word; cdecl;
external 'EMXWRAP' index 135;
{external 'VIOCALLS' index 35;}
function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word;
function VioScrLock(WaitFlag:word;var Status:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 123;
{external 'VIOCALLS' index 23;}
function VioScrUnLock(VioHandle:word):word;
function VioScrUnLock(VioHandle:word):word; cdecl;
external 'EMXWRAP' index 118;
{external 'VIOCALLS' index 18;}
function VioPopUp(var OptionFlags:word;VioHandle:word):word;
function VioPopUp(var OptionFlags:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 111;
{external 'VIOCALLS' index 11;}
function VioEndPopUp(VioHandle:word):word;
function VioEndPopUp(VioHandle:word):word; cdecl;
external 'EMXWRAP' index 101;
{external 'VIOCALLS' index 1;}
function VioGetConfig(ConfigId:word;var VideoConfig:TVioConfigInfo;
VioHandle:word):word;
VioHandle:word):word; cdecl;
external 'EMXWRAP' index 146;
{external 'VIOCALLS' index 46;}
function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word;
function VioGetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 129;
{external 'VIOCALLS' index 29;}
function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word;
function VioSetFont(var FontData:TVioFontInfo;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 133;
{external 'VIOCALLS' index 33;}
function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word;
function VioGetCp(Reserved:word;var CodePage:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 140;
{external 'VIOCALLS' index 40;}
function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word;
function VioSetCp(Reserved:word;CodePage:word;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 142;
{external 'VIOCALLS' index 42;}
function VioGetState(var State;VioHandle:word):word;
function VioGetState(var State;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 149;
{external 'VIOCALLS' index 49;}
function VioSetState(var State;VioHandle:word):word;
function VioSetState(var State;VioHandle:word):word; cdecl;
external 'EMXWRAP' index 151;
{external 'VIOCALLS' index 51;}
{Extended functions for windowed VIO follow.}
function VioAssociate(DC:cardinal;VPS:word):word;
function VioAssociate(DC:cardinal;VPS:word):word; cdecl;
external 'EMXWRAP' index 155;
{external 'VIOCALLS' index 55;}
function VioCreateLogFont(var FAtAttrs:TFAttrs;LLCId:longint;var Name:TStr8;
VPS:word):word;
VPS:word):word; cdecl;
external 'EMXWRAP' index 160;
{external 'VIOCALLS' index 60;}
function VioCreatePS(var VPS:word;Depth,Width,Format,Attrs:integer;
Reserved:word):word;
Reserved:word):word; cdecl;
external 'EMXWRAP' index 156;
{external 'VIOCALLS' index 56;}
function VioDeleteSetId(LLCId:longint;VPS:word):word;
function VioDeleteSetId(LLCId:longint;VPS:word):word; cdecl;
external 'EMXWRAP' index 157;
{external 'VIOCALLS' index 57;}
function VioDestroyPS(VPS:word):word;
function VioDestroyPS(VPS:word):word; cdecl;
external 'EMXWRAP' index 161;
{external 'VIOCALLS' index 61;}
function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word;
function VioGetDeviceCellSize(var Height,Width:integer;VPS:word):word; cdecl;
external 'EMXWRAP' index 158;
{external 'VIOCALLS' index 58;}
function VioGetOrg(var Row,Column:integer;VPS:word):word;
function VioGetOrg(var Row,Column:integer;VPS:word):word; cdecl;
external 'EMXWRAP' index 159;
{external 'VIOCALLS' index 59;}
function VioQueryFonts(var Remfonts:longint;var fmMetrics:TFontMetrics;
MetricsLength:longint;var Fonts:longint;FaceName:PChar;
flOptions:cardinal;VPS:word):word;
flOptions:cardinal;VPS:word):word; cdecl;
external 'EMXWRAP' index 164;
{external 'VIOCALLS' index 64;}
@ -1071,24 +1090,32 @@ begin
end;
function VioQuerySetIds(var allCIds:longint;var Names:TStr8;
var alTypes:longint;Count:longint;VPS:word):word;
var alTypes:longint;Count:longint;VPS:word):word; cdecl;
external 'EMXWRAP' index 162;
{external 'VIOCALLS' index 62;}
function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word;
function VioSetDeviceCellSize(Height,Width:integer;VPS:word):word; cdecl;
external 'EMXWRAP' index 165;
{external 'VIOCALLS' index 65;}
function VioSetOrg(Row,Column:integer;VPS:word):word;
function VioSetOrg(Row,Column:integer;VPS:word):word; cdecl;
external 'EMXWRAP' index 163;
{external 'VIOCALLS' index 63;}
function VioShowPS(Depth,Width,offCell:integer;VPS:word):word;
function VioShowPS(Depth,Width,offCell:integer;VPS:word):word; cdecl;
external 'EMXWRAP' index 166;
{external 'VIOCALLS' index 66;}
function WinDefAVioWindowProc(WND:cardinal;Msg:word;mp1,mp2:cardinal):pointer;
cdecl;
external 'EMXWRAP' index 30;
{external 'PMVIOP' index 30;}
end.
{
$Log$
Revision 1.7 2000-01-09 21:01:59 hajny
* cdecl added
}