2013-08-30 14:38:43 +00:00
|
|
|
/*
|
2024-09-17 19:00:25 +00:00
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
2025-01-24 00:11:17 +00:00
|
|
|
* SPDX-FileCopyrightText: (C) 2013 - 2016 Symless Ltd.
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
2013-08-30 14:38:43 +00:00
|
|
|
*/
|
|
|
|
|
|
2014-02-28 13:06:25 +00:00
|
|
|
#import "platform/OSXPasteboardPeeker.h"
|
2014-02-28 12:36:45 +00:00
|
|
|
|
2013-08-30 14:38:43 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2024-12-18 01:42:03 +00:00
|
|
|
#import <CoreData/CoreData.h>
|
|
|
|
|
#import <Foundation/Foundation.h>
|
2013-08-30 14:38:43 +00:00
|
|
|
|
2024-08-07 17:11:29 +00:00
|
|
|
#pragma clang diagnostic push
|
|
|
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
2024-12-18 01:42:03 +00:00
|
|
|
CFStringRef getDraggedFileURL()
|
2013-08-30 14:38:43 +00:00
|
|
|
{
|
2024-12-18 01:42:03 +00:00
|
|
|
NSString *pbName = NSDragPboard;
|
|
|
|
|
NSPasteboard *pboard = [NSPasteboard pasteboardWithName:pbName];
|
|
|
|
|
|
|
|
|
|
NSMutableString *string;
|
|
|
|
|
string = [[NSMutableString alloc] initWithCapacity:0];
|
|
|
|
|
|
|
|
|
|
NSArray *files = [pboard propertyListForType:NSFilenamesPboardType];
|
|
|
|
|
for (id file in files) {
|
|
|
|
|
[string appendString:(NSString *)file];
|
|
|
|
|
[string appendString:@"\0"];
|
|
|
|
|
}
|
2013-08-30 14:38:43 +00:00
|
|
|
|
2024-12-18 01:42:03 +00:00
|
|
|
return (CFStringRef)string;
|
2013-08-30 14:38:43 +00:00
|
|
|
}
|