Mercurial > projects > dwt-mac
annotate dwt/internal/cocoa/DOMKeyboardEvent.d @ 156:969e7de37c3d default tip
Fixes to get dwt to work with dmd and ldc
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Wed, 08 Jul 2009 21:56:44 +0200 |
parents | d8635bb48c7c |
children |
rev | line source |
---|---|
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
1 /******************************************************************************* |
45 | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
13
f565d3a95c0a
Ported dwt.internal
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
0
diff
changeset
|
11 * Port to the D programming language: |
45 | 12 * Jacob Carlborg <doob@me.com> |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
13 *******************************************************************************/ |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
14 module dwt.internal.cocoa.DOMKeyboardEvent; |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
15 |
45 | 16 import dwt.dwthelper.utils; |
17 import cocoa = dwt.internal.cocoa.id; | |
18 import dwt.internal.cocoa.DOMUIEvent; | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
19 import dwt.internal.cocoa.OS; |
45 | 20 import objc = dwt.internal.objc.runtime; |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
21 |
45 | 22 public class DOMKeyboardEvent : DOMUIEvent { |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
23 |
45 | 24 public this() { |
25 super(); | |
26 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
27 |
45 | 28 public this(objc.id id) { |
29 super(id); | |
30 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
31 |
45 | 32 public this(cocoa.id id) { |
33 super(id); | |
34 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
35 |
45 | 36 public bool altKey() { |
37 return OS.objc_msgSend_bool(this.id, OS.sel_altKey); | |
38 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
39 |
45 | 40 public int charCode() { |
41 return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_charCode); | |
42 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
43 |
45 | 44 public bool ctrlKey() { |
45 return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey); | |
46 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
47 |
45 | 48 public int keyCode() { |
49 return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_keyCode); | |
50 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
51 |
45 | 52 public bool metaKey() { |
53 return OS.objc_msgSend_bool(this.id, OS.sel_metaKey); | |
54 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
55 |
45 | 56 public bool shiftKey() { |
57 return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey); | |
58 } | |
0
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
59 |
380af2bdd8e5
Upload of whole dwt tree
Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
parents:
diff
changeset
|
60 } |