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