mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
- introduced new win32 compatability function SystemParametersInfo
- added support for parameter SPI_GETWHEELSCROLLLINES in base widgetset class with override in qt widgetset git-svn-id: trunk@10830 -
This commit is contained in:
parent
78187ac487
commit
adef54eff4
@ -1430,6 +1430,15 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||
begin
|
||||
case uiAction of
|
||||
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := 3; // default value
|
||||
else
|
||||
Result := False;
|
||||
end
|
||||
end;
|
||||
|
||||
Function TWidgetSet.TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean;
|
||||
begin
|
||||
Result := false;
|
||||
|
@ -840,6 +840,11 @@ begin
|
||||
SrcX,SrcY,SrcWidth,SrcHeight,Bits,BitsInfo,Usage,Rop);
|
||||
end;
|
||||
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||
begin
|
||||
Result := WidgetSet.SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||
end;
|
||||
|
||||
function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean;
|
||||
begin
|
||||
Result := WidgetSet.TextOut(DC, X, Y, Str, Count);
|
||||
|
@ -232,6 +232,7 @@ function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc,
|
||||
function StretchDIBits(DC: HDC; DestX, DestY, DestWidth, DestHeight, SrcX,
|
||||
SrcY, SrcWidth, SrcHeight: Integer; Bits: Pointer; var BitsInfo: TBitmapInfo;
|
||||
Usage: UINT; Rop: DWORD): Integer; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
|
||||
Function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
|
||||
@ -303,3 +304,4 @@ function RGB(R, G, B : Byte) : TColorRef; inline;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
@ -2759,6 +2759,24 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: SystemParametersInfo
|
||||
Params: uiAction: System-wide parameter to be retrieved or set
|
||||
uiParam: Depends on the system parameter being queried or set
|
||||
pvParam: Depends on the system parameter being queried or set
|
||||
fWinIni:
|
||||
Returns: True if the function succeeds
|
||||
retrieves or sets the value of one of the system-wide parameters
|
||||
------------------------------------------------------------------------------}
|
||||
function TQtWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||
begin
|
||||
case uiAction of
|
||||
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := QApplication_wheelScrollLines;
|
||||
else
|
||||
Result := False;
|
||||
end
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: TextOut
|
||||
Params: DC:
|
||||
|
@ -105,6 +105,7 @@ function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer;
|
||||
function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer;
|
||||
SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP;
|
||||
XMask, YMask: Integer; Rop: DWORD): Boolean; override;
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; override;
|
||||
|
||||
function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||
function WindowFromPoint(Point: TPoint): HWND; override;
|
||||
|
@ -3392,6 +3392,20 @@ Begin
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: SystemParametersInfo
|
||||
Params: uiAction: System-wide parameter to be retrieved or set
|
||||
uiParam: Depends on the system parameter being queried or set
|
||||
pvParam: Depends on the system parameter being queried or set
|
||||
fWinIni:
|
||||
Returns: True if the function succeeds
|
||||
retrieves or sets the value of one of the system-wide parameters
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32WidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||
begin
|
||||
Result := Windows.SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TextOut
|
||||
Params: DC - handle of device context
|
||||
@ -3475,3 +3489,4 @@ end;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
|
@ -197,6 +197,7 @@ function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; Override;
|
||||
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Rop: Cardinal): Boolean; Override;
|
||||
{ Copies a bitmap from a source rectangle into a destination rectangle using the specified mask and raster operations }
|
||||
function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; Override;
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; override;
|
||||
|
||||
function TextOut(DC: HDC; X, Y: Integer; Str: PChar; Count: Integer): Boolean; Override;
|
||||
|
||||
|
175
lcl/lcltype.pp
175
lcl/lcltype.pp
@ -1634,6 +1634,181 @@ const
|
||||
SM_MOUSEWHEELPRESENT = 75;
|
||||
SM_CMETRICS = 76;
|
||||
|
||||
//==============================================
|
||||
// SystemParametersInfo constants
|
||||
//==============================================
|
||||
SPI_GETBEEP = 1;
|
||||
SPI_SETBEEP = 2;
|
||||
SPI_GETMOUSE = 3;
|
||||
SPI_SETMOUSE = 4;
|
||||
SPI_GETBORDER = 5;
|
||||
SPI_SETBORDER = 6;
|
||||
SPI_GETKEYBOARDSPEED = 10;
|
||||
SPI_SETKEYBOARDSPEED = 11;
|
||||
SPI_LANGDRIVER = 12;
|
||||
SPI_ICONHORIZONTALSPACING = 13;
|
||||
SPI_GETSCREENSAVETIMEOUT = 14;
|
||||
SPI_SETSCREENSAVETIMEOUT = 15;
|
||||
SPI_GETSCREENSAVEACTIVE = 16;
|
||||
SPI_SETSCREENSAVEACTIVE = 17;
|
||||
SPI_GETGRIDGRANULARITY = 18;
|
||||
SPI_SETGRIDGRANULARITY = 19;
|
||||
SPI_SETDESKWALLPAPER = 20;
|
||||
SPI_SETDESKPATTERN = 21;
|
||||
SPI_GETKEYBOARDDELAY = 22;
|
||||
SPI_SETKEYBOARDDELAY = 23;
|
||||
SPI_ICONVERTICALSPACING = 24;
|
||||
SPI_GETICONTITLEWRAP = 25;
|
||||
SPI_SETICONTITLEWRAP = 26;
|
||||
SPI_GETMENUDROPALIGNMENT = 27;
|
||||
SPI_SETMENUDROPALIGNMENT = 28;
|
||||
SPI_SETDOUBLECLKWIDTH = 29;
|
||||
SPI_SETDOUBLECLKHEIGHT = 30;
|
||||
SPI_GETICONTITLELOGFONT = 31;
|
||||
SPI_SETDOUBLECLICKTIME = 32;
|
||||
SPI_SETMOUSEBUTTONSWAP = 33;
|
||||
SPI_SETICONTITLELOGFONT = 34;
|
||||
SPI_GETFASTTASKSWITCH = 35;
|
||||
SPI_SETFASTTASKSWITCH = 36;
|
||||
SPI_SETDRAGFULLWINDOWS = 37;
|
||||
SPI_GETDRAGFULLWINDOWS = 38;
|
||||
SPI_GETNONCLIENTMETRICS = 41;
|
||||
SPI_SETNONCLIENTMETRICS = 42;
|
||||
SPI_GETMINIMIZEDMETRICS = 43;
|
||||
SPI_SETMINIMIZEDMETRICS = 44;
|
||||
SPI_GETICONMETRICS = 45;
|
||||
SPI_SETICONMETRICS = 46;
|
||||
SPI_SETWORKAREA = 47;
|
||||
SPI_GETWORKAREA = 48;
|
||||
SPI_SETPENWINDOWS = 49;
|
||||
SPI_GETFILTERKEYS = 50;
|
||||
SPI_SETFILTERKEYS = 51;
|
||||
SPI_GETTOGGLEKEYS = 52;
|
||||
SPI_SETTOGGLEKEYS = 53;
|
||||
SPI_GETMOUSEKEYS = 54;
|
||||
SPI_SETMOUSEKEYS = 55;
|
||||
SPI_GETSHOWSOUNDS = 56;
|
||||
SPI_SETSHOWSOUNDS = 57;
|
||||
SPI_GETSTICKYKEYS = 58;
|
||||
SPI_SETSTICKYKEYS = 59;
|
||||
SPI_GETACCESSTIMEOUT = 60;
|
||||
SPI_SETACCESSTIMEOUT = 61;
|
||||
SPI_GETSERIALKEYS = 62;
|
||||
SPI_SETSERIALKEYS = 63;
|
||||
SPI_GETSOUNDSENTRY = 64;
|
||||
SPI_SETSOUNDSENTRY = 65;
|
||||
SPI_GETHIGHCONTRAST = 66;
|
||||
SPI_SETHIGHCONTRAST = 67;
|
||||
SPI_GETKEYBOARDPREF = 68;
|
||||
SPI_SETKEYBOARDPREF = 69;
|
||||
SPI_GETSCREENREADER = 70;
|
||||
SPI_SETSCREENREADER = 71;
|
||||
SPI_GETANIMATION = 72;
|
||||
SPI_SETANIMATION = 73;
|
||||
SPI_GETFONTSMOOTHING = 74;
|
||||
SPI_SETFONTSMOOTHING = 75;
|
||||
SPI_SETDRAGWIDTH = 76;
|
||||
SPI_SETDRAGHEIGHT = 77;
|
||||
SPI_SETHANDHELD = 78;
|
||||
SPI_GETLOWPOWERTIMEOUT = 79;
|
||||
SPI_GETPOWEROFFTIMEOUT = 80;
|
||||
SPI_SETLOWPOWERTIMEOUT = 81;
|
||||
SPI_SETPOWEROFFTIMEOUT = 82;
|
||||
SPI_GETLOWPOWERACTIVE = 83;
|
||||
SPI_GETPOWEROFFACTIVE = 84;
|
||||
SPI_SETLOWPOWERACTIVE = 85;
|
||||
SPI_SETPOWEROFFACTIVE = 86;
|
||||
SPI_SETCURSORS = 87;
|
||||
SPI_SETICONS = 88;
|
||||
SPI_GETDEFAULTINPUTLANG = 89;
|
||||
SPI_SETDEFAULTINPUTLANG = 90;
|
||||
SPI_SETLANGTOGGLE = 91;
|
||||
SPI_GETWINDOWSEXTENSION = 92;
|
||||
SPI_SETMOUSETRAILS = 93;
|
||||
SPI_GETMOUSETRAILS = 94;
|
||||
SPI_GETSNAPTODEFBUTTON = 95;
|
||||
SPI_SETSNAPTODEFBUTTON = 96;
|
||||
SPI_SCREENSAVERRUNNING = 97;
|
||||
SPI_SETSCREENSAVERRUNNING = 97;
|
||||
SPI_GETMOUSEHOVERWIDTH = 98;
|
||||
SPI_SETMOUSEHOVERWIDTH = 99;
|
||||
SPI_GETMOUSEHOVERHEIGHT = 100;
|
||||
SPI_SETMOUSEHOVERHEIGHT = 101;
|
||||
SPI_GETMOUSEHOVERTIME = 102;
|
||||
SPI_SETMOUSEHOVERTIME = 103;
|
||||
SPI_GETWHEELSCROLLLINES = 104;
|
||||
SPI_SETWHEELSCROLLLINES = 105;
|
||||
SPI_GETMENUSHOWDELAY = 106;
|
||||
SPI_SETMENUSHOWDELAY = 107;
|
||||
SPI_GETSHOWIMEUI = 110;
|
||||
SPI_SETSHOWIMEUI = 111;
|
||||
SPI_GETMOUSESPEED = 112;
|
||||
SPI_SETMOUSESPEED = 113;
|
||||
SPI_GETSCREENSAVERRUNNING = 114;
|
||||
SPI_GETDESKWALLPAPER = 115;
|
||||
SPI_GETACTIVEWINDOWTRACKING = 4096;
|
||||
SPI_SETACTIVEWINDOWTRACKING = 4097;
|
||||
SPI_GETMENUANIMATION = 4098;
|
||||
SPI_SETMENUANIMATION = 4099;
|
||||
SPI_GETCOMBOBOXANIMATION = 4100;
|
||||
SPI_SETCOMBOBOXANIMATION = 4101;
|
||||
SPI_GETLISTBOXSMOOTHSCROLLING = 4102;
|
||||
SPI_SETLISTBOXSMOOTHSCROLLING = 4103;
|
||||
SPI_GETGRADIENTCAPTIONS = 4104;
|
||||
SPI_SETGRADIENTCAPTIONS = 4105;
|
||||
SPI_GETKEYBOARDCUES = 4106;
|
||||
SPI_SETKEYBOARDCUES = 4107;
|
||||
SPI_GETMENUUNDERLINES = 4106;
|
||||
SPI_SETMENUUNDERLINES = 4107;
|
||||
SPI_GETACTIVEWNDTRKZORDER = 4108;
|
||||
SPI_SETACTIVEWNDTRKZORDER = 4109;
|
||||
SPI_GETHOTTRACKING = 4110;
|
||||
SPI_SETHOTTRACKING = 4111;
|
||||
SPI_GETMENUFADE = 4114;
|
||||
SPI_SETMENUFADE = 4115;
|
||||
SPI_GETSELECTIONFADE = 4116;
|
||||
SPI_SETSELECTIONFADE = 4117;
|
||||
SPI_GETTOOLTIPANIMATION = 4118;
|
||||
SPI_SETTOOLTIPANIMATION = 4119;
|
||||
SPI_GETTOOLTIPFADE = 4120;
|
||||
SPI_SETTOOLTIPFADE = 4121;
|
||||
SPI_GETCURSORSHADOW = 4122;
|
||||
SPI_SETCURSORSHADOW = 4123;
|
||||
SPI_GETUIEFFECTS = 4158;
|
||||
SPI_SETUIEFFECTS = 4159;
|
||||
SPI_GETFOREGROUNDLOCKTIMEOUT = 8192;
|
||||
SPI_SETFOREGROUNDLOCKTIMEOUT = 8193;
|
||||
SPI_GETACTIVEWNDTRKTIMEOUT = 8194;
|
||||
SPI_SETACTIVEWNDTRKTIMEOUT = 8195;
|
||||
SPI_GETFOREGROUNDFLASHCOUNT = 8196;
|
||||
SPI_SETFOREGROUNDFLASHCOUNT = 8197;
|
||||
SPI_GETCARETWIDTH = 8198;
|
||||
SPI_SETCARETWIDTH = 8199;
|
||||
SPI_GETMOUSESONAR = 4124;
|
||||
SPI_SETMOUSESONAR = 4125;
|
||||
SPI_GETMOUSECLICKLOCK = 4126;
|
||||
SPI_SETMOUSECLICKLOCK = 4127;
|
||||
SPI_GETMOUSEVANISH = 4128;
|
||||
SPI_SETMOUSEVANISH = 4129;
|
||||
SPI_GETFLATMENU = 4130;
|
||||
SPI_SETFLATMENU = 4131;
|
||||
SPI_GETDROPSHADOW = 4132;
|
||||
SPI_SETDROPSHADOW = 4133;
|
||||
SPI_GETBLOCKSENDINPUTRESETS = 4134;
|
||||
SPI_SETBLOCKSENDINPUTRESETS = 4135;
|
||||
SPI_GETMOUSECLICKLOCKTIME = 8200;
|
||||
SPI_SETMOUSECLICKLOCKTIME = 8201;
|
||||
SPI_GETFONTSMOOTHINGTYPE = 8202;
|
||||
SPI_SETFONTSMOOTHINGTYPE = 8203;
|
||||
SPI_GETFONTSMOOTHINGCONTRAST = 8204;
|
||||
SPI_SETFONTSMOOTHINGCONTRAST = 8205;
|
||||
SPI_GETFOCUSBORDERWIDTH = 8206;
|
||||
SPI_SETFOCUSBORDERWIDTH = 8207;
|
||||
SPI_GETFOCUSBORDERHEIGHT = 8208;
|
||||
SPI_SETFOCUSBORDERHEIGHT = 8209;
|
||||
SPI_GETFONTSMOOTHINGORIENTATION = 8210;
|
||||
SPI_SETFONTSMOOTHINGORIENTATION = 8211;
|
||||
|
||||
//==============================================
|
||||
// GetDeviceCaps constants
|
||||
//==============================================
|
||||
|
Loading…
Reference in New Issue
Block a user