]> gitweb.factorcode.org Git - factor.git/commitdiff
windows.dragdrop-listener: add a helper word
authorAlexander Iljin <ajsoft@yandex.ru>
Thu, 17 Aug 2017 21:43:51 +0000 (00:43 +0300)
committerAlexander Iljin <ajsoft@yandex.ru>
Thu, 17 Aug 2017 23:21:54 +0000 (02:21 +0300)
basis/windows/dragdrop-listener/dragdrop-listener.factor

index 34bef347d0da5cb75b0748b99aad48994a1ec973..2ac08bdccdc05fc55d902c6eea9f9e490b0dd038 100644 (file)
@@ -7,8 +7,11 @@ windows.shell32 windows.types ;
 SPECIALIZED-ARRAY: WCHAR
 IN: windows.dragdrop-listener
 
+: filecount-from-hdrop ( hdrop -- n )
+    0xFFFFFFFF f 0 DragQueryFile ;
+
 : filenames-from-hdrop ( hdrop -- filenames )
-    dup 0xFFFFFFFF f 0 DragQueryFile ! get count of files
+    dup filecount-from-hdrop
     [
         2dup f 0 DragQueryFile 1 + ! get size of filename buffer
         dup WCHAR <c-array>