mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 08:41:25 +02:00
EditorMacroScript: Refactor IFDEF
git-svn-id: trunk@39411 -
This commit is contained in:
parent
7d0bac6415
commit
a3df269512
@ -7,6 +7,10 @@ unit EMScriptClasses;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{$IFDEF darwin}
|
||||||
|
{$DEFINE NeedTPointFix }
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, SynEdit, SynEditTypes, Clipbrd, Dialogs, Controls, uPSCompiler,
|
Classes, SysUtils, SynEdit, SynEditTypes, Clipbrd, Dialogs, Controls, uPSCompiler,
|
||||||
uPSRuntime, uPSUtils;
|
uPSRuntime, uPSUtils;
|
||||||
@ -22,9 +26,8 @@ procedure ExecRegisterTClipboard(cl: TPSRuntimeClassImporter; AExec: TPSExec);
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$IFDEF darwin}
|
{$IFDEF NeedTPointFix}
|
||||||
type
|
type TPoint2 = record x,y,a,b,c: Longint; end;
|
||||||
TPoint2 = record x,y,a,b,c: Longint; end;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
Function EMS_MessageDlg(Msg: string; DlgType :TMsgDlgType; Buttons :TMsgDlgButtons; HelpCtx: Longint): Integer;
|
Function EMS_MessageDlg(Msg: string; DlgType :TMsgDlgType; Buttons :TMsgDlgButtons; HelpCtx: Longint): Integer;
|
||||||
@ -56,7 +59,7 @@ begin
|
|||||||
Result := InputQuery(ACaption, APrompt, Value);
|
Result := InputQuery(ACaption, APrompt, Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function EMS_Point(AX, AY: Integer): {$IFDEF darwin}TPoint2{$ELSE}TPoint{$ENDIF};
|
function EMS_Point(AX, AY: Integer): {$IFDEF NeedTPointFix}TPoint2{$ELSE}TPoint{$ENDIF};
|
||||||
begin
|
begin
|
||||||
Result.X := AX;
|
Result.X := AX;
|
||||||
Result.Y := AY;
|
Result.Y := AY;
|
||||||
@ -90,7 +93,7 @@ const
|
|||||||
FuncInputQuery: function(ACaption, APrompt: string; var Value : string): Boolean = @EMS_InputQuery;
|
FuncInputQuery: function(ACaption, APrompt: string; var Value : string): Boolean = @EMS_InputQuery;
|
||||||
|
|
||||||
DeclPoint = 'function Point(AX, AY: Integer): TPoint;';
|
DeclPoint = 'function Point(AX, AY: Integer): TPoint;';
|
||||||
FuncPoint: function(AX, AY: Integer): {$IFDEF darwin}TPoint2{$ELSE}TPoint{$ENDIF} = @EMS_Point; // @Classes.Point;
|
FuncPoint: function(AX, AY: Integer): {$IFDEF NeedTPointFix}TPoint2{$ELSE}TPoint{$ENDIF} = @EMS_Point; // @Classes.Point;
|
||||||
|
|
||||||
Decltest_ord_mt = 'function test_ord_mt(AType: TMsgDlgType): Integer;';
|
Decltest_ord_mt = 'function test_ord_mt(AType: TMsgDlgType): Integer;';
|
||||||
Decltest_ord_mb = 'function test_ord_mb(ABtn: TMsgDlgBtn): Integer;';
|
Decltest_ord_mb = 'function test_ord_mb(ABtn: TMsgDlgBtn): Integer;';
|
||||||
|
Loading…
Reference in New Issue
Block a user