mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-17 23:08:50 +02:00
customdrawn-android: Painting via paint events already partially works, there is now a pixel format missmatch
git-svn-id: trunk@33821 -
This commit is contained in:
parent
7137e09e51
commit
73b7aedc0b
@ -98,18 +98,19 @@ begin
|
|||||||
lFormInfo.LCLForm := AForm;
|
lFormInfo.LCLForm := AForm;
|
||||||
lFormInfo.Children := TFPList.Create;
|
lFormInfo.Children := TFPList.Create;
|
||||||
NonNativeForms.Insert(0, lFormInfo);
|
NonNativeForms.Insert(0, lFormInfo);
|
||||||
|
Result := lFormInfo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ShowForm(ACDForm: TCDNonNativeForm);
|
procedure ShowForm(ACDForm: TCDNonNativeForm);
|
||||||
var
|
var
|
||||||
lCount, lCurIndex: Integer;
|
lCount, lCurIndex: Integer;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseWinAPI}
|
|
||||||
DebugLn('ShowForm');
|
|
||||||
{$ENDIF}
|
|
||||||
InitNonNativeForms();
|
InitNonNativeForms();
|
||||||
lCount := NonNativeForms.Count;
|
lCount := NonNativeForms.Count;
|
||||||
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
||||||
|
{$IFDEF VerboseWinAPI}
|
||||||
|
DebugLn(Format('ShowForm lOldIndex=%d lNewIndex=%d', [lCurIndex, lCount-1]));
|
||||||
|
{$ENDIF}
|
||||||
NonNativeForms.Move(lCurIndex, lCount-1);
|
NonNativeForms.Move(lCurIndex, lCount-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -120,6 +121,9 @@ begin
|
|||||||
InitNonNativeForms();
|
InitNonNativeForms();
|
||||||
lCount := NonNativeForms.Count;
|
lCount := NonNativeForms.Count;
|
||||||
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
lCurIndex := NonNativeForms.IndexOf(ACDForm);
|
||||||
|
{$IFDEF VerboseWinAPI}
|
||||||
|
DebugLn(Format('HideForm lOldIndex=%d lNewIndex=0', [lCurIndex]));
|
||||||
|
{$ENDIF}
|
||||||
NonNativeForms.Move(lCurIndex, 0);
|
NonNativeForms.Move(lCurIndex, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -33,17 +33,17 @@ var
|
|||||||
lWindowInfo: TAndroidWindowInfo;
|
lWindowInfo: TAndroidWindowInfo;
|
||||||
AForm: TCustomForm absolute AWinControl;
|
AForm: TCustomForm absolute AWinControl;
|
||||||
begin
|
begin
|
||||||
(* {$ifdef VerboseCDWindow}
|
{$ifdef VerboseCDWindow}
|
||||||
DebugLn(Format(':>[TCDWSCustomForm.CreateHandle] AWinControl=%x Name=%s: %s',
|
DebugLn(Format(':>[TCDWSCustomForm.CreateHandle] AWinControl=%x Name=%s: %s',
|
||||||
[PtrInt(AWinControl), AWinControl.Name, AWinControl.ClassName]));
|
[PtrInt(AWinControl), AWinControl.Name, AWinControl.ClassName]));
|
||||||
{$endif}*)
|
{$endif}
|
||||||
|
|
||||||
Result := TLCLIntfhandle(AddNewForm(TCustomForm(AWinControl)));
|
Result := TLCLIntfhandle(AddNewForm(TCustomForm(AWinControl)));
|
||||||
|
|
||||||
(* {$ifdef VerboseCDWindow}
|
{$ifdef VerboseCDWindow}
|
||||||
DebugLn(Format(':<[TCDWSCustomForm.CreateHandle] Result=%x',
|
DebugLn(Format(':<[TCDWSCustomForm.CreateHandle] Result=%x',
|
||||||
[Result]));
|
[Result]));
|
||||||
{$endif}*)
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TCDWSCustomForm.DestroyHandle(const AWinControl: TWinControl);
|
class procedure TCDWSCustomForm.DestroyHandle(const AWinControl: TWinControl);
|
||||||
@ -86,23 +86,20 @@ end;
|
|||||||
|
|
||||||
class procedure TCDWSCustomForm.ShowHide(const AWinControl: TWinControl);
|
class procedure TCDWSCustomForm.ShowHide(const AWinControl: TWinControl);
|
||||||
begin
|
begin
|
||||||
// lWindowInfo := TX11WindowInfo(AWinControl.Handle);
|
|
||||||
// lWindow := lWindowInfo.Window;
|
|
||||||
|
|
||||||
if AWinControl.Visible then
|
if AWinControl.Visible then
|
||||||
begin
|
begin
|
||||||
ShowForm(TCDNonNativeForm(AWinControl.Handle));
|
{$ifdef VerboseCDWindow}
|
||||||
(* {$ifdef VerboseCDWindow}
|
|
||||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=True AWinControl=%x Handle=%x',
|
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=True AWinControl=%x Handle=%x',
|
||||||
[PtrInt(AWinControl), PtrInt(AWinControl.Handle)]));
|
[PtrInt(AWinControl), PtrInt(AWinControl.Handle)]));
|
||||||
{$endif}*)
|
{$endif}
|
||||||
|
ShowForm(TCDNonNativeForm(AWinControl.Handle));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
HideForm(TCDNonNativeForm(AWinControl.Handle));
|
{$ifdef VerboseCDWindow}
|
||||||
(* {$ifdef VerboseCDWindow}
|
|
||||||
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=False AWinControl=%x', [PtrInt(AWinControl)]));
|
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=False AWinControl=%x', [PtrInt(AWinControl)]));
|
||||||
{$endif}*)
|
{$endif}
|
||||||
|
HideForm(TCDNonNativeForm(AWinControl.Handle));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user