⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osxclipboard.mm

📁 game engine, which is useful for everyone who is interested in it. I hope you can enjoy it.
💻 MM
字号:
// Copyright (C) 2005 Etienne Petitjean// This file is part of the "Irrlicht Engine".// For conditions of distribution and use, see copyright notice in Irrlicht.h#include "OSXClipboard.h"#import <Cocoa/Cocoa.h>void	OSXCopyToClipboard(const char *text){	NSString		*str;	NSPasteboard	*board;	if (text != NULL && strlen(text) > 0)	{		str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding];		board = [NSPasteboard generalPasteboard];		[board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp];		[board setString:str forType:NSStringPboardType];	}}char*	OSXCopyFromClipboard(){	NSString		*str;	NSPasteboard	*board;	char			*result;		result = NULL;	board = [NSPasteboard generalPasteboard];	str = [board stringForType:NSStringPboardType];	if (str != nil) result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];	return (result);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -