mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:29:25 +02:00
customdrawn-android: Merges the defines VerboseCDWindow and VerboseCDForms
git-svn-id: trunk@33832 -
This commit is contained in:
parent
f76122ed92
commit
d337911f12
@ -82,7 +82,7 @@ begin
|
||||
{$IFDEF VerboseCDPaintProfiler}
|
||||
//lTimeStart := NowUTC();
|
||||
{$ENDIF}
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
//DebugLn(Format('[TCDWSCustomForm.EvPaint] AWindowInfo: %x', [PtrInt(AWindowInfo)]));
|
||||
{$ENDIF}
|
||||
|
||||
@ -94,11 +94,11 @@ begin
|
||||
struct.hdc := HDC(lCurForm.Canvas);
|
||||
|
||||
// Send the paint message to the LCL
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
//DebugLn(Format('[TCDWSCustomForm.EvPaint] OnPaint event started context: %x', [struct.hdc]));
|
||||
{$ENDIF}
|
||||
LCLSendPaintMsg(lCurForm.LCLForm, struct.hdc, @struct);
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
//DebugLn('[TCDWSCustomForm.EvPaint] OnPaint event ended');
|
||||
{$ENDIF}
|
||||
|
||||
|
@ -78,7 +78,7 @@ function GetCurrentForm(): TCDNonNativeForm;
|
||||
var
|
||||
lCount: Integer;
|
||||
begin
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn('GetCurrentForm');
|
||||
{$ENDIF}
|
||||
InitNonNativeForms();
|
||||
@ -91,7 +91,7 @@ function AddNewForm(AForm: TCustomForm): TCDNonNativeForm;
|
||||
var
|
||||
lFormInfo: TCDNonNativeForm;
|
||||
begin
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn('AddNewForm');
|
||||
{$ENDIF}
|
||||
InitNonNativeForms();
|
||||
@ -109,7 +109,7 @@ begin
|
||||
InitNonNativeForms();
|
||||
lCount := NonNativeForms.Count;
|
||||
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('ShowForm lOldIndex=%d lNewIndex=%d', [lCurIndex, lCount-1]));
|
||||
{$ENDIF}
|
||||
NonNativeForms.Move(lCurIndex, lCount-1);
|
||||
@ -122,7 +122,7 @@ begin
|
||||
InitNonNativeForms();
|
||||
lCount := NonNativeForms.Count;
|
||||
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('HideForm lOldIndex=%d lNewIndex=0', [lCurIndex]));
|
||||
{$ENDIF}
|
||||
NonNativeForms.Move(lCurIndex, 0);
|
||||
@ -135,7 +135,7 @@ var
|
||||
lRawImage: TRawImage;
|
||||
lPixelSize: Byte;
|
||||
begin
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format(':>[UpdateControlLazImageAndCanvas] Input Image: %x Canvas: %x',
|
||||
[PtrInt(AImage), PtrInt(ACanvas)]));
|
||||
{$ENDIF}
|
||||
@ -178,7 +178,7 @@ begin
|
||||
if (ACanvas <> nil) then ACanvas.Free;
|
||||
ACanvas := TLazCanvas.Create(AImage);
|
||||
end;
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format(':<[UpdateControlLazImageAndCanvas] Output Image: %x Canvas: %x',
|
||||
[PtrInt(AImage), PtrInt(ACanvas)]));
|
||||
{$ENDIF}
|
||||
|
@ -33,14 +33,14 @@ var
|
||||
lWindowInfo: TAndroidWindowInfo;
|
||||
AForm: TCustomForm absolute AWinControl;
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format(':>[TCDWSCustomForm.CreateHandle] AWinControl=%x Name=%s: %s',
|
||||
[PtrInt(AWinControl), AWinControl.Name, AWinControl.ClassName]));
|
||||
{$endif}
|
||||
|
||||
Result := TLCLIntfhandle(AddNewForm(TCustomForm(AWinControl)));
|
||||
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format(':<[TCDWSCustomForm.CreateHandle] Result=%x',
|
||||
[Result]));
|
||||
{$endif}
|
||||
@ -65,7 +65,7 @@ end;
|
||||
class procedure TCDWSCustomForm.SetBounds(const AWinControl: TWinControl;
|
||||
const ALeft, ATop, AWidth, AHeight: Integer);
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.SetBounds] AWinControl=%x ALeft=%d ATop=%d AWidth=%d AHeight=%d',
|
||||
[PtrInt(AWinControl), ALeft, ATop, AWidth, AHeight]));
|
||||
{$endif}
|
||||
@ -88,7 +88,7 @@ class procedure TCDWSCustomForm.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
if AWinControl.Visible then
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=True AWinControl=%x Handle=%x',
|
||||
[PtrInt(AWinControl), PtrInt(AWinControl.Handle)]));
|
||||
{$endif}
|
||||
@ -96,7 +96,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=False AWinControl=%x', [PtrInt(AWinControl)]));
|
||||
{$endif}
|
||||
HideForm(TCDNonNativeForm(AWinControl.Handle));
|
||||
|
@ -478,7 +478,7 @@ begin
|
||||
// lDepth, ZPixmap, 0, PChar(ARawImage.Data),
|
||||
// ADestWidth, ADestHeight, 8, 0);
|
||||
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.DrawRawImageToGC_XPutImage] XImage=%x Data=%x'
|
||||
+ ' ColorDepth:%d Width=%d Height=%d ScanlineSize=%d'
|
||||
+ ' red_mask=%x green_mask=%x blue_mask=%x',
|
||||
@ -607,7 +607,7 @@ begin
|
||||
{$IFDEF VerboseCDPaintProfiler}
|
||||
lTimeStart := NowUTC();
|
||||
{$ENDIF}
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.EvPaint] AWindowInfo: %x', [PtrInt(AWindowInfo)]));
|
||||
{$ENDIF}
|
||||
if (AWinControl = nil) or (AWindowInfo = nil) then Exit;
|
||||
@ -618,7 +618,7 @@ begin
|
||||
FillChar(struct, SizeOf(TPaintStruct), 0);
|
||||
|
||||
// Prepare the non-native image and canvas
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.EvPaint] Visual: Red-Mask: %x Green-Mask: %x Blue-Mask: %x'
|
||||
+ ' bits_per_rgb=%d c_class=%d',
|
||||
[AWindowInfo.Attr.visual^.red_mask, AWindowInfo.Attr.visual^.green_mask, AWindowInfo.Attr.visual^.blue_mask,
|
||||
@ -636,11 +636,11 @@ begin
|
||||
struct.hdc := HDC(AWindowInfo.Canvas);
|
||||
|
||||
// Send the paint message to the LCL
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.EvPaint] OnPaint event started context: %x', [struct.hdc]));
|
||||
{$ENDIF}
|
||||
LCLSendPaintMsg(AWinControl, struct.hdc, @struct);
|
||||
{$IFDEF VerboseCDWindow}
|
||||
{$IFDEF VerboseCDForms}
|
||||
DebugLn('[TCDWSCustomForm.EvPaint] OnPaint event ended');
|
||||
{$ENDIF}
|
||||
|
||||
@ -738,7 +738,7 @@ var
|
||||
lWindow: TWindow;
|
||||
AForm: TCustomForm absolute AWinControl;
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format(':>[TCDWSCustomForm.CreateHandle] AWinControl=%x Name=%s: %s',
|
||||
[PtrInt(AWinControl), AWinControl.Name, AWinControl.ClassName]));
|
||||
{$endif}
|
||||
@ -842,7 +842,7 @@ begin
|
||||
CreateX11Canvas(lWindowInfo);
|
||||
Result := TLCLIntfHandle(lWindowInfo);
|
||||
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format(':<[TCDWSCustomForm.CreateHandle] Result=%x',
|
||||
[Result]));
|
||||
{$endif}
|
||||
@ -867,7 +867,7 @@ end;
|
||||
class procedure TCDWSCustomForm.SetBounds(const AWinControl: TWinControl;
|
||||
const ALeft, ATop, AWidth, AHeight: Integer);
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.SetBounds] AWinControl=%x ALeft=%d ATop=%d AWidth=%d AHeight=%d',
|
||||
[PtrInt(AWinControl), ALeft, ATop, AWidth, AHeight]));
|
||||
{$endif}
|
||||
@ -899,7 +899,7 @@ begin
|
||||
|
||||
if AWinControl.Visible then
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=True AWinControl=%x Handle=%x',
|
||||
[PtrInt(AWinControl), PtrInt(AWinControl.Handle)]));
|
||||
{$endif}
|
||||
@ -907,7 +907,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
{$ifdef VerboseCDWindow}
|
||||
{$ifdef VerboseCDForms}
|
||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=False AWinControl=%x', [PtrInt(AWinControl)]));
|
||||
{$endif}
|
||||
// Don't remove it here, wait for a X11 Destroy event
|
||||
|
Loading…
Reference in New Issue
Block a user