aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/coqide.ml
diff options
context:
space:
mode:
authorGravatar narboux <narboux@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-11-17 20:06:03 +0000
committerGravatar narboux <narboux@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-11-17 20:06:03 +0000
commita74be91255ee658477dce640e337f9c5073b8402 (patch)
treeff586c3a0cae00f016008907efb7e809eab0493a /ide/coqide.ml
parentf7e00f4bc292795bcef6b66c294a60cd4f61ccb0 (diff)
implement support for drgeocaml
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7575 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/coqide.ml')
-rw-r--r--ide/coqide.ml21
1 files changed, 20 insertions, 1 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml
index 48bb19cb6..d9f02d840 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -3364,6 +3364,24 @@ with _ := Induction for _ Sort _.\n",61,10, Some GdkKeysyms._S);
;;
+(* This function check every half of second if DrGeoCaml has send
+ something on his private clipboard *)
+
+let rec check_for_drgeocaml_input () =
+ let cb_Dr = GData.clipboard (Gdk.Atom.intern "_DrGeoCaml") in
+ while true do
+ Thread.delay 0.5;
+ let s = cb_Dr#text in
+ (match s with
+ Some s ->
+ (get_current_view()).view#buffer#insert (s^"\n")
+ | None -> ()
+ );
+ (* cb_Dr#clear does not work so i use : *)
+ cb_Dr#set_text ""
+ done
+
+
let start () =
let files = Coq.init () in
ignore_break ();
@@ -3382,9 +3400,10 @@ let start () =
Command_windows.main ();
Blaster_window.main 9;
main files;
+ ignore (Thread.create check_for_drgeocaml_input ());
while true do
try
- GtkThread.main ()
+ GtkThread.main ()
with
| Sys.Break -> prerr_endline "Interrupted." ; flush stderr
| e ->