1{%MainUnit gtk2int.pas} 2 3// included by gtk2int.pp 4 5{****************************************************************************** 6 All gtk2 Winapi related stuff goes here. 7 This are the overrides of the QT Interface for the methods defined in the 8 lcl/include/winapih.inc 9 10 11 !! Keep this alphabetical !! 12 13 Support routines go to gtk2proc.pp 14 15 ****************************************************************************** 16 Interface 17 ****************************************************************************** 18 19 ***************************************************************************** 20 This file is part of the Lazarus Component Library (LCL) 21 22 See the file COPYING.modifiedLGPL.txt, included in this distribution, 23 for details about the license. 24 ***************************************************************************** 25} 26 27//##apiwiz##sps## // Do not remove, no wizard declaration before this line 28 29 30function Arc(DC: HDC; Left, top, right, bottom, angle1, angle2: Integer): Boolean; override; 31function AngleChord(DC: HDC; x1 ,y1, x2, y2, angle1, angle2: Integer): Boolean; override; 32 33function BeginPaint(Handle: hWnd; Var PS : TPaintStruct) : hdc; override; 34function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean; override; 35 36function CallNextHookEx({%H-}hHk: HHOOK; {%H-}ncode : Integer; {%H-}wParam: WParam; {%H-}lParam : LParam) : Integer; override; 37function CallWindowProc({%H-}lpPrevWndFunc : TFarProc; Handle : HWND; Msg : UINT; wParam: WParam; lParam : lParam) : Integer; override; 38function ClientToScreen(Handle : HWND; var P : TPoint) : Boolean;override; 39 40// clipboard 41function ClipboardFormatToMimeType(FormatID: TClipboardFormat): string; override; 42function ClipboardGetData(ClipboardType: TClipboardType; 43 FormatID: TClipboardFormat; Stream: TStream): boolean; override; 44// ! List will be created. You must free it yourself with FreeMem(List) ! 45function ClipboardGetFormats(ClipboardType: TClipboardType; 46 var Count: integer; var List: PClipboardFormat): boolean; override; 47function ClipboardGetOwnerShip(ClipboardType: TClipboardType; 48 OnRequestProc: TClipboardRequestEvent; FormatCount: integer; 49 Formats: PClipboardFormat): boolean; override; 50function ClipboardFormatNeedsNullByte(const {%H-}AFormat: TPredefinedClipboardFormat): Boolean; override; 51function ClipboardRegisterFormat(const AMimeType: string): TClipboardFormat; override; 52 53function CombineRgn(Dest, Src1, Src2 : HRGN; fnCombineMode : Longint) : Longint; override; 54function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; override; 55function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; override; 56function CreateCaret(Handle : HWND; Bitmap : hBitmap; width, Height : Integer) : Boolean; override; 57function CreateCompatibleBitmap(DC: HDC; Width, Height: Integer): HBITMAP; override; 58function CreateCompatibleDC({%H-}DC: HDC): HDC; override; 59function CreateEllipticRgn(X1, Y1, X2, Y2: Integer): HRGN; override; 60function CreateFontIndirect(const LogFont: TLogFont): HFONT; override; 61function CreateFontIndirectEx(const LogFont: TLogFont; const LongFontName: string): HFONT; override; 62function CreateIconIndirect(IconInfo: PIconInfo): HICON; override; 63function CreatePalette(const LogPalette: TLogPalette): HPALETTE; override; 64function CreatePenIndirect(const LogPen: TLogPen): HPEN; override; 65function CreatePolygonRgn(Points: PPoint; NumPts: Integer; FillMode: integer): HRGN; override; 66function CreateRectRgn(X1,Y1,X2,Y2 : Integer): HRGN; override; 67 68procedure DeleteCriticalSection(var CritSection: TCriticalSection); override; 69function DeleteDC(hDC: HDC): Boolean; override; 70function DeleteObject(GDIObject: HGDIOBJ): Boolean; override; 71function DestroyCaret(Handle : HWND): Boolean; override; 72function DestroyCursor(Handle: HCURSOR): Boolean; override; 73function DestroyIcon(Handle: HICON): Boolean; override; 74function DPtoLP(DC: HDC; var Points; Count: Integer): BOOL; override; 75function DrawFrameControl(DC: HDC; const Rect : TRect; uType, uState : Cardinal) : Boolean; override; 76function DrawFocusRect(DC: HDC; const Rect: TRect): boolean; override; 77function DrawEdge(DC: HDC; var ARect: TRect; Edge: Cardinal; grfFlags: Cardinal): Boolean; override; 78function DrawText(DC: HDC; Str: PChar; Count: Integer; var Rect: TRect; Flags: Cardinal): Integer; override; 79 80function Ellipse(DC: HDC; x1,y1,x2,y2: Integer): Boolean; override; 81function EnableScrollBar({%H-}Wnd: HWND; {%H-}wSBflags, {%H-}wArrows: Cardinal): Boolean; override; 82function EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean; override; 83function EndPaint(Handle : hwnd; var PS : TPaintStruct): Integer; override; 84procedure EnterCriticalSection(var CritSection: TCriticalSection); override; 85function EnumDisplayMonitors({%H-}hdc: HDC; {%H-}lprcClip: PRect; lpfnEnum: MonitorEnumProc; dwData: LPARAM): LongBool; override; 86{$IFDEF GTK2OLDENUMFONTFAMILIES} 87function EnumFontFamilies(DC: HDC; Family: Pchar; EnumFontFamProc: FontEnumProc; LParam:Lparam):longint; override; 88{$ENDIF} 89function EnumFontFamiliesEx({%H-}DC: HDC; lpLogFont: PLogFont; Callback: FontEnumExProc; Lparam: LParam; {%H-}Flags: dword): longint; override; 90function EqualRgn(Rgn1: HRGN; Rgn2: HRGN): Boolean; override; 91function ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom : Integer) : Integer; override; 92function ExtCreatePen(dwPenStyle, dwWidth: DWord; const lplb: TLogBrush; dwStyleCount: DWord; lpStyle: PDWord): HPEN; override; 93function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; override; 94function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; override; 95 96function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; override; 97function FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): Bool; override; 98function Frame3d(DC: HDC; var ARect: TRect; const FrameWidth : integer; const Style : TBevelCut): Boolean; override; 99function FrameRect(DC: HDC; const ARect: TRect; hBr: HBRUSH): Integer; override; 100 101function HideCaret(hWnd: HWND): Boolean; override; 102 103function GetActiveWindow : HWND; override; 104function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; override; 105function GetBkColor(DC: HDC): TColorRef; override; 106function GetCapture: HWND; override; 107function GetCaretPos(var lpPoint: TPoint): Boolean; override; 108function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; override; 109function GetCharABCWidths({%H-}DC: HDC; {%H-}p2, {%H-}p3: UINT; const {%H-}ABCStructs): Boolean; override; 110function GetClientBounds(handle : HWND; var ARect : TRect) : Boolean; override; 111function GetClientRect(handle : HWND; var ARect : TRect) : Boolean; override; 112function GetClipBox(DC : hDC; lpRect : PRect) : Longint; override; 113function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; override; 114function GetCmdLineParamDescForInterface: string; override; 115function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; override; 116function GetCursorPos(var lpPoint: TPoint): Boolean; override; 117function GetDC(hWnd: HWND): HDC; override; 118function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; override; 119function GetDesignerDC(WindowHandle: HWND): HDC; override; 120function GetDeviceCaps(DC: HDC; Index: Integer): Integer; override; 121function GetDeviceSize(DC: HDC; var p: TPoint): boolean; override; 122function GetDIBits(DC: HDC; Bitmap: HBitmap; StartScan, NumScans: UINT; Bits: Pointer; var BitInfo: BitmapInfo; Usage: UINT): Integer; override; 123function GetFocus: HWND; override; 124function GetFontLanguageInfo(DC: HDC): DWord; override; 125function GetForegroundWindow: HWND; override; 126function GetKeyState(nVirtKey: Integer): Smallint; override; 127function GetMapMode(DC: HDC): Integer; override; 128function GetMonitorInfo(Monitor: HMONITOR; lpmi: PMonitorInfo): Boolean; override; 129function GetObject(GDIObj: HGDIOBJ; BufSize: Integer; Buf: Pointer): Integer; override; 130function GetParent(Handle : HWND): HWND; override; 131function GetProp(Handle : hwnd; Str : PChar): Pointer; override; 132function GetRgnBox(RGN : HRGN; lpRect : PRect) : Longint; override; 133function GetROP2(DC: HDC): Integer; override; 134function GetScrollBarSize(Handle: HWND; BarKind: Integer): integer; override; 135function GetScrollbarVisible(Handle: HWND; SBStyle: Integer): boolean; override; 136function GetScrollInfo(Handle: HWND; SBStyle: Integer; var ScrollInfo: TScrollInfo): Boolean; override; 137function GetStockObject(Value: Integer): THandle; override; 138function GetSysColor(nIndex: Integer): DWORD; override; 139function GetSysColorBrush(nIndex: Integer): HBrush; override; 140function GetSystemMetrics(nIndex: Integer): Integer; override; 141function GetTextColor(DC: HDC) : TColorRef; override; 142function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, MaxWidth: Integer; MaxCount, PartialWidths: PInteger; var Size: TSize): Boolean; override; 143function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; override; 144function GetTextMetrics(DC: HDC; var TM: TTextMetric): Boolean; override; 145function GetViewPortExtEx(DC: HDC; Size: PSize): Integer; override; 146function GetViewPortOrgEx(DC: HDC; P: PPoint): Integer; override; 147function GetWindowExtEx(DC: HDC; Size: PSize): Integer; override; 148function GetWindowLong(Handle : HWND; int: Integer): PtrInt; override; 149function GetWindowOrgEx(dc : hdc; P: PPoint): Integer; override; 150function GetWindowRect(Handle : hwnd; var ARect: TRect): Integer; override; 151function GetWindowRelativePosition(Handle : hwnd; var Left, Top: integer): boolean; override; 152function GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean; override; 153 154procedure InitializeCriticalSection(var CritSection: TCriticalSection); override; 155function InvalidateRect(aHandle : HWND; Rect : pRect; bErase : Boolean) : Boolean; override; 156function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean; override; 157function IsIconic(handle: HWND): boolean; override; 158function IsWindow(handle: HWND): boolean; override; 159function IsWindowEnabled(handle: HWND): boolean; override; 160function IsWindowVisible(handle: HWND): boolean; override; 161function IsZoomed(handle: HWND): boolean; override; 162 163procedure LeaveCriticalSection(var CritSection: TCriticalSection); override; 164function LineTo(DC: HDC; X, Y: Integer): Boolean; override; 165function LPtoDP(DC: HDC; var Points; Count: Integer): BOOL; override; 166 167function MessageBox({%H-}hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer; override; 168function MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean; override; 169 170function OffsetRgn(RGN: HRGN; nXOffset, nYOffset: Integer): Integer; override; 171 172function PaintRgn(DC: HDC; RGN: HRGN): Boolean; override; 173function PeekMessage(var lpMsg : TMsg; {%H-}Handle : HWND; {%H-}wMsgFilterMin, {%H-}wMsgFilterMax,wRemoveMsg : UINT): Boolean; override; 174function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous: boolean): boolean; override; 175function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean; override; 176function Polyline(DC: HDC; Points: PPoint; NumPts: Integer): boolean; override; 177function PostMessage(Handle: HWND; Msg: Cardinal; wParam: WParam; lParam: LParam): Boolean; override; 178function PtInRegion(RGN: HRGN; X, Y: Integer): Boolean; override; 179 180function RadialArc(DC: HDC; left, top, right, bottom, sx, sy, ex, ey: Integer): Boolean; override; 181function RadialChord(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey: Integer): Boolean; override; 182function RealizePalette(DC: HDC): Cardinal; override; 183function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; override; 184function RectInRegion(RGN: HRGN; ARect: TRect): Boolean; override; 185function RectVisible(dc : hdc; const ARect: TRect) : Boolean; override; 186function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; override; 187function ReleaseCapture : Boolean; override; 188function ReleaseDC({%H-}hWnd: HWND; DC: HDC): Integer; override; 189function RemoveProp(Handle: hwnd; Str: PChar): THandle; override; 190function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override; 191function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; override; 192 193function SaveDC(DC: HDC): Integer; override; 194function ScreenToClient(Handle : HWND; var P : TPoint) : Integer; override; 195function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: PRect; {%H-}hrgnUpdate: HRGN; prcUpdate: PRect; flags: UINT): Boolean; override; 196function SelectClipRGN(DC: hDC; RGN: HRGN): Longint; override; 197function SelectObject(DC: HDC; GDIObj: HGDIOBJ): HGDIOBJ; override; 198function SelectPalette({%H-}DC: HDC; {%H-}Palette: HPALETTE; {%H-}ForceBackground: Boolean): HPALETTE; override; 199function SendMessage(HandleWnd: HWND; Msg: Cardinal; wParam: WParam; lParam: LParam): LResult; override; 200function SetActiveWindow(Handle: HWND): HWND; override; 201function SetBkColor(DC: HDC; Color: TColorRef): TColorRef; override; 202function SetBkMode(DC: HDC; bkMode : Integer) : Integer; override; 203function SetCapture(AHandle: HWND): HWND; override; 204function SetCaretPos(X, Y: Integer): Boolean; override; 205function SetCaretPosEx(Handle: HWnd; X, Y: Integer): Boolean; override; 206function SetCaretRespondToFocus(handle: HWND; ShowHideOnFocus: boolean): Boolean; override; 207function SetCursor(ACursor: HCURSOR): HCURSOR; override; 208function SetCursorPos(X, Y: Integer): Boolean; override; 209function SetFocus(hWnd: HWND): HWND; override; 210function SetForegroundWindow(hWnd: HWND): boolean; override; 211function SetMapMode(DC: HDC; fnMapMode : Integer): Integer; override; 212function SetParent(hWndChild: HWND; hWndParent: HWND): HWND; override; 213function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override; 214function SetRectRgn(aRGN: HRGN; X1, Y1, X2, Y2 : Integer): Boolean; override; 215function SetROP2(DC: HDC; Mode: Integer): Integer; override; 216function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override; 217function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): Boolean; override; 218function SetTextCharacterExtra({%H-}DC : hdc; {%H-}nCharExtra : Integer):Integer; override; 219function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override; 220function SetViewPortExtEx(DC: HDC; XExtent, YExtent : Integer; OldSize: PSize): Boolean; override; 221function SetViewPortOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; override; 222function SetWindowExtEx(DC: HDC; XExtent, YExtent: Integer; OldSize: PSize): Boolean; override; 223function SetWindowLong(Handle: HWND; Idx: Integer; NewLong: PtrInt): PtrInt; override; 224function SetWindowOrgEx(dc : hdc; NewX, NewY : Integer; OldPoint: PPoint) : Boolean; override; 225function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND; 226 X, Y, cx, cy: Integer; uFlags: UINT): Boolean; override; 227function SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: Boolean): longint; override; 228function ShowCaret(hWnd: HWND): Boolean; override; 229function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; override; 230function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override; 231function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override; 232function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; override; 233function SystemParametersInfo(uiAction: DWord; {%H-}uiParam: DWord; pvParam: Pointer; {%H-}fWinIni: DWord): LongBool; override; 234 235function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override; 236 237function UpdateWindow(Handle: HWND): Boolean; override; 238 239function WindowFromPoint(APoint: TPoint): HWND; override; 240 241//##apiwiz##eps## // Do not remove, no wizard declaration after this line 242 243// included by gtk2int.pp 244