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:
sekelsenmat 2011-11-28 10:27:59 +00:00
parent 7137e09e51
commit 73b7aedc0b
2 changed files with 17 additions and 16 deletions

View File

@ -98,18 +98,19 @@ begin
lFormInfo.LCLForm := AForm;
lFormInfo.Children := TFPList.Create;
NonNativeForms.Insert(0, lFormInfo);
Result := lFormInfo;
end;
procedure ShowForm(ACDForm: TCDNonNativeForm);
var
lCount, lCurIndex: Integer;
begin
{$IFDEF VerboseWinAPI}
DebugLn('ShowForm');
{$ENDIF}
InitNonNativeForms();
lCount := NonNativeForms.Count;
lCurIndex := NonNativeForms.IndexOf(ACDForm);
{$IFDEF VerboseWinAPI}
DebugLn(Format('ShowForm lOldIndex=%d lNewIndex=%d', [lCurIndex, lCount-1]));
{$ENDIF}
NonNativeForms.Move(lCurIndex, lCount-1);
end;
@ -120,6 +121,9 @@ begin
InitNonNativeForms();
lCount := NonNativeForms.Count;
lCurIndex := NonNativeForms.IndexOf(ACDForm);
{$IFDEF VerboseWinAPI}
DebugLn(Format('HideForm lOldIndex=%d lNewIndex=0', [lCurIndex]));
{$ENDIF}
NonNativeForms.Move(lCurIndex, 0);
end;

View File

@ -33,17 +33,17 @@ var
lWindowInfo: TAndroidWindowInfo;
AForm: TCustomForm absolute AWinControl;
begin
(* {$ifdef VerboseCDWindow}
{$ifdef VerboseCDWindow}
DebugLn(Format(':>[TCDWSCustomForm.CreateHandle] AWinControl=%x Name=%s: %s',
[PtrInt(AWinControl), AWinControl.Name, AWinControl.ClassName]));
{$endif}*)
{$endif}
Result := TLCLIntfhandle(AddNewForm(TCustomForm(AWinControl)));
(* {$ifdef VerboseCDWindow}
{$ifdef VerboseCDWindow}
DebugLn(Format(':<[TCDWSCustomForm.CreateHandle] Result=%x',
[Result]));
{$endif}*)
{$endif}
end;
class procedure TCDWSCustomForm.DestroyHandle(const AWinControl: TWinControl);
@ -86,23 +86,20 @@ end;
class procedure TCDWSCustomForm.ShowHide(const AWinControl: TWinControl);
begin
// lWindowInfo := TX11WindowInfo(AWinControl.Handle);
// lWindow := lWindowInfo.Window;
if AWinControl.Visible then
begin
ShowForm(TCDNonNativeForm(AWinControl.Handle));
(* {$ifdef VerboseCDWindow}
{$ifdef VerboseCDWindow}
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=True AWinControl=%x Handle=%x',
[PtrInt(AWinControl), PtrInt(AWinControl.Handle)]));
{$endif}*)
{$endif}
ShowForm(TCDNonNativeForm(AWinControl.Handle));
end
else
begin
HideForm(TCDNonNativeForm(AWinControl.Handle));
(* {$ifdef VerboseCDWindow}
{$ifdef VerboseCDWindow}
DebugLn(Format('[TCDWSCustomForm.ShowHide] Visible=False AWinControl=%x', [PtrInt(AWinControl)]));
{$endif}*)
{$endif}
HideForm(TCDNonNativeForm(AWinControl.Handle));
end;
end;