carbon: clean up

git-svn-id: trunk@37002 -
This commit is contained in:
mattias 2012-04-24 09:43:54 +00:00
parent ba1fbe98f3
commit cb0a474c00
3 changed files with 15 additions and 17 deletions

View File

@ -1,4 +1,3 @@
{ $Id$ }
{ {
------------------------------------- -------------------------------------
carbondebug.pp - graphic dump utils carbondebug.pp - graphic dump utils

View File

@ -1,5 +1,4 @@
{ $Id$ { -----------------------------------------
-----------------------------------------
carbondef.pp - Type & Const definitions carbondef.pp - Type & Const definitions
----------------------------------------- -----------------------------------------
@ -94,9 +93,9 @@ type
procedure FocusKilled; virtual; procedure FocusKilled; virtual;
procedure BoundsChanged; virtual; procedure BoundsChanged; virtual;
procedure ControlAdded; virtual; procedure ControlAdded; virtual;
function FilterKeyPress(SysKey: Boolean; const Char: TUTF8Char): Boolean; virtual; function FilterKeyPress({%H-}SysKey: Boolean; const {%H-}Char: TUTF8Char): Boolean; virtual;
procedure ProcessKeyEvent(const msg: TLMKey); virtual; procedure ProcessKeyEvent(const {%H-}msg: TLMKey); virtual;
function NeedDeliverMouseEvent(Msg: Integer; const AMessage): Boolean; virtual; function NeedDeliverMouseEvent({%H-}Msg: Integer; const {%H-}AMessage): Boolean; virtual;
public public
constructor Create(const AObject: TWinControl; const AParams: TCreateParams); constructor Create(const AObject: TWinControl; const AParams: TCreateParams);
destructor Destroy; override; destructor Destroy; override;
@ -484,8 +483,8 @@ var
ClientChanged: Boolean; ClientChanged: Boolean;
begin begin
if not Resizing then begin if not Resizing then begin
GetBounds(R); GetBounds(R{%H-});
GetClientRect(ClientR); GetClientRect(ClientR{%H-});
LCLR:=LCLObject.BoundsRect; LCLR:=LCLObject.BoundsRect;
LCLClientR:=LCLObject.ClientRect; LCLClientR:=LCLObject.ClientRect;
RChanged:=not CompareRect(@R,@LCLR); RChanged:=not CompareRect(@R,@LCLR);
@ -570,7 +569,7 @@ begin
DebugLn('TCarbonWidget.BoundsChanged ' + LCLObject.Name); DebugLn('TCarbonWidget.BoundsChanged ' + LCLObject.Name);
{$ENDIF} {$ENDIF}
GetBounds(WidgetBounds); GetBounds(WidgetBounds{%H-});
OldBounds := LCLObject.BoundsRect; OldBounds := LCLObject.BoundsRect;
{$IFDEF VerboseBounds} {$IFDEF VerboseBounds}
@ -771,7 +770,7 @@ var
const const
SName = 'GetMousePos'; SName = 'GetMousePos';
begin begin
GetGlobalMouse(P); GetGlobalMouse(P{%H-});
OSError(GetWindowBounds(GetTopParentWindow, kWindowStructureRgn, R{%H-}), OSError(GetWindowBounds(GetTopParentWindow, kWindowStructureRgn, R{%H-}),
Self, SName, SGetWindowBounds); Self, SName, SGetWindowBounds);

View File

@ -388,7 +388,7 @@ function CheckGDIObject(const GDIObject: HGDIOBJ; const AMethodName: String; APa
function CheckBitmap(const Bitmap: HBITMAP; const AMethodName: String; AParamName: String = ''): Boolean; function CheckBitmap(const Bitmap: HBITMAP; const AMethodName: String; AParamName: String = ''): Boolean;
function CheckCursor(const Cursor: HCURSOR; const AMethodName: String; AParamName: String = ''): Boolean; function CheckCursor(const Cursor: HCURSOR; const AMethodName: String; AParamName: String = ''): Boolean;
function FloodFillBitmap(const Bitmap: TCarbonBitmap; X,Y: Integer; ABorderColor, FillColor: TColor; isBorderColor: Boolean): Boolean; function FloodFillBitmap(const Bitmap: TCarbonBitmap; X,Y: Integer; {%H-}ABorderColor, FillColor: TColor; {%H-}isBorderColor: Boolean): Boolean;
var var
StockSystemFont: TCarbonFont; StockSystemFont: TCarbonFont;
@ -506,9 +506,9 @@ type
const const
// missed error codes // missed error codes
kQDNoColorHWCursorSupport = -3951; kQDNoColorHWCursorSupport = -3951;
kQDCursorAlreadyRegistered = -3952; {%H-}kQDCursorAlreadyRegistered = -3952;
kQDCursorNotRegistered = -3953; {%H-}kQDCursorNotRegistered = -3953;
kQDCorruptPICTDataErr = -3954; {%H-}kQDCorruptPICTDataErr = -3954;
kThemeCursorAnimationDelay = 70; kThemeCursorAnimationDelay = 70;
LazarusCursorInfix = '_lazarus_'; LazarusCursorInfix = '_lazarus_';
@ -2553,7 +2553,7 @@ type
ai : Byte; ai : Byte;
end; end;
procedure GetRGBA24(Bitmap: TCarbonBitmap; X,Y: Integer; var r,g,b,a: Byte; const pos: TColorPos); procedure GetRGBA24(Bitmap: TCarbonBitmap; X,Y: Integer; out r,g,b,a: Byte; const pos: TColorPos);
var var
line : PByteArray; line : PByteArray;
begin begin
@ -2579,7 +2579,7 @@ begin
line^[x*3+pos.bi]:=b; line^[x*3+pos.bi]:=b;
end; end;
procedure GetRGBA32(Bitmap: TCarbonBitmap; X,Y: Integer; var r,g,b,a: Byte; const pos: TColorPos); procedure GetRGBA32(Bitmap: TCarbonBitmap; X,Y: Integer; out r,g,b,a: Byte; const pos: TColorPos);
var var
line : PByteArray; line : PByteArray;
begin begin
@ -2626,7 +2626,7 @@ const
dx : array [0..3] of Integer = (-1,1,0,0); dx : array [0..3] of Integer = (-1,1,0,0);
dy : array [0..3] of Integer = (0,0,-1,1); dy : array [0..3] of Integer = (0,0,-1,1);
var var
GetRGBA: procedure (Bitmap: TCarbonBitmap; X,Y: Integer; var r,g,b,a: Byte; const pos: TColorPos); GetRGBA: procedure (Bitmap: TCarbonBitmap; X,Y: Integer; out r,g,b,a: Byte; const pos: TColorPos);
SetRGBA: procedure (Bitmap: TCarbonBitmap; X,Y: Integer; r,g,b,a: Byte; const pos: TColorPos); SetRGBA: procedure (Bitmap: TCarbonBitmap; X,Y: Integer; r,g,b,a: Byte; const pos: TColorPos);
begin begin
FillColorRef:=ColorToRGB(FillColor); FillColorRef:=ColorToRGB(FillColor);