123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(**************************************************************************)(* Lablgtk *)(* *)(* This program is free software; you can redistribute it *)(* and/or modify it under the terms of the GNU Library General *)(* Public License as published by the Free Software Foundation *)(* version 2, with the exception described in file COPYING which *)(* comes with the library. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU Library General Public License for more details. *)(* *)(* You should have received a copy of the GNU Library General *)(* Public License along with this program; if not, write to the *)(* Free Software Foundation, Inc., 59 Temple Place, Suite 330, *)(* Boston, MA 02111-1307 USA *)(* *)(* *)(**************************************************************************)typeerror=BACKENDexceptionErroroferror*stringexternal_init:unit->unit="ml_gtkspell_init"let()=_init();Callback.register_exception"gtkspell_error"(Error(BACKEND,""))(* unsafe! lifecycle of the GtkSpell struct is tied to the GtkTextView *)typetexternal_new_attach:Gtk.text_viewGtk.obj->t="ml_gtkspell_new_attach"external_is_attached:Gtk.text_viewGtk.obj->bool="ml_gtkspell_is_attached"external_get_from_text_view:Gtk.text_viewGtk.obj->toption="ml_gtkspell_get_from_text_view"external_detach:t->unit="ml_gtk_spell_checker_detach"external_set_language:t->stringoption->unit="ml_gtkspell_set_language"external_recheck_all:t->unit="ml_gtk_spell_checker_recheck_all"letattach?langview=letsc=_new_attachview#as_viewin_set_languagesclangletis_attachedview=_is_attachedview#as_viewletdetachview=match_get_from_text_viewview#as_viewwith|None->()|Somes->_detachsletrecheck_allview=match_get_from_text_viewview#as_viewwith|None->()|Somes->_recheck_allsletset_languageviewlang=match_get_from_text_viewview#as_viewwith|None->()|Somes->_set_languageslang