Skip to content

Instantly share code, notes, and snippets.

@vrotaru
vrotaru / graph.ml
Created November 28, 2017 22:03
Updated example from OCaml GTK tutorial
open GObj
(* Draw text left, centre or right justified at point. (x,y) point is
* either top left, top middle or top right of text.
*)
let draw_text drawable font_description position (x, y) text : unit =
let context = Gdk.Screen.get_pango_context () in
let layout = Pango.Layout.create context in
let () = Pango.Layout.set_font_description layout font_description in
let () = Pango.Layout.set_text layout text in
diff --git a/src/gText.mli b/src/gText.mli
index 455b90b3..a29f8d07 100644
--- a/src/gText.mli
+++ b/src/gText.mli
@@ -491,14 +491,12 @@ object ('a)
method populate_popup :
callback:(menu obj -> unit) -> GtkSignal.id
method set_anchor : callback:(unit -> unit) -> GtkSignal.id
- method set_scroll_adjustments :
- callback:(GData.adjustment option -> GData.adjustment option -> unit)