]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/lablgtksourceview/gtkSourceView.ml
ocaml 3.09 transition
[helm.git] / helm / DEVEL / lablgtksourceview / gtkSourceView.ml
index 79d448b029e4ee8169b00d5d053604491fb92aaf..d9a16a58d9b07783a67a31115d2af267546b0c0f 100644 (file)
@@ -1,26 +1,22 @@
-(* Copyright (C) 2005:
- *     Stefano Zacchiroli     <zack@cs.unibo.it>
- *     Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
+(*
+ * lablgtksourceview, OCaml binding for the GtkSourceView text widget
  *
- * This file is part of lablgtksourceview, the OCaml binding for the
- * GtkSourceView widget.
+ * Copyright (C) 2005  Stefano Zacchiroli <zack@cs.unibo.it>
  * 
- * lablgtksourceview is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
  * License, or (at your option) any later version.
- *
- * lablgtksourceview is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * 
+ * This library 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with lablgtksourceview; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * Lesser General Public License for more details.
  * 
- * For details, send a mail to the authors.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
  *)
 
 open Gtk_sourceview
@@ -31,6 +27,9 @@ open Tags
 open GtkSourceViewProps
 open GtkBase
 
+(* external gslist_of_string_list: string list -> 'a obj =
+  "ml_gslist_of_string_list" *)
+
 external _gtk_source_language_init: unit -> unit = "ml_gtk_source_language_init"
 external _gtk_source_languages_manager_init: unit -> unit =
   "ml_gtk_source_languages_manager_init"
@@ -46,6 +45,10 @@ let () =
 module SourceLanguage =
 struct
   include SourceLanguage
+  external new_from_file:
+    string -> [>`sourcelanguagesmanager] obj -> source_language obj option
+  =
+    "ml__gtk_source_language_new_from_file"
   external get_name: [>`sourcelanguage] obj -> string =
     "ml_gtk_source_language_get_name"
   external get_section: [>`sourcelanguage] obj -> string =
@@ -71,11 +74,14 @@ struct
     [>`sourcelanguagesmanager] obj -> source_language obj list
     = "ml_gtk_source_languages_manager_get_available_languages" *)
   external get_language_from_mime_type:
-    [>`sourcelanguagesmanager] obj -> source_language obj
+    [>`sourcelanguagesmanager] obj -> string -> source_language obj option
     = "ml_gtk_source_languages_manager_get_language_from_mime_type"
-(*   external get_lang_files_dirs:
+  external get_lang_files_dirs:
     [>`sourcelanguagesmanager] obj -> string list
-    = "ml_gtk_source_languages_manager_get_lang_files_dirs" *)
+    = "ml_gtk_source_languages_manager_get_lang_files_dirs"
+(*   external set_lang_files_dirs:
+    [>`sourcelanguagesmanager] obj -> string list -> unit
+    = "ml_gtk_source_languages_manager_set_lang_files_dirs" *)
 end
 
 module SourceBuffer =
@@ -104,3 +110,9 @@ struct
     "ml_gtk_source_view_new_with_buffer"
 end
 
+module SourceViewMisc =
+struct
+  external find_matching_bracket: text_iter -> bool =
+    "ml_gtk_source_iter_find_matching_bracket"
+end
+