mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 11:19:24 +02:00
cocoa: fix the declaration of boolean use. #35792
git-svn-id: trunk@61529 -
This commit is contained in:
parent
12bd4546ad
commit
a1b263e461
@ -27,6 +27,16 @@ uses
|
|||||||
// Libs
|
// Libs
|
||||||
MacOSAll, CocoaAll;
|
MacOSAll, CocoaAll;
|
||||||
|
|
||||||
|
type
|
||||||
|
// Due to backwards incompatible changes in FPC sources
|
||||||
|
// (switching from Boolean to Boolean8), LCL has to adopt
|
||||||
|
// either type, depending on FPC version
|
||||||
|
LCLObjCBoolean = {$ifdef HASBOOLEAN8}
|
||||||
|
Boolean8 // FPC 3.2.0 and earlier are using "boolean8" type
|
||||||
|
{$else}
|
||||||
|
Boolean // FPC 3.0.4 and earlier are using "boolean" type
|
||||||
|
{$endif};
|
||||||
|
|
||||||
type
|
type
|
||||||
NSImageScaling = NSUInteger;
|
NSImageScaling = NSUInteger;
|
||||||
const // NSImageScaling values
|
const // NSImageScaling values
|
||||||
@ -42,6 +52,10 @@ type
|
|||||||
|
|
||||||
{$ifdef BOOLFIX}
|
{$ifdef BOOLFIX}
|
||||||
ObjCBool = ShortInt; // Matches BOOL declaration in ObjC "signed char"
|
ObjCBool = ShortInt; // Matches BOOL declaration in ObjC "signed char"
|
||||||
|
// Note that this is different than LCLObjCBoolean
|
||||||
|
// even though it's trying to resolve the same problem
|
||||||
|
// for FPC3.0.4. ObjCBool should be removed after the officail
|
||||||
|
// fpc3.2+ release
|
||||||
|
|
||||||
NSMenuItemFix = objccategory external (NSMenuItem)
|
NSMenuItemFix = objccategory external (NSMenuItem)
|
||||||
procedure setEnabled_(aenabled: ObjCBool); message 'setEnabled:';
|
procedure setEnabled_(aenabled: ObjCBool); message 'setEnabled:';
|
||||||
|
@ -46,16 +46,6 @@ const
|
|||||||
{$define HASBOOLEAN8}
|
{$define HASBOOLEAN8}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
type
|
|
||||||
// Due to backwards incompatible changes in FPC sources
|
|
||||||
// (switching from Boolean to Boolean8), LCL has to adopt
|
|
||||||
// either type, depending on FPC version
|
|
||||||
LCLObjCBoolean = {$ifdef HASBOOLEAN8}
|
|
||||||
Boolean8 // FPC 3.2.0 and earlier are using "boolean8" type
|
|
||||||
{$else}
|
|
||||||
Boolean // FPC 3.0.4 and earlier are using "boolean" type
|
|
||||||
{$endif};
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ ICommonCallback }
|
{ ICommonCallback }
|
||||||
|
@ -130,7 +130,7 @@ type
|
|||||||
procedure unmarkText;
|
procedure unmarkText;
|
||||||
function selectedRange: NSRange;
|
function selectedRange: NSRange;
|
||||||
function markedRange: NSRange;
|
function markedRange: NSRange;
|
||||||
function hasMarkedText: Boolean;
|
function hasMarkedText: LCLObjCBoolean;
|
||||||
function attributedSubstringForProposedRange_actualRange(aRange: NSRange; actualRange: NSRangePointer): NSAttributedString;
|
function attributedSubstringForProposedRange_actualRange(aRange: NSRange; actualRange: NSRangePointer): NSAttributedString;
|
||||||
function validAttributesForMarkedText: NSArray;
|
function validAttributesForMarkedText: NSArray;
|
||||||
function firstRectForCharacterRange_actualRange(aRange: NSRange; actualRange: NSRangePointer): NSRect;
|
function firstRectForCharacterRange_actualRange(aRange: NSRange; actualRange: NSRangePointer): NSRect;
|
||||||
@ -691,7 +691,7 @@ begin
|
|||||||
Result.length := 0;
|
Result.length := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCocoaInputClient.hasMarkedText: Boolean;
|
function TCocoaInputClient.hasMarkedText: LCLObjCBoolean;
|
||||||
begin
|
begin
|
||||||
Result := false;
|
Result := false;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user