mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 15:47:52 +02:00
* Add missing functions from wincon.h (bug id 29963)
git-svn-id: trunk@36742 -
This commit is contained in:
parent
f3459454e6
commit
2f9627f9f5
@ -482,7 +482,17 @@ function OpenWaitableTimerA(dwDesiredAccess:DWORD;bInheritHandle:BOOL;lpTimerNam
|
||||
function FindFirstFileExA(lpfilename : LPCStr;fInfoLevelId:FINDEX_INFO_LEVELS ;lpFindFileData:pointer;fSearchOp : FINDEX_SEARCH_OPS;lpSearchFilter:pointer;dwAdditionalFlags:dword):Handle; stdcall; external 'kernel32' name 'FindFirstFileExA';
|
||||
// winver>$0600
|
||||
function FindFirstFileTransactedA(lpfilename : LPCStr;fInfoLevelId:FINDEX_INFO_LEVELS ;lpFindFileData:pointer;fSearchOp : FINDEX_SEARCH_OPS;lpSearchFilter:pointer;dwAdditionalFlags:dword;htransaction : HANDLE):Handle; stdcall; external 'kernel32' name 'FindFirstFileTransactedA';
|
||||
|
||||
// Wincon.h
|
||||
function WriteConsoleInputA(hConsoleInput:HANDLE; var lpBuffer:INPUT_RECORD; nLength:DWORD; lpNumberOfEventsWritten:LPDWORD):BOOL;stdcall;external 'kernel32' name 'WriteConsoleInputA';
|
||||
function ScrollConsoleScreenBufferA(hConsoleOutput:HANDLE; var lpScrollRectangle:SMALL_RECT; var lpClipRectangle:SMALL_RECT; dwDestinationOrigin:COORD; lpFill:PCHAR_INFO):BOOL;stdcall;external 'kernel32' name 'ScrollConsoleScreenBufferA';
|
||||
function GetConsoleOriginalTitleA(lpConsoleTitle:LPSTR; nSize:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleOriginalTitleA';
|
||||
function AddConsoleAliasA(Source:LPSTR; Target:LPSTR; ExeName:LPSTR):BOOL;stdcall;external 'kernel32' name 'AddConsoleAliasA';
|
||||
function GetConsoleAliasA(Source:LPSTR; TargetBuffer:LPSTR; TargetBufferLength:DWORD; ExeName:LPSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasA';
|
||||
function GetConsoleAliasesLengthA(ExeName:LPSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasesLengthA';
|
||||
function GetConsoleAliasExesLengthA:DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasExesLengthA';
|
||||
function GetConsoleAliasesA(AliasBuffer:LPSTR; AliasBufferLength:DWORD; ExeName:LPSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasesA';
|
||||
function GetConsoleAliasExesA(ExeNameBuffer:LPSTR; ExeNameBufferLength:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasExesA';
|
||||
|
||||
{$endif read_interface}
|
||||
|
||||
|
||||
|
@ -6222,6 +6222,58 @@ const
|
||||
MAPVK_VK_TO_VSC_EX = 4;
|
||||
//#endif /* WINVER >= 0x0600 */
|
||||
|
||||
//
|
||||
// Wincon.h
|
||||
//
|
||||
NLS_DBCSCHAR = $00010000; { DBCS for JPN: SBCS/DBCS mode. }
|
||||
NLS_ALPHANUMERIC = $00000000; { DBCS for JPN: Alphanumeric mode. }
|
||||
NLS_KATAKANA = $00020000; { DBCS for JPN: Katakana mode. }
|
||||
NLS_HIRAGANA = $00040000; { DBCS for JPN: Hiragana mode. }
|
||||
NLS_ROMAN = $00400000; { DBCS for JPN: Roman/Noroman mode. }
|
||||
NLS_IME_CONVERSION = $00800000; { DBCS for JPN: IME conversion. }
|
||||
NLS_IME_DISABLE = $20000000; { DBCS for JPN: IME enable/disable. }
|
||||
|
||||
|
||||
MOUSE_WHEELED = $0004;
|
||||
MOUSE_HWHEELED = $0008;
|
||||
|
||||
|
||||
COMMON_LVB_LEADING_BYTE = $0100; { Leading Byte of DBCS }
|
||||
COMMON_LVB_TRAILING_BYTE = $0200; { Trailing Byte of DBCS }
|
||||
COMMON_LVB_GRID_HORIZONTAL = $0400; { DBCS: Grid attribute: top horizontal. }
|
||||
COMMON_LVB_GRID_LVERTICAL = $0800; { DBCS: Grid attribute: left vertical. }
|
||||
COMMON_LVB_GRID_RVERTICAL = $1000; { DBCS: Grid attribute: right vertical. }
|
||||
COMMON_LVB_REVERSE_VIDEO = $4000; { DBCS: Reverse fore/back ground attribute. }
|
||||
COMMON_LVB_UNDERSCORE = $8000; { DBCS: Underscore. }
|
||||
COMMON_LVB_SBCSDBCS = $0300; { SBCS or DBCS flag. }
|
||||
|
||||
HISTORY_NO_DUP_FLAG = $1;
|
||||
|
||||
|
||||
CONSOLE_NO_SELECTION = $0000;
|
||||
CONSOLE_SELECTION_IN_PROGRESS = $0001; { selection has begun }
|
||||
CONSOLE_SELECTION_NOT_EMPTY = $0002; { non-null select rectangle }
|
||||
CONSOLE_MOUSE_SELECTION = $0004; { selecting with mouse }
|
||||
CONSOLE_MOUSE_DOWN = $0008; { mouse is down }
|
||||
|
||||
ENABLE_INSERT_MODE = $0020;
|
||||
ENABLE_QUICK_EDIT_MODE = $0040;
|
||||
ENABLE_EXTENDED_FLAGS = $0080;
|
||||
ENABLE_AUTO_POSITION = $0100;
|
||||
ENABLE_VIRTUAL_TERMINAL_INPUT = $0200;
|
||||
|
||||
ENABLE_VIRTUAL_TERMINAL_PROCESSING = $0004;
|
||||
DISABLE_NEWLINE_AUTO_RETURN = $0008;
|
||||
ENABLE_LVB_GRID_WORLDWIDE = $0010;
|
||||
|
||||
CONSOLE_FULLSCREEN = 1; { fullscreen console }
|
||||
CONSOLE_FULLSCREEN_HARDWARE = 2; { console owns the hardware }
|
||||
|
||||
|
||||
CONSOLE_FULLSCREEN_MODE = 1;
|
||||
CONSOLE_WINDOWED_MODE = 2;
|
||||
|
||||
|
||||
{$endif read_interface}
|
||||
|
||||
{$ifdef read_implementation}
|
||||
|
@ -53,7 +53,7 @@ function FreeResource(hResData:HGLOBAL):WINBOOL; external 'kernel32' name 'FreeR
|
||||
function LockResource(hResData:HGLOBAL):LPVOID; external 'kernel32' name 'LockResource';
|
||||
{$ifdef Unknown_functions}
|
||||
{ WARNING: function not found !!}
|
||||
function WinMain(hInstance:HINST; hPrevInstance:HINST; lpCmdLine:LPSTR; nShowCmd:longint):longint; external External_library name 'WinMain';
|
||||
function WinMain(hInstance:HINST; hPrevInstance:HINST; lpCmdLine:LPSTR; nShowCmd:longint):longint; external 'kernel32' name 'WinMain';
|
||||
{$endif Unknown_functions}
|
||||
function FreeLibrary(hLibModule:HINST):WINBOOL; external 'kernel32' name 'FreeLibrary';
|
||||
procedure FreeLibraryAndExitThread(hLibModule:HMODULE; dwExitCode:DWORD); external 'kernel32' name 'FreeLibraryAndExitThread';
|
||||
@ -1292,6 +1292,28 @@ function GET_DEVICE_CHANGE_WPARAM(wParam: WPARAM): WORD; inline;
|
||||
function GET_DEVICE_CHANGE_LPARAM(lParam: LPARAM): WORD; inline;
|
||||
//#endif /* (_WIN32_WINNT >= 0x0601) */
|
||||
|
||||
function CONSOLE_REAL_OUTPUT_HANDLE : HANDLE;
|
||||
function CONSOLE_REAL_INPUT_HANDLE : HANDLE;
|
||||
function GetConsoleScreenBufferInfoEx(hConsoleOutput:HANDLE; lpConsoleScreenBufferInfoEx:PCONSOLE_SCREEN_BUFFER_INFOEX):BOOL;stdcall;external 'kernel32' name 'GetConsoleScreenBufferInfoEx';
|
||||
function SetConsoleScreenBufferInfoEx(hConsoleOutput:HANDLE; lpConsoleScreenBufferInfoEx:PCONSOLE_SCREEN_BUFFER_INFOEX):BOOL;stdcall;external 'kernel32' name 'SetConsoleScreenBufferInfoEx';
|
||||
// function GetLargestConsoleWindowSize(hConsoleOutput:HANDLE):COORD;stdcall;external 'kernel32' name 'GetLargestConsoleWindowSize';
|
||||
function GetCurrentConsoleFont(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFont:PCONSOLE_FONT_INFO):BOOL;stdcall;external 'kernel32' name 'GetCurrentConsoleFont';
|
||||
function GetCurrentConsoleFontEx(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFontEx:PCONSOLE_FONT_INFOEX):BOOL;stdcall;external 'kernel32' name 'GetCurrentConsoleFontEx';
|
||||
function SetCurrentConsoleFontEx(hConsoleOutput:HANDLE; bMaximumWindow:BOOL; lpConsoleCurrentFontEx:PCONSOLE_FONT_INFOEX):BOOL;stdcall;external 'kernel32' name 'SetCurrentConsoleFontEx';
|
||||
function GetConsoleHistoryInfo(lpConsoleHistoryInfo:PCONSOLE_HISTORY_INFO):BOOL;stdcall;external 'kernel32' name 'GetConsoleHistoryInfo';
|
||||
function SetConsoleHistoryInfo(lpConsoleHistoryInfo:PCONSOLE_HISTORY_INFO):BOOL;stdcall;external 'kernel32' name 'SetConsoleHistoryInfo';
|
||||
function GetConsoleFontSize(hConsoleOutput:HANDLE; nFont:DWORD):COORD;stdcall;external 'kernel32' name 'GetConsoleFontSize';
|
||||
function GetConsoleSelectionInfo(lpConsoleSelectionInfo:PCONSOLE_SELECTION_INFO):BOOL;stdcall;external 'kernel32' name 'GetConsoleSelectionInfo';
|
||||
function AttachConsole(dwProcessId:DWORD):BOOL;stdcall;external 'kernel32' name 'AttachConsole';
|
||||
function ATTACH_PARENT_PROCESS : DWORD;
|
||||
|
||||
|
||||
function GetConsoleDisplayMode(lpModeFlags:LPDWORD):BOOL;stdcall;external 'kernel32' name 'GetConsoleDisplayMode';
|
||||
function SetConsoleDisplayMode(hConsoleOutput:HANDLE; dwFlags:DWORD; lpNewScreenBufferDimensions:PCOORD):BOOL;stdcall;external 'kernel32' name 'SetConsoleDisplayMode';
|
||||
function GetConsoleWindow:HWND;stdcall;external 'kernel32' name 'GetConsoleWindow';
|
||||
function GetConsoleProcessList(lpdwProcessList:LPDWORD; dwProcessCount:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleProcessList';
|
||||
|
||||
|
||||
{$endif read_interface}
|
||||
|
||||
|
||||
@ -2435,5 +2457,20 @@ begin
|
||||
GET_DEVICE_CHANGE_LPARAM:=LOWORD(lParam);
|
||||
end;
|
||||
|
||||
function CONSOLE_REAL_OUTPUT_HANDLE : HANDLE;
|
||||
begin
|
||||
CONSOLE_REAL_OUTPUT_HANDLE:=HANDLE(-(2));
|
||||
end;
|
||||
|
||||
function CONSOLE_REAL_INPUT_HANDLE : HANDLE;
|
||||
begin
|
||||
CONSOLE_REAL_INPUT_HANDLE:=HANDLE(-(3));
|
||||
end;
|
||||
|
||||
function ATTACH_PARENT_PROCESS : DWORD;
|
||||
begin
|
||||
ATTACH_PARENT_PROCESS:=DWORD(-(1));
|
||||
end;
|
||||
|
||||
{$endif read_implementation}
|
||||
|
||||
|
@ -9308,6 +9308,70 @@ type
|
||||
RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST;
|
||||
PRAWINPUTDEVICELIST = ^tagRAWINPUTDEVICELIST;
|
||||
//#endif /* _WIN32_WINNT >= 0x0501 */
|
||||
|
||||
// Wincon.h
|
||||
|
||||
_CONSOLE_SCREEN_BUFFER_INFOEX = record
|
||||
cbSize : ULONG;
|
||||
dwSize : COORD;
|
||||
dwCursorPosition : COORD;
|
||||
wAttributes : WORD;
|
||||
srWindow : SMALL_RECT;
|
||||
dwMaximumWindowSize : COORD;
|
||||
wPopupAttributes : WORD;
|
||||
bFullscreenSupported : BOOL;
|
||||
ColorTable : array[0..15] of COLORREF;
|
||||
end;
|
||||
CONSOLE_SCREEN_BUFFER_INFOEX = _CONSOLE_SCREEN_BUFFER_INFOEX;
|
||||
PCONSOLE_SCREEN_BUFFER_INFOEX = ^_CONSOLE_SCREEN_BUFFER_INFOEX;
|
||||
|
||||
|
||||
_CONSOLE_FONT_INFO = record
|
||||
nFont : DWORD;
|
||||
dwFontSize : COORD;
|
||||
end;
|
||||
CONSOLE_FONT_INFO = _CONSOLE_FONT_INFO;
|
||||
PCONSOLE_FONT_INFO = ^_CONSOLE_FONT_INFO;
|
||||
|
||||
_CONSOLE_FONT_INFOEX = record
|
||||
cbSize : ULONG;
|
||||
nFont : DWORD;
|
||||
dwFontSize : COORD;
|
||||
FontFamily : UINT;
|
||||
FontWeight : UINT;
|
||||
FaceName : array[0..(LF_FACESIZE)-1] of WCHAR;
|
||||
end;
|
||||
CONSOLE_FONT_INFOEX = _CONSOLE_FONT_INFOEX;
|
||||
PCONSOLE_FONT_INFOEX = ^_CONSOLE_FONT_INFOEX;
|
||||
|
||||
|
||||
|
||||
_CONSOLE_HISTORY_INFO = record
|
||||
cbSize : UINT;
|
||||
HistoryBufferSize : UINT;
|
||||
NumberOfHistoryBuffers : UINT;
|
||||
dwFlags : DWORD;
|
||||
end;
|
||||
CONSOLE_HISTORY_INFO = _CONSOLE_HISTORY_INFO;
|
||||
PCONSOLE_HISTORY_INFO = ^_CONSOLE_HISTORY_INFO;
|
||||
|
||||
_CONSOLE_SELECTION_INFO = record
|
||||
dwFlags : DWORD;
|
||||
dwSelectionAnchor : COORD;
|
||||
srSelection : SMALL_RECT;
|
||||
end;
|
||||
CONSOLE_SELECTION_INFO = _CONSOLE_SELECTION_INFO;
|
||||
PCONSOLE_SELECTION_INFO = ^_CONSOLE_SELECTION_INFO;
|
||||
|
||||
_CONSOLE_READCONSOLE_CONTROL = record
|
||||
nLength : ULONG;
|
||||
nInitialChars : ULONG;
|
||||
dwCtrlWakeupMask : ULONG;
|
||||
dwControlKeyState : ULONG;
|
||||
end;
|
||||
CONSOLE_READCONSOLE_CONTROL = _CONSOLE_READCONSOLE_CONTROL;
|
||||
PCONSOLE_READCONSOLE_CONTROL = ^_CONSOLE_READCONSOLE_CONTROL;
|
||||
|
||||
{$pop}
|
||||
{$endif read_interface}
|
||||
|
||||
|
@ -484,6 +484,18 @@ function FindFirstFileExW(lpfilename : LPCWStr;fInfoLevelId:FINDEX_INFO_LEVELS ;
|
||||
function FindFirstFileTransactedW(lpfilename : LPCWStr;fInfoLevelId:FINDEX_INFO_LEVELS ;lpFindFileData:pointer;fSearchOp : FINDEX_SEARCH_OPS;lpSearchFilter:pointer;dwAdditionalFlags:dword;htransaction : HANDLE):Handle; stdcall; external 'kernel32' name 'FindFirstFileTransactedW';
|
||||
function CopyFileExW(lpExistingFileName,lpNewFileName : LPCWSTR;lpProgressRoutine:LPPROGRESS_ROUTINE;lpdata:Pointer;pbcancel:LPBOOL;dwCopyFlags:DWord):DWord; stdcall; external 'kernel32' name 'CopyFileExW';
|
||||
|
||||
|
||||
function PeekConsoleInputW(hConsoleInput:HANDLE; lpBuffer:PINPUT_RECORD; nLength:DWORD; lpNumberOfEventsRead:LPDWORD):BOOL;stdcall;external 'kernel32' name 'PeekConsoleInputW';
|
||||
function WriteConsoleInputW(hConsoleInput:HANDLE; var lpBuffer:INPUT_RECORD; nLength:DWORD; lpNumberOfEventsWritten:LPDWORD):BOOL;stdcall;external 'kernel32' name 'WriteConsoleInputW';
|
||||
function ScrollConsoleScreenBufferW(hConsoleOutput:HANDLE; var lpScrollRectangle:SMALL_RECT; var lpClipRectangle:SMALL_RECT; dwDestinationOrigin:COORD; lpFill:PCHAR_INFO):BOOL;stdcall;external 'kernel32' name 'ScrollConsoleScreenBufferW';
|
||||
function GetConsoleOriginalTitleW(lpConsoleTitle:LPWSTR; nSize:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleOriginalTitleW';
|
||||
function AddConsoleAliasW(Source:LPWSTR; Target:LPWSTR; ExeName:LPWSTR):BOOL;stdcall;external 'kernel32' name 'AddConsoleAliasW';
|
||||
function GetConsoleAliasW(Source:LPWSTR; TargetBuffer:LPWSTR; TargetBufferLength:DWORD; ExeName:LPWSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasW';
|
||||
function GetConsoleAliasesLengthW(ExeName:LPWSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasesLengthW';
|
||||
function GetConsoleAliasExesLengthW:DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasExesLengthW';
|
||||
function GetConsoleAliasesW(AliasBuffer:LPWSTR; AliasBufferLength:DWORD; ExeName:LPWSTR):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasesW';
|
||||
function GetConsoleAliasExesW(ExeNameBuffer:LPWSTR; ExeNameBufferLength:DWORD):DWORD;stdcall;external 'kernel32' name 'GetConsoleAliasExesW';
|
||||
|
||||
{$endif read_interface}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user