Mercurial > projects > dstep
annotate dstep/appkit/NSWindowScripting.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children |
rev | line source |
---|---|
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
1 /** |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
3 * Authors: Jacob Carlborg |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
4 * Version: Initial created: Sep 24, 2009 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
6 */ |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
7 module dstep.appkit.NSWindowScripting; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
8 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
9 import dstep.appkit.NSWindow; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
10 import dstep.objc.bridge.Bridge; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
11 import dstep.objc.objc; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
12 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
13 const TNSScripting = ` |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
14 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
15 bool hasCloseBox () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
16 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
17 return invokeObjcSelf!(bool, "hasCloseBox"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
18 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
19 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
20 bool hasTitleBar () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
21 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
22 return invokeObjcSelf!(bool, "hasTitleBar"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
23 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
24 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
25 bool isFloatingPanel () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
26 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
27 return invokeObjcSelf!(bool, "isFloatingPanel"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
28 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
29 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
30 bool isMiniaturizable () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
31 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
32 return invokeObjcSelf!(bool, "isMiniaturizable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
33 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
34 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
35 bool isModalPanel () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
36 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
37 return invokeObjcSelf!(bool, "isModalPanel"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
38 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
39 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
40 bool isResizable () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
41 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
42 return invokeObjcSelf!(bool, "isResizable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
43 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
44 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
45 bool isZoomable () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
46 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
47 return invokeObjcSelf!(bool, "isZoomable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
48 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
49 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
50 NSInteger orderedIndex () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
51 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
52 return invokeObjcSelf!(NSInteger, "orderedIndex"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
53 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
54 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
55 void setIsMiniaturized (bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
56 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
57 return invokeObjcSelf!(void, "setIsMiniaturized:", bool)(flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
58 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
59 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
60 void setIsVisible (bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
61 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
62 return invokeObjcSelf!(void, "setIsVisible:", bool)(flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
63 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
64 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
65 void setIsZoomed (bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
66 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
67 return invokeObjcSelf!(void, "setIsZoomed:", bool)(flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
68 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
69 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
70 void setOrderedIndex (NSInteger index) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
71 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
72 return invokeObjcSelf!(void, "setOrderedIndex:", NSInteger)(index); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
73 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
74 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
75 Object handleCloseScriptCommand (NSCloseCommand command) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
76 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
77 return invokeObjcSelf!(Object, "handleCloseScriptCommand:", NSCloseCommand)(command); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
78 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
79 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
80 Object handlePrintScriptCommand (NSScriptCommand command) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
81 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
82 return invokeObjcSelf!(Object, "handlePrintScriptCommand:", NSScriptCommand)(command); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
83 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
84 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
85 Object handleSaveScriptCommand (NSScriptCommand command) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
86 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
87 return invokeObjcSelf!(Object, "handleSaveScriptCommand:", NSScriptCommand)(command); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
88 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
89 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
90 //mixin ObjcBindMethod!(hasCloseBox, "hasCloseBox"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
91 //mixin ObjcBindMethod!(hasTitleBar, "hasTitleBar"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
92 //mixin ObjcBindMethod!(isFloatingPanel, "isFloatingPanel"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
93 //mixin ObjcBindMethod!(isMiniaturizable, "isMiniaturizable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
94 //mixin ObjcBindMethod!(isModalPanel, "isModalPanel"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
95 //mixin ObjcBindMethod!(isResizable, "isResizable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
96 //mixin ObjcBindMethod!(isZoomable, "isZoomable"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
97 //mixin ObjcBindMethod!(orderedIndex, "orderedIndex"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
98 //mixin ObjcBindMethod!(setIsMiniaturized, "setIsMiniaturized:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
99 //mixin ObjcBindMethod!(setIsVisible, "setIsVisible:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
100 //mixin ObjcBindMethod!(setIsZoomed, "setIsZoomed:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
101 //mixin ObjcBindMethod!(setOrderedIndex, "setOrderedIndex:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
102 //mixin ObjcBindMethod!(handleCloseScriptCommand, "handleCloseScriptCommand:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
103 //mixin ObjcBindMethod!(handlePrintScriptCommand, "handlePrintScriptCommand:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
104 //mixin ObjcBindMethod!(handleSaveScriptCommand, "handleSaveScriptCommand:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
105 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
106 `; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
107 |