mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 02:38:16 +02:00
Adds more TScreen properties, from patch from bug #19379 by wovan.bugger
git-svn-id: trunk@31339 -
This commit is contained in:
parent
0cda734085
commit
35a781c607
17
lcl/forms.pp
17
lcl/forms.pp
@ -943,8 +943,11 @@ type
|
|||||||
function GetCustomFormsZOrdered(Index: Integer): TCustomForm;
|
function GetCustomFormsZOrdered(Index: Integer): TCustomForm;
|
||||||
function GetDataModuleCount: Integer;
|
function GetDataModuleCount: Integer;
|
||||||
function GetDataModules(AIndex: Integer): TDataModule;
|
function GetDataModules(AIndex: Integer): TDataModule;
|
||||||
|
function GetDesktopLeft: Integer;
|
||||||
|
function GetDesktopTop: Integer;
|
||||||
function GetDesktopHeight: Integer;
|
function GetDesktopHeight: Integer;
|
||||||
function GetDesktopWidth: Integer;
|
function GetDesktopWidth: Integer;
|
||||||
|
function GetDesktopRect: TRect;
|
||||||
function GetFonts : TStrings;
|
function GetFonts : TStrings;
|
||||||
function GetFormCount: Integer;
|
function GetFormCount: Integer;
|
||||||
function GetForms(IIndex: Integer): TForm;
|
function GetForms(IIndex: Integer): TForm;
|
||||||
@ -973,6 +976,11 @@ type
|
|||||||
procedure DoRemoveDataModule(DataModule: TDataModule);
|
procedure DoRemoveDataModule(DataModule: TDataModule);
|
||||||
procedure NotifyScreenFormHandler(HandlerType: TScreenNotification;
|
procedure NotifyScreenFormHandler(HandlerType: TScreenNotification;
|
||||||
Form: TCustomForm);
|
Form: TCustomForm);
|
||||||
|
function GetWorkAreaHeight: Integer;
|
||||||
|
function GetWorkAreaLeft: Integer;
|
||||||
|
function GetWorkAreaRect: TRect;
|
||||||
|
function GetWorkAreaTop: Integer;
|
||||||
|
function GetWorkAreaWidth: Integer;
|
||||||
protected
|
protected
|
||||||
function GetHintFont: TFont; virtual;
|
function GetHintFont: TFont; virtual;
|
||||||
function GetIconFont: TFont; virtual;
|
function GetIconFont: TFont; virtual;
|
||||||
@ -1033,8 +1041,12 @@ type
|
|||||||
property CustomFormZOrderCount: Integer read GetCustomFormZOrderCount;
|
property CustomFormZOrderCount: Integer read GetCustomFormZOrderCount;
|
||||||
property CustomFormsZOrdered[Index: Integer]: TCustomForm
|
property CustomFormsZOrdered[Index: Integer]: TCustomForm
|
||||||
read GetCustomFormsZOrdered; // lower index means on top
|
read GetCustomFormsZOrdered; // lower index means on top
|
||||||
|
property DesktopLeft: Integer read GetDesktopLeft;
|
||||||
|
property DesktopTop: Integer read GetDesktopTop;
|
||||||
|
|
||||||
property DesktopHeight: Integer read GetDesktopHeight;
|
property DesktopHeight: Integer read GetDesktopHeight;
|
||||||
property DesktopWidth: Integer read GetDesktopWidth;
|
property DesktopWidth: Integer read GetDesktopWidth;
|
||||||
|
property DesktopRect: TRect read GetDesktopRect;
|
||||||
property FocusedForm: TCustomForm read FFocusedForm;
|
property FocusedForm: TCustomForm read FFocusedForm;
|
||||||
property FormCount: Integer read GetFormCount;
|
property FormCount: Integer read GetFormCount;
|
||||||
property Forms[Index: Integer]: TForm read GetForms;
|
property Forms[Index: Integer]: TForm read GetForms;
|
||||||
@ -1053,6 +1065,11 @@ type
|
|||||||
property PixelsPerInch: integer read FPixelsPerInch;
|
property PixelsPerInch: integer read FPixelsPerInch;
|
||||||
property PrimaryMonitor: TMonitor read GetPrimaryMonitor;
|
property PrimaryMonitor: TMonitor read GetPrimaryMonitor;
|
||||||
property Width: Integer read GetWidth;
|
property Width: Integer read GetWidth;
|
||||||
|
property WorkAreaRect: TRect read GetWorkAreaRect;
|
||||||
|
property WorkAreaHeight: Integer read GetWorkAreaHeight;
|
||||||
|
property WorkAreaLeft: Integer read GetWorkAreaLeft;
|
||||||
|
property WorkAreaTop: Integer read GetWorkAreaTop;
|
||||||
|
property WorkAreaWidth: Integer read GetWorkAreaWidth;
|
||||||
property OnActiveControlChange: TNotifyEvent read FOnActiveControlChange
|
property OnActiveControlChange: TNotifyEvent read FOnActiveControlChange
|
||||||
write FOnActiveControlChange;
|
write FOnActiveControlChange;
|
||||||
property OnActiveFormChange: TNotifyEvent read FOnActiveFormChange
|
property OnActiveFormChange: TNotifyEvent read FOnActiveFormChange
|
||||||
|
@ -654,6 +654,48 @@ begin
|
|||||||
Result := GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
Result := GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetDesktopLeft: Integer;
|
||||||
|
begin
|
||||||
|
Result := GetSystemMetrics(SM_XVIRTUALSCREEN);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetDesktopRect: TRect;
|
||||||
|
begin
|
||||||
|
Result := Bounds(DesktopLeft, DesktopTop, DesktopWidth, DesktopHeight);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetDesktopTop: Integer;
|
||||||
|
begin
|
||||||
|
Result := GetSystemMetrics(SM_YVIRTUALSCREEN);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetWorkAreaLeft: Integer;
|
||||||
|
begin
|
||||||
|
Result := WorkAreaRect.Left;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetWorkAreaRect: TRect;
|
||||||
|
begin
|
||||||
|
SystemParametersInfo(SPI_GETWORKAREA, 0, @Result, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetWorkAreaTop: Integer;
|
||||||
|
begin
|
||||||
|
Result := WorkAreaRect.Top;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetWorkAreaHeight: Integer;
|
||||||
|
begin
|
||||||
|
with WorkAreaRect do Result := Bottom - Top;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TScreen.GetWorkAreaWidth: Integer;
|
||||||
|
begin
|
||||||
|
with WorkAreaRect do Result := Right - Left;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TScreen.AddForm
|
Function: TScreen.AddForm
|
||||||
Params: FForm: The form to be added
|
Params: FForm: The form to be added
|
||||||
|
@ -3616,6 +3616,21 @@ begin
|
|||||||
TCarbonBitmap(Mask), XMask, YMask, Rop);
|
TCarbonBitmap(Mask), XMask, YMask, Rop);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCarbonWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord;
|
||||||
|
pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
Case uiAction of
|
||||||
|
SPI_GETWORKAREA: begin
|
||||||
|
TRect(pvParam^):=Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_YVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CXVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TextOut
|
Method: TextOut
|
||||||
Params: DC - Handle of the device context
|
Params: DC - Handle of the device context
|
||||||
|
@ -217,6 +217,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
|||||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
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;
|
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||||
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 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 TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||||
function UpdateWindow(Handle: HWND): Boolean; override;
|
function UpdateWindow(Handle: HWND): Boolean; override;
|
||||||
|
@ -9776,6 +9776,21 @@ begin
|
|||||||
Rop);
|
Rop);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TGTKWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord;
|
||||||
|
pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
Case uiAction of
|
||||||
|
SPI_GETWORKAREA: begin
|
||||||
|
TRect(pvParam^):=Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_YVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CXVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TextOut
|
Function: TextOut
|
||||||
Params: DC:
|
Params: DC:
|
||||||
|
@ -215,6 +215,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
|||||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
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;
|
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||||
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 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 TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||||
|
|
||||||
|
@ -9106,6 +9106,21 @@ begin
|
|||||||
Rop);
|
Rop);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TGtk2WidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord;
|
||||||
|
pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||||
|
begin
|
||||||
|
Result:=False;
|
||||||
|
Case uiAction of
|
||||||
|
SPI_GETWORKAREA: begin
|
||||||
|
TRect(pvParam^):=Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_YVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CXVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Function: TextOut
|
Function: TextOut
|
||||||
Params: DC:
|
Params: DC:
|
||||||
|
@ -231,6 +231,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
|||||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
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;
|
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||||
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 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 TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||||
|
|
||||||
|
@ -5790,6 +5790,13 @@ function TQtWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvPa
|
|||||||
begin
|
begin
|
||||||
case uiAction of
|
case uiAction of
|
||||||
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := QApplication_wheelScrollLines;
|
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := QApplication_wheelScrollLines;
|
||||||
|
SPI_GETWORKAREA: begin
|
||||||
|
TRect(pvParam^):=Bounds(GetSystemMetrics(SM_XVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_YVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CXVIRTUALSCREEN),
|
||||||
|
GetSystemMetrics(SM_CYVIRTUALSCREEN));
|
||||||
|
Result:=True;
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
Result := False;
|
Result := False;
|
||||||
end
|
end
|
||||||
|
@ -3534,6 +3534,12 @@ begin
|
|||||||
Result := true;
|
Result := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TWinCEWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord;
|
||||||
|
pvParam: Pointer; fWinIni: DWord): LongBool;
|
||||||
|
begin
|
||||||
|
Result := Windows.SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TextOut
|
Method: TextOut
|
||||||
Params: DC - handle of device context
|
Params: DC - handle of device context
|
||||||
|
@ -229,6 +229,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
|||||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
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;
|
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||||
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 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 TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user