distclean: clean
rm -f configure config.cache config.status config.log Makefile
- cd $(TESTDIR); make distclean
include .depend
AC_OUTPUT([
Makefile
- test/Makefile
])
* For details, send a mail to the author.
*)
-(*open Gaux*)
+open Gaux
open Gtk
open Gtk_mathview
open GtkBase
open GtkMathView
open GObj
-open Misc
exception ErrorLoadingFile of string;;
exception ErrorWritingFile of string;;
method get_hadjustment = new GData.adjustment (MathView.get_hadjustment obj)
method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj)
method get_buffer = MathView.get_buffer obj
- method get_frame = new GFrame.frame (MathView.get_frame obj)
+ method get_frame = new GBin.frame (MathView.get_frame obj)
method set_font_size = MathView.set_font_size obj
method get_font_size = MathView.get_font_size obj
method set_anti_aliasing = MathView.set_anti_aliasing obj
open Gtk_mathview
open Tags
open GtkBase
-open Misc
+open Gpointer
-external mDOMNode_of_boxed :
- Misc.pointer -> Minidom.mDOMNode =
- "ml_gtk_math_view_mDOMNode_of_boxed"
+external mDOMNode_of_boxed_option :
+ Gpointer.boxed option -> Minidom.mDOMNode =
+ "ml_gtk_math_view_mDOMNode_of_bodex_option"
-external mDOMNode_option_of_boxed :
- Misc.pointer -> Minidom.mDOMNode option =
- "ml_gtk_math_view_mDOMNode_option_of_boxed"
+external mDOMNode_option_of_boxed_option :
+ Gpointer.boxed option -> Minidom.mDOMNode option =
+ "ml_gtk_math_view_mDOMNode_option_of_bodex_option"
let o_mDOMNode_of_mDOMNode node = new Ominidom.o_mDOMNode node
open GtkSignal
let clicked : ([>`math_view],_) t =
- let marshal_clicked f argv =
- match GtkArgv.get_pointer argv ~pos:0 with
- Some p -> f (o_mDOMNode_of_mDOMNode (mDOMNode_of_boxed (Obj.magic p)))
+ let marshal_clicked f _ =
+ function
+ [GtkArgv.POINTER node] -> f (o_mDOMNode_of_mDOMNode (mDOMNode_of_boxed_option node))
| _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_clicked"
in
{ name = "clicked"; marshaller = marshal_clicked }
let jump : ([>`math_view],_) t =
- let marshal_jump f argv =
- match GtkArgv.get_pointer argv ~pos:0 with
- Some p -> f (o_mDOMNode_of_mDOMNode (mDOMNode_of_boxed (Obj.magic p)))
+ let marshal_jump f _ =
+ function
+ [GtkArgv.POINTER node] -> f (o_mDOMNode_of_mDOMNode (mDOMNode_of_boxed_option node))
| _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_jump"
in
{ name = "jump"; marshaller = marshal_jump }
let selection_changed : ([>`math_view],_) t =
- let marshal_selection_changed f argv =
- match GtkArgv.get_pointer argv ~pos:0 with
- Some p ->f (o_mDOMNode_option_of_mDOMNode_option (mDOMNode_option_of_boxed (Obj.magic p)))
- | None -> f None
+ let marshal_selection_changed f _ =
+ function
+ [GtkArgv.POINTER node] -> f (o_mDOMNode_option_of_mDOMNode_option (mDOMNode_option_of_boxed_option node))
+ | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_selection_changed"
in
{ name = "selection_changed"; marshaller = marshal_selection_changed }
end
#include <caml/callback.h>
#include <caml/fail.h>
-#include <gtkmathview.h>
+#include <gtkmathview/gtkmathview.h>
#include <ml_gtk.h>
#include <wrappers.h>
#include <gtk_tags.h>
#include <minidom.h>
-#include "mlminidom/ml_minidom.h"
+#include "minidom/ml_minidom.h"
/* <CSC/>: Next row should be put in a .h of lablgtk. */
#define GtkAdjustment_val(val) check_cast(GTK_ADJUSTMENT,val)
-/* <LUCA/>: Next rows too */
-
-extern value Val_GtkObject_sink();
-
-#define Val_GtkAny(w) Val_GtkObject((GtkObject*)w)
-#define Val_GtkAny_sink(w) Val_GtkObject_sink((GtkObject*)w)
-#define Val_GtkWidget Val_GtkAny
-#define Val_GtkWidget_sink Val_GtkAny_sink
#define GtkMathView_val(val) check_cast(GTK_MATH_VIEW,val)
CAMLreturn (result);
}
-value ml_gtk_math_view_mDOMNode_of_boxed (value arg1)
+
+value ml_gtk_math_view_mDOMNode_of_bodex_option (value arg1)
{
CAMLparam1(arg1);
mDOMNodeRef nr;
+ CAMLlocal1 (tmp);
CAMLlocal1 (optval);
CAMLlocal1 (res);
- nr = (mDOMNodeRef) Field(arg1, 1);
+ if (arg1==Val_int(0)) {
+ assert(0);
+ } else {
+ tmp = Field(arg1, 0);
+ nr = (mDOMNodeRef) Field(tmp, 1);
+ }
optval = Val_mDOMNodeRef(nr);
if (optval==Val_int(0)) {
assert(0);
CAMLreturn(res);
}
-value ml_gtk_math_view_mDOMNode_option_of_boxed (value arg1)
+value ml_gtk_math_view_mDOMNode_option_of_bodex_option (value arg1)
{
CAMLparam1(arg1);
mDOMNodeRef nr;
+ CAMLlocal1 (tmp);
- nr = (mDOMNodeRef) Field(arg1, 1);
+ if (arg1==Val_int(0)) {
+ nr=NULL;
+ } else {
+ tmp = Field(arg1, 0);
+ nr = (mDOMNodeRef) Field(tmp, 1);
+ }
- CAMLreturn(Val_mDOMNodeRef(nr));
+ CAMLreturn(Val_mDOMNodeRef(nr));
}