Adding upstream version 0.7.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f170ee46ad
commit
79ead63b61
35 changed files with 2904 additions and 0 deletions
21
clipboard_ios.m
Normal file
21
clipboard_ios.m
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2021 The golang.design Initiative Authors.
|
||||
// All rights reserved. Use of this source code is governed
|
||||
// by a MIT license that can be found in the LICENSE file.
|
||||
//
|
||||
// Written by Changkun Ou <changkun.de>
|
||||
|
||||
//go:build ios
|
||||
// +build ios
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <MobileCoreServices/MobileCoreServices.h>
|
||||
|
||||
void clipboard_write_string(char *s) {
|
||||
NSString *value = [NSString stringWithUTF8String:s];
|
||||
[[UIPasteboard generalPasteboard] setString:value];
|
||||
}
|
||||
|
||||
char *clipboard_read_string() {
|
||||
NSString *str = [[UIPasteboard generalPasteboard] string];
|
||||
return (char *)[str UTF8String];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue