patch.diff

GelluleX, 09/18/2011 10:08 am

Download (1.5 kB)

b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.cpp Sat Sep 17 22:07:01 2011 -1000
149 149

150 150
bool CCocoaEventEmitter::pasteTextFromClipboard(ucstring &text)
151 151
{
152
#warning "OpenGL Driver: Missing Mac Implementation for pasteTextFromClipboard"
153
	return false;
152
	text = _clipboard;
153
	return true;
154 154
}
155 155

156 156
bool CCocoaEventEmitter::copyTextToClipboard(const ucstring &text)
157 157
{
158
#warning "OpenGL Driver: Missing Mac Implementation for copyTextToClipboard"
159
	return false;
158
	_clipboard = text;
159
	return true;
160 160
}
161 161

162 162
/// convert modifier key state to nel internal modifier key state
b/code/nel/src/3d/driver/opengl/mac/cocoa_event_emitter.h Sat Sep 17 22:07:01 2011 -1000
40 40

41 41
	// TODO like internal server in unix event emitter... review!
42 42
	CEventServer*    _server;
43
	ucstring         _clipboard;
43 44

44 45
public:
45 46
	CCocoaEventEmitter() : 
......
47 48
		_setToEmulateRawMode(false),
48 49
		_driver(NULL),
49 50
		_glView(nil),
50
		_server(NULL) { }
51
		_server(NULL),
52
		_clipboard("") { }
51 53

52 54
	void         init(NL3D::IDriver*, CocoaOpenGLView*, bool eventLoop);
53 55
	bool         processMessage(NSEvent* event, CEventServer* server = NULL);