]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/core-foundation/fsevents/fsevents.factor
factor: trim using lists
[factor.git] / basis / core-foundation / fsevents / fsevents.factor
index edf699e61ebc41cb89754900a07e56fdafcc47a0..fb216f55c4d9916f3518048dcb6a69c23eef0bd6 100644 (file)
@@ -4,9 +4,8 @@ USING: accessors alien alien.c-types alien.data alien.strings
 alien.syntax arrays assocs classes.struct combinators
 core-foundation core-foundation.arrays core-foundation.run-loop
 core-foundation.strings core-foundation.time destructors init
-io.encodings.utf8 kernel locals namespaces sequences
+io.encodings.utf8 kernel namespaces sequences
 specialized-arrays unix.types ;
-FROM: namespaces => change-global ;
 IN: core-foundation.fsevents
 
 SPECIALIZED-ARRAY: void*
@@ -19,7 +18,11 @@ CONSTANT: kFSEventStreamCreateFlagNoDefer 0x00000002
 CONSTANT: kFSEventStreamCreateFlagWatchRoot 0x00000004
 CONSTANT: kFSEventStreamCreateFlagIgnoreSelf 0x00000008
 CONSTANT: kFSEventStreamCreateFlagFileEvents 0x00000010
+CONSTANT: kFSEventStreamCreateFlagMarkSelf 0x00000020
+CONSTANT: kFSEventStreamCreateFlagUseExtendedData 0x00000040
+CONSTANT: kFSEventStreamCreateFlagFullHistory 0x00000080
 
+CONSTANT: kFSEventStreamEventFlagNone 0x00000000
 CONSTANT: kFSEventStreamEventFlagMustScanSubDirs 0x00000001
 CONSTANT: kFSEventStreamEventFlagUserDropped 0x00000002
 CONSTANT: kFSEventStreamEventFlagKernelDropped 0x00000004
@@ -28,7 +31,6 @@ CONSTANT: kFSEventStreamEventFlagHistoryDone 0x00000010
 CONSTANT: kFSEventStreamEventFlagRootChanged 0x00000020
 CONSTANT: kFSEventStreamEventFlagMount 0x00000040
 CONSTANT: kFSEventStreamEventFlagUnmount 0x00000080
-
 CONSTANT: kFSEventStreamEventFlagItemCreated 0x00000100
 CONSTANT: kFSEventStreamEventFlagItemRemoved 0x00000200
 CONSTANT: kFSEventStreamEventFlagItemInodeMetaMod 0x00000400
@@ -40,6 +42,10 @@ CONSTANT: kFSEventStreamEventFlagItemXattrMod 0x00008000
 CONSTANT: kFSEventStreamEventFlagItemIsFile 0x00010000
 CONSTANT: kFSEventStreamEventFlagItemIsDir 0x00020000
 CONSTANT: kFSEventStreamEventFlagItemIsSymlink 0x00040000
+CONSTANT: kFSEventStreamEventFlagItemOwnEvent 0x00080000
+CONSTANT: kFSEventStreamEventFlagItemIsHardlink 0x00100000
+CONSTANT: kFSEventStreamEventFlagItemIsLastHardlink 0x00200000
+CONSTANT: kFSEventStreamEventFlagItemCloned 0x00400000
 
 TYPEDEF: uint FSEventStreamCreateFlags
 TYPEDEF: uint FSEventStreamEventFlags
@@ -123,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 )
@@ -170,7 +176,7 @@ SYMBOL: event-stream-callbacks
 
 [
     event-stream-callbacks
-    [ [ drop expired? ] assoc-reject H{ } assoc-like ] change-global
+    [ [ drop expired? ] H{ } assoc-reject-as ] change-global
 ] "core-foundation" add-startup-hook
 
 : add-event-source-callback ( quot -- id )