aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/preferences.mli
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-08-16 00:32:23 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-08-16 03:51:20 +0200
commit2c70dd6a256ed4cac2b74bd0c8719ab37fffcb84 (patch)
tree4d39756908a91c73535628bbb648018799670d1b /ide/preferences.mli
parent2bb05717bde540332aa814a59da3745f2097dedf (diff)
Simplifying CoqIDE preferences mechanism.
We use a class-based system instead of the old record-based system. This allows for more uniformity and the possibility to define complex interactions with preferences based on GTK signals. This will allow to simplify some architectural choices.
Diffstat (limited to 'ide/preferences.mli')
-rw-r--r--ide/preferences.mli19
1 files changed, 19 insertions, 0 deletions
diff --git a/ide/preferences.mli b/ide/preferences.mli
index 1e4f152c2..8e1d926ac 100644
--- a/ide/preferences.mli
+++ b/ide/preferences.mli
@@ -12,6 +12,25 @@ val style_manager : GSourceView2.source_style_scheme_manager
type project_behavior = Ignore_args | Append_args | Subst_args
type inputenc = Elocale | Eutf8 | Emanual of string
+class type ['a] repr =
+object
+ method into : string list -> 'a option
+ method from : 'a -> string list
+end
+
+class ['a] preference_signals : changed:'a GUtil.signal ->
+object
+ inherit GUtil.ml_signals
+ method changed : callback:('a -> unit) -> GtkSignal.id
+end
+
+class ['a] preference : name:string list -> init:'a -> repr:'a repr ->
+object
+ method connect : 'a preference_signals
+ method get : 'a
+ method set : 'a -> unit
+end
+
type pref =
{
mutable cmd_coqtop : string option;