]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/dragdrop-listener/dragdrop-listener.factor
update windows.* for <c-array> change
[factor.git] / basis / windows / dragdrop-listener / dragdrop-listener.factor
index e9c4930b6402d986189b7ac06b9d99c7f0d8e7f2..91dfddbbff28202781bf9ceb09aedaf791ee804e 100644 (file)
@@ -1,16 +1,19 @@
-USING: windows.com windows.com.wrapper combinators\r
-windows.kernel32 windows.ole32 windows.shell32 kernel accessors\r
+USING: alien.strings io.encodings.utf16n windows.com\r
+windows.com.wrapper combinators windows.kernel32 windows.ole32\r
+windows.shell32 kernel accessors\r
 prettyprint namespaces ui.tools.listener ui.tools.workspace\r
 alien.c-types alien sequences math ;\r
 IN: windows.dragdrop-listener\r
 \r
+<< "WCHAR" require-c-arrays >>\r
+\r
 : filenames-from-hdrop ( hdrop -- filenames )\r
     dup HEX: FFFFFFFF f 0 DragQueryFile ! get count of files\r
     [\r
         2dup f 0 DragQueryFile 1 + ! get size of filename buffer\r
         dup "WCHAR" <c-array>\r
         [ swap DragQueryFile drop ] keep\r
-        alien>u16-string\r
+        utf16n alien>string\r
     ] with map ;\r
 \r
 : filenames-from-data-object ( data-object -- filenames )\r