comparison dwt/internal/cocoa/NSWindowController.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSWindowController; 14 module dwt.internal.cocoa.NSWindowController;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.NSDocument; 17 import dwt.internal.cocoa.NSDocument;
17 import dwt.internal.cocoa.NSResponder; 18 import dwt.internal.cocoa.NSResponder;
18 import dwt.internal.cocoa.NSString; 19 import dwt.internal.cocoa.NSString;
19 import dwt.internal.cocoa.NSWindow; 20 import dwt.internal.cocoa.NSWindow;
20 import dwt.internal.cocoa.OS; 21 import dwt.internal.cocoa.OS;
33 super(id); 34 super(id);
34 } 35 }
35 36
36 public void close () 37 public void close ()
37 { 38 {
38 OS.objc_msgSend(this.id, OS.sel_close); 39 OS.objc_msgSend(this.id_, OS.sel_close);
39 } 40 }
40 41
41 public id document () 42 public id document ()
42 { 43 {
43 objc.id result = OS.objc_msgSend(this.id, OS.sel_document); 44 objc.id result = OS.objc_msgSend(this.id_, OS.sel_document);
44 return result !is null ? new id(result) : null; 45 return result !is null ? new id(result) : null;
45 } 46 }
46 47
47 public id initWithWindow (NSWindow window) 48 public id initWithWindow (NSWindow window)
48 { 49 {
49 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindow_1, window !is null ? window.id : null); 50 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindow_1, window !is null ? window.id_ : null);
50 return result !is null ? new id(result) : null; 51 return result !is null ? new id(result) : null;
51 } 52 }
52 53
53 public id initWithWindowNibName_ (NSString windowNibName) 54 public id initWithWindowNibName_ (NSString windowNibName)
54 { 55 {
55 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindowNibName_1, windowNibName !is null ? windowNibName.id : null); 56 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibName_1, windowNibName !is null ? windowNibName.id_ : null);
56 return result !is null ? new id(result) : null; 57 return result !is null ? new id(result) : null;
57 } 58 }
58 59
59 public id initWithWindowNibName_owner_ (NSString windowNibName, id owner) 60 public id initWithWindowNibName_owner_ (NSString windowNibName, id owner)
60 { 61 {
61 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindowNibName_1owner_1, windowNibName !is null ? windowNibName.id : null, 62 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibName_1owner_1, windowNibName !is null ? windowNibName.id_ : null,
62 owner !is null ? owner.id : null); 63 owner !is null ? owner.id_ : null);
63 return result !is null ? new id(result) : null; 64 return result !is null ? new id(result) : null;
64 } 65 }
65 66
66 public id initWithWindowNibPath (NSString windowNibPath, id owner) 67 public id initWithWindowNibPath (NSString windowNibPath, id owner)
67 { 68 {
68 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithWindowNibPath_1owner_1, windowNibPath !is null ? windowNibPath.id : null, 69 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibPath_1owner_1, windowNibPath !is null ? windowNibPath.id_ : null,
69 owner !is null ? owner.id : null); 70 owner !is null ? owner.id_ : null);
70 return result !is null ? new id(result) : null; 71 return result !is null ? new id(result) : null;
71 } 72 }
72 73
73 public bool isWindowLoaded () 74 public bool isWindowLoaded ()
74 { 75 {
75 return OS.objc_msgSend(this.id, OS.sel_isWindowLoaded) !is null; 76 return OS.objc_msgSend(this.id_, OS.sel_isWindowLoaded) !is null;
76 } 77 }
77 78
78 public void loadWindow () 79 public void loadWindow ()
79 { 80 {
80 OS.objc_msgSend(this.id, OS.sel_loadWindow); 81 OS.objc_msgSend(this.id_, OS.sel_loadWindow);
81 } 82 }
82 83
83 public id owner () 84 public id owner ()
84 { 85 {
85 objc.id result = OS.objc_msgSend(this.id, OS.sel_owner); 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_owner);
86 return result !is null ? new id(result) : null; 87 return result !is null ? new id(result) : null;
87 } 88 }
88 89
89 public void setDocument (NSDocument document) 90 public void setDocument (NSDocument document)
90 { 91 {
91 OS.objc_msgSend(this.id, OS.sel_setDocument_1, document !is null ? document.id : null); 92 OS.objc_msgSend(this.id_, OS.sel_setDocument_1, document !is null ? document.id_ : null);
92 } 93 }
93 94
94 public void setDocumentEdited (bool dirtyFlag) 95 public void setDocumentEdited (bool dirtyFlag)
95 { 96 {
96 OS.objc_msgSend(this.id, OS.sel_setDocumentEdited_1, dirtyFlag); 97 OS.objc_msgSend(this.id_, OS.sel_setDocumentEdited_1, dirtyFlag);
97 } 98 }
98 99
99 public void setShouldCascadeWindows (bool flag) 100 public void setShouldCascadeWindows (bool flag)
100 { 101 {
101 OS.objc_msgSend(this.id, OS.sel_setShouldCascadeWindows_1, flag); 102 OS.objc_msgSend(this.id_, OS.sel_setShouldCascadeWindows_1, flag);
102 } 103 }
103 104
104 public void setShouldCloseDocument (bool flag) 105 public void setShouldCloseDocument (bool flag)
105 { 106 {
106 OS.objc_msgSend(this.id, OS.sel_setShouldCloseDocument_1, flag); 107 OS.objc_msgSend(this.id_, OS.sel_setShouldCloseDocument_1, flag);
107 } 108 }
108 109
109 public void setWindow (NSWindow window) 110 public void setWindow (NSWindow window)
110 { 111 {
111 OS.objc_msgSend(this.id, OS.sel_setWindow_1, window !is null ? window.id : null); 112 OS.objc_msgSend(this.id_, OS.sel_setWindow_1, window !is null ? window.id_ : null);
112 } 113 }
113 114
114 public void setWindowFrameAutosaveName (NSString name) 115 public void setWindowFrameAutosaveName (NSString name)
115 { 116 {
116 OS.objc_msgSend(this.id, OS.sel_setWindowFrameAutosaveName_1, name !is null ? name.id : null); 117 OS.objc_msgSend(this.id_, OS.sel_setWindowFrameAutosaveName_1, name !is null ? name.id_ : null);
117 } 118 }
118 119
119 public bool shouldCascadeWindows () 120 public bool shouldCascadeWindows ()
120 { 121 {
121 return OS.objc_msgSend(this.id, OS.sel_shouldCascadeWindows) !is null; 122 return OS.objc_msgSend(this.id_, OS.sel_shouldCascadeWindows) !is null;
122 } 123 }
123 124
124 public bool shouldCloseDocument () 125 public bool shouldCloseDocument ()
125 { 126 {
126 return OS.objc_msgSend(this.id, OS.sel_shouldCloseDocument) !is null; 127 return OS.objc_msgSend(this.id_, OS.sel_shouldCloseDocument) !is null;
127 } 128 }
128 129
129 public void showWindow (id sender) 130 public void showWindow (id sender)
130 { 131 {
131 OS.objc_msgSend(this.id, OS.sel_showWindow_1, sender !is null ? sender.id : null); 132 OS.objc_msgSend(this.id_, OS.sel_showWindow_1, sender !is null ? sender.id_ : null);
132 } 133 }
133 134
134 public void synchronizeWindowTitleWithDocumentName () 135 public void synchronizeWindowTitleWithDocumentName ()
135 { 136 {
136 OS.objc_msgSend(this.id, OS.sel_synchronizeWindowTitleWithDocumentName); 137 OS.objc_msgSend(this.id_, OS.sel_synchronizeWindowTitleWithDocumentName);
137 } 138 }
138 139
139 public NSWindow window () 140 public NSWindow window ()
140 { 141 {
141 objc.id result = OS.objc_msgSend(this.id, OS.sel_window); 142 objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
142 return result !is null ? new NSWindow(result) : null; 143 return result !is null ? new NSWindow(result) : null;
143 } 144 }
144 145
145 public void windowDidLoad () 146 public void windowDidLoad ()
146 { 147 {
147 OS.objc_msgSend(this.id, OS.sel_windowDidLoad); 148 OS.objc_msgSend(this.id_, OS.sel_windowDidLoad);
148 } 149 }
149 150
150 public NSString windowFrameAutosaveName () 151 public NSString windowFrameAutosaveName ()
151 { 152 {
152 objc.id result = OS.objc_msgSend(this.id, OS.sel_windowFrameAutosaveName); 153 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowFrameAutosaveName);
153 return result !is null ? new NSString(result) : null; 154 return result !is null ? new NSString(result) : null;
154 } 155 }
155 156
156 public NSString windowNibName () 157 public NSString windowNibName ()
157 { 158 {
158 objc.id result = OS.objc_msgSend(this.id, OS.sel_windowNibName); 159 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowNibName);
159 return result !is null ? new NSString(result) : null; 160 return result !is null ? new NSString(result) : null;
160 } 161 }
161 162
162 public NSString windowNibPath () 163 public NSString windowNibPath ()
163 { 164 {
164 objc.id result = OS.objc_msgSend(this.id, OS.sel_windowNibPath); 165 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowNibPath);
165 return result !is null ? new NSString(result) : null; 166 return result !is null ? new NSString(result) : null;
166 } 167 }
167 168
168 public NSString windowTitleForDocumentDisplayName (NSString displayName) 169 public NSString windowTitleForDocumentDisplayName (NSString displayName)
169 { 170 {
170 objc.id result = OS.objc_msgSend(this.id, OS.sel_windowTitleForDocumentDisplayName_1, displayName !is null ? displayName.id : null); 171 objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowTitleForDocumentDisplayName_1, displayName !is null ? displayName.id_ : null);
171 return result !is null ? new NSString(result) : null; 172 return result !is null ? new NSString(result) : null;
172 } 173 }
173 174
174 public void windowWillLoad () 175 public void windowWillLoad ()
175 { 176 {
176 OS.objc_msgSend(this.id, OS.sel_windowWillLoad); 177 OS.objc_msgSend(this.id_, OS.sel_windowWillLoad);
177 } 178 }
178 179
179 } 180 }