]> gitweb.factorcode.org Git - factor.git/commitdiff
classes.struct: moving to new/boa instead of <struct>/<struct-boa>
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 17 Jan 2022 01:33:09 +0000 (17:33 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 17 Jan 2022 01:33:09 +0000 (17:33 -0800)
94 files changed:
basis/alien/complex/complex-tests.factor
basis/alien/complex/functor/functor.factor
basis/calendar/unix/unix.factor
basis/calendar/windows/windows.factor
basis/classes/struct/struct.factor
basis/cocoa/messages/messages.factor
basis/cocoa/types/types.factor
basis/compiler/tests/alien.factor
basis/compression/zlib/zlib.factor
basis/core-foundation/core-foundation.factor
basis/core-foundation/fsevents/fsevents.factor
basis/core-foundation/launch-services/launch-services.factor
basis/core-graphics/types/types.factor
basis/game/input/dinput/dinput.factor
basis/game/input/xinput/xinput.factor
basis/images/loader/gdiplus/gdiplus.factor
basis/io/backend/unix/multiplexers/epoll/epoll.factor
basis/io/backend/unix/multiplexers/kqueue/kqueue.factor
basis/io/backend/unix/unix.factor
basis/io/directories/unix/linux/linux.factor
basis/io/directories/unix/unix.factor
basis/io/directories/windows/windows.factor
basis/io/files/info/unix/freebsd/freebsd.factor
basis/io/files/info/unix/linux/linux.factor
basis/io/files/info/unix/macosx/macosx.factor
basis/io/files/info/unix/unix.factor
basis/io/files/info/windows/windows.factor
basis/io/files/windows/windows.factor
basis/io/launcher/windows/windows.factor
basis/io/sockets/sockets.factor
basis/io/sockets/unix/unix.factor
basis/linux/input-events/ffi/ffi.factor
basis/math/floats/half/half-tests.factor
basis/random/sfmt/sfmt.factor
basis/specialized-arrays/specialized-arrays-tests.factor
basis/system-info/windows/windows.factor
basis/tools/deploy/windows/ico/ico.factor
basis/tools/ps/windows/windows.factor
basis/ui/backend/gtk/gtk.factor
basis/ui/backend/windows/windows.factor
basis/ui/backend/x11/x11.factor
basis/ui/text/pango/pango.factor
basis/unix/groups/groups.factor
basis/unix/process/process.factor
basis/unix/stat/stat.factor
basis/unix/time/time.factor
basis/unix/unix.factor
basis/windows/directx/dinput/constants/constants.factor
basis/windows/dragdrop-listener/dragdrop-listener.factor
basis/windows/dropfiles/dropfiles.factor
basis/windows/dwmapi/dwmapi.factor
basis/windows/hardware/hardware.factor
basis/windows/iphlpapi/iphlpapi.factor
basis/windows/offscreen/offscreen.factor
basis/windows/ole32/ole32.factor
basis/windows/powrprof/powrprof.factor
basis/windows/privileges/privileges.factor
basis/windows/registry/registry.factor
basis/windows/shell32/shell32.factor
basis/windows/streams/streams.factor
basis/windows/time/time.factor
basis/windows/types/types.factor
basis/windows/uniscribe/uniscribe.factor
basis/x11/clipboard/clipboard.factor
basis/x11/events/events.factor
basis/x11/windows/windows.factor
extra/benchmark/nbody-simd/nbody-simd.factor
extra/benchmark/struct-arrays/struct-arrays.factor
extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor
extra/chipmunk/ffi/ffi.factor
extra/classes/struct/vectored/vectored.factor
extra/cuda/devices/devices.factor
extra/file-picker/windows/windows.factor
extra/fluids/fluids.factor
extra/game/loop/benchmark/benchmark.factor
extra/gdbm/gdbm.factor
extra/gpu/demos/bunny/bunny.factor
extra/io/files/acls/macosx/macosx.factor
extra/io/files/trash/macosx/macosx.factor
extra/io/files/trash/windows/windows.factor
extra/io/serial/linux/linux.factor
extra/io/serial/windows/windows.factor
extra/macho/macho.factor
extra/random/xoshiro/xoshiro.factor
extra/raylib/demo/demo.factor
extra/raylib/demo/gui/gui.factor
extra/raylib/demo/mesh-picking/mesh-picking.factor
extra/terminal/linux/linux.factor
extra/terminal/macosx/macosx.factor
extra/terminal/windows/windows.factor
extra/time/macosx/macosx.factor
extra/time/unix/unix.factor
extra/tools/time/struct/struct.factor
extra/windows/fullscreen/fullscreen.factor

index 564f97cd385c18247f373d22465a4799a10ffc66..ff9da9ce8cb2afe2ca47a129c8c5fe5da353c1e1 100644 (file)
@@ -7,8 +7,7 @@ IN: alien.complex.tests
 STRUCT: complex-holder
     { z complex-float } ;
 
-: <complex-holder> ( z -- alien )
-    complex-holder <struct-boa> ;
+C: <complex-holder> complex-holder
 
 { } [
     C{ 1.0 2.0 } <complex-holder> "h" set
index 33a651a19c1d55501d33a1827bd8edca40399472..26f4c60419471593d5416c47dc163d5f567acf0b 100644 (file)
@@ -18,7 +18,7 @@ WHERE
 STRUCT: T-class { real N-type } { imaginary N-type } ;
 
 : <T> ( z -- alien )
-    >rect T-class <struct-boa> >c-ptr ;
+    >rect T-class boa >c-ptr ;
 
 : *T ( alien -- z )
     T-class memory>struct [ real>> ] [ imaginary>> ] bi rect> ; inline
index 3fbe252511a474a8a728d8c596e298bfef3ca18f..c888e3457df63094f5d9d7637bab17b5800983dc 100644 (file)
@@ -35,7 +35,7 @@ M: unix gmt-offset
     get-time gmtoff>> 3600 /mod 60 /mod ;
 
 : current-timeval ( -- timeval )
-    timeval <struct> [ f gettimeofday io-error ] keep ; inline
+    timeval new [ f gettimeofday io-error ] keep ; inline
 
 : system-micros ( -- n )
     current-timeval timeval>micros ;
index 0fa3f2ea208a13d55d295f108e8d53336e3fd7f2..3da219bb7fcdf45711f41b70ab9b413135cb0d6d 100644 (file)
@@ -15,7 +15,7 @@ IN: calendar.windows
             [ nip >integer ]
             [ - 1000 * >integer ] 2bi
         ]
-    } cleave \ SYSTEMTIME <struct-boa> ;
+    } cleave \ SYSTEMTIME boa ;
 
 : SYSTEMTIME>timestamp ( SYSTEMTIME -- timestamp )
     {
@@ -28,7 +28,7 @@ IN: calendar.windows
     } cleave instant <timestamp> ;
 
 M: windows gmt-offset
-    TIME_ZONE_INFORMATION <struct>
+    TIME_ZONE_INFORMATION new
     dup GetTimeZoneInformation {
         { TIME_ZONE_ID_INVALID [ win32-error ] }
         { TIME_ZONE_ID_UNKNOWN [ Bias>> ] }
@@ -37,4 +37,4 @@ M: windows gmt-offset
     } case neg 60 /mod 0 ;
 
 M: windows now-gmt
-    SYSTEMTIME <struct> [ GetSystemTime ] keep SYSTEMTIME>timestamp ;
+    SYSTEMTIME new [ GetSystemTime ] keep SYSTEMTIME>timestamp ;
index 3763d65ab12d29467c960b0e1d8d04790beaefbc..df7896a40426a3f32bef1594aec4b4bafa2b9888 100644 (file)
@@ -162,6 +162,7 @@ M: struct-class writer-quot
 : offset-of ( field struct -- offset )
     struct-slots slot-named offset>> ; inline
 
+! XXX: make this faster
 M: struct hashcode*
     nip dup >c-ptr [ struct-slot-values hashcode ] [ drop 0 ] if ; inline
 
index 780e7717b7c298587330e2362b7f705e0265be0c..b4a608aa5b66e900320a90c576b848537e4e8616 100644 (file)
@@ -40,7 +40,7 @@ super-message-senders [ H{ } clone ] initialize
 
 : <super> ( receiver -- super )
     [ ] [ object_getClass class_getSuperclass ] bi
-    objc-super <struct-boa> ;
+    objc-super boa ;
 
 TUPLE: selector-tuple name object ;
 
index 9c3058ab358776569ec2bf526a76c39664f52e08..43e0a238aea77cfae05a75e5794b68bac54f7b4a 100644 (file)
@@ -22,6 +22,8 @@ STRUCT: NSRange
     { location NSUInteger }
     { length NSUInteger } ;
 
+C: <NSRange> NSRange
+
 TYPEDEF: NSRange _NSRange
 
 ! The "lL" type encodings refer to 32-bit values even in 64-bit mode
@@ -29,9 +31,6 @@ TYPEDEF: int long32
 TYPEDEF: uint ulong32
 TYPEDEF: void* unknown_type
 
-: <NSRange> ( location length -- size )
-    NSRange <struct-boa> ;
-
 STRUCT: NSFastEnumerationState
     { state ulong }
     { itemsPtr id* }
index 7edb8402261ad7e57dfcc7e48d3f84b63000a131..faea5a6fe63ccb3cd237255fbc51a8724b0994e0 100644 (file)
@@ -762,11 +762,11 @@ mingw? [
 
 : fastcall-struct-return-ii-callback ( -- ptr )
     test-struct-11 { int int } fastcall
-    [ [ + ] [ - ] 2bi test-struct-11 <struct-boa> ] alien-callback ;
+    [ [ + ] [ - ] 2bi test-struct-11 boa ] alien-callback ;
 
 : fastcall-struct-return-iii-callback ( -- ptr )
     test-struct-11 { int int int } fastcall
-    [ [ drop + ] [ - nip ] 3bi test-struct-11 <struct-boa> ] alien-callback ;
+    [ [ drop + ] [ - nip ] 3bi test-struct-11 boa ] alien-callback ;
 
 { 8 } [
     3 4 fastcall-ii-callback [ fastcall-ii-indirect ] with-callback
index f7318500f5dcd0ebd7b8d97f70bf5a1c25ef8303..bb41d6dccd32adfa2a92a1dbe3c91ca1b13026d0 100644 (file)
@@ -53,12 +53,12 @@ ERROR: zlib-failed n string ;
 
 
 : zlib-inflate-init ( -- z_stream_s )
-    z_stream <struct>
+    z_stream new
     dup ZLIB_VERSION over byte-length inflateInit_ zlib-error ;
 
 ! window can be 0, 15, 32, 47 (others?)
 : zlib-inflate-init2 ( window -- z_stream_s )
-    [ z_stream <struct> dup ] dip
+    [ z_stream new dup ] dip
     ZLIB_VERSION pick byte-length inflateInit2_ zlib-error ;
 
 : zlib-inflate-end ( z_stream -- )
@@ -71,4 +71,4 @@ ERROR: zlib-failed n string ;
     inflate zlib-error ;
 
 : zlib-inflate-get-header ( z_stream -- gz_header )
-    gz_header <struct> [ inflateGetHeader zlib-error ] keep ;
+    gz_header new [ inflateGetHeader zlib-error ] keep ;
index e0e537b737f9afc5b160b739d2855c6f7e9f21f1..12ce61cf44dcba48f0787e2b4129f89f6190df02 100644 (file)
@@ -33,8 +33,7 @@ STRUCT: CFRange
     { location CFIndex }
     { length CFIndex } ;
 
-: <CFRange> ( location length -- range )
-    CFRange <struct-boa> ;
+C: <CFRange> CFRange
 
 FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf )
 
index c1bf42db62d39167a93aa4c952fefb48c40e0a09..15cb7894f0cce551f28706bd7e28783dd3eea273 100644 (file)
@@ -129,7 +129,7 @@ FUNCTION: void FSEventStreamShow ( FSEventStreamRef streamRef )
 FUNCTION: CFStringRef FSEventStreamCopyDescription ( FSEventStreamRef streamRef )
 
 : make-FSEventStreamContext ( info -- alien )
-    FSEventStreamContext <struct>
+    FSEventStreamContext new
         swap >>info ;
 
 :: <FSEventStream> ( callback info paths latency flags -- event-stream )
index cc72a8013c89735dc326358dc6c2647317c2804d..7b7a12d7be01615db46c905608b9c4e3b0a82345 100644 (file)
@@ -126,7 +126,7 @@ ERROR: core-foundation-error n ;
         kLSUnknownCreator
         swap <CFString> &CFRelease
         f
-        FSRef <struct>
+        FSRef new
         [ f LSFindApplicationForInfo cf-error ] keep
         fsref>string
     ] with-destructors ;
index 262c241cbf8777dd28ea6ea4bc6279e73ab09648..97e94adfb8224fe272b55c8537f9ebba1807e4ac 100644 (file)
@@ -12,15 +12,13 @@ STRUCT: CGPoint
     { x CGFloat }
     { y CGFloat } ;
 
-: <CGPoint> ( x y -- point )
-    CGPoint <struct-boa> ;
+C: <CGPoint> CGPoint
 
 STRUCT: CGSize
     { w CGFloat }
     { h CGFloat } ;
 
-: <CGSize> ( w h -- size )
-    CGSize <struct-boa> ;
+C: <CGSize> CGSize
 
 STRUCT: CGRect
     { origin CGPoint }
@@ -56,8 +54,7 @@ STRUCT: CGRect
     size>> h<< ; inline
 
 : <CGRect> ( x y w h -- rect )
-    [ CGPoint <struct-boa> ] [ CGSize <struct-boa> ] 2bi*
-    CGRect <struct-boa> ;
+    [ CGPoint boa ] [ CGSize boa ] 2bi* CGRect boa ;
 
 : CGRect-x-y ( alien -- origin-x origin-y )
     [ CGRect-x ] [ CGRect-y ] bi ;
index 78b8ac5444e615e201a15aac00ff5173d396b93c..3a69d4408a09baa01d1c827760f2222431dfb2a8 100644 (file)
@@ -41,7 +41,7 @@ SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+
     get-global IDirectInputDevice8W::SetDataFormat check-ole32-error ; inline
 
 : <buffer-size-diprop> ( size -- DIPROPDWORD )
-    DIPROPDWORD <struct> [
+    DIPROPDWORD new [
         diph>>
         DIPROPDWORD heap-size  >>dwSize
         DIPROPHEADER heap-size >>dwHeaderSize
@@ -77,11 +77,11 @@ SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+
     MOUSE-BUFFER-SIZE DIDEVICEOBJECTDATA <c-array> +mouse-buffer+ set-global ;
 
 : device-info ( device -- DIDEVICEIMAGEINFOW )
-    DIDEVICEINSTANCEW <struct>
+    DIDEVICEINSTANCEW new
         DIDEVICEINSTANCEW heap-size >>dwSize
     [ IDirectInputDevice8W::GetDeviceInfo check-ole32-error ] keep ; inline
 : device-caps ( device -- DIDEVCAPS )
-    DIDEVCAPS <struct>
+    DIDEVCAPS new
         DIDEVCAPS heap-size >>dwSize
     [ IDirectInputDevice8W::GetCapabilities check-ole32-error ] keep ; inline
 
@@ -190,7 +190,7 @@ TUPLE: window-rect < rect window-loc ;
     { 0 0 } >>dim ;
 
 : (device-notification-filter) ( -- DEV_BROADCAST_DEVICEW )
-    DEV_BROADCAST_DEVICEW <struct>
+    DEV_BROADCAST_DEVICEW new
         DEV_BROADCAST_DEVICEW heap-size >>dbcc_size
         DBT_DEVTYP_DEVICEINTERFACE >>dbcc_devicetype ;
 
@@ -323,7 +323,7 @@ CONSTANT: pov-values
     IDirectInputDevice8W::GetDeviceState check-ole32-error ;
 
 : (read-controller) ( handle template -- state )
-    swap [ DIJOYSTATE2 <struct> [ get-device-state ] keep ]
+    swap [ DIJOYSTATE2 new [ get-device-state ] keep ]
     [ fill-controller-state ] [ drop f ] with-acquisition ;
 
 M: dinput-game-input-backend read-controller
index 6a38f96e2fad16a818607199fb200be30acfd0bb..0959df79f5f8b0bbcf3b19f2313ad58aa5ad6846 100644 (file)
@@ -114,13 +114,13 @@ M: xinput-game-input-backend instance-id
     if ;
 
 M: xinput-game-input-backend read-controller
-    XINPUT_STATE <struct> [ XInputGetState drop ] keep
+    XINPUT_STATE new [ XInputGetState drop ] keep
     fill-controller-state ;
 
 M: xinput-game-input-backend calibrate-controller drop ;
 
 M: xinput-game-input-backend vibrate-controller
-    [ >vibration ] bi@ XINPUT_VIBRATION <struct-boa> XInputSetState drop ;
+    [ >vibration ] bi@ XINPUT_VIBRATION boa XInputSetState drop ;
 
 M: xinput-game-input-backend read-keyboard
     +keyboard-device+ get
index 12cb00577d17bb56c2201c3d6fdac586f8ace8a7..0f4835e683b74c47205a687483031d57b846ca87 100644 (file)
@@ -17,8 +17,7 @@ os windows? [
 
 <PRIVATE
 
-: <GpRect> ( x y w h -- rect )
-    GpRect <struct-boa> ; inline
+C: <GpRect> GpRect
 
 : stream>gdi+-bitmap ( stream -- bitmap )
     stream>IStream &com-release
index b4e941bbe8f89d1a3609f5bc9e40faffa36604b7..4aaf4f7a18ab8bb38507293debcb129fdfb25057 100644 (file)
@@ -21,7 +21,7 @@ CONSTANT: max-events 256
 M: epoll-mx dispose* fd>> close-file ;
 
 : make-event ( fd events -- event )
-    epoll-event <struct>
+    epoll-event new
         swap >>events
         tuck data>> fd<< ;
 
index 65fab251a46eb4b364fd672d9f41fe85d3cef883..9f9ed6ad5ab51ee1ab4b2d50748bd004a6bf5a83 100644 (file)
@@ -21,7 +21,7 @@ CONSTANT: max-events 256
 M: kqueue-mx dispose* fd>> close-file ;
 
 : make-kevent ( fd filter flags -- event )
-    \ kevent <struct>
+    \ kevent new
         swap >>flags
         swap >>filter
         swap >>ident ;
index d42dc575677298118ed85d330174c45fa3061653..c02eb8a9afecfb7b7abb5d7d5f48bedcf2a7f5c3 100644 (file)
@@ -62,7 +62,7 @@ M: unix can-seek-handle?
     fd>> SEEK_CUR 0 lseek -1 = not ;
 
 M: unix handle-length
-    fd>> \ stat <struct> [ fstat -1 = not ] keep
+    fd>> \ stat new [ fstat -1 = not ] keep
     swap [ st_size>> ] [ drop f ] if ;
 
 ERROR: io-timeout ;
index 8f2c61831f05b1a65d143425cfa34f73c5d00d4c..d2d95504572ab1662d120d9fc81437c2a0057048 100644 (file)
@@ -12,6 +12,6 @@ IN: io.directories.unix.linux
 
 M: linux (directory-entries)
     [
-        dirent <struct>
+        dirent new
         '[ _ _ next-dirent ] [ >directory-entry ] produce nip
     ] with-unix-directory ;
index 798f64d6195e53eda4356a521593d1425e3cd403..32b9df10b40f1b03cacbb870b251481e43ee0862 100644 (file)
@@ -73,7 +73,7 @@ M: unix copy-file
 
 M: unix (directory-entries)
     [
-        dirent <struct>
+        dirent new
         '[ _ _ next-dirent ] [ >directory-entry ] produce nip
     ] with-unix-directory ;
 
index f3e54c56f9784d097086310f1f8fa0e145e88772..a956eecf9a2b6574606f2ba2adbcd68936c10787 100644 (file)
@@ -73,7 +73,7 @@ C: <windows-directory-entry> windows-directory-entry
 
 M: windows (directory-entries)
     "\\" ?tail drop "\\*" append
-    WIN32_FIND_DATA <struct>
+    WIN32_FIND_DATA new
     find-first-file over
     [ >windows-directory-entry ] 2dip
     [
index 51966fdf272443ad319b3d74a3a758f9ad0034a8..3a4a3763198fd153f5891f24d23725c3da3d27d4 100644 (file)
@@ -33,10 +33,10 @@ M: freebsd file-systems
 M: freebsd new-file-system-info freebsd-file-system-info new ;
 
 M: freebsd file-system-statfs
-    \ statfs <struct> [ statfs-func io-error ] keep ;
+    \ statfs new [ statfs-func io-error ] keep ;
 
 M: freebsd file-system-statvfs
-    \ statvfs <struct> [ statvfs-func io-error ] keep ;
+    \ statvfs new [ statvfs-func io-error ] keep ;
 
 M: freebsd statfs>file-system-info
     {
index 5a2b07f05433cd43a06be6d41df75bdb4e9286d7..00ef82e00d7957fe7dd48ff76f76e282eeabe293 100644 (file)
@@ -14,7 +14,7 @@ namelen ;
 M: linux new-file-system-info linux-file-system-info new ;
 
 M: linux file-system-statfs
-    \ statfs64 <struct> [ statfs64 io-error ] keep ;
+    \ statfs64 new [ statfs64 io-error ] keep ;
 
 M: linux statfs>file-system-info
     {
@@ -32,7 +32,7 @@ M: linux statfs>file-system-info
     } cleave ;
 
 M: linux file-system-statvfs
-    \ statvfs64 <struct> [ statvfs64 io-error ] keep ;
+    \ statvfs64 new [ statvfs64 io-error ] keep ;
 
 M: linux statvfs>file-system-info
     {
index d78705b9226b0cd6b3618a88454ade673d3dc81b..3d258c42e57e46f209ef51fce06da75673201abc 100644 (file)
@@ -33,10 +33,10 @@ M: macosx file-systems
 M: macosx new-file-system-info macosx-file-system-info new ;
 
 M: macosx file-system-statfs
-    \ statfs64 <struct> [ statfs64-func io-error ] keep ;
+    \ statfs64 new [ statfs64-func io-error ] keep ;
 
 M: macosx file-system-statvfs
-    \ statvfs <struct> [ statvfs-func io-error ] keep ;
+    \ statvfs new [ statvfs-func io-error ] keep ;
 
 M: macosx statfs>file-system-info
     {
index ef1f57db00f81f91d50accef94a3910b5b82fc94..c6cdfd846c9ceb2e807219172ab1b03c05adb4d5 100644 (file)
@@ -190,7 +190,7 @@ CONSTANT: ALL-EXECUTE   0o0000111
     unix-1970 time- duration>microseconds make-timeval ;
 
 : timestamps>byte-array ( timestamps -- byte-array )
-    [ [ timestamp>timeval ] [ \ timeval <struct> ] if* ] map
+    [ [ timestamp>timeval ] [ \ timeval new ] if* ] map
     timeval >c-array ;
 
 PRIVATE>
index 731f815b402b474d26948c27cb2a65b8354936f5..b4529f9b8cde4272e8ad810483308d1e432d5ecb 100644 (file)
@@ -41,7 +41,7 @@ TUPLE: windows-file-info < file-info-tuple attributes ;
     } cleave ;
 
 : find-first-file-stat ( path -- WIN32_FIND_DATA )
-    WIN32_FIND_DATA <struct> [
+    WIN32_FIND_DATA new [
         FindFirstFile check-invalid-handle
         FindClose win32-error=0/f
     ] keep ;
@@ -68,7 +68,7 @@ TUPLE: windows-file-info < file-info-tuple attributes ;
 
 : get-file-information ( handle -- BY_HANDLE_FILE_INFORMATION )
     [
-        BY_HANDLE_FILE_INFORMATION <struct>
+        BY_HANDLE_FILE_INFORMATION new
         [ GetFileInformationByHandle win32-error=0/f ] keep
     ] keep CloseHandle win32-error=0/f ;
 
index ad18263548f158bde52cf3f1f9bcd45d7f6820da..233a9119ed126e40970d976559e940c9f67c6a7b 100644 (file)
@@ -36,7 +36,7 @@ CONSTANT: share-mode
     }
 
 : default-security-attributes ( -- obj )
-    SECURITY_ATTRIBUTES <struct>
+    SECURITY_ATTRIBUTES new
     SECURITY_ATTRIBUTES heap-size >>nLength ;
 
 TUPLE: FileArgs
@@ -209,7 +209,7 @@ M: windows (wait-to-read)
     [ dup handle>> refill ] with-destructors drop ;
 
 : make-fd-set ( socket -- fd_set )
-    fd_set <struct> swap 1array void* >c-array >>fd_array 1 >>fd_count ;
+    fd_set new swap 1array void* >c-array >>fd_array 1 >>fd_count ;
 
 : select-sets ( socket event -- read-fds write-fds except-fds )
     [ make-fd-set ] dip +input+ = [ f f ] [ f swap f ] if ;
@@ -367,7 +367,7 @@ M: windows normalize-path
 <PRIVATE
 
 : windows-file-size ( path -- size )
-    normalize-path 0 WIN32_FILE_ATTRIBUTE_DATA <struct>
+    normalize-path 0 WIN32_FILE_ATTRIBUTE_DATA new
     [ GetFileAttributesEx win32-error=0/f ] keep
     [ nFileSizeLow>> ] [ nFileSizeHigh>> ] bi >64bit ;
 
@@ -389,7 +389,7 @@ M: windows home
     [ StreamSize>> ] bi 2array ;
 
 : file-streams-rest ( streams handle -- streams )
-    WIN32_FIND_STREAM_DATA <struct>
+    WIN32_FIND_STREAM_DATA new
     [ FindNextStream ] 2keep
     rot zero? [
         GetLastError ERROR_HANDLE_EOF = [ win32-error ] unless
@@ -401,7 +401,7 @@ M: windows home
 : file-streams ( path -- streams )
     normalize-path
     FindStreamInfoStandard
-    WIN32_FIND_STREAM_DATA <struct>
+    WIN32_FIND_STREAM_DATA new
     0
     [ FindFirstStream ] keepd
     over INVALID_HANDLE_VALUE = [
index 7829ec5d8d99730b8d0db8d2626e4c62f5b99ddf..7a957e30032ea7054f2a84df5eda1288e4930cbf 100644 (file)
@@ -28,10 +28,10 @@ TUPLE: CreateProcess-args
 
 : default-CreateProcess-args ( -- obj )
     CreateProcess-args new
-        STARTUPINFO <struct>
+        STARTUPINFO new
         dup class-of heap-size >>cb
     >>lpStartupInfo
-    PROCESS_INFORMATION <struct> >>lpProcessInformation
+    PROCESS_INFORMATION new >>lpProcessInformation
     TRUE >>bInheritHandles
     0 >>dwCreateFlags ;
 
index da1d5c5205a1c3086faa114b41b4242973c8ad02..65e915b7f67be42a32761d86d0c36c0a59373209 100644 (file)
@@ -101,10 +101,10 @@ M: ipv4 protocol-family drop PF_INET ;
 
 M: ipv4 sockaddr-size drop sockaddr-in heap-size ;
 
-M: ipv4 empty-sockaddr drop sockaddr-in <struct> ;
+M: ipv4 empty-sockaddr drop sockaddr-in new ;
 
 : make-sockaddr-part ( inet -- sockaddr )
-    sockaddr-in <struct>
+    sockaddr-in new
         AF_INET >>family
         swap
         port>> 0 or htons >>port ; inline
@@ -173,10 +173,10 @@ M: ipv6 protocol-family drop PF_INET6 ;
 
 M: ipv6 sockaddr-size drop sockaddr-in6 heap-size ;
 
-M: ipv6 empty-sockaddr drop sockaddr-in6 <struct> ;
+M: ipv6 empty-sockaddr drop sockaddr-in6 new ;
 
 : make-sockaddr-in6-part ( inet -- sockaddr )
-    sockaddr-in6 <struct>
+    sockaddr-in6 new
         AF_INET6 >>family
         swap
         port>> 0 or htons >>port ; inline
@@ -306,7 +306,7 @@ HOOK: (send) io-backend ( bytes addrspec datagram -- )
 HOOK: addrinfo-error-string io-backend ( n -- string )
 
 : prepare-addrinfo ( -- addrinfo )
-    addrinfo <struct>
+    addrinfo new
         PF_UNSPEC >>family
         IPPROTO_TCP >>protocol ;
 
index fbb5515d2fec05252561e1c502d58ed2bff8ac4f..b7c615e0b84abf02da7e535a1d33d1218d87aaea 100644 (file)
@@ -163,12 +163,12 @@ M: local protocol-family drop PF_UNIX ;
 
 M: local sockaddr-size drop sockaddr-un heap-size ;
 
-M: local empty-sockaddr drop sockaddr-un <struct> ;
+M: local empty-sockaddr drop sockaddr-un new ;
 
 M: local make-sockaddr
     path>> absolute-path
     dup length 1 + max-un-path > [ "Path too long" throw ] when
-    sockaddr-un <struct>
+    sockaddr-un new
         AF_UNIX >>family
         swap utf8 string>alien >>path ;
 
index b2d07d83c3b06905908fb19d92e011df2cbc556d..0691e5dfd853723cdee8e638a45059f61a44aaa8 100644 (file)
@@ -160,7 +160,7 @@ CONSTANT: IOC_DIRSHIFT 30  ! SIZESHIFT + SIZEBITS
 : ctype-ioctl-inout ( handle id bytes type -- out )
     [ call-ioctl-out ] dip deref ; inline
 : struct-ioctl ( handle id struct-class -- out )
-    <struct> call-ioctl-out ; inline
+    new call-ioctl-out ; inline
 
 ! EV IOC G/S - evdev ioctl get/set
 ! EVIOCGVERSION EVIOCGID EVIOCGREP EVIOCSREP
index 41371278ebc4056dde70c10252dd52c9a40611f0..7a843cc45c59b7634eafcdeb8f82486a093bc9af 100644 (file)
@@ -40,7 +40,7 @@ STRUCT: halves
 { 8 } [ halves heap-size ] unit-test
 
 { 3.0 } [
-    halves <struct>
+    halves new
         3.0 >>dick
     dick>>
 ] unit-test
index 2ef48334489d2161db73fcdc703974f8efb4c673..d6668c1622ebaa00c09f4ebdec1df2f80bb9879f 100644 (file)
@@ -121,7 +121,7 @@ M:: sfmt generate ( sfmt -- )
     dup uint-4 cast-array ;
 
 : <sfmt-state> ( seed n m mask parity -- sfmt )
-    sfmt-state <struct>
+    sfmt-state new
         swap >>parity
         swap >>mask
         swap >>m
index 95db87e683a685eb4a6f2a0294804d570c2e938e..84c4201ee0d2a06d67fee825a6eef248b7271a7f 100644 (file)
@@ -64,7 +64,7 @@ SPECIALIZED-ARRAY: test-struct
 ] unit-test
 
 : make-point ( x y -- struct )
-    test-struct <struct-boa> ;
+    test-struct boa ;
 
 { 5/4 } [
     2 <test-struct-array>
index 7e344d3c574950174a490555396631cb3eca4897..0af078d3861e05ccbbbd3cd1eb8495c49a318d2c 100644 (file)
@@ -10,7 +10,7 @@ SPECIALIZED-ARRAY: ushort
 IN: system-info.windows
 
 : system-info ( -- SYSTEM_INFO )
-    SYSTEM_INFO <struct> [ GetSystemInfo ] keep ;
+    SYSTEM_INFO new [ GetSystemInfo ] keep ;
 
 : page-size ( -- n )
     system-info dwPageSize>> ;
@@ -24,7 +24,7 @@ IN: system-info.windows
     system-info dwOemId>> 0xffff0000 bitand ;
 
 : os-version-struct ( -- os-version )
-    OSVERSIONINFO <struct>
+    OSVERSIONINFO new
         OSVERSIONINFO heap-size >>dwOSVersionInfoSize
     dup GetVersionEx win32-error=0/f ;
 
@@ -75,7 +75,7 @@ M: windows cpu-mhz
     get-processor-power-information first MaxMhz>> 1,000,000 * ;
 
 : memory-status ( -- MEMORYSTATUSEX )
-    MEMORYSTATUSEX <struct>
+    MEMORYSTATUSEX new
     MEMORYSTATUSEX heap-size >>dwLength
     dup GlobalMemoryStatusEx win32-error=0/f ;
 
index aa706c8b9d5d35ca468a4dcea1583fc4b63954be..ff4d12b77c126d2d6da69ffd823fcabecb3f8042 100644 (file)
@@ -36,7 +36,7 @@ STRUCT: group-directory-entry
     [ {
         [ Width>> ] [ Height>> ] [ Colors>> ] [ Reserved>> ]
         [ Planes>> ] [ BitsPerPixel>> ] [ ImageSize>> ]
-    } cleave ] [ 1 + ] bi* group-directory-entry <struct-boa> >c-ptr ; inline
+    } cleave ] [ 1 + ] bi* group-directory-entry boa >c-ptr ; inline
 
 : ico-icon ( directory-entry bytes -- subbytes )
     [ [ ImageOffset>> dup ] [ ImageSize>> + ] bi ] dip subseq ; inline
index 470318edcbe765788605b393c8bc2b463859d35c..a21d8644d275b3e7ff07bf8f94d506519a34ea18 100644 (file)
@@ -10,7 +10,7 @@ IN: tools.ps.windows
     0 CreateToolhelp32Snapshot dup win32-error=0/f ;
 
 : default-process-entry ( -- obj )
-    PROCESSENTRY32 <struct> PROCESSENTRY32 heap-size >>dwSize ;
+    PROCESSENTRY32 new PROCESSENTRY32 heap-size >>dwSize ;
 
 : first-process ( handle -- PROCESSENTRY32 )
     default-process-entry
@@ -28,7 +28,7 @@ IN: tools.ps.windows
 
 : query-information-process ( HANDLE -- PROCESS_BASIC_INFORMATION )
     0
-    PROCESS_BASIC_INFORMATION <struct> [
+    PROCESS_BASIC_INFORMATION new [
         dup byte-length
         f
         NtQueryInformationProcess drop
index c9a46f99ea17cbad15dff37d2b9ff3dd983f02a5..6ec1c80ab5de227a38b6e5d7bdb6e5e6a3bfa521 100644 (file)
@@ -267,7 +267,7 @@ icon-data [ default-icon-data ] initialize
 : gadget-cursor-location ( gadget -- rectangle )
     [ screen-loc ] [ cursor-loc&dim ] bi [ v+ ] dip
     [ first2 [ >fixnum ] bi@ ] bi@
-    cairo_rectangle_int_t <struct-boa> ;
+    cairo_rectangle_int_t boa ;
 
 : update-cursor-location ( im-context gadget -- )
     gadget-cursor-location gtk_im_context_set_cursor_location ;
index d8a32647c5985fa8b401cd845e80a71eec39ef0d..b379581df6589c49be8598d5d702b0c462dd0e32 100644 (file)
@@ -85,7 +85,7 @@ CONSTANT: pfd-flag-map H{
     [ value>> ] [ 0 ] if* ;
 
 : >pfd ( attributes -- pfd )
-    [ PIXELFORMATDESCRIPTOR <struct> ] dip
+    [ PIXELFORMATDESCRIPTOR new ] dip
     {
         [ drop PIXELFORMATDESCRIPTOR c:heap-size >>nSize ]
         [ drop 1 >>nVersion ]
@@ -483,7 +483,7 @@ SYMBOL: nc-buttons
     ] if ;
 
 : make-TRACKMOUSEEVENT ( hWnd -- alien )
-    TRACKMOUSEEVENT <struct>
+    TRACKMOUSEEVENT new
         swap >>hwndTrack
         TRACKMOUSEEVENT c:heap-size >>cbSize ;
 
@@ -591,7 +591,7 @@ M: windows-ui-backend do-events
     ] if ;
 
 :: register-window-class ( class-name-ptr -- )
-    WNDCLASSEX <struct> f GetModuleHandle
+    WNDCLASSEX new f GetModuleHandle
     class-name-ptr pick GetClassInfoEx 0 = [
         WNDCLASSEX c:heap-size >>cbSize
         flags{ CS_HREDRAW CS_VREDRAW CS_OWNDC } >>style
@@ -675,7 +675,7 @@ M: windows-ui-backend do-events
 
 : set-pixel-format ( pixel-format hdc -- )
     swap handle>>
-    PIXELFORMATDESCRIPTOR <struct> SetPixelFormat win32-error=0/f ;
+    PIXELFORMATDESCRIPTOR new SetPixelFormat win32-error=0/f ;
 
 : setup-gl ( world -- )
     [ get-dc ] keep
@@ -747,18 +747,18 @@ M: windows-ui-backend system-alert
 
 : fullscreen-RECT ( hwnd -- RECT )
     MONITOR_DEFAULTTONEAREST MonitorFromWindow
-    MONITORINFOEX <struct>
+    MONITORINFOEX new
         MONITORINFOEX c:heap-size >>cbSize
     [ GetMonitorInfo win32-error=0/f ] keep rcMonitor>> ;
 
 : client-area>RECT ( hwnd -- RECT )
-    RECT <struct>
+    RECT new
     [ GetClientRect win32-error=0/f ]
     [ >c-ptr POINT cast-array [ ClientToScreen drop ] with each ]
     [ nip ] 2tri ;
 
 : hwnd>RECT ( hwnd -- RECT )
-    RECT <struct> [ GetWindowRect win32-error=0/f ] keep ;
+    RECT new [ GetWindowRect win32-error=0/f ] keep ;
 
 M: windows-ui-backend (grab-input)
     0 ShowCursor drop
@@ -807,7 +807,7 @@ CONSTANT: fullscreen-flags flags{ WS_CAPTION WS_BORDER WS_THICKFRAME }
 
 : add-tray-icon ( title -- )
     NIM_ADD
-    NOTIFYICONDATA <struct>
+    NOTIFYICONDATA new
         NOTIFYICONDATA heap-size >>cbSize
         NOTIFYICON_VERSION_4 over timeout-version>> uVersion<<
         NIF_TIP NIF_ICON bitor >>uFlags
@@ -818,7 +818,7 @@ CONSTANT: fullscreen-flags flags{ WS_CAPTION WS_BORDER WS_THICKFRAME }
 
 : remove-tray-icon ( -- )
     NIM_DELETE
-    NOTIFYICONDATA <struct>
+    NOTIFYICONDATA new
         NOTIFYICONDATA heap-size >>cbSize
         world get handle>> hWnd>> >>hWnd
     Shell_NotifyIcon win32-error=0/f ;
index 8165898bc1a9617b11c07c458971aa49820999ae..de09ecd03563b6b8ffb06fbf8af6dfc77d1a8753 100644 (file)
@@ -254,7 +254,7 @@ M: x11-ui-backend set-title
     [ dpy get ] 2dip [ set-title-old ] [ set-title-new ] 3bi ;
 
 : make-fullscreen-msg ( window ? -- msg )
-    XClientMessageEvent <struct>
+    XClientMessageEvent new
         ClientMessage >>type
         dpy get >>display
         XA_NET_WM_STATE >>message_type
@@ -286,7 +286,7 @@ M: x11-ui-backend (open-window)
     tri ;
 
 : make-raise-window-msg ( window -- msg )
-    XClientMessageEvent <struct>
+    XClientMessageEvent new
         ClientMessage >>type
         1 >>send_event
         dpy get >>display
@@ -341,7 +341,7 @@ PRIVATE>
 M: x11-ui-backend system-alert
     "\n\n" glue xmessage ;
 
-: black ( -- xcolor ) 0 0 0 0 0 0 XColor <struct-boa> ; inline
+: black ( -- xcolor ) 0 0 0 0 0 0 XColor boa ; inline
 
 M:: x11-ui-backend (grab-input) ( handle -- )
     handle window>>                                                  :> wnd
index 6679362e292c3673a6b323dda4993d78941067bc..29cbe14d93dd68658ba5de4712cb860e8de18fae 100644 (file)
@@ -43,8 +43,8 @@ SYMBOL: dpi
     <rect> ;
 
 : layout-extents ( layout -- ink-rect logical-rect )
-    PangoRectangle <struct>
-    PangoRectangle <struct>
+    PangoRectangle new
+    PangoRectangle new
     [ pango_layout_get_extents ] 2keep
     [ PangoRectangle>rect ] bi@ ;
 
index d214ebef833aac70a4953e9e1865c1e394bd7ae6..45e24a4ced19f9b4fa53244f8351ac754fb6dd13 100644 (file)
@@ -18,7 +18,7 @@ GENERIC: group-struct ( obj -- group/f )
     gr_mem>> utf8 alien>strings ;
 
 : (group-struct) ( id -- group-struct id group-struct byte-array length void* )
-    [ unix.ffi:group <struct> ] dip over 4096
+    [ unix.ffi:group new ] dip over 4096
     [ <byte-array> ] keep f void* <ref> ;
 
 : check-group-struct ( group-struct ptr -- group-struct/f )
index e5570394acca8009692c24f34dc4771e7caa04c4..417a15b6f86dc7226f574b956d75713504496933 100644 (file)
@@ -83,7 +83,7 @@ CONSTANT: POSIX_SPAWN_PCONTROL_KILL       0x0003
     dup 0 = [ drop ] [ (throw-errno) ] if ;
 
 : posix-spawn-file-actions-init ( -- posix_spawn_file_actions_t )
-    posix_spawn_file_actions_t <struct>
+    posix_spawn_file_actions_t new
     [ posix_spawn_file_actions_init check-posix ] keep ;
 
 : posix-spawn-file-actions-destroy ( posix_spawn_file_actions_t -- )
index 417ca094fd9c9c8d50e16bed0da342c5df813e58..67efa45e9c2ad704c0fcf52b18c22aa7d9d61393 100644 (file)
@@ -24,7 +24,7 @@ TYPEDEF: fsid fsid_t
 << "unix.stat." os name>> append require >>
 
 : file-status ( pathname -- stat )
-    \ stat <struct> [ [ stat-func ] unix-system-call drop ] keep ;
+    \ stat new [ [ stat-func ] unix-system-call drop ] keep ;
 
 : link-status ( pathname -- stat )
-    \ stat <struct> [ [ lstat ] unix-system-call drop ] keep ;
+    \ stat new [ [ lstat ] unix-system-call drop ] keep ;
index 71c34046d89dfc1a830a3406c7eb54825e70e143..0935f3a7fb184c41fa35149e843c09dc9e79f19d 100644 (file)
@@ -13,17 +13,17 @@ STRUCT: timespec
     { nsec long } ;
 
 : <timeval> ( sec usec -- timeval )
-    timeval <struct>
+    timeval new
         swap >>usec
         swap >>sec ; inline
 
 : make-timeval ( us -- timeval )
-    [ timeval <struct> ] dip [
+    [ timeval new ] dip [
         1000000 /mod [ >>sec ] [ >>usec ] bi*
     ] unless-zero ;
 
 : make-timespec ( nanos -- timespec )
-    [ timespec <struct> ] dip [
+    [ timespec new ] dip [
         1000000000 /mod [ >>sec ] [ >>nsec ] bi*
     ] unless-zero ;
 
index 7c61cd531fe15a2eaab522c3ba1feaeb5a5381b0..da7b8a1594ca1c613a50a015dcd3f97b904eec33 100644 (file)
@@ -73,7 +73,7 @@ M: unix open-file [ open ] unix-system-call ;
 : touch ( filename -- ) f [ utime ] unix-system-call drop ;
 
 : change-file-times ( filename access modification -- )
-    utimbuf <struct>
+    utimbuf new
         swap >>modtime
         swap >>actime
         [ utime ] unix-system-call drop ;
index 18a0e417509fe13aa8e517bbb415d64832f487a2..f7ab901417d80bf20d438ee6afd6980a8b9ec6a8 100644 (file)
@@ -54,7 +54,7 @@ M: array array-base-type first ;
         [ fourth (flags) ]
         [ 4 swap nth (flag) ]
     } cleave
-    DIOBJECTDATAFORMAT <struct-boa> ;
+    DIOBJECTDATAFORMAT boa ;
 
 : make-DIOBJECTDATAFORMAT-arrays ( struct array -- values vars )
     [ [ <DIOBJECTDATAFORMAT> ] [ first ] bi ] with
@@ -73,7 +73,7 @@ M: array array-base-type first ;
 MACRO: <DIDATAFORMAT> ( dwFlags dwDataSize struct rgodf-array -- alien )
     [ DIDATAFORMAT heap-size DIOBJECTDATAFORMAT heap-size ] 4dip
     [ nip length ] [ make-DIOBJECTDATAFORMAT-array-quot ] 2bi
-    '[ _ _ _ _ _ @ DIDATAFORMAT <struct-boa> ] ;
+    '[ _ _ _ _ _ @ DIDATAFORMAT boa ] ;
 
 : (malloc-guid-symbol) ( symbol guid -- )
     '[ _ malloc-byte-array ] initialize ;
index c63ba980147a8377fbb32931b51ee30543732c06..cb4e3677ab97c7c49305150e4d1e95de8f5bf2f9 100644 (file)
@@ -8,13 +8,13 @@ windows.kernel32 windows.ole32 windows.user32 ;
 IN: windows.dragdrop-listener
 
 : handle-data-object ( handler:  ( hdrop -- x ) data-object -- filenames )
-    FORMATETC <struct>
+    FORMATETC new
         CF_HDROP         >>cfFormat
         f                >>ptd
         DVASPECT_CONTENT >>dwAspect
         -1               >>lindex
         TYMED_HGLOBAL    >>tymed
-    STGMEDIUM <struct>
+    STGMEDIUM new
     [ IDataObject::GetData ] keep swap succeeded? [
         dup data>>
         [ rot execute( hdrop -- x ) ] with-global-lock
index 128b0ae18545e6e24c1de9d446f8f811ff74f628..320a2f1fe05ce59a47bda0e2fe9bbf09724838de 100644 (file)
@@ -20,7 +20,7 @@ IN: windows.dropfiles
     ] with map ;
 
 ! : point-from-hdrop ( hdrop -- loc )
-!    POINT <struct> [ DragQueryPoint drop ] keep [ x>> ] [ y>> ] bi 2array ;
+!    POINT new [ DragQueryPoint drop ] keep [ x>> ] [ y>> ] bi 2array ;
 
 : handle-wm-dropfiles ( hdrop -- )
     <alien> [ filenames-from-hdrop dropped-files set-global ] [ DragFinish ] bi
index 86c35a4527d4c2bb57f0a15b8c717cecd49530a3..3a688dbad8bb08e933e7649ac7a2e0aa7be9dc4c 100644 (file)
@@ -11,15 +11,14 @@ STRUCT: MARGINS
     { cyTopHeight    int }
     { cyBottomHeight int } ;
 
+C: <MARGINS> MARGINS
+
 STRUCT: DWM_BLURBEHIND
     { dwFlags                DWORD   }
     { fEnable                BOOL    }
     { hRgnBlur               HANDLE  }
     { fTransitionOnMaximized BOOL    } ;
 
-: <MARGINS> ( l r t b -- MARGINS )
-    MARGINS <struct-boa> ; inline
-
 : full-window-margins ( -- MARGINS )
     -1 -1 -1 -1 <MARGINS> ; inline
 
index b7d7e4516735f2bf910c32cc140cabb39e16c4e5..b0594793408bb19abe49779e968a506458e67084 100644 (file)
@@ -9,7 +9,7 @@ IN: windows.hardware
     BOOL { HMONITOR HDC LPRECT LPARAM } stdcall [
         4dup 4array .
         3drop
-        MONITORINFOEX <struct> dup byte-length >>cbSize
+        MONITORINFOEX new dup byte-length >>cbSize
         [ GetMonitorInfo win32-error=0/f ] keep ... flush
         TRUE
     ] alien-callback ;
index 8394b3bdf4db9531118d30e91359bef4792c4afb..dac8e0a12c430b89306475b4f07450515114f2f2 100644 (file)
@@ -386,7 +386,7 @@ FUNCTION: DWORD GetAdaptersInfo (
 FUNCTION: DWORD GetNetworkParams ( PFIXED_INFO pFixedInfo, PULONG pOutBufLen )
 
 : get-fixed-info ( -- FIXED_INFO )
-    FIXED_INFO <struct> dup byte-length ulong <ref>
+    FIXED_INFO new dup byte-length ulong <ref>
     [ GetNetworkParams n>win32-error-check ] keepd ;
 
 : dns-server-ips ( -- sequence )
index 02b72388a76a5e55890aed9fc7227cbc9df5375c..7a169ec161a2fe275199f0cb6d8115bc5466e79c 100644 (file)
@@ -7,7 +7,7 @@ IN: windows.offscreen
 
 : (bitmap-info) ( dim -- BITMAPINFO )
     [
-        BITMAPINFO <struct>
+        BITMAPINFO new
         dup bmiHeader>>
         BITMAPINFOHEADER heap-size >>biSize
     ] dip
index b4faa6da0d2e7de5c97e0924a96b3e2ecef2384a..26773412c888b000f27d15a047766515f7cc31a8 100644 (file)
@@ -173,13 +173,13 @@ CONSTANT: GUID-STRING-LENGTH
     $[ "{01234567-89ab-cdef-0123-456789abcdef}" length ]
 
 : create-guid ( -- GUID )
-    GUID <struct> dup CoCreateGuid check-ole32-error ;
+    GUID new dup CoCreateGuid check-ole32-error ;
 
 : string>guid ( string -- guid )
     "{-}" split harvest
     [ first3 [ hex> ] tri@ ]
     [ 3 tail concat 2 group [ hex> ] B{ } map-as ] bi
-    GUID <struct-boa> ;
+    GUID boa ;
 
 : guid>string ( guid -- string )
     [
index a94b4ffdf17ef2c5c059881db9197a04243e9e53..d3485277ccfc2087f6d578b724e29a394cad0447 100644 (file)
@@ -310,7 +310,7 @@ ERROR: win32-powrprof-error n ;
     dup 0 = [ drop ] [ win32-powrprof-error ] if ;
 
 : get-power-capabilities ( -- struct )
-    SYSTEM_POWER_CAPABILITIES <struct>
+    SYSTEM_POWER_CAPABILITIES new
     [ GetPwrCapabilities win32-error=0/f ] keep ;
 
 : get-processor-power-information ( -- structs )
index 1d124fcbfa8ac5de7d8f699043bd6474a52cf9d6..88b953660ea4c6846a380604c9204b4811362ca3 100644 (file)
@@ -28,11 +28,11 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES
     [ CloseHandle drop ] finally ; inline
 
 : lookup-privilege ( string -- luid )
-    [ f ] dip LUID <struct>
+    [ f ] dip LUID new
     [ LookupPrivilegeValue win32-error=0/f ] keep ;
 
 :: make-token-privileges ( name enabled? -- obj )
-    TOKEN_PRIVILEGES <struct>
+    TOKEN_PRIVILEGES new
         1 >>PrivilegeCount
         LUID_AND_ATTRIBUTES malloc-struct &free
             enabled? [ SE_PRIVILEGE_ENABLED >>Attributes ] when
index f6568e314f0025ec4451cb544c968c8af9592d35..21e326539ff59fc7b5b7ed925a760e07b108ea5d 100644 (file)
@@ -132,7 +132,7 @@ TUPLE: registry-enum-key ;
     0 DWORD <ref> dup :> max-value
     0 DWORD <ref> dup :> max-value-data
     0 DWORD <ref> dup :> security-descriptor
-    FILETIME <struct> dup :> last-write-time
+    FILETIME new dup :> last-write-time
     RegQueryInfoKey :> ret
     ret ERROR_SUCCESS = [
         key
index 89dd6a89caa251d1d0e7b5f68ba4bbe9ebdf145d..8dcc5ea85048c5ded062cfd3ef2a07484507aa33 100644 (file)
@@ -125,7 +125,7 @@ FUNCTION: DWORD_PTR SHGetFileInfoW ( LPCTSTR pszPath,
 : shell32-file-info ( path -- err struct )
     normalize-path
     0
-    SHFILEINFO <struct>
+    SHFILEINFO new
     [ dup byte-length SHGFI_EXETYPE SHGetFileInfoW ] keep ;
 
 SINGLETONS:
index 6bbb2aa55e18fbd38789f8ee1b466ca91074cd0e..74c712ddff3695416d4c386c3b5ad2a213e6f2b3 100644 (file)
@@ -82,9 +82,9 @@ SPECIALIZED-ARRAY: uchar
             f >>pwcsName
             STGTY_STREAM >>type
             stream stream-size >>cbSize
-            FILETIME <struct> >>mtime
-            FILETIME <struct> >>ctime
-            FILETIME <struct> >>atime
+            FILETIME new >>mtime
+            FILETIME new >>ctime
+            FILETIME new >>atime
             STGM_READWRITE >>grfMode
             0 >>grfLocksSupported
             GUID_NULL >>clsid
index dea0e7de4001e7d32b27afc3f2fe2cc3988cd1a1..16663593c078f284d1137286640348d60611ab6d 100644 (file)
@@ -17,7 +17,7 @@ IN: windows.time
     [ windows-1601 ] dip 10,000,000 /i +second ;
 
 : windows-time ( -- n )
-    FILETIME <struct> [ GetSystemTimeAsFileTime ] keep
+    FILETIME new [ GetSystemTimeAsFileTime ] keep
     FILETIME>windows-time ;
 
 : timestamp>windows-time ( timestamp -- n )
@@ -25,7 +25,7 @@ IN: windows.time
     >gmt windows-1601 (time-) 10,000,000 * >integer ;
 
 : windows-time>FILETIME ( n -- FILETIME )
-    [ FILETIME <struct> ] dip
+    [ FILETIME new ] dip
     [ 32 bits >>dwLowDateTime ] [ -32 shift >>dwHighDateTime ] bi ;
 
 : timestamp>FILETIME ( timestamp -- FILETIME/f )
index e6edc14dd178138d577507b777d321b0198647d4..e6fe0622428861cfacf3839a31318b70c13d70c1 100644 (file)
@@ -322,7 +322,7 @@ STRUCT: PIXELFORMATDESCRIPTOR
     { dwDamageMask DWORD } ;
 
 : <RECT> ( loc dim -- RECT )
-    dupd v+ [ first2 ] bi@ RECT <struct-boa> ;
+    dupd v+ [ first2 ] bi@ RECT boa ;
 
 TYPEDEF: RECT* PRECT
 TYPEDEF: RECT* LPRECT
index 6bc7a05008fdb8f108afc591be1e914ce52baa69..08f33b0f1755ef984d2678ef62eabe9d56c543b6 100644 (file)
@@ -131,7 +131,7 @@ PRIVATE>
     [ cx>> ] [ cy>> ] bi 2array ;
 
 : dc-metrics ( dc -- metrics )
-    TEXTMETRICW <struct>
+    TEXTMETRICW new
     [ GetTextMetrics drop ] keep
     TEXTMETRIC>metrics ;
 
index 82913b81122879928fc1b327cf27ff084588e3d8..dd97faf9741238a91cf5d3b851be73f247bf129d 100644 (file)
@@ -57,7 +57,7 @@ TUPLE: x-clipboard atom contents ;
     1 XChangeProperty drop ;
 
 : send-notify ( evt prop -- )
-    XSelectionEvent <struct>
+    XSelectionEvent new
     SelectionNotify >>type
     swap >>property
     over display>>   >>display
index c71f0a6f2328e309bcc9dd90a0a55e0a27691b3c..ec4e6ed5850b66927459f01cfe753a148f3c157f 100644 (file)
@@ -36,10 +36,10 @@ GENERIC: selection-request-event ( event window -- )
 GENERIC: client-event ( event window -- )
 
 : next-event ( -- event )
-    dpy get XEvent <struct> [ XNextEvent drop ] keep ;
+    dpy get XEvent new [ XNextEvent drop ] keep ;
 
 : mask-event ( mask -- event )
-    [ dpy get ] dip XEvent <struct> [ XMaskEvent drop ] keep ;
+    [ dpy get ] dip XEvent new [ XMaskEvent drop ] keep ;
 
 : events-queued ( mode -- n ) [ dpy get ] dip XEventsQueued ;
 
index b0d6ce3d7006d8c5fe6ccb8c7ab2dcac17352799..6b3cd1e3a1ec878c495a7353e44eb0c2dacb7006 100644 (file)
@@ -28,14 +28,14 @@ CONSTANT: event-mask
     }
 
 : window-attributes ( visinfo -- attributes )
-    XSetWindowAttributes <struct>
+    XSetWindowAttributes new
     0 >>background_pixel
     0 >>border_pixel
     event-mask >>event_mask
     swap create-colormap >>colormap ;
 
 : set-size-hints ( window -- )
-    XSizeHints <struct>
+    XSizeHints new
     USPosition >>flags
     [ dpy get ] 2dip XSetWMNormalHints ;
 
index 6e8a0bb3da300f3608639cee37d68d19ad424e20..1c628ca4313855e3e7119a4bdc1fc225d64a29b6 100644 (file)
@@ -17,7 +17,7 @@ STRUCT: body
 SPECIALIZED-ARRAY: body
 
 : <body> ( location velocity mass -- body )
-    [ days-per-year v*n ] [ solar-mass * ] bi* body <struct-boa> ; inline
+    [ days-per-year v*n ] [ solar-mass * ] bi* body boa ; inline
 
 : <jupiter> ( -- body )
     double-4{ 4.84143144246472090e00 -1.16032004402742839e00 -1.03622044471123109e-01 0.0 }
index 6e1338d50b354bbb3100a5f0ac80f0868a981e14..42b1abdbd0bf97b2458cea0c8be32845c28041cb 100644 (file)
@@ -37,7 +37,7 @@ SPECIALIZED-ARRAY: point
     [ x>> max ] [ y>> max ] [ z>> max ] change-xyz ; inline
 
 : <zero-point> ( -- point )
-    0 0 0 point <struct-boa> ; inline
+    0 0 0 point boa ; inline
 
 : max-points ( points -- point )
     <zero-point> [ max-point ] reduce ; inline
index 7f4702082100dac904586574944935982b4afa8b..a68a3fd37db3afa259e1efb7179e61cf6e455234 100644 (file)
@@ -20,7 +20,7 @@ STRUCT: yuv-buffer
 :: fake-data ( -- rgb yuv )
     1600 :> w
     1200 :> h
-    yuv-buffer <struct> :> buffer
+    yuv-buffer new :> buffer
     w h * 3 * <byte-array> :> rgb
     rgb buffer
         w >>y_width
index d4e52711dff52fc0f5800abbb0f14039bcebc03b..3a224a50ab457f735f56906b829ff395ae36ce6f 100644 (file)
@@ -36,7 +36,7 @@ CONSTANT: CP_ALL_LAYERS 0xffffffff
 
 ! cpVect.h
 TYPED: cpv ( x y -- v: cpVect )
-    cpVect <struct-boa> ; inline
+    cpVect boa ; inline
 
 TYPED: cpvzero ( -- v: cpVect )
     0.0 0.0 cpv ; inline
@@ -146,7 +146,7 @@ STRUCT: cpBB
     { t cpFloat } ;
 
 TYPED: cpBBNew ( l b r t -- cpbb: cpBB )
-    cpBB <struct-boa> ; inline
+    cpBB boa ; inline
 
 TYPED: cpBBintersects ( a: cpBB b: cpBB -- ? )
     {
index a9be5fe966051acfa4bd16d35b21ba0a9f5be5fa..1926040f5575443f9d83cefe7ffb6c668548b5a4 100644 (file)
@@ -41,7 +41,7 @@ MACRO: (vectored-slots) ( struct-class -- quot: ( n -- slots... ) )
 
 MACRO: (vectored-element>) ( struct-class -- quot: ( elt -- struct ) )
     [ struct-slots [ name>> reader-word 1quotation ] map ] keep
-    '[ _ cleave _ <struct-boa> ] ;
+    '[ _ cleave _ boa ] ;
 
 SLOT: (n)
 SLOT: (vectored)
index 96ae3a8d3bbb5d8f3f7889a14494708eb00d213b..038f4d2dddbf1d9d54696e4ac03b866c91dd5709 100644 (file)
@@ -20,7 +20,7 @@ IN: cuda.devices
     [ enumerate-cuda-devices ] dip '[ 0 _ with-cuda-context ] each ; inline
 
 : cuda-device-properties ( n -- properties )
-    [ CUdevprop <struct> ] dip
+    [ CUdevprop new ] dip
     [ cuDeviceGetProperties cuda-error ] keepd ;
 
 : cuda-devices ( -- assoc )
index 8e83539fe7c1d93ae82127135228faefeef6bf07..dcb564290017531398bdd5aca97ae14946861666 100644 (file)
@@ -61,7 +61,7 @@ FUNCTION: BOOL SHGetPathFromIDList (
 
 M: windows open-file-dialog
     [
-        BROWSEINFO <struct>
+        BROWSEINFO new
             GetDesktopWindow >>hwndOwner
             "Select a file or folder" utf8 malloc-string &free >>lpszTitle
             BIF_BROWSEINCLUDEFILES >>ulFlags
index 20a2033c7f38de2ab0270e8467c3201d53a6f611..26f6494da4b2f9c5dc05e0f549e3e6e1b2d73e29 100644 (file)
@@ -23,7 +23,7 @@ CONSTANT: gravity { 0.0 -0.1 }
     particle [ p>> ] [ v>> ] bi dt v*n v+
     gravity dt dt * particle m>> 2 * / v*n v+ :> p'
     p' particle p>> v- dt v/n :> v'
-    p' v' particle m>> particle_t <struct-boa> ; inline
+    p' v' particle m>> particle_t boa ; inline
 
 CONSTANT: initial-particles
 particle_t-array{
@@ -115,6 +115,6 @@ fluids-world H{
     { T{ button-down } [ [
         hand-loc get float >c-array
         world get dim>> float >c-array v/ 2 v*n 1 v-n { 1 -1 } v*
-        float-array{ 0 0.2 } 2.0 particle_t <struct-boa> suffix
+        float-array{ 0 0.2 } 2.0 particle_t boa suffix
     ] change-particles drop ] }
 } set-gestures
index b361baefe6d5506b67e721436b617e11a8b3a0b9..cfe7fae66097fbcf9a1361b9dcacce69975ca72b 100644 (file)
@@ -13,7 +13,7 @@ STRUCT: game-loop-benchmark
 SPECIALIZED-VECTOR: game-loop-benchmark
 
 : <game-loop-benchmark> ( benchmark-data-pair tick frame -- obj )
-    \ game-loop-benchmark <struct>
+    \ game-loop-benchmark new
         swap >>frame#
         swap >>tick#
         swap >>benchmark-data-pair ; inline
index 7a09649bd8b3258f400c72a46c6cf24c3ca91268..f261d3b5fe99c8752038b631ba06be737d3af75e 100644 (file)
@@ -70,7 +70,7 @@ DESTRUCTOR: gdbm-close
 
 : object>datum ( obj -- datum )
     object>bytes [ malloc-byte-array &free ] [ length ] bi
-    datum <struct-boa> ;
+    datum boa ;
 
 : datum>object* ( datum -- obj ? )
     [ dptr>> ] [ dsize>> ] bi over
index 813e846e321348946f3ae2781016dc8fe2889922..2c1b2658a022e70b591033e3c19963109cf54c7d 100644 (file)
@@ -86,7 +86,7 @@ UNIFORM-TUPLE: loading-uniforms
     [ string>number ] map ; inline
 
 : <bunny-vertex> ( vertex -- struct )
-    bunny-vertex-struct <struct>
+    bunny-vertex-struct new
         swap first3 0.0 float-4-boa >>vertex ; inline
 
 : (read-line-tokens) ( seq stream -- seq )
index b7dbc4b3f15b5a3d5abfe7e06172dab4c1af86e4..fb56c48299f6767816636fb4d0e77560f5a8076a 100644 (file)
@@ -14,7 +14,7 @@ IN: io.files.acls.macosx
     {
         { ID_TYPE_UID [ user-name "user:" prepend ] }
         { ID_TYPE_GID [ group-name "group:" prepend ] }
-        ! [ uuid_string_t <struct> [ mbr_uuid_to_string io-error ] keep ]
+        ! [ uuid_string_t new [ mbr_uuid_to_string io-error ] keep ]
     } case ;
 
 : acl-error ( n -- ) -1 = [ throw-errno ] when ; inline
index f7be3e41793b33f140ae3d885d939036ff24f896..3865eb7ab90c133385ef9a4fece8676f03b2e436 100644 (file)
@@ -54,7 +54,7 @@ FUNCTION: OSStatus FSPathMakeRefWithOptions (
 : <fs-ref> ( path -- fs-ref )
     utf8 string>alien
     kFSPathMakeRefDoNotFollowLeafSymlink
-    FSRef <struct>
+    FSRef new
     [ f FSPathMakeRefWithOptions check-err ] keep ;
 
 PRIVATE>
index bfae7e66ee0f49de61214932064ce85a7d0f9cbd..7697c0702f0a2910e44c9d5d84c3ae301b99e6e5 100644 (file)
@@ -55,7 +55,7 @@ M: windows send-to-trash ( path -- )
         absolute-path native-string>alien B{ 0 0 } append
         malloc-byte-array &free
 
-        SHFILEOPSTRUCTW <struct>
+        SHFILEOPSTRUCTW new
             f >>hwnd
             FO_DELETE >>wFunc
             swap >>pFrom
index aa060a970edeaa9da7f86def41cc8a6a88337fc4..6c6e73621a3d4dd9b2258101cf609a7a8d6d583c 100644 (file)
@@ -23,7 +23,7 @@ IN: io.serial.linux
     stream>> in>> handle>> fd>> ;
 
 : get-fd-termios ( fd -- serial )
-    termios <struct> [ tcgetattr io-error ] keep ;
+    termios new [ tcgetattr io-error ] keep ;
 
 : set-termios ( serial -- )
     [ serial-fd get-fd-termios ] keep termios<< ;
index 4ea3d5e9e44783d858f5320282d0b00d7c8b31be..c76fff77efe0926938ed88a3f1c55ccef350f820 100644 (file)
@@ -10,7 +10,7 @@ IN: io.serial.windows
 
 : get-comm-state ( duplex -- dcb )
     in>> handle>>
-    DCB <struct> [ GetCommState win32-error=0/f ] keep ;
+    DCB new [ GetCommState win32-error=0/f ] keep ;
 
 : set-comm-state ( duplex dcb -- )
     [ in>> handle>> ] dip
index 557571962fe390f4583541730f221583b99394dc..472ceb76b79daee193960b8b0542c4a16420d74d 100644 (file)
@@ -959,7 +959,7 @@ TYPED: load-commands ( macho: mach_header_32/64 -- load-commands )
 : sections-array ( segment-commands -- sections-array )
     [
         dup first segment_command_64?
-        [ section_64 ] [ section ] if <struct> ,
+        [ section_64 ] [ section ] if new ,
         segment-commands [ segment-sections [ , ] each ] each
     ] { } make ;
 
index acfff6c26f01fe561f4c0385250df93fdee96ae9..a76aafc0b301c98ae917ebbbe063b26f0e7799fa 100644 (file)
@@ -23,7 +23,7 @@ CONSTANT: LONG-JUMP-256 {
 STRUCT: xoshiro-256-star-star { s0 ulonglong } { s1 ulonglong } { s2 ulonglong } { s3 ulonglong } ;
 
 : <xoshiro-256-star-star> ( s0 s1 s2 s3 -- obj )
-    xoshiro-256-star-star <struct>
+    xoshiro-256-star-star new
         swap >>s3
         swap >>s2
         swap >>s1
index c9957e27cc50f26c71ecaa535daec9e23ea0f265..52a6dd708877283557dfbaede1210fa112005c42 100644 (file)
@@ -24,7 +24,7 @@ SYMBOL: player
 : setup-game-vars ( -- )
     get-screen-width 2 /
     get-screen-height 2 /
-    Vector2 <struct-boa> player set ;
+    Vector2 boa player set ;
 
 ! Make this cleaner
 : change-player-position ( -- )
index 6e598212dfe9ec94e518a88213c562359a8a167f..32bb6fd698882ab507e53e21016b64f32bf9a10d 100644 (file)
@@ -12,7 +12,7 @@ IN: raylib.demo.gui
     60 set-target-fps ;
 
 : button-rec ( -- button )
-    50 50 100 100 Rectangle <struct-boa> ;
+    50 50 100 100 Rectangle boa ;
 
 : white-background ( -- )
     RAYWHITE clear-background ;
index 7be1459b9277445ae9f5ef06b25200bdfb543915..dec8196f738e701896a9a4e6cac228be6ae2fcf5 100644 (file)
@@ -12,7 +12,7 @@ CONSTANT: screen-height 800
     screen-width screen-height "raylib [models] example - mesh-picking" init-window ;
 
 : make-camera ( -- camera )
-    Camera3D <struct>
+    Camera3D new
     20 30 20 <Vector3> >>position
     0 10 0 <Vector3> >>target
     0 1.6 0 <Vector3> >>up
@@ -46,7 +46,7 @@ CONSTANT: screen-height 800
 TUPLE: hit-state name color nearest-hit ;
 : <hit-state> ( -- obj )
     "None" WHITE
-    RayCollision <struct>
+    RayCollision new
     most-positive-finite-float >>distance
     f >>hit
     hit-state boa ;
@@ -127,7 +127,7 @@ SYMBOL: mesh-picking-frame
     ! LOG_ALL set-trace-log-level
     [
         make-camera :> camera
-        Ray <struct> :> ray
+        Ray new :> ray
         init-assets :> ( tower triangle )
 
         f :> bary!
index 7d3120f5cc14196fddaca2fc4b1de4011c8b5ec3..3069bfecbcb41e8a3db380121c930ac5ad5b71ba 100644 (file)
@@ -20,7 +20,7 @@ STRUCT: winsize
 PRIVATE>
 
 M: unix (terminal-size)
-    stdout-handle fileno TIOCGWINSZ winsize <struct>
+    stdout-handle fileno TIOCGWINSZ winsize new
     [ ioctl ] keep swap 0 < [
         drop 0 0
     ] [
index 0c58e03e8336ebc42ac1eb519142530aac38ed8e..d7d682a16b0034431cc93bf74f468111897a24f1 100644 (file)
@@ -36,7 +36,7 @@ MEMO: TIOCGWINSZ ( -- x ) CHAR: t 104 winsize heap-size _IOCR ;
 PRIVATE>
 
 M: macosx (terminal-size)
-    stdout-handle fileno TIOCGWINSZ winsize <struct>
+    stdout-handle fileno TIOCGWINSZ winsize new
     [ ioctl ] keep swap 0 < [
         drop 0 0
     ] [
index ce7d2b719e8fd729081f1b544cdf4e55e804bae7..f30eef9981f221b7bc2b4bff7bb5e0e3b384199c 100644 (file)
@@ -8,7 +8,7 @@ IN: terminal.windows
 
 M: windows (terminal-size)
     STD_OUTPUT_HANDLE GetStdHandle
-    CONSOLE_SCREEN_BUFFER_INFO <struct>
+    CONSOLE_SCREEN_BUFFER_INFO new
     [ GetConsoleScreenBufferInfo ] keep swap zero? [
         drop 0 0
     ] [
index 98521f64ed23c2c6b3f96f108e29da9a184216eb..17f33abfe6d0f626c3dbcaeeaed98fed12497b67 100644 (file)
@@ -7,7 +7,7 @@ IN: time.macosx
 
 M: macosx adjust-time-monotonic
     timestamp>timeval
-    \ timeval <struct>
+    \ timeval new
     [ adjtime io-error ] keep dup binary-zero? [
         drop instant
     ] [
index 19129b360bd75f1a4007c6bb5d26f05fe23b1d7f..076c22bf2dbe9a4cc60654123faeed612b55eca1 100644 (file)
@@ -5,7 +5,7 @@ system time unix unix.time ;
 IN: time.unix
 
 : timestamp>timezone ( timestamp -- timezone )
-    gmt-offset>> duration>minutes 1 \ timezone <struct-boa> ; inline
+    gmt-offset>> duration>minutes 1 \ timezone boa ; inline
 
 M: unix set-system-time
     [ unix-1970 time- duration>microseconds >integer make-timeval ]
index 16a0549ec57e86e08e2f0d480a870f6a0595e973..f13edf085d34d45370f058477ca132d0a061c283 100644 (file)
@@ -15,14 +15,14 @@ STRUCT: benchmark-data-pair
     { stop benchmark-data } ;
 
 : <benchmark-data> ( -- benchmark-data )
-    \ benchmark-data <struct>
+    \ benchmark-data new
         nano-count >>time
         data-room >>data-room
         code-room >>code-room
         callback-room >>callback-room ; inline
 
 : <benchmark-data-pair> ( start stop -- benchmark-data-pair )
-    \ benchmark-data-pair <struct>
+    \ benchmark-data-pair new
         swap >>stop
         swap >>start ; inline
 
index ff06dcade5fd1043ce06c8b66672b8a860ad2cd8..e892fac13894ce70187c6bec30598abf34202e65 100644 (file)
@@ -14,7 +14,7 @@ IN: windows.fullscreen
     GetDesktopWindow hwnd>hmonitor ;
 
 :: (monitor-info>devmodes) ( monitor-info n -- )
-    DEVMODE <struct>
+    DEVMODE new
         DEVMODE heap-size >>dmSize
         flags{ DM_BITSPERPEL DM_PELSWIDTH DM_PELSHEIGHT } >>dmFields
     :> devmode
@@ -31,7 +31,7 @@ IN: windows.fullscreen
     [ 0 (monitor-info>devmodes) ] { } make ;
 
 : hmonitor>monitor-info ( HMONITOR -- monitor-info )
-    MONITORINFOEX <struct>
+    MONITORINFOEX new
         MONITORINFOEX heap-size >>cbSize
     [ GetMonitorInfo win32-error=0/f ] keep ;
 
@@ -48,7 +48,7 @@ IN: windows.fullscreen
     desktop-hmonitor hmonitor>monitor-info ;
 
 : desktop-RECT ( -- RECT )
-    GetDesktopWindow RECT <struct> [ GetWindowRect win32-error=0/f ] keep ;
+    GetDesktopWindow RECT new [ GetWindowRect win32-error=0/f ] keep ;
 
 ERROR: display-change-error n ;