lclintf: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: lclintf
| Old | New | Line | |
|---|---|---|---|
| 1 | + | **LCLIntf** is a Lazarus unit that provides compatibility with Delphi in a cross-platform way. It also contains some additional functions | |
| 2 | + | ||
| 3 | + | On defining a new [[Lazarus Packages|package]], make sure that [[LCL]] is added as requirement to get rid of 'missing LCLIntf' error. | |
| 4 | + | ||
| 5 | + | ## functions and procedures | |
| 6 | + | ||
| 7 | + | It can replace code in the (Delphi) Windows unit. | |
| 8 | + | ||
| 9 | + | \<source lang="pascal\> | |
| 10 | + | ||
| 11 | + | `function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat): TClipboardFormat;`\ | |
| 12 | + | `function MsgKeyDataToShiftState(KeyData: PtrInt): TShiftState;`\ | |
| 13 | + | `function GetTickCount: DWord; inline;`\ | |
| 14 | + | `function GetTickCount64: QWord; inline;`\ | |
| 15 | + | `function FindDefaultBrowser(out ABrowser, AParams: String): Boolean;`\ | |
| 16 | + | `function OpenURL(AURL: String): Boolean;`\ | |
| 17 | + | `function OpenDocument(APath: String): Boolean;` | |
| 18 | + | ||
| 19 | + | ## winapih.inc | |
| 20 | + | ||
| 21 | + | ``` pascal | |
| 22 | + | function Arc(DC: HDC; Left,Top,Right,Bottom,Angle16Deg, Angle16DegLength: Integer): Boolean; | |
| 23 | + | function AngleChord(DC: HDC; x1,y1,x2,y2,angle1,angle2 : Integer): Boolean; | |
| 24 | + | function BeginPaint(Handle : hwnd; var PS : TPaintStruct): hdc; | |
| 25 | + | function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Rop: DWORD): Boolean; | |
| 26 | + | function CallNextHookEx(hhk : HHOOK; ncode : Integer; WParam: WParam; LParam: LParam) : Integer; | |
| 27 | + | function CallWindowProc(lpPrevWndFunc : TFarProc; Handle : HWND; Msg : UINT; WParam: WParam; LParam: LParam): Integer; | |
| 28 | + | //function CharLower --> independent | |
| 29 | + | //function CharLowerBuff --> independent | |
| 30 | + | //function CharUpper --> independent | |
| 31 | + | function ClientToScreen(Handle : HWND; var P : TPoint) : Boolean; | |
| 32 | + | function CombineRgn(Dest, Src1, Src2 : HRGN; fnCombineMode : Longint) : Longint; | |
| 33 | + | function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; | |
| 34 | + | function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; | |
| 35 | + | function CreateCaret(Handle: HWND; Bitmap: hBitmap; width, Height: Integer): Boolean; | |
| 36 | + | function CreateCompatibleBitmap(DC: HDC; Width, Height: Integer): HBITMAP; | |
| 37 | + | function CreateCompatibleDC(DC: HDC): HDC; | |
| 38 | + | function CreateDIBitmap(DC: HDC; var InfoHeader: TBitmapInfoHeader; | |
| 39 | + | dwUsage: DWORD; InitBits: PChar; var InitInfo: TBitmapInfo; | |
| 40 | + | wUsage: UINT): HBITMAP; | |
| 41 | + | function CreateDIBSection(DC: HDC; const BitmapInfo: tagBitmapInfo; Usage: UINT; | |
| 42 | + | var Bits: Pointer; SectionHandle: THandle; Offset: DWORD): HBITMAP; | |
| 43 | + | function CreateEllipticRgn(X1, Y1, X2, Y2: Integer): HRGN; | |
| 44 | + | //function CreateEllipticRgnIndirect --> independent | |
| 45 | + | //function CreateFont --> independent | |
| 46 | + | function CreateFontIndirect(const LogFont: TLogFont): HFONT; | |
| 47 | + | function CreateFontIndirectEx(const LogFont: TLogFont; const LongFontName: string): HFONT; | |
| 48 | + | function CreateIconIndirect(IconInfo: PIconInfo): HICON; | |
| 49 | + | function CreatePalette(const LogPalette: TLogPalette): HPalette; | |
| 50 | + | function CreatePatternBrush(ABitmap: HBITMAP): HBRUSH; | |
| 51 | + | //function CreatePen --> independent | |
| 52 | + | function CreatePenIndirect(const LogPen: TLogPen): HPEN; | |
| 53 | + | function CreatePolygonRgn(Points: PPoint; NumPts: Integer; FillMode: integer): HRGN; | |
| 54 | + | function CreateRectRgn(X1,Y1,X2,Y2 : Integer): HRGN; | |
| 55 | + | //function CreateRectRgnIndirect --> independent | |
| 56 | + | function CreateRoundRectRgn(X1, Y1, X2, Y2, nWidthEllipse, nHeightEllipse: Integer): HRGN; | |
| 57 | + | procedure DeleteCriticalSection(var CritSection: TCriticalSection); | |
| 58 | + | function DeleteDC(hDC: HDC): Boolean; | |
| 59 | + | function DeleteObject(GDIObject: HGDIOBJ): Boolean; | |
| 60 | + | function DestroyCaret(Handle : HWND): Boolean; | |
| 61 | + | function DestroyCursor(Handle: HCURSOR): Boolean; | |
| 62 | + | function DestroyIcon(Handle: HICON): Boolean; | |
| 63 | + | function DPtoLP(DC: HDC; var Points; Count: Integer): BOOL; | |
| 64 | + | function DrawFrameControl(DC: HDC; const Rect : TRect; uType, uState : Cardinal) : Boolean; | |
| 65 | + | function DrawFocusRect(DC: HDC; const Rect: TRect): Boolean; | |
| 66 | + | function DrawEdge(DC: HDC; var Rect: TRect; edge: Cardinal; grfFlags: Cardinal): Boolean; | |
| 67 | + | function DrawText(DC: HDC; Str: PChar; Count: Integer; var Rect: TRect; Flags: Cardinal): Integer; | |
| 68 | + | function EnableScrollBar(Wnd: HWND; wSBflags, wArrows: Cardinal): Boolean; | |
| 69 | + | function EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean; | |
| 70 | + | function EndPaint(Handle : hwnd; var PS : TPaintStruct): Integer; | |
| 71 | + | procedure EnterCriticalSection(var CritSection: TCriticalSection); | |
| 72 | + | function EnumDisplayMonitors(hdc: HDC; lprcClip: PRect; lpfnEnum: MonitorEnumProc; dwData: LPARAM): LongBool; | |
| 73 | + | function EnumFontFamilies(DC: HDC; Family: Pchar; EnumFontFamProc: FontEnumProc; LParam:Lparam):longint; | |
| 74 | + | function EnumFontFamiliesEx(DC: HDC; lpLogFont:PLogFont; Callback: FontEnumExProc; Lparam:LParam; Flags: dword): longint; | |
| 75 | + | function Ellipse(DC: HDC; x1, y1, x2, y2: Integer): Boolean; | |
| 76 | + | //function EqualRect --> independent | |
| 77 | + | function EqualRgn(Rgn1: HRGN; Rgn2: HRGN): Boolean; | |
| 78 | + | function ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom : Integer) : Integer; | |
| 79 | + | function ExtCreatePen(dwPenStyle, dwWidth: DWord; const lplb: TLogBrush; dwStyleCount: DWord; lpStyle: PDWord): HPEN; | |
| 80 | + | function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; | |
| 81 | + | function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; | |
| 82 | + | function FillRect(DC: HDC; const Rect: TRect; Brush: HBRUSH): Boolean; | |
| 83 | + | function FillRgn(DC: HDC; RegionHnd: HRGN; hbr: HBRUSH): BOOL; | |
| 84 | + | function FloodFill(DC: HDC; X, Y: Integer; | |
| 85 | + | Color: TGraphicsColor; | |
| 86 | + | FillStyle: TGraphicsFillStyle; | |
| 87 | + | Brush: HBRUSH): Boolean; | |
| 88 | + | function FrameRect(DC: HDC; const ARect: TRect; hBr: HBRUSH): Integer; | |
| 89 | + | function GetActiveWindow : HWND; | |
| 90 | + | function GetBitmapBits(Bitmap: HBITMAP; Count: Longint; Bits: Pointer): Longint; | |
| 91 | + | function GetBkColor(DC: HDC): TColorRef; | |
| 92 | + | function GetCapture : HWND; | |
| 93 | + | function GetCaretPos(var lpPoint: TPoint): Boolean; | |
| 94 | + | function GetClientRect(handle : HWND; var Rect: TRect) : Boolean; | |
| 95 | + | function GetClipBox(DC : hDC; lpRect : PRect) : Longint; | |
| 96 | + | function GetClipRGN(DC : hDC; RGN : hRGN) : Longint; | |
| 97 | + | function GetCurrentObject(DC: HDC; uObjectType: UINT): HGDIOBJ; | |
| 98 | + | function GetCursorPos(var lpPoint: TPoint): Boolean; | |
| 99 | + | function GetCharABCWidths(DC: HDC; p2, p3: UINT; const ABCStructs): Boolean; //pbd | |
| 100 | + | function GetDC(hWnd: HWND): HDC; | |
| 101 | + | function GetDeviceCaps(DC: HDC; Index: Integer): Integer; | |
| 102 | + | function GetDIBits(DC: HDC; Bitmap: HBitmap; StartScan, NumScans: UINT; Bits: Pointer; var BitInfo: BitmapInfo; Usage: UINT): Integer; | |
| 103 | + | function GetDoubleClickTime: UINT; | |
| 104 | + | function GetFocus: HWND; | |
| 105 | + | function GetFontLanguageInfo(DC: HDC): DWord; | |
| 106 | + | function GetForegroundWindow: HWND; | |
| 107 | + | function GetIconInfo(AIcon: HICON; AIconInfo: PIconInfo): Boolean; | |
| 108 | + | function GetKeyState(nVirtKey: Integer): Smallint; | |
| 109 | + | function GetMapMode(DC: HDC): Integer; | |
| 110 | + | function GetMonitorInfo(hMonitor: HMONITOR; lpmi: PMonitorInfo): Boolean; | |
| 111 | + | function GetObject(GDIObject: HGDIOBJ; BufSize: Integer; Buf: Pointer): Integer; | |
| 112 | + | function GetPaletteEntries(Palette: HPALETTE; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; | |
| 113 | + | function GetParent(Handle : HWND): HWND; | |
| 114 | + | function GetProp(Handle : hwnd; Str : PChar): Pointer; | |
| 115 | + | function GetRgnBox(RGN : HRGN; lpRect : PRect) : Longint; | |
| 116 | + | function GetROP2(DC: HDC): integer; | |
| 117 | + | function GetScrollInfo(Handle: HWND; SBStyle: Integer; var ScrollInfo: TScrollInfo): Boolean; | |
| 118 | + | //function GetScrollPos --> independent | |
| 119 | + | //function GetScrollRange --> independent | |
| 120 | + | function GetStockObject(Value: Integer): THandle; | |
| 121 | + | function GetSysColor(nIndex: Integer): DWORD; | |
| 122 | + | function GetSysColorBrush(nIndex: Integer): HBrush; | |
| 123 | + | function GetSystemPaletteEntries(DC: HDC; StartIndex, NumEntries: UINT; var PaletteEntries): UINT; | |
| 124 | + | function GetSystemMetrics(nIndex: Integer): Integer; | |
| 125 | + | function GetTextColor(DC: HDC) : TColorRef; | |
| 126 | + | function GetTextExtentExPoint(DC: HDC; Str: PChar; Count, MaxWidth: Integer; MaxCount, PartialWidths: PInteger; var Size: TSize): boolean; | |
| 127 | + | function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; | |
| 128 | + | function GetTextExtentPoint32(DC: HDC; Str: PChar; Count: Integer; var Size: TSize): Boolean; | |
| 129 | + | function GetTextMetrics(DC: HDC; var TM: TTextMetric): Boolean; | |
| 130 | + | function GetViewPortExtEx(DC: HDC; Size: PSize): Integer; | |
| 131 | + | function GetViewPortOrgEx(DC: HDC; P: PPoint): Integer; | |
| 132 | + | function GetWindowExtEx(DC: HDC; Size: PSize): Integer; | |
| 133 | + | function GetWindowLong(Handle : hwnd; int : Integer): PtrInt; | |
| 134 | + | function GetWindowRect(Handle : hwnd; var Rect : TRect): Integer; | |
| 135 | + | function GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean; | |
| 136 | + | function GetWindowOrgEx(dc : hdc; var P: TPoint): Integer; // because of delphi compatibility | |
| 137 | + | function GetWindowOrgEx(dc : hdc; P : PPoint): Integer; // an old declaration | |
| 138 | + | function GradientFill(DC: HDC; Vertices: PTriVertex; NumVertices : Longint; Meshes: Pointer; NumMeshes : Longint; Mode : Longint): Boolean; | |
| 139 | + | function HideCaret(hWnd: HWND): Boolean; | |
| 140 | + | //function IndexToOverlayMask --> independent | |
| 141 | + | //function InflateRect --> independent | |
| 142 | + | procedure InitializeCriticalSection(var CritSection: TCriticalSection); | |
| 143 | + | function IntersectClipRect(dc: hdc; Left, Top, Right,Bottom: Integer): Integer; | |
| 144 | + | //function IntersectRect --> independent | |
| 145 | + | function InvalidateRect(aHandle : HWND; ARect : pRect; bErase : Boolean) : Boolean; | |
| 146 | + | function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean; | |
| 147 | + | //function IsCharAlphaNumeric --> independent | |
| 148 | + | function IsDBCSLeadByte(TestChar: Byte): boolean; | |
| 149 | + | //function IsRectEmpty --> independent | |
| 150 | + | function IsIconic(handle: HWND): boolean; | |
| 151 | + | function IsWindow(handle: HWND): boolean; | |
| 152 | + | function IsWindowEnabled(handle: HWND): boolean; | |
| 153 | + | function IsWindowVisible(handle: HWND): boolean; | |
| 154 | + | function IsZoomed(handle: HWND): boolean; | |
| 155 | + | //function KillTimer --> independent | |
| 156 | + | procedure LeaveCriticalSection(var CritSection: TCriticalSection); | |
| 157 | + | function LineTo(DC: HDC; X, Y: Integer): Boolean; | |
| 158 | + | function LoadBitmap(hInstance: THandle; lpBitmapName: PChar): HBitmap; | |
| 159 | + | function LoadCursor(hInstance: THandle; lpCursorName: PChar): HCursor; | |
| 160 | + | function LoadIcon(hInstance: THandle; lpIconName: PChar): HIcon; | |
| 161 | + | function LPtoDP(DC: HDC; var Points; Count: Integer): BOOL; | |
| 162 | + | //function MakeLong --> independent | |
| 163 | + | //function MakeROP4 --> independent | |
| 164 | + | //function MakeWord --> independent | |
| 165 | + | function MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; | |
| 166 | + | function MaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc: Integer; Mask: HBITMAP; XMask, YMask: Integer): Boolean; | |
| 167 | + | function MessageBox(hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer; | |
| 168 | + | function MonitorFromPoint(ptScreenCoords: TPoint; dwFlags: DWord): HMONITOR; | |
| 169 | + | function MonitorFromRect(lprcScreenCoords: PRect; dwFlags: DWord): HMONITOR; | |
| 170 | + | function MonitorFromWindow(hWnd: HWND; dwFlags: DWord): HMONITOR; | |
| 171 | + | function MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean; | |
| 172 | + | //function OffsetRect --> independent | |
| 173 | + | function OffsetRgn(RGN: HRGN; nXOffset, nYOffset: Integer): Integer; | |
| 174 | + | function PaintRgn(DC: HDC; RGN: HRGN): Boolean; | |
| 175 | + | function PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean; | |
| 176 | + | function Pie(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey: Integer): Boolean; | |
| 177 | + | function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous: boolean): boolean; | |
| 178 | + | function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean; | |
| 179 | + | function Polyline(DC: HDC; Points: PPoint; NumPts: Integer): boolean; | |
| 180 | + | function PostMessage(Handle: HWND; Msg: Cardinal; WParam: WParam; LParam: LParam): Boolean; | |
| 181 | + | function PtInRegion(RGN: HRGN; X, Y: Integer): Boolean; | |
| 182 | + | //function PtInRect --> independent | |
| 183 | + | function RealizePalette(DC: HDC): Cardinal; | |
| 184 | + | function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; | |
| 185 | + | function RectInRegion(RGN: HRGN; ARect: TRect): Boolean; | |
| 186 | + | function RectVisible(DC: HDC; const ARect: TRect): Boolean; | |
| 187 | + | function RedrawWindow(Wnd: HWND; lprcUpdate: PRECT; hrgnUpdate: HRGN; flags: UINT): Boolean; | |
| 188 | + | function ReleaseCapture : Boolean; | |
| 189 | + | function ReleaseDC(hWnd: HWND; DC: HDC): Integer; | |
| 190 | + | function RemoveProp(Handle: hwnd; Str: PChar): THandle; | |
| 191 | + | function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; | |
| 192 | + | function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; | |
| 193 | + | function SaveDC(DC: HDC): Integer; | |
| 194 | + | function ScreenToClient(Handle : HWND; var P : TPoint) : Integer; | |
| 195 | + | //function ScrollWindow --> independent deprecated calls ScrollWindowEx | |
| 196 | + | function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: PRect; hrgnUpdate: HRGN; prcUpdate: PRect; flags: UINT): Boolean; | |
| 197 | + | function SelectClipRGN(DC : hDC; RGN : HRGN) : Longint; | |
| 198 | + | function SelectObject(DC: HDC; GDIObj: HGDIOBJ): HGDIOBJ; | |
| 199 | + | function SelectPalette(DC: HDC; Palette: HPALETTE; ForceBackground: Boolean): HPALETTE; | |
| 200 | + | function SendMessage(HandleWnd: HWND; Msg: Cardinal; WParam: WParam; LParam: LParam): LResult; | |
| 201 | + | function SetActiveWindow(Handle: HWND): HWND; | |
| 202 | + | function SetBkColor(DC: HDC; Color: TColorRef): TColorRef; //pbd | |
| 203 | + | function SetBkMode(DC: HDC; bkMode : Integer): Integer; | |
| 204 | + | function SetCapture (AHandle: HWND): HWND; | |
| 205 | + | function SetCaretPos(X, Y: Integer): Boolean; | |
| 206 | + | function SetCaretPosEx(handle: HWnd; X, Y: Integer): Boolean; | |
| 207 | + | function SetCursor(hCursor: HICON): HCURSOR; | |
| 208 | + | function SetCursorPos(X, Y: Integer): Boolean; | |
| 209 | + | function SetFocus(hWnd: HWND): HWND; | |
| 210 | + | function SetForegroundWindow(hWnd : HWND): Boolean; | |
| 211 | + | function SetMapMode(DC: HDC; fnMapMode : Integer): Integer; | |
| 212 | + | function SetMenu(AWindowHandle: HWND; AMenuHandle: HMENU): Boolean; | |
| 213 | + | function SetParent(hWndChild: HWND; hWndParent: HWND): HWND; | |
| 214 | + | function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; | |
| 215 | + | //function SetRect --> independent | |
| 216 | + | function SetRectRgn(aRGN: HRGN; X1, Y1, X2, Y2 : Integer): Boolean; | |
| 217 | + | //function SetRectEmpty --> independent | |
| 218 | + | function SetROP2(DC: HDC; Mode: Integer): Integer; | |
| 219 | + | function SetScrollInfo(Handle: HWND; SBStyle: Integer; ScrollInfo: TScrollInfo; Redraw : Boolean): Integer; | |
| 220 | + | //function SetScrollPos --> independent | |
| 221 | + | //function SetScrollRange --> independent | |
| 222 | + | function SetStretchBltMode(DC: HDC; StretchMode: Integer): Integer; | |
| 223 | + | function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): Boolean; | |
| 224 | + | function SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer; | |
| 225 | + | function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; | |
| 226 | + | //function SetTimer --> independent | |
| 227 | + | function SetWindowLong(Handle: HWND; Idx: Integer; NewLong : PtrInt): PtrInt; | |
| 228 | + | function SetViewPortExtEx(DC: HDC; XExtent, YExtent : Integer; OldSize: PSize): Boolean; | |
| 229 | + | function SetViewPortOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; | |
| 230 | + | function SetWindowExtEx(DC: HDC; XExtent, YExtent: Integer; OldSize: PSize): Boolean; | |
| 231 | + | function SetWindowOrgEx(dc : hdc; NewX, NewY: Integer; OldPoint: PPoint): Boolean; | |
| 232 | + | function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND; | |
| 233 | + | X, Y, cx, cy: Integer; uFlags: UINT): Boolean; | |
| 234 | + | function SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: Boolean): longint; | |
| 235 | + | function ShowCaret(hWnd: HWND): Boolean; | |
| 236 | + | function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; | |
| 237 | + | function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; | |
| 238 | + | function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Rop: Cardinal): Boolean ; | |
| 239 | + | function StretchDIBits(DC: HDC; DestX, DestY, DestWidth, DestHeight, SrcX, | |
| 240 | + | SrcY, SrcWidth, SrcHeight: Integer; Bits: Pointer; var BitsInfo: TBitmapInfo; | |
| 241 | + | Usage: UINT; Rop: DWORD): Integer; | |
| 242 | + | //function SubtractRect --> independent | |
| 243 | + | function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; | |
| 244 | + | function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; | |
| 245 | + | function UpdateWindow(Handle: HWND): Boolean; | |
| 246 | + | //function UnionRect --> independent | |
| 247 | + | function WindowFromPoint(Point : TPoint) : HWND; | |
| 248 | + | ``` | |
| 249 | + | ||
| 250 | + | ## lclintfh.inc | |
| 251 | + | ||
| 252 | + | Platform independent | |
| 253 | + | ||
| 254 | + | ``` pascal | |
| 255 | + | function AdjustWindowRectEx(Var Rect: TRect; Style1: Word; MenuExist : Boolean; Style2 : Word) : Boolean; | |
| 256 | + | function CharLower(c: char): char; inline; | |
| 257 | + | function CharLowerBuff(pStr : PChar; Len : Integer): Integer; | |
| 258 | + | function CharUpper(c: char): char; inline; | |
| 259 | + | function CharUpperBuff(pStr : PChar; Len : Integer): Integer; | |
| 260 | + | function CopyRect(var DestRect: TRect; const SrcRect: TRect): Boolean; | |
| 261 | + | function CreateEllipticRgnIndirect(const ARect: TRect): HRGN; | |
| 262 | + | function CreateFont(Height, Width, Escapement, Orientation, Weight: Integer; | |
| 263 | + | Italic, Underline, StrikeOut, CharSet, OutputPrecision, ClipPrecision, | |
| 264 | + | Quality, PitchAndFamily: Byte; FaceName: PChar): HFONT; | |
| 265 | + | function CreatePen(Style, Width: Integer; Color: TColorRef): HPEN; | |
| 266 | + | function CreateRectRgnIndirect(const ARect: TRect): HRGN; | |
| 267 | + | function CreateSolidBrush(Color: TColorRef): HBRUSH; | |
| 268 | + | function EqualRect(const lprc1, lprc2: TRect): Boolean; | |
| 269 | + | function GetScrollPos(Handle: HWND; nBar: Integer): Integer; | |
| 270 | + | function GetScrollRange(Handle: HWND; nBar: Integer; var lpMinPos, lpMaxPos: Integer): Boolean; | |
| 271 | + | function GetRValue(RGB : DWORD) : BYTE; inline; | |
| 272 | + | function GetGValue(RGB : DWORD) : BYTE; inline; | |
| 273 | + | function GetBValue(RGB : DWORD) : BYTE; inline; | |
| 274 | + | procedure GetRGBValues(RGB : DWORD; out R, G, B: Byte); inline; | |
| 275 | + | procedure GetRGBIntValues(RGB : DWORD; out R, G, B: integer); inline; | |
| 276 | + | function IndexToOverlayMask(iOverlay: UINT): UINT; inline; | |
| 277 | + | function InflateRect(var ARect: TRect; dx, dy: Integer): Boolean; | |
| 278 | + | function IntersectRect(var DestRect: TRect; const SrcRect1, SrcRect2: TRect): Boolean; | |
| 279 | + | function IsCharAlphaNumeric(c : Char) : Boolean; | |
| 280 | + | function IsRectEmpty(const ARect: TRect): Boolean; | |
| 281 | + | function KillTimer(Wnd: HWND; uIDEvent: UINT_PTR): BOOL; | |
| 282 | + | function MakeLong(A,B: Word): DWORD; inline; | |
| 283 | + | function MakeROP4(fore, back: DWORD): DWORD;inline; | |
| 284 | + | function MakeWord(A,B: Byte): Word; inline; | |
| 285 | + | function MakeWParam(l, h: Word): WPARAM; inline; | |
| 286 | + | function MakeLParam(l, h: Word): LPARAM; inline; | |
| 287 | + | function MakeLResult(l, h: Word): LRESULT; inline; | |
| 288 | + | function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; inline; | |
| 289 | + | function PtInRect(const Rect : TRect; const Point : TPoint) : Boolean; inline; | |
| 290 | + | function PointToSmallPoint(const P : TPoint) : TSmallPoint; inline; | |
| 291 | + | function RGB(R, G, B : Byte) : TColorRef; inline; | |
| 292 | + | function ScrollWindow(hWnd: HWND; XAmount, YAmount: Integer; Rect, ClipRect: PRect): Boolean; inline; | |
| 293 | + | function SetRect(var ARect : TRect; xLeft,yTop,xRight,yBottom : Integer) : Boolean; | |
| 294 | + | function SetRectEmpty(var ARect: TRect): Boolean; | |
| 295 | + | function SetScrollPos(Handle: HWND; nBar, nPos: Integer; bRedraw: Boolean): Integer; | |
| 296 | + | function SetScrollRange(Handle: HWND; nBar, nMinPos, nMaxPos: Integer; bRedraw: Boolean): Boolean; | |
| 297 | + | function SetTimer(Wnd: HWND; nIDEvent: UINT_PTR; uElapse: UINT; lpTimerFunc: TTimerProc): UINT_PTR; | |
| 298 | + | function SmallPointToPoint(const P : TSmallPoint) : Tpoint; | |
| 299 | + | function SubtractRect(out lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): Boolean; | |
| 300 | + | function UnionRect(var DestRect: TRect; const SrcRect1, SrcRect2: TRect): Boolean; //pbd | |
| 301 | + | ||
| 302 | + | Platform specific stuff | |
| 303 | + | function AddEventHandler(AHandle: THandle; AFlags: dword; AEventHandler: TWaitHandleEvent; AData: PtrInt): PEventHandler; | |
| 304 | + | function AddProcessEventHandler(AHandle: THandle; AEventHandler: TChildExitEvent; AData: PtrInt): PProcessEventHandler; | |
| 305 | + | function AddPipeEventHandler(AHandle: THandle; AEventHandler: TPipeEvent; AData: PtrInt): PPipeEventHandler; | |
| 306 | + | function AllocateHWnd(Method: TLCLWndMethod): HWND; | |
| 307 | + | function AskUser(const DialogCaption, DialogMessage: string; DialogType: LongInt; Buttons: TDialogButtons; HelpCtx: Longint): LongInt; | |
| 308 | + | // ! ClipboardGetFormats: List will be created. You must free it yourself with FreeMem(List) ! | |
| 309 | + | procedure CallDefaultWndHandler(Sender: TObject; var Message); | |
| 310 | + | function ClipboardFormatToMimeType(FormatID: TClipboardFormat): string; | |
| 311 | + | function ClipboardGetData(ClipboardType: TClipboardType; FormatID: TClipboardFormat; Stream: TStream): boolean; | |
| 312 | + | function ClipboardGetFormats(ClipboardType: TClipboardType; var Count: integer; var List: PClipboardFormat): boolean; | |
| 313 | + | function ClipboardGetOwnerShip(ClipboardType: TClipboardType; OnRequestProc: TClipboardRequestEvent; FormatCount: integer; Formats: PClipboardFormat): boolean; | |
| 314 | + | function ClipboardRegisterFormat(const AMimeType: string): TClipboardFormat; | |
| 315 | + | function CreateEmptyRegion: hRGN; | |
| 316 | + | function CreatePixmapIndirect(const Data: Pointer; const TransColor: Longint): HBITMAP; | |
| 317 | + | function CreateRegionCopy(SrcRGN: hRGN): hRGN; | |
| 318 | + | function CreateRubberBand(const ARect: TRect; const ABrush: HBrush = 0): HWND; | |
| 319 | + | function CreateStandardCursor(ACursor: SmallInt): hCursor; | |
| 320 | + | function DCClipRegionValid(DC: HDC): boolean; | |
| 321 | + | procedure DeallocateHWnd(Wnd: HWND); | |
| 322 | + | procedure DestroyRubberBand(ARubberBand: HWND); | |
| 323 | + | procedure DrawDefaultDockImage(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation); | |
| 324 | + | procedure DrawGrid(DC: HDC; const R: TRect; DX, DY: Integer); | |
| 325 | + | function ExtUTF8Out(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean; | |
| 326 | + | function FontCanUTF8(Font: HFont): boolean; deprecated; | |
| 327 | + | function FontIsMonoSpace(Font: HFont): boolean; | |
| 328 | + | function Frame3d(DC: HDC; var ARect: TRect; const FrameWidth : integer; const Style : TGraphicsBevelCut): Boolean; | |
| 329 | + | function GetAcceleratorString(const AVKey: Byte; const AShiftState: TShiftState): String; | |
| 330 | + | function GetAvailableNativeCanvasTypes(DC: HDC; AAllowFallbackToParent: Boolean = False): TNativeCanvasTypes; | |
| 331 | + | function GetAvailableNativeHandleTypes(Handle: HWND; AAllowFallbackToParent: Boolean = False): TNativeHandleTypes; | |
| 332 | + | function GetCaretRespondToFocus(handle: HWND; var ShowHideOnFocus: boolean): Boolean; | |
| 333 | + | function GetClientBounds(handle : HWND; var ARect: TRect) : Boolean; | |
| 334 | + | function GetCmdLineParamDescForInterface: string; | |
| 335 | + | function GetControlConstraints(Constraints: TObject): boolean; | |
| 336 | + | function GetDCOriginRelativeToWindow(PaintDC: HDC; WindowHandle: HWND; var OriginDiff: TPoint): boolean; | |
| 337 | + | function GetDesignerDC(WindowHandle: HWND): HDC; | |
| 338 | + | function GetDeviceSize(DC: HDC; var p: TPoint): boolean; | |
| 339 | + | function GetLCLOwnerObject(Handle: HWnd): TObject; | |
| 340 | + | function GetNativeCanvas(DC: HDC; AHandleType: TNativeCanvasType; AAllowFallbackToParent: Boolean = False): PtrInt; | |
| 341 | + | function GetNativeHandle(Handle: HWND; AHandleType: TNativeHandleType; AAllowFallbackToParent: Boolean = False): PtrInt; | |
| 342 | + | function GetScrollBarSize(Handle: HWND; SBStyle: Integer): integer; | |
| 343 | + | function GetScrollbarVisible(Handle: HWND; SBStyle: Integer): boolean; | |
| 344 | + | function GetWindowRelativePosition(Handle : hwnd; var Left, Top: integer): boolean; | |
| 345 | + | function IntfSendsUTF8KeyPress: Boolean; deprecated; | |
| 346 | + | function InvalidateFrame(aHandle : HWND; ARect : pRect; bErase : Boolean; BorderWidth: integer) : Boolean; | |
| 347 | + | function IsDesignerDC(WindowHandle: HWND; DC: HDC): Boolean; | |
| 348 | + | function IsMobilePlatform: Boolean; | |
| 349 | + | function IsCDIntfControl(AWinControl: TObject): Boolean; | |
| 350 | + | function MoveWindowOrgEx(dc : hdc; dX,dY : Integer): boolean; | |
| 351 | + | function PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint; | |
| 352 | + | function PromptUserAtXY(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint; X, Y : Longint) : Longint; | |
| 353 | + | function RadialArc(DC: HDC; left, top, right, bottom, sx, sy, ex, ey : Integer): Boolean; | |
| 354 | + | function RadialChord(DC: HDC; x1, y1, x2, y2, sx, sy, ex, ey : Integer): Boolean; | |
| 355 | + | function RadialPie(DC: HDC; x1, y1, x2, y2, Angle1, Angle2: Integer): Boolean; | |
| 356 | + | function RawImage_CreateBitmaps(const ARawImage: TRawImage; out ABitmap, AMask: HBitmap; ASkipMask: Boolean = False): Boolean; | |
| 357 | + | function RawImage_DescriptionFromBitmap(ABitmap: HBITMAP; out ADesc: TRawImageDescription): Boolean; | |
| 358 | + | function RawImage_DescriptionFromDevice(ADC: HDC; out ADesc: TRawImageDescription): Boolean; | |
| 359 | + | function RawImage_FromBitmap(out ARawImage: TRawImage; ABitmap, AMask: HBITMAP; ARect: PRect = nil): Boolean; | |
| 360 | + | function RawImage_FromDevice(out ARawImage: TRawImage; ADC: HDC; const ARect: TRect): Boolean; | |
| 361 | + | function RawImage_QueryDescription(AFlags: TRawImageQueryFlags; var ADesc: TRawImageDescription): Boolean; | |
| 362 | + | function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; | |
| 363 | + | function ReleaseDesignerDC(hWnd: HWND; DC: HDC): Integer; | |
| 364 | + | procedure RemoveEventHandler(var AHandler: PEventHandler); | |
| 365 | + | procedure RemoveProcessEventHandler(var AHandler: PProcessEventHandler); | |
| 366 | + | procedure RemovePipeEventHandler(var AHandler: PPipeEventHandler); | |
| 367 | + | function RequestInput(const InputCaption, InputPrompt : String; MaskInput : Boolean; var Value : String) : Boolean; | |
| 368 | + | procedure SendCachedLCLMessages; | |
| 369 | + | function SetCaretRespondToFocus(handle: HWND; ShowHideOnFocus: boolean): Boolean; | |
| 370 | + | function SetComboMinDropDownSize(Handle: HWND; MinItemsWidth, MinItemsHeight, MinItemCount: integer): boolean; | |
| 371 | + | procedure SetEventHandlerFlags(AHandler: PEventHandler; NewFlags: dword); | |
| 372 | + | procedure SetRubberBandRect(const ARubberBand: HWND; const ARect: TRect); | |
| 373 | + | function ShowSelectItemDialog(const AItems: TStrings): Boolean; | |
| 374 | + | function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean ; | |
| 375 | + | function TextUTF8Out(DC: HDC; X, Y: Integer; Str: PChar; Count: Longint): Boolean; | |
| 376 | + | ||
| 377 | + | function ExcludeClipRgn(dc: hdc; rgn : hrgn) : Integer; | |
| 378 | + | procedure NotifyUser(const DialogMessage : String; DialogType : longint); | |
| 379 | + | procedure NotifyUser(const DialogCaption, DialogMessage : String; DialogType : longint); | |
| 380 | + | procedure NotifyUserAtXY(const DialogMessage : String; DialogType : longint; X, Y : Longint); | |
| 381 | + | procedure NotifyUserAtXY(const DialogCaption, DialogMessage : String; DialogType : longint; X, Y : Longint); | |
| 382 | + | function PromptUser(const DialogMessage : String; DialogType : longint; Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint) : Longint; | |
| 383 | + | function PromptUser(const DialogMessage : String; DialogType : longint; Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint; | |
| 384 | + | function PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint) : Longint; | |
| 385 | + | function PromptUserAtXY(const DialogMessage : String; DialogType : longint; Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint; X, Y : Longint) : Longint; | |
| 386 | + | function PromptUserAtXY(const DialogMessage : String; DialogType : longint; Buttons : PLongint; ButtonCount, DefaultIndex, EscapeResult : Longint; X, Y : Longint) : Longint; | |
| 387 | + | function PromptUserAtXY(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : Array of Longint; DefaultIndex, EscapeResult : Longint; X, Y : Longint) : Longint; | |
| 388 | + | ``` | |
| 389 | + | ||
| 390 | + | --- | |
| 391 | + | *From the Free Pascal wiki, page "lclintf", as it stood on 2019-06-26 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 392 | + | Category: LCL | |
| 393 | + | Category: Lazarus | |
| 394 | + | Category: lclintf |
