Skip to content

Commit aa8d572

Browse files
committed
add HasShadow, OrderOut, OrderFront, OrderBack with doc comments
1 parent 6eb884c commit aa8d572

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

cocoa/NSWindow.go

+31-4
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ func (w NSWindow) TitleVisibility() int64 {
142142
return w.Get("titleVisibility").Int()
143143
}
144144

145-
func (w NSWindow) SetHasShadow(b bool) {
146-
w.Set("hasShadow:", b)
147-
}
148-
149145
func (w NSWindow) SetOpaque(b bool) {
150146
w.Set("opaque:", b)
151147
}
@@ -189,6 +185,37 @@ func (w NSWindow) SetFrameDisplay(frame core.NSRect, display bool) {
189185
func (w NSWindow) CollectionBehavior() int64 {
190186
return w.Get("collectionBehavior").Int()
191187
}
188+
192189
func (w NSWindow) SetCollectionBehavior(collectionBehavior int) {
193190
w.Set("collectionBehavior:", collectionBehavior)
194191
}
192+
193+
// SetHasShadow sets a Boolean value that indicates whether the window has a shadow.
194+
// https://developer.apple.com/documentation/appkit/nswindow/1419234-hasshadow?language=objc
195+
func (w NSWindow) SetHasShadow(b bool) {
196+
w.Set("setHasShadow:", b)
197+
}
198+
199+
// HasShadow returns a Boolean value that indicates whether the window has a shadow.
200+
// https://developer.apple.com/documentation/appkit/nswindow/1419234-hasshadow?language=objc
201+
func (w NSWindow) HasShadow() bool {
202+
return w.Get("hasShadow").Bool()
203+
}
204+
205+
// OrderOut removes the window from the screen list, which hides the window.
206+
// https://developer.apple.com/documentation/appkit/nswindow/1419660-orderout?language=objc
207+
func (w NSWindow) OrderOut(sender objc.Object) {
208+
w.Send("orderOut:", sender)
209+
}
210+
211+
// OrderFront moves the window to the front of its level in the screen list, without changing either the key window or the main window.
212+
// https://developer.apple.com/documentation/appkit/nswindow/1419495-orderfront?language=objc
213+
func (w NSWindow) OrderFront(sender objc.Object) {
214+
w.Send("orderFront:", sender)
215+
}
216+
217+
// OrderBack moves the window to the back of its level in the screen list, without changing either the key window or the main window.
218+
// https://developer.apple.com/documentation/appkit/nswindow/1419204-orderback?language=objc
219+
func (w NSWindow) OrderBack(sender objc.Object) {
220+
w.Send("orderBack:", sender)
221+
}

0 commit comments

Comments
 (0)