-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoclip_darwin.h
More file actions
41 lines (33 loc) · 985 Bytes
/
Copy pathgoclip_darwin.h
File metadata and controls
41 lines (33 loc) · 985 Bytes
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
#include "Cocoa/Cocoa.h"
#define CLIPBOARD_FORMAT_NONE 0
#define CLIPBOARD_FORMAT_UTF8_TEXT 1
#define CLIPBOARD_FORMAT_IMAGE_PNG 2
#define CLIPBOARD_FORMAT_IMAGE_BMP 3
#define CLIPBOARD_FORMAT_IMAGE_TIFF 4
#define CLIPBOARD_FORMAT_IMAGE_JPG 5
typedef struct ClipboardInformation {
int typeInt;
int formatTypeInt;
int count;
} ClipboardInformation;
typedef struct ClipboardData {
Byte* data;
int dataLength;
} ClipboardData;
typedef struct ClipboardInternal {
NSPasteboard *pb;
ClipboardData *cb;
ClipboardInformation *cbi;
} ClipboardInternal;
typedef struct ClipboardTypeFilter {
bool text;
bool image;
bool files;
} ClipboardTypeFilter;
ClipboardInternal *cocoaPbFactory();
int cocoaPbChangeCount(ClipboardInternal *sub);
void pasteWriteAddText(char* data, int len);
void pasteWrite(ClipboardInternal *sub);
void readClipboard(ClipboardInternal *i, ClipboardTypeFilter *filter);
void readInformation(ClipboardInternal *i);
const char* nsstring2cstring(void *str);