mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 23:19:28 +02:00
lcl: implement TCanvas.TryLock (fixes part of issue #0008380)
git-svn-id: trunk@19047 -
This commit is contained in:
parent
e8814a27e8
commit
058c9c7149
@ -1037,6 +1037,7 @@ type
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure Lock; virtual;
|
||||
function TryLock: Boolean;
|
||||
procedure Unlock; virtual;
|
||||
procedure Refresh; virtual;
|
||||
procedure Changing; virtual;
|
||||
|
@ -1659,6 +1659,13 @@ begin
|
||||
LockCanvas;
|
||||
end;
|
||||
|
||||
function TCanvas.TryLock: Boolean;
|
||||
begin
|
||||
Result := not Locked;
|
||||
if Result then
|
||||
Lock;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Function: TCanvas.Unlock
|
||||
Params: none
|
||||
|
Loading…
Reference in New Issue
Block a user