mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 21:10:42 +02:00
carbon: clean up
git-svn-id: trunk@37004 -
This commit is contained in:
parent
a299e98de4
commit
ba12c3847e
@ -1,5 +1,4 @@
|
||||
{ $Id$
|
||||
------------------------------------------
|
||||
{ ------------------------------------------
|
||||
carbongdiobjects.pp - Carbon GDI objects
|
||||
------------------------------------------
|
||||
|
||||
@ -762,7 +761,7 @@ function TCarbonRegion.GetBounds: TRect;
|
||||
var
|
||||
R: HIRect;
|
||||
begin
|
||||
if HIShapeGetBounds(FShape, R) = nil then
|
||||
if HIShapeGetBounds(FShape, R{%H-}) = nil then
|
||||
begin
|
||||
DebugLn('TCarbonRegion.GetBounds Error!');
|
||||
Exit;
|
||||
|
@ -321,10 +321,10 @@ begin
|
||||
end;
|
||||
|
||||
try
|
||||
if OSError(CreateStandardAlert(AlertCode, CaptionStr, MessageStr, @ParamRec, AlertRef),
|
||||
if OSError(CreateStandardAlert(AlertCode, CaptionStr, MessageStr, @ParamRec, AlertRef{%H-}),
|
||||
Self, SName, 'CreateStandardAlert') then Exit;
|
||||
|
||||
if OSError(RunStandardAlert(AlertRef, nil, AlertBtnIdx), Self, SName,
|
||||
if OSError(RunStandardAlert(AlertRef, nil, AlertBtnIdx{%H-}), Self, SName,
|
||||
'RunStandardAlert') then Exit;
|
||||
|
||||
{Convert Carbon result to LCL "id" dialog result}
|
||||
@ -464,7 +464,6 @@ end;
|
||||
function TCarbonWidgetSet.RawImage_FromDevice(out ARawImage: TRawImage; ADC: HDC; const ARect: TRect): Boolean;
|
||||
var
|
||||
CBC: TCarbonBitmapContext absolute ADC;
|
||||
Desc: TRawImageDescription absolute ARawImage.Description;
|
||||
displayID: CGDirectDisplayID;
|
||||
ScreenImage: CGImageRef;
|
||||
begin
|
||||
|
@ -33,7 +33,7 @@ procedure DrawGrid(DC: HDC; const R: TRect; DX, DY: Integer); override;
|
||||
function ExtUTF8Out(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect;
|
||||
Str: PChar; Count: Longint; Dx: PInteger): Boolean; override;
|
||||
|
||||
function FontCanUTF8(Font: HFont): boolean; override;
|
||||
function FontCanUTF8({%H-}Font: HFont): boolean; override;
|
||||
|
||||
function GetAcceleratorString(const AVKey: Byte; const AShiftState: TShiftState): String; override;
|
||||
function GetControlConstraints(Constraints: TObject): boolean; override;
|
||||
@ -63,7 +63,7 @@ function RawImage_FromDevice(out ARawImage: TRawImage; ADC: HDC; const ARect: TR
|
||||
// override only when queried formats are different from screen description
|
||||
//function RawImage_QueryDescription(AFlags: TRawImageQueryFlags; var ADesc: TRawImageDescription): Boolean; override;
|
||||
|
||||
function ReleaseDesignerDC(Window: HWND; DC: HDC): Integer; override;
|
||||
function ReleaseDesignerDC(Window: HWND; {%H-}DC: HDC): Integer; override;
|
||||
|
||||
//##apiwiz##eps## // Do not remove, no wizard declaration after this line
|
||||
|
||||
|
@ -2231,7 +2231,7 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
if not CheckWidget(Handle, 'GetWindowRelativePosition') then Exit;
|
||||
Result := TCarbonWidget(Handle).GetBounds(ARect);
|
||||
Result := TCarbonWidget(Handle).GetBounds(ARect{%H-});
|
||||
|
||||
if not Result then Exit;
|
||||
Left := ARect.Left;
|
||||
@ -2264,7 +2264,7 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
if not CheckWidget(Handle, 'GetWindowSize') then Exit;
|
||||
Result := TCarbonWidget(Handle).GetBounds(ARect);
|
||||
Result := TCarbonWidget(Handle).GetBounds(ARect{%H-});
|
||||
|
||||
if not Result then Exit;
|
||||
Width := ARect.Right - ARect.Left;
|
||||
@ -2316,7 +2316,7 @@ begin
|
||||
New(ACritSec);
|
||||
|
||||
System.InitCriticalSection(ACritSec^);
|
||||
CritSection := TCriticalSection(ACritSec);
|
||||
CritSection := {%H-}TCriticalSection(ACritSec);
|
||||
|
||||
{$IFDEF VerboseWinAPI}
|
||||
DebugLn('TCarbonWidgetSet.InitializeCriticalSection Section: ' + DbgS(CritSection));
|
||||
@ -2490,7 +2490,7 @@ begin
|
||||
DebugLn('TCarbonWidgetSet.LeaveCriticalSection Section: ' + DbgS(CritSection));
|
||||
{$ENDIF}
|
||||
|
||||
ACritSec := System.PRTLCriticalSection(CritSection);
|
||||
ACritSec := {%H-}System.PRTLCriticalSection(CritSection);
|
||||
System.LeaveCriticalsection(ACritSec^);
|
||||
end;
|
||||
|
||||
@ -2805,7 +2805,7 @@ begin
|
||||
// therefore we can only test bounding box of the clipping path.
|
||||
|
||||
ClipBox := CGContextGetClipBoundingBox(TCarbonContext(DC).CGContext);
|
||||
Result := IntersectRect(R, ARect, CGRectToRect(ClipBox));
|
||||
Result := IntersectRect(R{%H-}, ARect, CGRectToRect(ClipBox));
|
||||
|
||||
{$IFDEF VerboseWinAPI}
|
||||
DebugLn('TCarbonWidgetSet.RectVisible Result: ' + DbgS(Result) + ' Clip: ' + DbgS(CGRectToRect(ClipBox)));
|
||||
@ -2885,7 +2885,7 @@ begin
|
||||
|
||||
if not CheckWidget(Handle, 'RemoveProp') then Exit;
|
||||
|
||||
Result := THandle(TCarbonWidget(Handle).Properties[Str]);
|
||||
Result := {%H-}THandle(TCarbonWidget(Handle).Properties[Str]);
|
||||
TCarbonWidget(Handle).Properties[Str] := nil;
|
||||
end;
|
||||
|
||||
@ -3094,9 +3094,10 @@ begin
|
||||
begin
|
||||
R := RectToCGRect(prcScroll^);
|
||||
// TODO: create CGRect
|
||||
OSError(HIViewGetBounds(ACtl.Content, R1),
|
||||
OSError(HIViewGetBounds(ACtl.Content, R1{%H-}),
|
||||
Self, SName, 'HIViewGetBounds');
|
||||
RR := CGRectToRect(R1);
|
||||
{$NOTE: check why RR is not used}
|
||||
OSError(HIViewScrollRect(ACtl.Content, HiRectPtr(@R), CGFloat(dx), CGFloat(dy)),
|
||||
ACtl, SName, 'HIViewScrollRect');
|
||||
Result := True;
|
||||
@ -3122,8 +3123,6 @@ end;
|
||||
{$ENDIF}
|
||||
|
||||
function TCarbonWidgetSet.SelectClipRGN(DC: hDC; RGN: HRGN): Longint;
|
||||
const
|
||||
SName = 'TCarbonWidgetSet.SelectClipRGN';
|
||||
begin
|
||||
{$IFDEF VerboseWinAPI}
|
||||
DebugLn('TCarbonWidgetSet.SelectClipRGN DC: ' + DbgS(DC) + ' RGN: ' +
|
||||
@ -3891,11 +3890,11 @@ begin
|
||||
|
||||
P.h := Point.X;
|
||||
P.v := Point.Y;
|
||||
if FindWindowOfClass(P, kAllWindowClasses, Window, @WindowPart) <> noErr then Exit;
|
||||
if FindWindowOfClass(P, kAllWindowClasses, Window{%H-}, @WindowPart) <> noErr then Exit;
|
||||
if Window = nil then Exit;
|
||||
if WindowPart <> inContent then Exit;
|
||||
|
||||
if OSError(GetWindowBounds(Window, kWindowContentRgn, R), Self,
|
||||
if OSError(GetWindowBounds(Window, kWindowContentRgn, R{%H-}), Self,
|
||||
'WindowFromPoint', SGetWindowBounds) then Exit;
|
||||
|
||||
Dec(P.h, R.left);
|
||||
|
@ -143,8 +143,8 @@ function HideCaret(hWnd: HWND): Boolean; override;
|
||||
|
||||
procedure InitializeCriticalSection(var CritSection: TCriticalSection); Override;
|
||||
function IntersectClipRect(DC: HDC; Left, Top, Right, Bottom: Integer): Integer; override;
|
||||
function InvalidateRect(AHandle : HWND; Rect : pRect; bErase : Boolean) : Boolean; override;
|
||||
function InvalidateRgn(Handle: HWND; Rgn: HRGN; Erase: Boolean): Boolean; override;
|
||||
function InvalidateRect(AHandle : HWND; Rect : pRect; {%H-}bErase : Boolean) : Boolean; override;
|
||||
function InvalidateRgn(Handle: HWND; Rgn: HRGN; {%H-}Erase: Boolean): Boolean; override;
|
||||
function IsIconic(Handle: HWND): boolean; override;
|
||||
function IsWindow(handle: HWND): boolean; override;
|
||||
function IsWindowEnabled(Handle: HWND): boolean; override;
|
||||
@ -174,7 +174,7 @@ function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; override;
|
||||
function RectVisible(DC: HDC; const ARect: TRect) : Boolean; override;
|
||||
function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; override;
|
||||
function ReleaseCapture : Boolean; override;
|
||||
function ReleaseDC(HWnd: HWND; DC: HDC): Integer; override;
|
||||
function ReleaseDC({%H-}HWnd: HWND; DC: HDC): Integer; override;
|
||||
function RemoveProp(Handle: hwnd; Str: PChar): THandle; override;
|
||||
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override;
|
||||
function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; override;
|
||||
@ -192,7 +192,7 @@ function SetBkMode(DC: HDC; BkMode : Integer) : Integer; override;
|
||||
function SetComboMinDropDownSize(Handle: HWND; MinItemsWidth, MinItemsHeight, MinItemCount: integer): boolean; override;
|
||||
function SetCapture(AHandle: HWND): HWND; override;
|
||||
function SetCaretPos(X, Y: Integer): Boolean; override;
|
||||
function SetCaretPosEx(Handle: HWnd; X, Y: Integer): Boolean; override;
|
||||
function SetCaretPosEx({%H-}Handle: HWnd; X, Y: Integer): Boolean; override;
|
||||
function SetCaretRespondToFocus(handle: HWND; ShowHideOnFocus: boolean): Boolean; override;
|
||||
function SetCursor(ACursor: HCURSOR): HCURSOR; override;
|
||||
function SetCursorPos(X, Y: Integer): Boolean; override;
|
||||
@ -202,7 +202,7 @@ function SetMenu(AWindowHandle: HWND; AMenuHandle: HMENU): Boolean; override;
|
||||
function SetParent(hWndChild: HWND; hWndParent: HWND): HWND; override;
|
||||
function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override;
|
||||
function SetROP2(DC: HDC; Mode: Integer): Integer; override;
|
||||
function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override;
|
||||
function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; {%H-}bRedraw : Boolean): Integer; override;
|
||||
function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): Boolean; override;
|
||||
function SetTextCharacterExtra(_hdc : hdc; nCharExtra : Integer):Integer; override;
|
||||
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
@ -216,7 +216,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
||||
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||
function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; override;
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; override;
|
||||
function SystemParametersInfo(uiAction: DWord; {%H-}uiParam: DWord; pvParam: Pointer; {%H-}fWinIni: DWord): LongBool; override;
|
||||
|
||||
function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||
function UpdateWindow(Handle: HWND): Boolean; override;
|
||||
|
Loading…
Reference in New Issue
Block a user