webkit-demo: update for recent <ViewWindow> stack effect change
parent
56523afb29
commit
5bd27a8dee
|
@ -1,12 +1,7 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov.
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel
|
USING: cocoa cocoa.application cocoa.types cocoa.classes cocoa.windows
|
||||||
cocoa
|
core-graphics.types kernel math.bitwise ;
|
||||||
cocoa.application
|
|
||||||
cocoa.types
|
|
||||||
cocoa.classes
|
|
||||||
cocoa.windows
|
|
||||||
core-graphics.types ;
|
|
||||||
IN: webkit-demo
|
IN: webkit-demo
|
||||||
|
|
||||||
FRAMEWORK: /System/Library/Frameworks/WebKit.framework
|
FRAMEWORK: /System/Library/Frameworks/WebKit.framework
|
||||||
|
@ -18,8 +13,16 @@ IMPORT: WebView
|
||||||
WebView -> alloc
|
WebView -> alloc
|
||||||
rect f f -> initWithFrame:frameName:groupName: ;
|
rect f f -> initWithFrame:frameName:groupName: ;
|
||||||
|
|
||||||
|
: window-style ( -- n )
|
||||||
|
{
|
||||||
|
NSClosableWindowMask
|
||||||
|
NSMiniaturizableWindowMask
|
||||||
|
NSResizableWindowMask
|
||||||
|
NSTitledWindowMask
|
||||||
|
} flags ;
|
||||||
|
|
||||||
: <WebWindow> ( -- id )
|
: <WebWindow> ( -- id )
|
||||||
<WebView> rect <ViewWindow> ;
|
<WebView> rect window-style <ViewWindow> ;
|
||||||
|
|
||||||
: load-url ( window url -- )
|
: load-url ( window url -- )
|
||||||
[ -> contentView ] [ <NSString> ] bi* -> setMainFrameURL: ;
|
[ -> contentView ] [ <NSString> ] bi* -> setMainFrameURL: ;
|
||||||
|
|
Loading…
Reference in New Issue