+Implemented more winapi routines.

+Added define VerboseQtWinAPI_MISSING_IMPLEMENTATION, to see verbose qtwinapi
 messages during runtime, about unimplemented routines.

git-svn-id: trunk@11622 -
This commit is contained in:
zeljko 2007-07-25 14:18:00 +00:00
parent 2e324f401a
commit 08aa90ec95
3 changed files with 548 additions and 3 deletions

View File

@ -178,6 +178,7 @@ type
constructor Create(CreateHandle: Boolean; Poly: QPolygonH;
Const Fill: QtFillRule = QtWindingFill); virtual; overload;
destructor Destroy; override;
function GetRegionType: integer;
end;
// NOTE: PQtDCData was a pointer to a structure with QPainter information
@ -245,6 +246,7 @@ type
procedure setPen(pen: TQtPen);
function SetBkColor(Color: TcolorRef): TColorRef;
function SetBkMode(BkMode: Integer): Integer;
function getRegionType(ARegion: QRegionH): integer;
function region: TQtRegion;
procedure setRegion(region: TQtRegion);
procedure drawImage(targetRect: PRect; image: QImageH; sourceRect: PRect; flags: QtImageConversionFlags = QtAutoColor);
@ -465,7 +467,7 @@ begin
WriteLn('TQtImage.Destroy Handle:', dbgs(Handle));
{$endif}
if Handle <> nil then
if Handle <> nil then
QImage_destroy(Handle);
if (FDataOwner) and (FData <> nil) then
FreeMem(FData);
@ -893,6 +895,26 @@ begin
inherited Destroy;
end;
function TQtRegion.GetRegionType: integer;
var
R: TRect;
begin
try
if QRegion_isEmpty(Widget) then
Result := NULLREGION
else
begin
QRegion_boundingRect(Widget, @R);
if QRegion_contains(Widget, PRect(@R)) then
Result := SIMPLEREGION
else
Result := COMPLEXREGION;
end;
except
Result := ERROR;
end;
end;
{ TQtDeviceContext }
{------------------------------------------------------------------------------
@ -1456,6 +1478,31 @@ begin
end;
end;
{------------------------------------------------------------------------------
Function: TQtDeviceContext.getRegionType
Params: QRegionH
Returns: Region type
------------------------------------------------------------------------------}
function TQtDeviceContext.getRegionType(ARegion: QRegionH): integer;
var
R: TRect;
begin
try
if QRegion_isEmpty(ARegion) then
Result := NULLREGION
else
begin
QRegion_boundingRect(ARegion, @R);
if QRegion_contains(ARegion, PRect(@R)) then
Result := SIMPLEREGION
else
Result := COMPLEXREGION;
end;
except
Result := ERROR;
end;
end;
{------------------------------------------------------------------------------
Function: TQtDeviceContext.region
Params: None

View File

@ -116,6 +116,30 @@ begin
{$endif}
end;
function TQtWidgetSet.BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.BitBlt] missing implementation ');
{$endif}
Result := False;
end;
function TQtWidgetSet.CallNextHookEx(hHk: HHOOK; ncode : Integer; wParam: WParam; lParam : LParam) : Integer;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.CallNextHookEx] missing implementation ');
{$endif}
Result := 0;
end;
function TQtWidgetSet.CallWindowProc(lpPrevWndFunc : TFarProc; Handle : HWND; Msg : UINT; wParam: WParam; lParam : lParam) : Integer;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.CallWindowProc] missing implementation ');
{$endif}
Result := 0;
end;
{------------------------------------------------------------------------------
Method: ClientToScreen
Params: Handle -
@ -216,6 +240,49 @@ begin
end;
end;
{------------------------------------------------------------------------------
Method: TQtWidgetSet.ComboBoxDropDown
Params: Handle: HWND; DropDown: boolean
Returns:
Shows or hides combobox dropdown list via DropDown parameter.
------------------------------------------------------------------------------}
function TQtWidgetSet.ComboBoxDropDown(Handle: HWND; DropDown: boolean): boolean;
var
ComboList: QAbstractItemViewH;
ComboBox: QComboBoxH;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('[WinAPI TQtWidgetSet.ComboBoxDropDown] ');
{$endif}
Result := False;
if TQtWidget(Handle) is TQtComboBox then
begin
ComboBox := QComboBoxH(TQtComboBox(Handle).Widget);
ComboList := QComboBox_view(ComboBox);
if DropDown <> QWidget_isVisible(ComboList) then
begin
if DropDown then QComboBox_showPopup(ComboBox)
else QComboBox_hidePopup(ComboBox);
end;
Result := True;
end;
end;
{------------------------------------------------------------------------------
Method: TQtWidgetSet.CreateCompatibleBitmap
Params:
Returns:
------------------------------------------------------------------------------}
function TQtWidgetSet.CreateCompatibleBitmap(DC: HDC; Width, Height: Integer): HBITMAP;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.CreateCompatibleBitmap] missing implementation ');
{$endif}
Result := 0;
end;
{------------------------------------------------------------------------------
Method: TQtWidgetSet.CreateBitmap
Params:
@ -553,6 +620,20 @@ begin
end;
{------------------------------------------------------------------------------
Function: CreatePixmapIndirect
Params: const Data: Pointer; const TransColor: Longint
Returns: HBITMAP
------------------------------------------------------------------------------}
function TQtWidgetSet.CreatePixmapIndirect(const Data: Pointer; const TransColor: Longint): HBITMAP;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.CreatePixmapIndirect] missing implementation ');
{$endif}
Result := 0;
end;
{------------------------------------------------------------------------------
Function: CreatePolygonRgn
Params: none
@ -621,6 +702,40 @@ begin
CritSection:=0;
end;
{------------------------------------------------------------------------------
Function: DeleteDC
Params: none
Returns: Nothing
------------------------------------------------------------------------------}
function TQtWidgetSet.DeleteDC(hDC: HDC): Boolean;
var
Painter: QPainterH;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('[WinAPI DeleteDC] Handle: ', dbghex(hDC));
{$endif}
Result := False;
if not IsValidDC(hDC) then exit;
Painter := TQtDeviceContext(hDC).Widget;
Result := not QPainter_isActive(Painter);
if not Result then
QPainter_end(Painter);
if Result then
begin
{we should never come here ... endPaint() do the job}
{$ifdef VerboseQtWinAPI}
WriteLn('[WinAPI DeleteDC] freeing resources ');
{$endif}
TQtDeviceContext(hDC).Free;
end;
end;
{------------------------------------------------------------------------------
Function: DeleteObject
Params: none
@ -697,6 +812,7 @@ begin
{$endif}
// we must stop paintdevice before destroying
APaintEngine := QImage_paintEngine(TQtImage(AObject).Handle);
if (APaintEngine <> NiL)
@ -707,6 +823,7 @@ begin
then
QPainter_end(APainter);
end ;
end
{------------------------------------------------------------------------------
Region
@ -778,6 +895,31 @@ begin
Result := True;
end;
{------------------------------------------------------------------------------
Method: DrawFrameControl
Params: DC: HDC; const Rect : TRect; uType, uState : Cardinal
Returns: Boolean
------------------------------------------------------------------------------}
function TQtWidgetSet.DrawFrameControl(DC: HDC; const Rect : TRect; uType, uState : Cardinal) : Boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.DrawFrameControl] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Method: DrawFocusRect
Params: DC: HDC; const Rect: TRect
Returns: Boolean
------------------------------------------------------------------------------}
function TQtWidgetSet.DrawFocusRect(DC: HDC; const Rect: TRect): boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.DrawFocusRect] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Method: DrawEdge
@ -1095,6 +1237,25 @@ begin
Result := True;
end;
function TQtWidgetSet.EnableScrollBar(Wnd: HWND; wSBflags, wArrows: Cardinal): Boolean;
begin
{maybe we can put creating of scrollbar here instead of SetScrollInfo() }
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.EnableScrollbar] missing implementation ');
{$endif}
end;
function TQtWidgetSet.EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean;
begin
Result := True;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.EnableWindow] possible wrong implementation');
{$endif}
if TQtWidget(hWnd).LCLObject.ClassName<>'TScrollBar' then
QWidget_setEnabled(TQtWidget(hWnd).Widget, bEnable);
end;
{------------------------------------------------------------------------------
Function: EndPaint
Params:
@ -1116,7 +1277,6 @@ begin
{$ifdef VerboseQtWinAPI}
WriteLn('Freeing resources');
{$endif}
TQtDeviceContext(PS.HDC).Free;
end;
end;
@ -1197,6 +1357,69 @@ begin
end;
end;
function TQtWidgetSet.ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer;
var
Clip,
Tmp : hRGN;
X, Y : Longint;
DCOrigin: TPoint;
QtWidget: TQtWidget;
QtDC: TQtDeviceContext;
begin
// copied from gtk winapi
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.ExtSelectClipRGN] possible wrong implementation ');
{$endif}
If not IsValidDC(DC) then
begin
Result := ERROR;
exit;
end else
Result := SIMPLEREGION;
QtDC := TQtDeviceContext(DC);
QtWidget := QtObjectFromWidgetH(TQtDeviceContext(DC).Parent);
if Assigned(QtWidget) and (QtWidget.PaintData.ClipRegion = nil) then
begin
// there is no clipping region in the DC
Case Mode of
RGN_COPY:
begin
// Result := RegionType(PGdiObject(RGN)^.GDIRegionObject);
// If Result <> ERROR then
Result := SelectClipRGN(DC, RGN);
end;
RGN_OR,
RGN_XOR,
RGN_AND,
RGN_DIFF:
begin
// get existing clip
// GDK_Window_Get_Size(Drawable, @X, @Y);
// DCOrigin := GetDCOffset(TQtDeviceContext(DC));
GetDeviceSize(DC, DCOrigin);
Clip := CreateRectRGN(-DCOrigin.X,-DCOrigin.Y,X-DCOrigin.X,Y-DCOrigin.Y);
// create target clip
Tmp := CreateEmptyRegion;
// combine
Result := CombineRGN(Tmp, Clip, RGN, Mode);
// commit
//DebugLn('TGtkWidgetSet.ExtSelectClipRGN B ClipRegValid=',dbgs(ClipRegion),' TmpRGN=',GDKRegionAsString(PGdiObject(Tmp)^.GDIRegionObject));
SelectClipRGN(DC, Tmp);
// clean up
DeleteObject(Clip);
DeleteObject(Tmp);
end;
end;
end
else
Result := Inherited ExtSelectClipRGN(dc, rgn, mode);
end;
{------------------------------------------------------------------------------
Function: ExtTextOut
Params: none
@ -1272,6 +1495,9 @@ begin
{$endif}
Result := False;
if not IsValidDC(DC) then exit;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.FillRgn] missing implementation ');
{$endif}
{$note implement FillRgn()}
end;
@ -1306,6 +1532,9 @@ function TQtWidgetSet.Frame3d(DC : HDC; var ARect : TRect;
begin
{$note implement}
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.Frame3d] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
@ -1337,6 +1566,14 @@ begin
Result := 0;
end;
function TQtWidgetSet.GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint;
begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetBitmapBits] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Method: TQtWidgetSet.GetBitmapRawImageDescription
Params: none
@ -1371,6 +1608,39 @@ begin
// Desc^.LineEnd := rileDWordBoundary;
end;
function TQtWidgetSet.GetCapture: HWND;
var
w: QWidgetH;
QtWidget: TQtWidget;
vPoint: TQtPoint;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('[WinAPI GetCapture]');
{$endif}
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
// WriteLn('*#*#*#*#* [WinAPI TQtWidgetSet.GetCapture] possible wrong implementation ');
{$endif}
QCursor_pos(@vPoint);
w := QApplication_widgetAt(@vPoint);
if w <> nil then
begin
QtWidget := QtObjectFromWidgetH(w);
if Assigned(QtWidget) then
begin
if QWidget_isWindow(w)
and QWidget_isModal(w) then
Result := 0
else
Result := HWND(QtWidget)
end else
Result := 0;
end else
Result := 0;
end;
function TQtWidgetSet.GetCaretPos(var lpPoint: TPoint): Boolean;
begin
Result := QtCaret.GetCaretPos(lpPoint);
@ -1379,6 +1649,9 @@ end;
function TQtWidgetSet.GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean;
begin
{$note implement}
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetCaretRespondToFocus] missing implementation ');
{$endif}
Result := False;
end;
@ -1563,6 +1836,21 @@ begin
{$endif}
end;
function TQtWidgetSet.GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetDCOriginRelativeToWindow] missing implementation ');
{$endif}
end;
function TQtWidgetSet.GetDesignerDC(WindowHandle: HWND): HDC;
begin
Result := HDC(TQtDeviceContext.Create(WindowHandle, False));
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetDesignerDC] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: GetDeviceCaps
Params: DC: HDC; Index: Integer
@ -1618,6 +1906,14 @@ begin
end;
end;
function TQtWidgetSet.GetDIBits(DC: HDC; Bitmap: HBitmap; StartScan, NumScans: UINT; Bits: Pointer; var BitInfo: BitmapInfo; Usage: UINT): Integer;
begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetDIBits] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: GetFocus
Params: None
@ -1747,6 +2043,9 @@ begin
if not IsValidDC(DC) then exit;
{$note implement - wait for LCL}
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetMapMode] missing implementation ');
{$endif}
// Result := TQtDeviceContext(DC).MapMode;
end;
@ -1893,6 +2192,22 @@ begin
{$endif}
end;
function TQtWidgetSet.GetParent(Handle : HWND): HWND;
var
QtWidget: TQtWidget;
Parent: TQtWidget;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetParent] possible wrong implementation ');
{$endif}
QtWidget := TQtWidget(Handle);
if Assigned(QtWidget.LCLObject.Parent) then
begin
Parent := TQtWidget(QtWidget.LCLObject.Parent.Handle);
Result := HWND(Parent);
end;
end;
function TQtWidgetSet.GetProp(Handle: hwnd; Str: PChar): Pointer;
begin
if Handle<>0 then
@ -2045,6 +2360,59 @@ begin
Result := True;
end;
function TQtWidgetSet.GetRgnBox(RGN : HRGN; lpRect : PRect) : Longint;
var
R: TRect;
begin
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetRgnBox] possible wrong implementation ');
{$endif}
Result := SIMPLEREGION;
If lpRect <> nil then
lpRect^ := Rect(0,0,0,0);
If Not IsValidGDIObject(RGN) then
Result := ERROR
else
begin
Result := TQtRegion(RGN).GetRegionType;
If lpRect <> nil then begin
QRegion_boundingRect(TQtRegion(RGN).Widget, @R);
With lpRect^ do
begin
Left := R.Left;
Top := R.Top;
Right := R.Left + R.Right;
Bottom := R.Top + R.Bottom;
end;
end;
end;
end;
function TQtWidgetSet.GetROP2(DC: HDC): Integer;
begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetROP2] missing implementation ');
{$endif}
end;
function TQtWidgetSet.GetScrollBarSize(Handle: HWND; BarKind: Integer): integer;
begin
Result := 15;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetScrollBarSize] missing implementation ');
{$endif}
end;
function TQtWidgetSet.GetScrollbarVisible(Handle: HWND; SBStyle: Integer): boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetScrollBarVisible] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: GetScrollInfo
Params: BarFlag
@ -2120,6 +2488,14 @@ begin
end;
end;
function TQtWidgetSet.GetStockObject(Value: Integer): THandle;
begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetStockObject] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: TQtWidgetSet.GetSysColor
Params: index to the syscolors array
@ -2533,6 +2909,10 @@ begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetTextColor] missing implementation ');
{$endif}
{ if IsValidDC(DC) then
with TQtDeviceContext(DC) do
begin
@ -2627,6 +3007,14 @@ begin
end;
end;
function TQtWidgetSet.GetWindowLong(Handle : hwnd; int: Integer): PtrInt;
begin
Result := 0;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.GetWindowLong] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Method: GetWindowOrgEx
Params: DC -
@ -2800,6 +3188,50 @@ begin
CritSection:=TCriticalSection(ACritSec);
end;
function TQtWidgetSet.IntersectClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer;
var
IntersectRgn, Rgn: QRegionH;
X1,Y1,X2,Y2: Integer;
QtDC: TQtDeviceContext;
begin
{$ifdef VerboseQtWinAPI}
WriteLn('***** [WinAPI TQtWidgetSet.IntersectClipRect] ');
{$endif}
Result := ERROR;
if not IsValidDC(DC) then exit;
QtDC := TQtDeviceContext(DC);
X1 := Left;
Y1 := Top;
X2 := Right;
Y2 := Bottom;
QMatrix_map(QPainter_worldMatrix(QtDC.Widget), X1, Y1, @X2, @Y2);
IntersectRgn := QRegion_create(X1, Y1, X2 - X1, Y2 - Y1);
Rgn := QRegion_create;
try
if QPainter_hasClipping(QtDC.Widget) then
begin
QPainter_clipRegion(QtDC.Widget, Rgn);
if QRegion_isEmpty(Rgn) then
QRegion_unite(Rgn, Rgn, IntersectRgn)
else
QRegion_intersect(Rgn, Rgn, IntersectRgn);
end
else
begin
QPainter_setClipRegion(QtDC.Widget, InterSectRgn);
QPainter_clipRegion(QtDC.Widget, Rgn);
end;
QPainter_setClipping(QtDC.Widget, True);
Result := QtDC.GetRegionType(Rgn);
finally
QRegion_destroy(IntersectRgn);
QRegion_destroy(Rgn);
end;
end;
function TQtWidgetSet.IsWindowEnabled(Handle: HWND): boolean;
begin
Result := TQtWidget(Handle).getEnabled;
@ -2880,6 +3312,22 @@ begin
Result := True;
end;
function TQtWidgetSet.MessageBox(hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer;
var
Str: WideString;
TitleStr: WideString;
OkStr: WideString;
begin
Str := UTF8Decode('TQtWidgetSet.MessageBox - not implemented');
TitleStr := UTF8Decode(lpCaption);
OkStr := UTF8Decode('Ok');
Result := QMessageBox_information(TQtWidget(hWnd).Widget, @Str, @TitleStr, @OkStr);
// {$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
// WriteLn('***** [WinAPI TQtWidgetSet.MessageBox] missing implementation ');
// {$endif}
end;
{------------------------------------------------------------------------------
Function: MoveToEx
Params: none
@ -2921,6 +3369,14 @@ begin
Result := True;
end;
function TQtWidgetSet.PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.PeekMessage] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: PolyBezier
Params: DC: HDC; Points: PPoint; NumPts: Integer; Filled: Boolean;
@ -2975,6 +3431,13 @@ begin
QPainter_drawPolyline(TQtDeviceContext(DC).Widget, PQtPoint(Points), NumPts);
end;
function TQtWidgetSet.PostMessage(Handle: HWND; Msg: Cardinal; wParam: WParam; lParam: LParam): Boolean;
begin
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.PostMessage] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
Function: Rectangle
Params: DC: HDC; X1, Y1, X2, Y2: Integer
@ -3404,6 +3867,9 @@ function TQtWidgetSet.SetCaretRespondToFocus(handle: HWND;
begin
{$note implement}
Result := False;
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.SetCaretRespondToFocus] missing implementation ');
{$endif}
end;
{------------------------------------------------------------------------------
@ -3476,6 +3942,10 @@ begin
{$note implement - wait for LCL}
{$ifdef VerboseQtWinAPI_MISSING_IMPLEMENTATION}
WriteLn('***** [WinAPI TQtWidgetSet.SetMapMode] missing implementation ');
{$endif}
(*
QtDC := TQtDeviceContext(DC);

View File

@ -31,34 +31,46 @@ function Arc(DC: HDC; Left,Top,Right,Bottom,angle1,angle2 : Integer): Boolean; o
function AngleChord(DC: HDC; x1, y1, x2, y2, angle1, angle2: Integer): Boolean; override;
function BeginPaint(Handle: hWnd; Var PS : TPaintStruct) : hdc; override;
function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean; override;
function CallNextHookEx(hHk: HHOOK; ncode : Integer; wParam: WParam; lParam : LParam) : Integer; override;
Function CallWindowProc(lpPrevWndFunc : TFarProc; Handle : HWND; Msg : UINT; wParam: WParam; lParam : lParam) : Integer; override;
function ClientToScreen(Handle: HWND; var P: TPoint) : Boolean; override;
function CombineRgn(Dest, Src1, Src2: HRGN; fnCombineMode: Longint): Longint; override;
function ComboBoxDropDown(Handle: HWND; DropDown: boolean): boolean; override;
function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; override;
function CreateBitmapFromRawImage(const RawImage: TRawImage; var Bitmap, MaskBitmap: HBitmap; AlwaysCreateMask: boolean): boolean; override;
function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; override;
function CreateCaret(Handle : HWND; Bitmap : hBitmap; Width, Height : Integer) : Boolean; override;
function CreateCompatibleBitmap(DC: HDC; Width, Height: Integer): HBITMAP; override;
function CreateCompatibleDC(DC: HDC): HDC; override;
function CreateCursor(ACursorInfo: PIconInfo): hCursor; override;
function CreateEllipticRgn(p1, p2, p3, p4: Integer): HRGN; override;
function CreateFontIndirect(const LogFont: TLogFont): HFONT; override;
function CreateFontIndirectEx(const LogFont: TLogFont; const LongFontName: string): HFONT; override;
function CreatePenIndirect(const LogPen: TLogPen): HBRUSH; override;
function CreatePixmapIndirect(const Data: Pointer; const TransColor: Longint): HBITMAP; override;
function CreatePolygonRgn(Points: PPoint; NumPts: Integer; FillMode: integer): HRGN; override;
function CreateRectRgn(X1, Y1, X2, Y2: Integer): HRGN; override;
procedure DeleteCriticalSection(var CritSection: TCriticalSection); override;
function DeleteDC(hDC: HDC): Boolean; override;
function DeleteObject(GDIObject: HGDIOBJ): Boolean; override;
function DestroyCaret(Handle : HWND): Boolean; override;
function DestroyCursor(Handle: hCursor): Boolean; override;
function DPtoLP(DC: HDC; var Points; Count: Integer): BOOL; override;
Function DrawFrameControl(DC: HDC; const Rect : TRect; uType, uState : Cardinal) : Boolean; override;
function DrawFocusRect(DC: HDC; const Rect: TRect): boolean; override;
function DrawEdge(DC: HDC; var Rect: TRect; edge: Cardinal; grfFlags: Cardinal): Boolean; override;
function DrawText(DC: HDC; Str: PChar; Count: Integer; var ARect: TRect; Flags: Cardinal): Integer; override;
function Ellipse(DC: HDC; x1, y1, x2, y2: Integer): Boolean; override;
function EnableScrollBar(Wnd: HWND; wSBflags, wArrows: Cardinal): Boolean; override;
function EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean; override;
function EndPaint(Handle: hwnd; var PS: TPaintStruct): Integer; override;
procedure EnterCriticalSection(var CritSection: TCriticalSection); override;
Function ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom : Integer) : Integer; override;
function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; override;
function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; override;
function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; override;
@ -68,7 +80,9 @@ function Frame3d(DC: HDC; var ARect: TRect; const FrameWidth : integer; const St
function FrameRect(DC: HDC; const ARect: TRect; hBr: HBRUSH): Integer; override;
function GetActiveWindow : HWND; override;
function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; override;
function GetBitmapRawImageDescription(Bitmap: HBITMAP; Desc: PRawImageDescription): Boolean; override;
function GetCapture: HWND; override;
function GetCaretPos(var lpPoint: TPoint): Boolean; override;
function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; override;
function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override;
@ -76,23 +90,33 @@ function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override;
function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override;
function GetClipRGN(DC: hDC; RGN: hRGN): Longint; override;
function GetCursorPos(var lpPoint: TPoint ): Boolean; override;
function GetDC(hWnd: HWND): HDC; override;
function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; override;
function GetDesignerDC(WindowHandle: HWND): HDC; override;
function GetDeviceCaps(DC: HDC; Index: Integer): Integer; override;
function GetDeviceRawImageDescription(DC: HDC; Desc: PRawImageDescription): boolean; override;
function GetDeviceSize(DC: HDC; var P: TPoint): Boolean; Override;
function GetDC(hWnd: HWND): HDC; override;
function GetDIBits(DC: HDC; Bitmap: HBitmap; StartScan, NumScans: UINT; Bits: Pointer; var BitInfo: BitmapInfo; Usage: UINT): Integer; Override;
function GetFocus: HWND; override;
function GetKeyState(nVirtKey: Integer): Smallint; override;
function GetMapMode(DC: HDC): Integer; override;
function GetObject(GDIObj: HGDIOBJ; BufSize: Integer; Buf: Pointer): Integer; override;
function GetParent(Handle : HWND): HWND; override;
function GetProp(Handle : hwnd; Str : PChar): Pointer; override;
function GetRawImageFromDevice(SrcDC: HDC; const SrcRect: TRect; var NewRawImage: TRawImage): boolean; override;
function GetRawImageFromBitmap(SrcBitmap, SrcMaskBitmap: HBITMAP; const SrcRect: TRect; var NewRawImage: TRawImage): boolean; Override;
function GetRgnBox(RGN : HRGN; lpRect : PRect) : Longint; override;
function GetROP2(DC: HDC): Integer; override;
function GetScrollBarSize(Handle: HWND; BarKind: Integer): integer; override;
function GetScrollbarVisible(Handle: HWND; SBStyle: Integer): boolean; override;
function GetScrollInfo(Handle: HWND; BarFlag: Integer; Var ScrollInfo: TScrollInfo): Boolean; override;
function GetStockObject(Value: Integer): THandle; override;
function GetSysColor(nIndex: Integer): DWORD; override;
function GetSystemMetrics(nIndex: Integer): Integer; override;
function GetTextColor(DC: HDC) : TColorRef; Override;
function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; override;
function GetTextMetrics(DC: HDC; var TM: TTextMetric): Boolean; override;
Function GetWindowLong(Handle : hwnd; int: Integer): PtrInt; override;
function GetWindowOrgEx(dc : hdc; P : PPoint): Integer; override;
function GetWindowRect(Handle: hwnd; var ARect: TRect): Integer; override;
function GetWindowRelativePosition(Handle: hwnd; var Left, Top: Integer): boolean; override;
@ -102,18 +126,22 @@ function HideCaret(hWnd: HWND): Boolean; override;
function InvalidateRect(aHandle : HWND; Rect : pRect; bErase : Boolean) : Boolean; override;
procedure InitializeCriticalSection(var CritSection: TCriticalSection); override;
function IntersectClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer; override;
function IsWindowEnabled(Handle: HWND): boolean; override;
function IsWindowVisible(Handle: HWND): boolean; override;
procedure LeaveCriticalSection(var CritSection: TCriticalSection); override;
function LineTo(DC: HDC; X, Y: Integer): Boolean; override;
function MessageBox(hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer; override;
function MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean; override;
function MoveWindowOrgEx(DC: HDC; dX, dY: Integer): Boolean; override;
function PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean; override;
function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous: boolean): boolean; override;
function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean; override;
function Polyline(DC: HDC; Points: PPoint; NumPts: Integer): boolean; override;
function PostMessage(Handle: HWND; Msg: Cardinal; wParam: WParam; lParam: LParam): Boolean; override;
function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; override;
function RectVisible(dc : hdc; const ARect: TRect) : Boolean; override;