mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 14:49:14 +02:00
+ added the win16api window message functions
git-svn-id: trunk@31714 -
This commit is contained in:
parent
07879e64ca
commit
90d4b116d7
@ -480,6 +480,20 @@ const
|
||||
SPIF_UPDATEINIFILE = $0001;
|
||||
SPIF_SENDWININICHANGE = $0002;
|
||||
|
||||
{ Window message support }
|
||||
|
||||
{ GetQueueStatus flags }
|
||||
QS_KEY = $0001;
|
||||
QS_MOUSEMOVE = $0002;
|
||||
QS_MOUSEBUTTON = $0004;
|
||||
QS_MOUSE = QS_MOUSEMOVE or QS_MOUSEBUTTON;
|
||||
QS_POSTMESSAGE = $0008;
|
||||
QS_TIMER = $0010;
|
||||
QS_PAINT = $0020;
|
||||
QS_SENDMESSAGE = $0040;
|
||||
|
||||
QS_ALLINPUT = $007f;
|
||||
|
||||
function GetFreeSystemResources(SysResource: UINT): UINT; external 'USER';
|
||||
|
||||
procedure LogError(err: UINT; lpInfo: FarPointer); external 'KERNEL';
|
||||
@ -618,6 +632,10 @@ function SubtractRect(lprcDest: LPRECT; lprcSource1, lprcSource2: LPRECT): BOOL;
|
||||
function SubtractRect(var rcDest: RECT; var rcSource1, rcSource2: RECT): BOOL; external 'USER';
|
||||
{$endif}
|
||||
|
||||
{ Window message support }
|
||||
function GetMessageExtraInfo: LPARAM; external 'USER';
|
||||
function GetQueueStatus(flags: UINT): DWORD; external 'USER';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -745,3 +745,43 @@ procedure InflateRect(var rc: RECT; xAmt, yAmt: SmallInt); external 'USER';
|
||||
|
||||
function PtInRect(var rc: RECT; pt: POINT): BOOL; external 'USER';
|
||||
{$endif}
|
||||
|
||||
{ Window message support }
|
||||
|
||||
function RegisterWindowMessage(lpsz: LPCSTR): UINT; external 'USER';
|
||||
|
||||
function GetMessage(lpmsg: LPMSG; hwnd: HWND; uMsgFilterMin, uMsgFilterMax: UINT): BOOL; external 'USER';
|
||||
function PeekMessage(lpmsg: LPMSG; hwnd: HWND; uFilterFirst, uFilterLast, fuRemove: UINT): BOOL; external 'USER';
|
||||
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||
function GetMessage(var msg: MSG; hwnd: HWND; uMsgFilterMin, uMsgFilterMax: UINT): BOOL; external 'USER';
|
||||
function PeekMessage(var msg: MSG; hwnd: HWND; uFilterFirst, uFilterLast, fuRemove: UINT): BOOL; external 'USER';
|
||||
{$endif}
|
||||
|
||||
procedure WaitMessage; external 'USER';
|
||||
|
||||
function GetMessagePos: DWORD; external 'USER';
|
||||
function GetMessageTime: LONG; external 'USER';
|
||||
|
||||
function TranslateMessage(lpmsg: LPMSG): BOOL; external 'USER';
|
||||
function DispatchMessage(lpmsg: LPMSG): LONG; external 'USER';
|
||||
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||
function TranslateMessage(var msg: MSG): BOOL; external 'USER';
|
||||
function DispatchMessage(var msg: MSG): LONG; external 'USER';
|
||||
{$endif}
|
||||
|
||||
function SetMessageQueue(cMsg: SmallInt): BOOL; external 'USER';
|
||||
|
||||
function GetInputState: BOOL; external 'USER';
|
||||
|
||||
function PostMessage(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; external 'USER';
|
||||
function SendMessage(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'USER';
|
||||
|
||||
function PostAppMessage(htask: HTASK; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; external 'USER';
|
||||
|
||||
procedure ReplyMessage(lResult: LRESULT); external 'USER';
|
||||
function InSendMessage: BOOL; external 'USER';
|
||||
|
||||
function CallMsgFilter(lpmsg: LPMSG; nCode: SmallInt): BOOL; external 'USER';
|
||||
{$ifdef VAR_PARAMS_ARE_FAR}
|
||||
function CallMsgFilter(var msg: MSG; nCode: SmallInt): BOOL; external 'USER';
|
||||
{$endif}
|
||||
|
@ -1295,3 +1295,59 @@ const
|
||||
|
||||
WM_DEVMODECHANGE = $001B;
|
||||
WM_TIMECHANGE = $001E;
|
||||
|
||||
{ Window message support }
|
||||
WM_NULL = $0000;
|
||||
|
||||
{ NOTE: All messages below $0400 are RESERVED by Windows }
|
||||
WM_USER = $0400;
|
||||
|
||||
type
|
||||
{ Queued message structure }
|
||||
PMSG = ^MSG;
|
||||
NPMSG = ^MSG; near;
|
||||
LPMSG = ^MSG; far;
|
||||
MSG = record
|
||||
hwnd: HWND;
|
||||
message: UINT;
|
||||
wParam: WPARAM;
|
||||
lParam: LPARAM;
|
||||
time: DWORD;
|
||||
pt: POINT;
|
||||
end;
|
||||
TMsg = MSG;
|
||||
|
||||
const
|
||||
{ PeekMessage() options }
|
||||
PM_NOREMOVE = $0000;
|
||||
PM_REMOVE = $0001;
|
||||
PM_NOYIELD = $0002;
|
||||
|
||||
{ Special HWND value for use with PostMessage() and SendMessage() }
|
||||
HWND_BROADCAST = HWND($ffff);
|
||||
|
||||
WH_GETMESSAGE = 3;
|
||||
|
||||
WH_CALLWNDPROC = 4;
|
||||
|
||||
WH_MSGFILTER = (-1);
|
||||
WH_SYSMSGFILTER = 6;
|
||||
|
||||
{ CallMsgFilter() and WH_SYS/MSGFILTER context codes }
|
||||
MSGF_DIALOGBOX = 0;
|
||||
MSGF_MENU = 2;
|
||||
MSGF_MOVE = 3;
|
||||
MSGF_SIZE = 4;
|
||||
MSGF_SCROLLBAR = 5;
|
||||
MSGF_NEXTWINDOW = 6;
|
||||
MSGF_MAINLOOP = 8;
|
||||
MSGF_USER = 4096;
|
||||
|
||||
{ Standard window messages }
|
||||
{ PenWindows specific messages }
|
||||
WM_PENWINFIRST = $0380;
|
||||
WM_PENWINLAST = $038F;
|
||||
|
||||
{ Coalescing messages }
|
||||
WM_COALESCE_FIRST = $0390;
|
||||
WM_COALESCE_LAST = $039F;
|
||||
|
Loading…
Reference in New Issue
Block a user