]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/dropfiles/dropfiles.factor
factor: trim using lists
[factor.git] / basis / windows / dropfiles / dropfiles.factor
index 8460856503c9feaed97c835904dcd4fce5dee515..194502c4ebd1711d04e145069e84cb608703f14d 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2017-2018 Alexander Ilin.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien alien.data alien.libraries alien.strings
-continuations fry io.encodings.utf16n kernel literals math
-namespaces sequences ui.backend.windows ui.gadgets.worlds
-ui.gestures windows.messages windows.shell32 windows.types
-windows.user32 ;
+init io.encodings.utf16n kernel literals math namespaces
+sequences ui.backend.windows ui.gadgets.worlds
+ui.gestures windows.errors windows.messages windows.shell32
+windows.types windows.user32 ;
 IN: windows.dropfiles
 
 : filecount-from-hdrop ( hdrop -- n )
@@ -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
@@ -61,3 +61,7 @@ IN: windows.dropfiles
 
 : reject-files ( -- )
     world get world-reject-files ;
+
+[
+    f \ init-message-filter set-global
+] "init-dropfiles" add-startup-hook