Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSResponder.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | f565d3a95c0a |
children |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2007 IBM Corporation and others. | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * | 10 * |
11 * Port to the D programming language: | 11 * Port to the D programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <doob@me.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSResponder; | 14 module dwt.internal.cocoa.NSResponder; |
15 | 15 |
16 import dwt.internal.cocoa.id; | 16 import dwt.dwthelper.utils; |
17 import cocoa = dwt.internal.cocoa.id; | |
17 import dwt.internal.cocoa.NSArray; | 18 import dwt.internal.cocoa.NSArray; |
18 import dwt.internal.cocoa.NSError; | |
19 import dwt.internal.cocoa.NSEvent; | 19 import dwt.internal.cocoa.NSEvent; |
20 import dwt.internal.cocoa.NSInterfaceStyle; | |
21 import dwt.internal.cocoa.NSMenu; | |
22 import dwt.internal.cocoa.NSObject; | 20 import dwt.internal.cocoa.NSObject; |
23 import dwt.internal.cocoa.NSString; | |
24 import dwt.internal.cocoa.NSUndoManager; | |
25 import dwt.internal.cocoa.NSWindow; | |
26 import dwt.internal.cocoa.OS; | 21 import dwt.internal.cocoa.OS; |
27 import objc = dwt.internal.objc.runtime; | 22 import objc = dwt.internal.objc.runtime; |
28 | 23 |
29 public class NSResponder : NSObject | 24 public class NSResponder : NSObject { |
30 { | |
31 | 25 |
32 public this () | 26 public this() { |
33 { | 27 super(); |
34 super(); | 28 } |
35 } | |
36 | 29 |
37 public this (objc.id id) | 30 public this(objc.id id) { |
38 { | 31 super(id); |
39 super(id); | 32 } |
40 } | |
41 | 33 |
42 public bool acceptsFirstResponder () | 34 public this(cocoa.id id) { |
43 { | 35 super(id); |
44 return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstResponder) !is null; | 36 } |
45 } | |
46 | 37 |
47 public bool becomeFirstResponder () | 38 public bool acceptsFirstResponder() { |
48 { | 39 return OS.objc_msgSend_bool(this.id, OS.sel_acceptsFirstResponder); |
49 return OS.objc_msgSend(this.id_, OS.sel_becomeFirstResponder) !is null; | 40 } |
50 } | |
51 | 41 |
52 public void cancelOperation (id sender) | 42 public bool becomeFirstResponder() { |
53 { | 43 return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder); |
54 OS.objc_msgSend(this.id_, OS.sel_cancelOperation_1, sender !is null ? sender.id_ : null); | 44 } |
55 } | |
56 | 45 |
57 public void capitalizeWord (id sender) | 46 public void doCommandBySelector(objc.SEL aSelector) { |
58 { | 47 OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector); |
59 OS.objc_msgSend(this.id_, OS.sel_capitalizeWord_1, sender !is null ? sender.id_ : null); | 48 } |
60 } | |
61 | 49 |
62 public void centerSelectionInVisibleArea (id sender) | 50 public void flagsChanged(NSEvent theEvent) { |
63 { | 51 OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent !is null ? theEvent.id : null); |
64 OS.objc_msgSend(this.id_, OS.sel_centerSelectionInVisibleArea_1, sender !is null ? sender.id_ : null); | 52 } |
65 } | |
66 | 53 |
67 public void changeCaseOfLetter (id sender) | 54 public void helpRequested(NSEvent eventPtr) { |
68 { | 55 OS.objc_msgSend(this.id, OS.sel_helpRequested_, eventPtr !is null ? eventPtr.id : null); |
69 OS.objc_msgSend(this.id_, OS.sel_changeCaseOfLetter_1, sender !is null ? sender.id_ : null); | 56 } |
70 } | |
71 | 57 |
72 public void complete (id sender) | 58 public void insertText(cocoa.id insertString) { |
73 { | 59 OS.objc_msgSend(this.id, OS.sel_insertText_, insertString !is null ? insertString.id : null); |
74 OS.objc_msgSend(this.id_, OS.sel_complete_1, sender !is null ? sender.id_ : null); | 60 } |
75 } | |
76 | 61 |
77 public void cursorUpdate (NSEvent event) | 62 public void interpretKeyEvents(NSArray eventArray) { |
78 { | 63 OS.objc_msgSend(this.id, OS.sel_interpretKeyEvents_, eventArray !is null ? eventArray.id : null); |
79 OS.objc_msgSend(this.id_, OS.sel_cursorUpdate_1, event !is null ? event.id_ : null); | 64 } |
80 } | |
81 | 65 |
82 public void deleteBackward (id sender) | 66 public void keyDown(NSEvent theEvent) { |
83 { | 67 OS.objc_msgSend(this.id, OS.sel_keyDown_, theEvent !is null ? theEvent.id : null); |
84 OS.objc_msgSend(this.id_, OS.sel_deleteBackward_1, sender !is null ? sender.id_ : null); | 68 } |
85 } | |
86 | 69 |
87 public void deleteBackwardByDecomposingPreviousCharacter (id sender) | 70 public void keyUp(NSEvent theEvent) { |
88 { | 71 OS.objc_msgSend(this.id, OS.sel_keyUp_, theEvent !is null ? theEvent.id : null); |
89 OS.objc_msgSend(this.id_, OS.sel_deleteBackwardByDecomposingPreviousCharacter_1, sender !is null ? sender.id_ : null); | 72 } |
90 } | |
91 | 73 |
92 public void deleteForward (id sender) | 74 public void mouseDown(NSEvent theEvent) { |
93 { | 75 OS.objc_msgSend(this.id, OS.sel_mouseDown_, theEvent !is null ? theEvent.id : null); |
94 OS.objc_msgSend(this.id_, OS.sel_deleteForward_1, sender !is null ? sender.id_ : null); | 76 } |
95 } | |
96 | 77 |
97 public void deleteToBeginningOfLine (id sender) | 78 public void mouseDragged(NSEvent theEvent) { |
98 { | 79 OS.objc_msgSend(this.id, OS.sel_mouseDragged_, theEvent !is null ? theEvent.id : null); |
99 OS.objc_msgSend(this.id_, OS.sel_deleteToBeginningOfLine_1, sender !is null ? sender.id_ : null); | 80 } |
100 } | |
101 | 81 |
102 public void deleteToBeginningOfParagraph (id sender) | 82 public void mouseEntered(NSEvent theEvent) { |
103 { | 83 OS.objc_msgSend(this.id, OS.sel_mouseEntered_, theEvent !is null ? theEvent.id : null); |
104 OS.objc_msgSend(this.id_, OS.sel_deleteToBeginningOfParagraph_1, sender !is null ? sender.id_ : null); | 84 } |
105 } | |
106 | 85 |
107 public void deleteToEndOfLine (id sender) | 86 public void mouseExited(NSEvent theEvent) { |
108 { | 87 OS.objc_msgSend(this.id, OS.sel_mouseExited_, theEvent !is null ? theEvent.id : null); |
109 OS.objc_msgSend(this.id_, OS.sel_deleteToEndOfLine_1, sender !is null ? sender.id_ : null); | 88 } |
110 } | |
111 | 89 |
112 public void deleteToEndOfParagraph (id sender) | 90 public void mouseMoved(NSEvent theEvent) { |
113 { | 91 OS.objc_msgSend(this.id, OS.sel_mouseMoved_, theEvent !is null ? theEvent.id : null); |
114 OS.objc_msgSend(this.id_, OS.sel_deleteToEndOfParagraph_1, sender !is null ? sender.id_ : null); | 92 } |
115 } | |
116 | 93 |
117 public void deleteToMark (id sender) | 94 public void mouseUp(NSEvent theEvent) { |
118 { | 95 OS.objc_msgSend(this.id, OS.sel_mouseUp_, theEvent !is null ? theEvent.id : null); |
119 OS.objc_msgSend(this.id_, OS.sel_deleteToMark_1, sender !is null ? sender.id_ : null); | 96 } |
120 } | |
121 | 97 |
122 public void deleteWordBackward (id sender) | 98 public void moveToBeginningOfParagraph(cocoa.id sender) { |
123 { | 99 OS.objc_msgSend(this.id, OS.sel_moveToBeginningOfParagraph_, sender !is null ? sender.id : null); |
124 OS.objc_msgSend(this.id_, OS.sel_deleteWordBackward_1, sender !is null ? sender.id_ : null); | 100 } |
125 } | |
126 | 101 |
127 public void deleteWordForward (id sender) | 102 public void moveToEndOfParagraph(cocoa.id sender) { |
128 { | 103 OS.objc_msgSend(this.id, OS.sel_moveToEndOfParagraph_, sender !is null ? sender.id : null); |
129 OS.objc_msgSend(this.id_, OS.sel_deleteWordForward_1, sender !is null ? sender.id_ : null); | 104 } |
130 } | |
131 | 105 |
132 public void doCommandBySelector (objc.SEL aSelector) | 106 public void moveUp(cocoa.id sender) { |
133 { | 107 OS.objc_msgSend(this.id, OS.sel_moveUp_, sender !is null ? sender.id : null); |
134 OS.objc_msgSend(this.id_, OS.sel_doCommandBySelector_1, aSelector); | 108 } |
135 } | |
136 | 109 |
137 public void flagsChanged (NSEvent theEvent) | 110 public void otherMouseDown(NSEvent theEvent) { |
138 { | 111 OS.objc_msgSend(this.id, OS.sel_otherMouseDown_, theEvent !is null ? theEvent.id : null); |
139 OS.objc_msgSend(this.id_, OS.sel_flagsChanged_1, theEvent !is null ? theEvent.id_ : null); | 112 } |
140 } | |
141 | 113 |
142 public void flushBufferedKeyEvents () | 114 public void otherMouseDragged(NSEvent theEvent) { |
143 { | 115 OS.objc_msgSend(this.id, OS.sel_otherMouseDragged_, theEvent !is null ? theEvent.id : null); |
144 OS.objc_msgSend(this.id_, OS.sel_flushBufferedKeyEvents); | 116 } |
145 } | |
146 | 117 |
147 public void helpRequested (NSEvent eventPtr) | 118 public void otherMouseUp(NSEvent theEvent) { |
148 { | 119 OS.objc_msgSend(this.id, OS.sel_otherMouseUp_, theEvent !is null ? theEvent.id : null); |
149 OS.objc_msgSend(this.id_, OS.sel_helpRequested_1, eventPtr !is null ? eventPtr.id_ : null); | 120 } |
150 } | |
151 | 121 |
152 public void indent (id sender) | 122 public void pageDown(cocoa.id sender) { |
153 { | 123 OS.objc_msgSend(this.id, OS.sel_pageDown_, sender !is null ? sender.id : null); |
154 OS.objc_msgSend(this.id_, OS.sel_indent_1, sender !is null ? sender.id_ : null); | 124 } |
155 } | |
156 | 125 |
157 public void insertBacktab (id sender) | 126 public void pageUp(cocoa.id sender) { |
158 { | 127 OS.objc_msgSend(this.id, OS.sel_pageUp_, sender !is null ? sender.id : null); |
159 OS.objc_msgSend(this.id_, OS.sel_insertBacktab_1, sender !is null ? sender.id_ : null); | 128 } |
160 } | |
161 | 129 |
162 public void insertContainerBreak (id sender) | 130 public bool resignFirstResponder() { |
163 { | 131 return OS.objc_msgSend_bool(this.id, OS.sel_resignFirstResponder); |
164 OS.objc_msgSend(this.id_, OS.sel_insertContainerBreak_1, sender !is null ? sender.id_ : null); | 132 } |
165 } | |
166 | 133 |
167 public void insertLineBreak (id sender) | 134 public void rightMouseDown(NSEvent theEvent) { |
168 { | 135 OS.objc_msgSend(this.id, OS.sel_rightMouseDown_, theEvent !is null ? theEvent.id : null); |
169 OS.objc_msgSend(this.id_, OS.sel_insertLineBreak_1, sender !is null ? sender.id_ : null); | 136 } |
170 } | |
171 | 137 |
172 public void insertNewline (id sender) | 138 public void rightMouseDragged(NSEvent theEvent) { |
173 { | 139 OS.objc_msgSend(this.id, OS.sel_rightMouseDragged_, theEvent !is null ? theEvent.id : null); |
174 OS.objc_msgSend(this.id_, OS.sel_insertNewline_1, sender !is null ? sender.id_ : null); | 140 } |
175 } | |
176 | 141 |
177 public void insertNewlineIgnoringFieldEditor (id sender) | 142 public void rightMouseUp(NSEvent theEvent) { |
178 { | 143 OS.objc_msgSend(this.id, OS.sel_rightMouseUp_, theEvent !is null ? theEvent.id : null); |
179 OS.objc_msgSend(this.id_, OS.sel_insertNewlineIgnoringFieldEditor_1, sender !is null ? sender.id_ : null); | 144 } |
180 } | |
181 | 145 |
182 public void insertParagraphSeparator (id sender) | 146 public void scrollWheel(NSEvent theEvent) { |
183 { | 147 OS.objc_msgSend(this.id, OS.sel_scrollWheel_, theEvent !is null ? theEvent.id : null); |
184 OS.objc_msgSend(this.id_, OS.sel_insertParagraphSeparator_1, sender !is null ? sender.id_ : null); | 148 } |
185 } | |
186 | |
187 public void insertTab (id sender) | |
188 { | |
189 OS.objc_msgSend(this.id_, OS.sel_insertTab_1, sender !is null ? sender.id_ : null); | |
190 } | |
191 | |
192 public void insertTabIgnoringFieldEditor (id sender) | |
193 { | |
194 OS.objc_msgSend(this.id_, OS.sel_insertTabIgnoringFieldEditor_1, sender !is null ? sender.id_ : null); | |
195 } | |
196 | |
197 public void insertText (id insertString) | |
198 { | |
199 OS.objc_msgSend(this.id_, OS.sel_insertText_1, insertString !is null ? insertString.id_ : null); | |
200 } | |
201 | |
202 public NSInterfaceStyle interfaceStyle () | |
203 { | |
204 return cast(NSInterfaceStyle) OS.objc_msgSend(this.id_, OS.sel_interfaceStyle); | |
205 } | |
206 | |
207 public void interpretKeyEvents (NSArray eventArray) | |
208 { | |
209 OS.objc_msgSend(this.id_, OS.sel_interpretKeyEvents_1, eventArray !is null ? eventArray.id_ : null); | |
210 } | |
211 | |
212 public void keyDown (NSEvent theEvent) | |
213 { | |
214 OS.objc_msgSend(this.id_, OS.sel_keyDown_1, theEvent !is null ? theEvent.id_ : null); | |
215 } | |
216 | |
217 public void keyUp (NSEvent theEvent) | |
218 { | |
219 OS.objc_msgSend(this.id_, OS.sel_keyUp_1, theEvent !is null ? theEvent.id_ : null); | |
220 } | |
221 | |
222 public void lowercaseWord (id sender) | |
223 { | |
224 OS.objc_msgSend(this.id_, OS.sel_lowercaseWord_1, sender !is null ? sender.id_ : null); | |
225 } | |
226 | |
227 public NSMenu menu () | |
228 { | |
229 objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu); | |
230 return result !is null ? new NSMenu(result) : null; | |
231 } | |
232 | |
233 public void mouseDown (NSEvent theEvent) | |
234 { | |
235 OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null); | |
236 } | |
237 | |
238 public void mouseDragged (NSEvent theEvent) | |
239 { | |
240 OS.objc_msgSend(this.id_, OS.sel_mouseDragged_1, theEvent !is null ? theEvent.id_ : null); | |
241 } | |
242 | |
243 public void mouseEntered (NSEvent theEvent) | |
244 { | |
245 OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1, theEvent !is null ? theEvent.id_ : null); | |
246 } | |
247 | |
248 public void mouseExited (NSEvent theEvent) | |
249 { | |
250 OS.objc_msgSend(this.id_, OS.sel_mouseExited_1, theEvent !is null ? theEvent.id_ : null); | |
251 } | |
252 | |
253 public void mouseMoved (NSEvent theEvent) | |
254 { | |
255 OS.objc_msgSend(this.id_, OS.sel_mouseMoved_1, theEvent !is null ? theEvent.id_ : null); | |
256 } | |
257 | |
258 public void mouseUp (NSEvent theEvent) | |
259 { | |
260 OS.objc_msgSend(this.id_, OS.sel_mouseUp_1, theEvent !is null ? theEvent.id_ : null); | |
261 } | |
262 | |
263 public void moveBackward (id sender) | |
264 { | |
265 OS.objc_msgSend(this.id_, OS.sel_moveBackward_1, sender !is null ? sender.id_ : null); | |
266 } | |
267 | |
268 public void moveBackwardAndModifySelection (id sender) | |
269 { | |
270 OS.objc_msgSend(this.id_, OS.sel_moveBackwardAndModifySelection_1, sender !is null ? sender.id_ : null); | |
271 } | |
272 | |
273 public void moveDown (id sender) | |
274 { | |
275 OS.objc_msgSend(this.id_, OS.sel_moveDown_1, sender !is null ? sender.id_ : null); | |
276 } | |
277 | |
278 public void moveDownAndModifySelection (id sender) | |
279 { | |
280 OS.objc_msgSend(this.id_, OS.sel_moveDownAndModifySelection_1, sender !is null ? sender.id_ : null); | |
281 } | |
282 | |
283 public void moveForward (id sender) | |
284 { | |
285 OS.objc_msgSend(this.id_, OS.sel_moveForward_1, sender !is null ? sender.id_ : null); | |
286 } | |
287 | |
288 public void moveForwardAndModifySelection (id sender) | |
289 { | |
290 OS.objc_msgSend(this.id_, OS.sel_moveForwardAndModifySelection_1, sender !is null ? sender.id_ : null); | |
291 } | |
292 | |
293 public void moveLeft (id sender) | |
294 { | |
295 OS.objc_msgSend(this.id_, OS.sel_moveLeft_1, sender !is null ? sender.id_ : null); | |
296 } | |
297 | |
298 public void moveLeftAndModifySelection (id sender) | |
299 { | |
300 OS.objc_msgSend(this.id_, OS.sel_moveLeftAndModifySelection_1, sender !is null ? sender.id_ : null); | |
301 } | |
302 | |
303 public void moveRight (id sender) | |
304 { | |
305 OS.objc_msgSend(this.id_, OS.sel_moveRight_1, sender !is null ? sender.id_ : null); | |
306 } | |
307 | |
308 public void moveRightAndModifySelection (id sender) | |
309 { | |
310 OS.objc_msgSend(this.id_, OS.sel_moveRightAndModifySelection_1, sender !is null ? sender.id_ : null); | |
311 } | |
312 | |
313 public void moveToBeginningOfDocument (id sender) | |
314 { | |
315 OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfDocument_1, sender !is null ? sender.id_ : null); | |
316 } | |
317 | |
318 public void moveToBeginningOfLine (id sender) | |
319 { | |
320 OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfLine_1, sender !is null ? sender.id_ : null); | |
321 } | |
322 | |
323 public void moveToBeginningOfParagraph (id sender) | |
324 { | |
325 OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfParagraph_1, sender !is null ? sender.id_ : null); | |
326 } | |
327 | |
328 public void moveToEndOfDocument (id sender) | |
329 { | |
330 OS.objc_msgSend(this.id_, OS.sel_moveToEndOfDocument_1, sender !is null ? sender.id_ : null); | |
331 } | |
332 | |
333 public void moveToEndOfLine (id sender) | |
334 { | |
335 OS.objc_msgSend(this.id_, OS.sel_moveToEndOfLine_1, sender !is null ? sender.id_ : null); | |
336 } | |
337 | |
338 public void moveToEndOfParagraph (id sender) | |
339 { | |
340 OS.objc_msgSend(this.id_, OS.sel_moveToEndOfParagraph_1, sender !is null ? sender.id_ : null); | |
341 } | |
342 | |
343 public void moveUp (id sender) | |
344 { | |
345 OS.objc_msgSend(this.id_, OS.sel_moveUp_1, sender !is null ? sender.id_ : null); | |
346 } | |
347 | |
348 public void moveUpAndModifySelection (id sender) | |
349 { | |
350 OS.objc_msgSend(this.id_, OS.sel_moveUpAndModifySelection_1, sender !is null ? sender.id_ : null); | |
351 } | |
352 | |
353 public void moveWordBackward (id sender) | |
354 { | |
355 OS.objc_msgSend(this.id_, OS.sel_moveWordBackward_1, sender !is null ? sender.id_ : null); | |
356 } | |
357 | |
358 public void moveWordBackwardAndModifySelection (id sender) | |
359 { | |
360 OS.objc_msgSend(this.id_, OS.sel_moveWordBackwardAndModifySelection_1, sender !is null ? sender.id_ : null); | |
361 } | |
362 | |
363 public void moveWordForward (id sender) | |
364 { | |
365 OS.objc_msgSend(this.id_, OS.sel_moveWordForward_1, sender !is null ? sender.id_ : null); | |
366 } | |
367 | |
368 public void moveWordForwardAndModifySelection (id sender) | |
369 { | |
370 OS.objc_msgSend(this.id_, OS.sel_moveWordForwardAndModifySelection_1, sender !is null ? sender.id_ : null); | |
371 } | |
372 | |
373 public void moveWordLeft (id sender) | |
374 { | |
375 OS.objc_msgSend(this.id_, OS.sel_moveWordLeft_1, sender !is null ? sender.id_ : null); | |
376 } | |
377 | |
378 public void moveWordLeftAndModifySelection (id sender) | |
379 { | |
380 OS.objc_msgSend(this.id_, OS.sel_moveWordLeftAndModifySelection_1, sender !is null ? sender.id_ : null); | |
381 } | |
382 | |
383 public void moveWordRight (id sender) | |
384 { | |
385 OS.objc_msgSend(this.id_, OS.sel_moveWordRight_1, sender !is null ? sender.id_ : null); | |
386 } | |
387 | |
388 public void moveWordRightAndModifySelection (id sender) | |
389 { | |
390 OS.objc_msgSend(this.id_, OS.sel_moveWordRightAndModifySelection_1, sender !is null ? sender.id_ : null); | |
391 } | |
392 | |
393 public NSResponder nextResponder () | |
394 { | |
395 objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextResponder); | |
396 return result is this.id_ ? this : (result !is null ? new NSResponder(result) : null); | |
397 } | |
398 | |
399 public void noResponderFor (objc.SEL eventSelector) | |
400 { | |
401 OS.objc_msgSend(this.id_, OS.sel_noResponderFor_1, eventSelector); | |
402 } | |
403 | |
404 public void otherMouseDown (NSEvent theEvent) | |
405 { | |
406 OS.objc_msgSend(this.id_, OS.sel_otherMouseDown_1, theEvent !is null ? theEvent.id_ : null); | |
407 } | |
408 | |
409 public void otherMouseDragged (NSEvent theEvent) | |
410 { | |
411 OS.objc_msgSend(this.id_, OS.sel_otherMouseDragged_1, theEvent !is null ? theEvent.id_ : null); | |
412 } | |
413 | |
414 public void otherMouseUp (NSEvent theEvent) | |
415 { | |
416 OS.objc_msgSend(this.id_, OS.sel_otherMouseUp_1, theEvent !is null ? theEvent.id_ : null); | |
417 } | |
418 | |
419 public void pageDown (id sender) | |
420 { | |
421 OS.objc_msgSend(this.id_, OS.sel_pageDown_1, sender !is null ? sender.id_ : null); | |
422 } | |
423 | |
424 public void pageUp (id sender) | |
425 { | |
426 OS.objc_msgSend(this.id_, OS.sel_pageUp_1, sender !is null ? sender.id_ : null); | |
427 } | |
428 | |
429 public bool performKeyEquivalent (NSEvent theEvent) | |
430 { | |
431 return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id_ : null) !is null; | |
432 } | |
433 | |
434 public bool performMnemonic (NSString theString) | |
435 { | |
436 return OS.objc_msgSend(this.id_, OS.sel_performMnemonic_1, theString !is null ? theString.id_ : null) !is null; | |
437 } | |
438 | |
439 public bool presentError_ (NSError error) | |
440 { | |
441 return OS.objc_msgSend(this.id_, OS.sel_presentError_1, error !is null ? error.id_ : null) !is null; | |
442 } | |
443 | |
444 public void presentError_modalForWindow_delegate_didPresentSelector_contextInfo_ (NSError error, NSWindow window, id delegatee, | |
445 objc.SEL didPresentSelector, void* contextInfo) | |
446 { | |
447 OS.objc_msgSend(this.id_, OS.sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1, error !is null ? error.id_ : null, | |
448 window !is null ? window.id_ : null, delegatee !is null ? delegatee.id_ : null, didPresentSelector, contextInfo); | |
449 } | |
450 | |
451 public bool resignFirstResponder () | |
452 { | |
453 return OS.objc_msgSend(this.id_, OS.sel_resignFirstResponder) !is null; | |
454 } | |
455 | |
456 public void rightMouseDown (NSEvent theEvent) | |
457 { | |
458 OS.objc_msgSend(this.id_, OS.sel_rightMouseDown_1, theEvent !is null ? theEvent.id_ : null); | |
459 } | |
460 | |
461 public void rightMouseDragged (NSEvent theEvent) | |
462 { | |
463 OS.objc_msgSend(this.id_, OS.sel_rightMouseDragged_1, theEvent !is null ? theEvent.id_ : null); | |
464 } | |
465 | |
466 public void rightMouseUp (NSEvent theEvent) | |
467 { | |
468 OS.objc_msgSend(this.id_, OS.sel_rightMouseUp_1, theEvent !is null ? theEvent.id_ : null); | |
469 } | |
470 | |
471 public void scrollLineDown (id sender) | |
472 { | |
473 OS.objc_msgSend(this.id_, OS.sel_scrollLineDown_1, sender !is null ? sender.id_ : null); | |
474 } | |
475 | |
476 public void scrollLineUp (id sender) | |
477 { | |
478 OS.objc_msgSend(this.id_, OS.sel_scrollLineUp_1, sender !is null ? sender.id_ : null); | |
479 } | |
480 | |
481 public void scrollPageDown (id sender) | |
482 { | |
483 OS.objc_msgSend(this.id_, OS.sel_scrollPageDown_1, sender !is null ? sender.id_ : null); | |
484 } | |
485 | |
486 public void scrollPageUp (id sender) | |
487 { | |
488 OS.objc_msgSend(this.id_, OS.sel_scrollPageUp_1, sender !is null ? sender.id_ : null); | |
489 } | |
490 | |
491 public void scrollWheel (NSEvent theEvent) | |
492 { | |
493 OS.objc_msgSend(this.id_, OS.sel_scrollWheel_1, theEvent !is null ? theEvent.id_ : null); | |
494 } | |
495 | |
496 public void selectAll (id sender) | |
497 { | |
498 OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null); | |
499 } | |
500 | |
501 public void selectLine (id sender) | |
502 { | |
503 OS.objc_msgSend(this.id_, OS.sel_selectLine_1, sender !is null ? sender.id_ : null); | |
504 } | |
505 | |
506 public void selectParagraph (id sender) | |
507 { | |
508 OS.objc_msgSend(this.id_, OS.sel_selectParagraph_1, sender !is null ? sender.id_ : null); | |
509 } | |
510 | |
511 public void selectToMark (id sender) | |
512 { | |
513 OS.objc_msgSend(this.id_, OS.sel_selectToMark_1, sender !is null ? sender.id_ : null); | |
514 } | |
515 | |
516 public void selectWord (id sender) | |
517 { | |
518 OS.objc_msgSend(this.id_, OS.sel_selectWord_1, sender !is null ? sender.id_ : null); | |
519 } | |
520 | |
521 public void setInterfaceStyle (NSInterfaceStyle interfaceStyle) | |
522 { | |
523 OS.objc_msgSend(this.id_, OS.sel_setInterfaceStyle_1, interfaceStyle); | |
524 } | |
525 | |
526 public void setMark (id sender) | |
527 { | |
528 OS.objc_msgSend(this.id_, OS.sel_setMark_1, sender !is null ? sender.id_ : null); | |
529 } | |
530 | |
531 public void setMenu (NSMenu menu) | |
532 { | |
533 OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null); | |
534 } | |
535 | |
536 public void setNextResponder (NSResponder aResponder) | |
537 { | |
538 OS.objc_msgSend(this.id_, OS.sel_setNextResponder_1, aResponder !is null ? aResponder.id_ : null); | |
539 } | |
540 | |
541 public bool shouldBeTreatedAsInkEvent (NSEvent theEvent) | |
542 { | |
543 return OS.objc_msgSend(this.id_, OS.sel_shouldBeTreatedAsInkEvent_1, theEvent !is null ? theEvent.id_ : null) !is null; | |
544 } | |
545 | |
546 public void showContextHelp (id sender) | |
547 { | |
548 OS.objc_msgSend(this.id_, OS.sel_showContextHelp_1, sender !is null ? sender.id_ : null); | |
549 } | |
550 | |
551 public void swapWithMark (id sender) | |
552 { | |
553 OS.objc_msgSend(this.id_, OS.sel_swapWithMark_1, sender !is null ? sender.id_ : null); | |
554 } | |
555 | |
556 public void tabletPoint (NSEvent theEvent) | |
557 { | |
558 OS.objc_msgSend(this.id_, OS.sel_tabletPoint_1, theEvent !is null ? theEvent.id_ : null); | |
559 } | |
560 | |
561 public void tabletProximity (NSEvent theEvent) | |
562 { | |
563 OS.objc_msgSend(this.id_, OS.sel_tabletProximity_1, theEvent !is null ? theEvent.id_ : null); | |
564 } | |
565 | |
566 public void transpose (id sender) | |
567 { | |
568 OS.objc_msgSend(this.id_, OS.sel_transpose_1, sender !is null ? sender.id_ : null); | |
569 } | |
570 | |
571 public void transposeWords (id sender) | |
572 { | |
573 OS.objc_msgSend(this.id_, OS.sel_transposeWords_1, sender !is null ? sender.id_ : null); | |
574 } | |
575 | |
576 public bool tryToPerform (objc.SEL anAction, id anObject) | |
577 { | |
578 return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null; | |
579 } | |
580 | |
581 public NSUndoManager undoManager () | |
582 { | |
583 objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoManager); | |
584 return result !is null ? new NSUndoManager(result) : null; | |
585 } | |
586 | |
587 public void uppercaseWord (id sender) | |
588 { | |
589 OS.objc_msgSend(this.id_, OS.sel_uppercaseWord_1, sender !is null ? sender.id_ : null); | |
590 } | |
591 | |
592 public id validRequestorForSendType (NSString sendType, NSString returnType) | |
593 { | |
594 objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null, | |
595 returnType !is null ? returnType.id_ : null); | |
596 return result !is null ? new id(result) : null; | |
597 } | |
598 | |
599 public NSError willPresentError (NSError error) | |
600 { | |
601 objc.id result = OS.objc_msgSend(this.id_, OS.sel_willPresentError_1, error !is null ? error.id_ : null); | |
602 return result !is null ? new NSError(result) : null; | |
603 } | |
604 | |
605 public void yank (id sender) | |
606 { | |
607 OS.objc_msgSend(this.id_, OS.sel_yank_1, sender !is null ? sender.id_ : null); | |
608 } | |
609 | 149 |
610 } | 150 } |