ui.gestures ui.private words sorting math.vectors
ui.baseline-alignment ui.gadgets.line-support
ui.gadgets.editors ui.backend.cocoa.input-methods
-ui.backend.cocoa.input-methods.editors io.encodings.utf16n
+ui.backend.cocoa.input-methods.editors io.encodings.utf16
io.encodings.string classes.struct ;
IN: ui.backend.cocoa.views
+SLOT: window
+
: send-mouse-moved ( view event -- )
[ mouse-location ] [ drop window ] 2bi
[ move-hand fire-motion yield ] [ drop ] if* ;
:: >codepoint-index ( str utf16-index -- codepoint-index )
0 utf16-index 2 * str utf16n encode subseq utf16n decode length ;
-
+
:: >utf16-index ( str codepoint-index -- utf16-index )
0 codepoint-index str subseq utf16n encode length 2 / >integer ;