comparison dwt/internal/cocoa/DOMMouseEvent.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children f565d3a95c0a
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Port to the D Programming language:
3 * Jacob Carlborg <jacob.carlborg@gmail.com>
4 *******************************************************************************/
5 module dwt.internal.cocoa.DOMMouseEvent;
6
7 import dwt.dwthelper.utils;
8 import dwt.internal.cocoa.NSObject;
9
10 public class DOMMouseEvent : NSObject {
11
12 public this () {
13 super();
14 }
15
16 public this (int id) {
17 super(id);
18 }
19
20 public bool altKey () {
21 return OS.objc_msgSend(this.id, OS.sel_altKey) !is 0;
22 }
23
24 public short button () {
25 return cast(short) OS.objc_msgSend(this.id, OS.sel_button);
26 }
27
28 public int clientX () {
29 return OS.objc_msgSend(this.id, OS.sel_clientX);
30 }
31
32 public int clientY () {
33 return OS.objc_msgSend(this.id, OS.sel_clientY);
34 }
35
36 public bool ctrlKey () {
37 return OS.objc_msgSend(this.id, OS.sel_ctrlKey) !is 0;
38 }
39
40 public int detail () {
41 return OS.objc_msgSend(this.id, OS.sel_detail);
42 }
43
44 //public void initMouseEvent_______________(NSString initMouseEvent, bool canBubble, bool cancelable, DOMAbstractView view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, short button, id relatedTarget) {
45 // OS.objc_msgSend(this.id, OS.sel_initMouseEvent_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1, initMouseEvent !is null ? initMouseEvent.id : 0, canBubble, cancelable, view !is null ? view.id : 0, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget !is null ? relatedTarget.id : 0);
46 //}
47
48 //public void initMouseEvent_canBubble_cancelable_view_detail_screenX_screenY_clientX_clientY_ctrlKey_altKey_shiftKey_metaKey_button_relatedTarget_(NSString type, bool canBubble, bool cancelable, DOMAbstractView view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, short button, id relatedTarget) {
49 // OS.objc_msgSend(this.id, OS.sel_initMouseEvent_1canBubble_1cancelable_1view_1detail_1screenX_1screenY_1clientX_1clientY_1ctrlKey_1altKey_1shiftKey_1metaKey_1button_1relatedTarget_1, type !is null ? type.id : 0, canBubble, cancelable, view !is null ? view.id : 0, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget !is null ? relatedTarget.id : 0);
50 //}
51
52 public bool metaKey () {
53 return OS.objc_msgSend(this.id, OS.sel_metaKey) !is 0;
54 }
55
56 public id relatedTarget () {
57 int result = OS.objc_msgSend(this.id, OS.sel_relatedTarget);
58 return result !is 0 ? new id(result) : null;
59 }
60
61 public int screenX () {
62 return OS.objc_msgSend(this.id, OS.sel_screenX);
63 }
64
65 public int screenY () {
66 return OS.objc_msgSend(this.id, OS.sel_screenY);
67 }
68
69 public bool shiftKey () {
70 return OS.objc_msgSend(this.id, OS.sel_shiftKey) !is 0;
71 }
72
73 }