mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: MacCloud/DropBox step-1: basic extensions to CocoaAll
This commit is contained in:
parent
e701968cd1
commit
7a974dde4c
1 changed files with 38 additions and 0 deletions
38
plugins/wfx/MacCloud/src/util/uminicocoa.pas
Normal file
38
plugins/wfx/MacCloud/src/util/uminicocoa.pas
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
Notes:
|
||||
1. contains only the most basic extensions to CocoaAll
|
||||
2. the purpose is to avoid dependence on LCL/Cocoa
|
||||
}
|
||||
|
||||
unit uMiniCocoa;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
{$modeswitch objectivec2}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
CocoaAll;
|
||||
|
||||
type
|
||||
|
||||
TCocoaAppOnOpenURLNotify = procedure (const url: NSURL) of object;
|
||||
|
||||
NSApplication_FIX = objccategory external (NSApplication)
|
||||
procedure setOpenURLObserver( onOpenURLObserver: TCocoaAppOnOpenURLNotify );
|
||||
message 'lclSetOpenURLObserver:';
|
||||
end;
|
||||
|
||||
function StringToNSString(const S: String): NSString;
|
||||
|
||||
implementation
|
||||
|
||||
// copy from uMyDarwin
|
||||
function StringToNSString(const S: String): NSString;
|
||||
begin
|
||||
Result:= NSString(NSString.stringWithUTF8String(PAnsiChar(S)));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue