Handbook
Glossary
<ViewWindow> ( view rect style -- window )
Cocoa bridge
ยป
Cocoa window utilities
Prev:
<NSWindow> ( rect style class -- window )
Vocabulary
cocoa
.
windows
Inputs
view
an
NSView
rect
an
NSRect
style
a style mask
Outputs
window
an
NSWindow
Word description
Creates a new
NSWindow
with the specified dimensions, containing the given view.
Definition
USING:
alien.c-types
cocoa.messages
cocoa.runtime
kernel
;
IN:
cocoa.windows
:
<ViewWindow>
( view rect style -- window )
dup
class-for-style
<NSWindow>
[
swap
{
void
{
id
SEL
id
}
}
"setContentView:"
send
]
keep
dup
dup
{
id
{
id
SEL
}
}
"contentView"
send
{
void
{
id
SEL
id
}
}
"setInitialFirstResponder:"
send
dup
1
{
void
{
id
SEL
char
}
}
"setAcceptsMouseMovedEvents:"
send
dup
0
{
void
{
id
SEL
char
}
}
"setReleasedWhenClosed:"
send
;