]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/game/input/dinput/dinput.factor
classes.struct: moving to new/boa instead of <struct>/<struct-boa>
[factor.git] / basis / game / input / dinput / dinput.factor
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