1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
{ ————————————————————————————————————————————————————————————— }
{$IF LSM_TARGET_CARBON_MAC64_IPHONE_TVOS_WATCHOS = 1}
{ ------------------------------------------------------------------------- }
{ iOS 2.0+, macOS 10.0+, tvOS 9.0+, watchOS 2.0+ }
{ on SAIT que : h_cfs <> nil }
{ -> S = '' }
procedure f_OSX_CFStringToString (h_cfs: CFStringRef; var S: string);
{$IF LSM_LINKER_FPC = 0}
var
B_ok: boolean;
{$ENDIF}
begin
{$IF LSM_LINKER_FPC = 0}
B_ok :=
{$ENDIF} CFStringGetPascalString(h_cfs, @S, 256, kCFStringEncodingMacRoman)
end;
{$ENDIF}
{ ————————————————————————————————————————————————————————————— }
{$IF LSM_TARGET_CARBON_MAC64 = 1}
{ ------------------------------------------ }
function f_CBN64_PasteboardCreate: PasteboardRef;
var
h_crs: PasteboardRef;
L_oss: OSStatus;
h_cfs: CFStringRef;
begin
h_crs := nil;
{ - }
h_cfs := f_OSX_StringToCFString('com.apple.pasteboard.clipboard');
if h_cfs <> nil then
begin
L_oss := PasteboardCreate(h_cfs, h_crs);
if L_oss <> noErr then
h_crs := nil;
CFRelease(CFTypeRef(h_cfs))
end;
{ - }
f_CBN64_PasteboardCreate := h_crs
end;
{$ENDIF}
{ ————————————————————————————————————————————————————————————— }
{$IF LSM_TARGET_68K_PPC = 1}
{ ---------------------------------- }
procedure f_68K_PPC_PasteboardClear;
{$IF LSM_LINKER_FPC = 0}
var
L_oss: OSStatus;
{$ENDIF}
begin
{$IF LSM_LINKER_FPC = 0}
L_oss :=
{$ENDIF} ZeroScrap
end;
{$ENDIF}
{ ————————————————————————————————————————————————————————————— }
{$IF LSM_TARGET_CARBON = 1}
{ --------------------------------- }
procedure f_CARBON_PasteboardClear;
{$IF LSM_LINKER_FPC = 0}
var
L_oss: OSStatus;
{$ENDIF}
begin
{$IF LSM_LINKER_FPC = 0}
L_oss :=
{$ENDIF} ClearCurrentScrap { DEPRECATED 10.0_10.5 }
end;
{$ENDIF}
{ ————————————————————————————————————————————————————————————— }
procedure f_CBN64_PasteboardClear;
var
h_crs: PasteboardRef;
{$IF LSM_LINKER_FPC = 0}
L_oss: OSStatus;
{$ENDIF}
begin
h_crs := f_CBN64_PasteboardCreate;
if h_crs <> nil then
begin
{$IF LSM_LINKER_FPC = 0}
L_oss :=
{$ENDIF} PasteboardClear(h_crs);
CFRelease(CFTypeRef(h_crs))
end
end;
{ ————————————————————————————————————————————————————————————— }
procedure f_ULL_CBClearScrap;
begin
{$IF LSM_TARGET_68K_PPC = 1}
f_68K_PPC_PasteboardClear;
{$ENDIF}
(****************************************************************************************)
{$IF LSM_TARGET_CARBON = 1}
if xx_ULL.ull_sys >= $1030 then
f_CBN64_PasteboardClear
else
f_CARBON_PasteboardClear;
{$ENDIF}
(****************************************************************************************)
{$IF LSM_TARGET_MAC64 = 1} { => xx_ULL.ull_sys >= $1060 }
f_CBN64_PasteboardClear;
{$ENDIF}
(****************************************************************************************)
{$IF LSM_TARGET_IPHONE_TVOS_WATCHOS = 1}
{ _zibuibui_iPhone_ }
{ _zibuibui_iTVOS_ }
{ _zibuibui_iWatch_ }
{$ENDIF}
(****************************************************************************************)
{$IF LSM_TARGET_WIN32_WIN64_ANDROID = 1}
{ _zibuibui_win32_ }
{ _zibuibui_win64_ }
{ _zibuibui_android_ }
{$ENDIF}
(****************************************************************************************)
xx_ULL.ull_ppp_ref := nil;
xx_ULL.ull_ppp_nat := 0;
xx_ULL.ull_ppp_whn := 0
end;
{ ————————————————————————————————————————————————————————————— } |
Partager