     dup editor-caret first2 [ swap editor-line ] dip ;
 
 M: editor delete-cursor-surrounding
-    3drop ;
-
-M: editor set-preedit-string
     3drop ;
 
 M: editor get-cursor-loc&dim

GENERIC: support-input-methods? ( gadget -- ? )
GENERIC: get-cursor-surrounding ( gadget -- text cursor-pos )
GENERIC: delete-cursor-surrounding ( offset count gadget -- )
GENERIC: set-preedit-string ( str cursor-pos gadget -- )
GENERIC: get-cursor-loc&dim ( gadget -- loc dim )

M: gadget support-input-methods? drop f ;

! Copyright (C) 2010 Anton Gorenko, Philipp Brüschweiler.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.accessors alien.c-types alien.data
alien.strings arrays assocs classes.struct command-line destructors
gdk.ffi gdk.gl.ffi glib.ffi gobject-introspection.standard-types
gobject.ffi gtk.ffi gtk.gl.ffi io.backend io.backend.unix.multiplexers
io.encodings.utf8 io.thread kernel libc literals locals math
math.bitwise math.order math.vectors namespaces sequences strings
system threads ui ui.backend ui.clipboards ui.event-loop ui.gadgets
ui.gadgets.editors ui.gadgets.private ui.gadgets.worlds ui.gestures
ui.pixel-formats ui.pixel-formats.private ui.private ;
IN: ui.backend.gtk

SINGLETON: gtk-ui-backend
