[Pkg-ocaml-maint-commits] [lablgtk2] 03/09: Imported Upstream version 2.18.2+dfsg
Stéphane Glondu
glondu at moszumanska.debian.org
Wed Jun 17 14:12:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
glondu pushed a commit to branch master
in repository lablgtk2.
commit 7d76371c19e285c387eaac217c374b9e4ed6cf68
Author: Stephane Glondu <steph at glondu.net>
Date: Wed Jun 17 14:32:27 2015 +0200
Imported Upstream version 2.18.2+dfsg
---
.gitignore | 10 --
CHANGES | 22 +++
Makefile.pre | 4 +-
README | 4 +-
README.win32 | 1 +
config.make.mingw | 0
examples/seppala.ml | 19 +++
src/.depend | 24 ++--
src/Makefile | 27 ++--
src/absvalue/caml/callback.h | 59 --------
src/absvalue/caml/mlvalues.h | 325 -------------------------------------------
src/build.ml.in | 13 +-
src/gData.ml | 21 ++-
src/gData.mli | 12 ++
src/gObj.ml | 6 +-
src/gObj.mli | 4 +-
src/gTree.mli | 2 +-
src/gtkBase.props | 8 +-
src/gtkData.ml | 21 ---
src/gtkSignal.ml4 | 4 +-
src/gtkTree.props | 2 +-
src/ml_gtk.c | 6 +-
src/wrappers.h | 3 +-
23 files changed, 128 insertions(+), 469 deletions(-)
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index dfee34b..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-config.make
-config.cache
-config.status
-config.log
-configure.lineno
-aclocal.m4
-autom4te.cache
-test_dynlink.*
-*~
-*.sw[po]
diff --git a/CHANGES b/CHANGES
index edcd907..4715934 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,27 @@
LablGTK changes log
+In Lablgtk-2.18.2:
+
+2014.09.17 [Jacques]
+ * Revert old commit which broke notify signals
+ * Quote $(FLINSTALLDIR) in Makefile (cf PR#1342)
+ * Update applications/browser for 4.02
+
+2014.08.22 [Jacques]
+ * Make Float_val an alias for Double_val, since it was used
+ wrongly anyway (Felix Ruess)
+ * Make GObj.misc_ops#add_accelerator polymorphic in the widget of
+ the signal (Erkki Seppala)
+ * Use properties in GtkAdjustment, rather than direct accessors
+
+2013.12.31 [Jacques]
+ * fix GtkTree.IconView.get_path_at_pos (Thomas Leonard)
+
+In Lablgtk-2.18.1:
+
+2013.12.6 [Jacques]
+ * add gtksourceview2 to windows binaries
+
In Lablgtk-2.18.0:
2013.10.01 [Jacques]
diff --git a/Makefile.pre b/Makefile.pre
index 8d0bee2..c4093a2 100644
--- a/Makefile.pre
+++ b/Makefile.pre
@@ -6,6 +6,6 @@ all:
cp README $(ROOT)/Lablgtk.txt
cp README.win32 $(ROOT)/Lablgtk-install.txt
cp CHANGES $(ROOT)/Lablgtk-changes.txt
- mkdir -p $(SAMPLES)/{glade,rsvg,text,canvas}
- for i in . glade rsvg text canvas; do \
+ for i in . glade rsvg text canvas sourceview; do \
+ mkdir -p $(SAMPLES)/$$i; \
(cd examples/$$i; cp * $(SAMPLES)/$$i); done
diff --git a/README b/README
old mode 100644
new mode 100755
index bc6dbe7..1078304
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
- LablGTK2 2.18.0 : an interface to the GIMP Tool Kit
+ LablGTK2 2.18.2 : an interface to the GIMP Tool Kit
Needed:
- ocaml-3.11 or more (4.01 is preferred)
+ ocaml-3.11 or more (4.02 is preferred)
gtk+-2.x (gtk+-2.16.x for full functionality)
findlib 1.2.1 or more (for default install)
GNU make (there is no standard for conditionals)
diff --git a/README.win32 b/README.win32
old mode 100644
new mode 100755
index 3d6649e..5dd7fa1
--- a/README.win32
+++ b/README.win32
@@ -22,6 +22,7 @@ Binary installation
libglade-2.6.4 (requires libxml2)
libgnomecanvas-2.30.1 (requires libart_lgpl)
librsvg-2.32.1 (requires libcroco and libgsf)
+ gtksourceview-2.10
If you want to do custom linking, you need also the dev packages.
All of these are available in the above win32 and
win32/dependencies directories.
diff --git a/config.make.mingw b/config.make.mingw
old mode 100644
new mode 100755
diff --git a/examples/seppala.ml b/examples/seppala.ml
new file mode 100644
index 0000000..930bab1
--- /dev/null
+++ b/examples/seppala.ml
@@ -0,0 +1,19 @@
+open Gtk
+
+let destroy () = GMain.Main.quit ()
+
+let main () =
+ ignore (GMain.init ());
+ let main_window = GWindow.window () in
+ let accel_group = GtkData.AccelGroup.create () in
+ main_window#add_accel_group accel_group;
+ let quit_button = GButton.button ~label:"Quit" ~packing:main_window#add () in
+ quit_button#misc#add_accelerator
+ ~sgn:GtkButtonProps.Button.S.activate
+ ~group:accel_group
+ ~modi:[`CONTROL] GdkKeysyms._q;
+ ignore (quit_button#connect#clicked ~callback:destroy);
+ main_window#show ();
+ GMain.main ()
+
+let () = main ()
diff --git a/src/.depend b/src/.depend
index c775024..717dcf0 100644
--- a/src/.depend
+++ b/src/.depend
@@ -90,10 +90,8 @@ gtkAssistantProps.cmo : gtkSignal.cmi gtkObject.cmo gtkEnums.cmo gtk.cmo \
gobject.cmi gdkPixbuf.cmi
gtkAssistantProps.cmx : gtkSignal.cmx gtkObject.cmx gtkEnums.cmx gtk.cmx \
gobject.cmx gdkPixbuf.cmx
-gtkData.cmo : gtkSignal.cmi gtkBaseProps.cmo gtk.cmo gobject.cmi gdk.cmi \
- gaux.cmo
-gtkData.cmx : gtkSignal.cmx gtkBaseProps.cmx gtk.cmx gobject.cmx gdk.cmx \
- gaux.cmx
+gtkData.cmo : gtkBaseProps.cmo gtk.cmo gobject.cmi gdk.cmi gaux.cmo
+gtkData.cmx : gtkBaseProps.cmx gtk.cmx gobject.cmx gdk.cmx gaux.cmx
gtkBase.cmo : pango.cmo gtkStock.cmo gtkSignal.cmi gtkObject.cmo \
gtkEnums.cmo gtkBaseProps.cmo gtk.cmo gpointer.cmi gobject.cmi \
gdkPixbuf.cmi gdkEvent.cmo gdk.cmi gaux.cmo
@@ -158,14 +156,12 @@ gObj.cmo : pango.cmo gtkStock.cmo gtkSignal.cmi gtkData.cmo gtkBase.cmo \
gObj.cmx : pango.cmx gtkStock.cmx gtkSignal.cmx gtkData.cmx gtkBase.cmx \
gtk.cmx gpointer.cmx gobject.cmx gdk.cmx gaux.cmx gPango.cmx gDraw.cmx \
gObj.cmi
-gData.cmo : gtkData.cmo gtkBin.cmo gtkBase.cmo gtk.cmo gpointer.cmi \
- gobject.cmi gaux.cmo gObj.cmi gData.cmi
-gData.cmx : gtkData.cmx gtkBin.cmx gtkBase.cmx gtk.cmx gpointer.cmx \
- gobject.cmx gaux.cmx gObj.cmx gData.cmi
-gMain.cmo : gtkMain.cmo gtk.cmo glib.cmi gdk.cmi gObj.cmi gData.cmi \
- gMain.cmi
-gMain.cmx : gtkMain.cmx gtk.cmx glib.cmx gdk.cmx gObj.cmx gData.cmx \
- gMain.cmi
+ogtkBaseProps.cmo : gtkSignal.cmi gtkBaseProps.cmo gobject.cmi gObj.cmi
+ogtkBaseProps.cmx : gtkSignal.cmx gtkBaseProps.cmx gobject.cmx gObj.cmx
+gData.cmo : ogtkBaseProps.cmo gtkData.cmo gtkBin.cmo gtkBase.cmo gtk.cmo \
+ gpointer.cmi gobject.cmi gaux.cmo gObj.cmi gData.cmi
+gData.cmx : ogtkBaseProps.cmx gtkData.cmx gtkBin.cmx gtkBase.cmx gtk.cmx \
+ gpointer.cmx gobject.cmx gaux.cmx gObj.cmx gData.cmi
ogtkBaseProps.cmo : gtkSignal.cmi gtkBaseProps.cmo gobject.cmi gObj.cmi
ogtkBaseProps.cmx : gtkSignal.cmx gtkBaseProps.cmx gobject.cmx gObj.cmx
ogtkBinProps.cmo : gtkSignal.cmi gtkPackProps.cmo gtkBinProps.cmo \
@@ -202,6 +198,10 @@ ogtkBrokenProps.cmo : gtkSignal.cmi gtkBrokenProps.cmo gobject.cmi gData.cmi
ogtkBrokenProps.cmx : gtkSignal.cmx gtkBrokenProps.cmx gobject.cmx gData.cmx
ogtkAssistantProps.cmo : gtkSignal.cmi gtkAssistantProps.cmo gobject.cmi
ogtkAssistantProps.cmx : gtkSignal.cmx gtkAssistantProps.cmx gobject.cmx
+gMain.cmo : gtkMain.cmo gtk.cmo glib.cmi gdk.cmi gObj.cmi gData.cmi \
+ gMain.cmi
+gMain.cmx : gtkMain.cmx gtk.cmx glib.cmx gdk.cmx gObj.cmx gData.cmx \
+ gMain.cmi
gContainer.cmo : ogtkBaseProps.cmo gtkBase.cmo gtk.cmo gpointer.cmi \
gobject.cmi gaux.cmo gObj.cmi gData.cmi gContainer.cmi
gContainer.cmx : ogtkBaseProps.cmx gtkBase.cmx gtk.cmx gpointer.cmx \
diff --git a/src/Makefile b/src/Makefile
index c4d1b75..c06dd3d 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -163,12 +163,15 @@ GTKSOURCEVIEW2COBJS = ml_gtksourceview2$(XO)
GTKSOURCEVIEW2MLOBJSENUM = sourceView2Enums.cmo
GTKSOURCEVIEW2PROPS = gtkSourceView2.props
BEFORE_DEPEND += $(GTKSOURCEVIEW2PROPS:%.props=%Props.ml) $(GTKSOURCEVIEW2PROPS:%.props= o%Props.ml) $(GTKSOURCEVIEWMLOBJSENUM:%.cmo=%.ml)
-
EXTRA_OBJS += $(GTKSOURCEVIEW2MLOBJSENUM)
+GTKSOURCEVIEW2ALLMLOBJS = $(GTKSOURCEVIEW2MLOBJSENUM) \
+ $(GTKSOURCEVIEW2PROPS:%.props=%Props.cmo) \
+ $(GTKSOURCEVIEW2PROPS:%.props=o%Props.cmo) $(GTKSOURCEVIEW2MLOBJS)
lablgtksourceview2.cma liblablgtksourceview2$(XA): \
- $(GTKSOURCEVIEW2COBJS) $(GTKSOURCEVIEW2MLOBJSENUM) $(GTKSOURCEVIEW2PROPS:%.props=%Props.cmo) $(GTKSOURCEVIEW2PROPS:%.props=o%Props.cmo) $(GTKSOURCEVIEW2MLOBJS)
+ $(GTKSOURCEVIEW2COBJS) $(GTKSOURCEVIEW2ALLMLOBJS)
$(LIBRARIAN) -o lablgtksourceview2 $^ $(GTKSOURCEVIEW2LIBS)
-lablgtksourceview2.cmxa: $(GTKSOURCEVIEW2COBJS) $(GTKSOURCEVIEW2MLOBJSENUM:.cmo=.cmx) $(GTKSOURCEVIEW2PROPS:%.props=%Props.cmx) $(GTKSOURCEVIEW2PROPS:%.props=o%Props.cmx) $(GTKSOURCEVIEW2MLOBJS:.cmo=.cmx)
+lablgtksourceview2.cmxa: \
+ $(GTKSOURCEVIEW2COBJS) $(GTKSOURCEVIEW2ALLMLOBJS:.cmo=.cmx)
$(LIBRARIAN) -o lablgtksourceview2 $^ $(GTKSOURCEVIEW2LIBS)
lablgtksourceview2.cmxs: DYNLINKLIBS=$(GTKSOURCEVIEW2_LIBS)
endif
@@ -185,7 +188,7 @@ endif
.c.d$(XO):
$(CAMLC) -c -ccopt '-MT -DCAML_DLL -Fo$@ $(CFLAGS)' $<
.ml.cmo:
- $(COMPILER) $<
+ $(COMPILER) $(PRINCIPAL) $<
.mli.cmi:
$(COMPILER) $<
.ml.cmx:
@@ -228,8 +231,8 @@ MLOBJS3 = gtkData.cmo gtkBase.cmo gtkPack.cmo gtkButton.cmo \
gtkMenu.cmo gtkMisc.cmo gtkWindow.cmo gtkList.cmo \
gtkBin.cmo gtkEdit.cmo gtkRange.cmo gtkText.cmo gtkTree.cmo \
gtkFile.cmo gtkMain.cmo gtkBroken.cmo \
- gPango.cmo gDraw.cmo gObj.cmo gData.cmo gMain.cmo
-MLOBJS4 = gContainer.cmo gPack.cmo gButton.cmo gText.cmo \
+ gPango.cmo gDraw.cmo gObj.cmo ogtkBaseProps.cmo gData.cmo
+MLOBJS4 = gMain.cmo gContainer.cmo gPack.cmo gButton.cmo gText.cmo \
gMenu.cmo gMisc.cmo gTree.cmo gList.cmo gFile.cmo gWindow.cmo \
gAssistant.cmo \
gBin.cmo gEdit.cmo gRange.cmo gAction.cmo gBroken.cmo \
@@ -299,6 +302,8 @@ build.ml: Makefile $(CONFIG) build.ml.in
-e "s|@RSVG_LIBS@|$(RSVGLIBS)|" \
-e "s|@CANVAS_MLS@|$(GNOMECANVASMLOBJS:.cmo=)|" \
-e "s|@CANVAS_LIBS@|$(GNOMECANVASLIBS)|" \
+ -e "s|@SOURCEVIEW2_MLS@|$(GTKSOURCEVIEW2ALLMLOBJS:.cmo=)|" \
+ -e "s|@SOURCEVIEW2_LIBS@|$(GTKSOURCEVIEW2LIBS)|" \
-e "s|@TOOLCHAIN@|$(TOOLCHAIN)|" \
< build.ml.in > $@
@@ -325,12 +330,12 @@ testcc$(XE): lablgladecc$(XE) lablgtktop
rm -f testcc.ml
PREOBJS= $(MLOBJS) $(EXTRAOBJS) $(GLADEMLOBJS) $(RSVGMLOBJS) \
- $(GNOMECANVASMLOBJS)
+ $(GNOMECANVASMLOBJS) $(GTKSOURCEVIEW2ALLMLOBJS)
# Install ml sources and C binaries, can then rebuild using build.ml
preinstall:
mkdir -p "$(INSTALLDIR)" "$(BINDIR)" "$(DLLDIR)"
- cp $(PREOBJS:.cmo=.ml) "$(INSTALLDIR)"
+ cp $(PREOBJS:.cmo=.ml) gtkSourceView2_types.mli "$(INSTALLDIR)"
for f in $(PREOBJS:.cmo=.mli); do \
if test -f $$f; then cp $$f "$(INSTALLDIR)"; fi; done
cp build.ml "$(INSTALLDIR)"
@@ -442,11 +447,11 @@ findlib-install:
cp lablgladecc$(XE) "$(BINDIR)/lablgladecc2$(XE)"; \
fi
cp gdk_pixbuf_mlsource$(XE) "$(BINDIR)"
- $(RANLIB) $(CLIBS:%=$(FLINSTALLDIR)/%)
+ $(RANLIB) $(CLIBS:%="$(FLINSTALLDIR)"/%)
@if test -f lablgtk.cmxa; then \
echo "Execute $(RANLIB) in $(FLINSTALLDIR)"; \
- $(RANLIB) $(MLLIBS:%.cma=$(FLINSTALLDIR)/%$(XA)) \
- $(EXTRA_MLLIBS:%.cma=$(FLINSTALLDIR)/%$(XA)) ; \
+ $(RANLIB) $(MLLIBS:%.cma="$(FLINSTALLDIR)"/%$(XA)) \
+ $(EXTRA_MLLIBS:%.cma="$(FLINSTALLDIR)"/%$(XA)) ; \
fi
findlib-uninstall:
diff --git a/src/absvalue/caml/callback.h b/src/absvalue/caml/callback.h
deleted file mode 100644
index 6877f3f..0000000
--- a/src/absvalue/caml/callback.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**************************************************************************/
-/* Lablgtk */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU Library General */
-/* Public License as published by the Free Software Foundation */
-/* version 2, with the exception described in file COPYING which */
-/* comes with the library. */
-/* */
-/* This program 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 Library General Public License for more details. */
-/* */
-/* You should have received a copy of the GNU Library General */
-/* Public License along with this program; if not, write to the */
-/* Free Software Foundation, Inc., 59 Temple Place, Suite 330, */
-/* Boston, MA 02111-1307 USA */
-/* */
-/* */
-/**************************************************************************/
-
-/* $Id$ */
-
-/* Callbacks from C to Caml */
-
-#ifndef CAML_GTK_CALLBACK_H
-#define CAML_CALLBACK_H
-#define CAML_GTK_CALLBACK_H
-
-#ifndef CAML_NAME_SPACE
-#include <caml/compatibility.h>
-#endif
-#include "mlvalues.h"
-
-CAMLextern value caml_callback (value closure, value arg);
-CAMLextern value caml_callback2 (value closure, value arg1, value arg2);
-CAMLextern value caml_callback3 (value closure, value arg1, value arg2,
- value arg3);
-CAMLextern value caml_callbackN (value closure, int narg, value args[]);
-
-CAMLextern value caml_callback_exn (value closure, value arg);
-CAMLextern value caml_callback2_exn (value closure, value arg1, value arg2);
-CAMLextern value caml_callback3_exn (value closure,
- value arg1, value arg2, value arg3);
-CAMLextern value caml_callbackN_exn (value closure, int narg, value args[]);
-
-#define Make_exception_result(v) ((intnat)(v) | 2)
-#define Is_exception_result(v) (((intnat)(v) & 3) == 2)
-#define Extract_exception(v) ((value)((intnat)(v) & ~3))
-
-CAMLextern value * caml_named_value (char * name);
-
-CAMLextern void caml_main (char ** argv);
-CAMLextern void caml_startup (char ** argv);
-
-CAMLextern int caml_callback_depth;
-
-#endif
diff --git a/src/absvalue/caml/mlvalues.h b/src/absvalue/caml/mlvalues.h
deleted file mode 100644
index ea1c286..0000000
--- a/src/absvalue/caml/mlvalues.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/**************************************************************************/
-/* Lablgtk */
-/* */
-/* This program is free software; you can redistribute it */
-/* and/or modify it under the terms of the GNU Library General */
-/* Public License as published by the Free Software Foundation */
-/* version 2, with the exception described in file COPYING which */
-/* comes with the library. */
-/* */
-/* This program 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 Library General Public License for more details. */
-/* */
-/* You should have received a copy of the GNU Library General */
-/* Public License along with this program; if not, write to the */
-/* Free Software Foundation, Inc., 59 Temple Place, Suite 330, */
-/* Boston, MA 02111-1307 USA */
-/* */
-/* */
-/**************************************************************************/
-
-/* $Id$ */
-
-#ifndef CAML_GTK_MLVALUES_H
-#define CAML_MLVALUES_H
-#define CAML_GTK_MLVALUES_H
-
-#ifndef CAML_NAME_SPACE
-#include <caml/compatibility.h>
-#endif
-#include <caml/config.h>
-#include <caml/misc.h>
-
-/* Definitions
-
- word: Four bytes on 32 and 16 bit architectures,
- eight bytes on 64 bit architectures.
- long: A C integer having the same number of bytes as a word.
- val: The ML representation of something. A long or a block or a pointer
- outside the heap. If it is a block, it is the (encoded) address
- of an object. If it is a long, it is encoded as well.
- block: Something allocated. It always has a header and some
- fields or some number of bytes (a multiple of the word size).
- field: A word-sized val which is part of a block.
- bp: Pointer to the first byte of a block. (a char *)
- op: Pointer to the first field of a block. (a value *)
- hp: Pointer to the header of a block. (a char *)
- int32: Four bytes on all architectures.
- int64: Eight bytes on all architectures.
-
- Remark: A block size is always a multiple of the word size, and at least
- one word plus the header.
-
- bosize: Size (in bytes) of the "bytes" part.
- wosize: Size (in words) of the "fields" part.
- bhsize: Size (in bytes) of the block with its header.
- whsize: Size (in words) of the block with its header.
-
- hd: A header.
- tag: The value of the tag field of the header.
- color: The value of the color field of the header.
- This is for use only by the GC.
-*/
-
-typedef struct {} *value;
-typedef uintnat header_t;
-typedef uintnat mlsize_t;
-typedef unsigned int tag_t; /* Actually, an unsigned char */
-typedef uintnat color_t;
-typedef uintnat mark_t;
-
-/* Longs vs blocks. */
-/*
-#define Is_long(x) (((intnat)(x) & 1) != 0)
-#define Is_block(x) (((intnat)(x) & 1) == 0)
-*/
-CAMLextern int Is_long(value);
-CAMLextern int Is_block(value);
-
-/* Conversion macro names are always of the form "to_from". */
-/* Example: Val_long as in "Val from long" or "Val of long". */
-/*
-#define Val_long(x) ((value)(((intnat)(x) << 1) + 1))
-#define Long_val(x) ((intnat)(x) >> 1)
-*/
-CAMLextern intnat Long_val(value);
-CAMLextern value Val_long(intnat);
-#define Max_long ((1L << (8 * sizeof(value) - 2)) - 1)
-#define Min_long (-(1L << (8 * sizeof(value) - 2)))
-#define Val_int(x) Val_long(x)
-#define Int_val(x) ((int) Long_val(x))
-#define Unsigned_long_val(x) ((uintnat)(x) >> 1)
-#define Unsigned_int_val(x) ((int) Unsigned_long_val(x))
-
-/* Structure of the header:
-
-For 16-bit and 32-bit architectures:
- +--------+-------+-----+
- | wosize | color | tag |
- +--------+-------+-----+
-bits 31 10 9 8 7 0
-
-For 64-bit architectures:
-
- +--------+-------+-----+
- | wosize | color | tag |
- +--------+-------+-----+
-bits 63 10 9 8 7 0
-
-*/
-
-#define Tag_hd(hd) ((tag_t) ((hd) & 0xFF))
-#define Wosize_hd(hd) ((mlsize_t) ((hd) >> 10))
-
-#define Hd_val(val) (((header_t *) (val)) [-1]) /* Also an l-value. */
-#define Hd_op(op) (Hd_val (op)) /* Also an l-value. */
-#define Hd_bp(bp) (Hd_val (bp)) /* Also an l-value. */
-#define Hd_hp(hp) (* ((header_t *) (hp))) /* Also an l-value. */
-#define Hp_val(val) ((char *) (((header_t *) (val)) - 1))
-#define Hp_op(op) (Hp_val (op))
-#define Hp_bp(bp) (Hp_val (bp))
-#define Val_op(op) ((value) (op))
-#define Val_hp(hp) ((value) (((header_t *) (hp)) + 1))
-#define Op_hp(hp) ((value *) Val_hp (hp))
-#define Bp_hp(hp) ((char *) Val_hp (hp))
-
-#define Num_tags (1 << 8)
-#ifdef ARCH_SIXTYFOUR
-#define Max_wosize ((1L << 54) - 1)
-#else
-#define Max_wosize ((1 << 22) - 1)
-#endif
-
-#define Wosize_val(val) (Wosize_hd (Hd_val (val)))
-#define Wosize_op(op) (Wosize_val (op))
-#define Wosize_bp(bp) (Wosize_val (bp))
-#define Wosize_hp(hp) (Wosize_hd (Hd_hp (hp)))
-#define Whsize_wosize(sz) ((sz) + 1)
-#define Wosize_whsize(sz) ((sz) - 1)
-#define Wosize_bhsize(sz) ((sz) / sizeof (value) - 1)
-#define Bsize_wsize(sz) ((sz) * sizeof (value))
-#define Wsize_bsize(sz) ((sz) / sizeof (value))
-#define Bhsize_wosize(sz) (Bsize_wsize (Whsize_wosize (sz)))
-#define Bhsize_bosize(sz) ((sz) + sizeof (header_t))
-#define Bosize_val(val) (Bsize_wsize (Wosize_val (val)))
-#define Bosize_op(op) (Bosize_val (Val_op (op)))
-#define Bosize_bp(bp) (Bosize_val (Val_bp (bp)))
-#define Bosize_hd(hd) (Bsize_wsize (Wosize_hd (hd)))
-#define Whsize_hp(hp) (Whsize_wosize (Wosize_hp (hp)))
-#define Whsize_val(val) (Whsize_hp (Hp_val (val)))
-#define Whsize_bp(bp) (Whsize_val (Val_bp (bp)))
-#define Whsize_hd(hd) (Whsize_wosize (Wosize_hd (hd)))
-#define Bhsize_hp(hp) (Bsize_wsize (Whsize_hp (hp)))
-#define Bhsize_hd(hd) (Bsize_wsize (Whsize_hd (hd)))
-
-#ifdef ARCH_BIG_ENDIAN
-#define Tag_val(val) (((unsigned char *) (val)) [-1])
- /* Also an l-value. */
-#define Tag_hp(hp) (((unsigned char *) (hp)) [sizeof(value)-1])
- /* Also an l-value. */
-#else
-#define Tag_val(val) (((unsigned char *) (val)) [-sizeof(value)])
- /* Also an l-value. */
-#define Tag_hp(hp) (((unsigned char *) (hp)) [0])
- /* Also an l-value. */
-#endif
-
-/* The lowest tag for blocks containing no value. */
-#define No_scan_tag 251
-
-
-/* 1- If tag < No_scan_tag : a tuple of fields. */
-
-/* Pointer to the first field. */
-#define Op_val(x) ((value *) (x))
-/* Fields are numbered from 0. */
-#define Field(x, i) (((value *)(x)) [i]) /* Also an l-value. */
-
-typedef int32 opcode_t;
-typedef opcode_t * code_t;
-
-/* NOTE: [Forward_tag] and [Infix_tag] must be just under
- [No_scan_tag], with [Infix_tag] the lower one.
- See [caml_oldify_one] in minor_gc.c for more details.
-
- NOTE: Update stdlib/obj.ml whenever you change the tags.
- */
-
-/* Forward_tag: forwarding pointer that the GC may silently shortcut.
- See stdlib/lazy.ml. */
-#define Forward_tag 250
-#define Forward_val(v) Field(v, 0)
-
-/* If tag == Infix_tag : an infix header inside a closure */
-/* Infix_tag must be odd so that the infix header is scanned as an integer */
-/* Infix_tag must be 1 modulo 4 and infix headers can only occur in blocks
- with tag Closure_tag (see compact.c). */
-
-#define Infix_tag 249
-#define Infix_offset_hd(hd) (Bosize_hd(hd))
-#define Infix_offset_val(v) Infix_offset_hd(Hd_val(v))
-
-/* Another special case: objects */
-#define Object_tag 248
-#define Class_val(val) Field((val), 0)
-#define Oid_val(val) Long_val(Field((val), 1))
-CAMLextern value caml_get_public_method (value obj, value tag);
-/* called as: callback(caml_get_public_method(obj, hash_variant(name)), obj) */
-
-/* Special case of tuples of fields: closures */
-#define Closure_tag 247
-#define Code_val(val) (((code_t *) (val)) [0]) /* Also an l-value. */
-
-/* This tag is used (with Forward_tag) to implement lazy values.
- See major_gc.c and stdlib/lazy.ml. */
-#define Lazy_tag 246
-
-/* Another special case: variants */
-CAMLextern value caml_hash_variant(char * tag);
-
-/* 2- If tag >= No_scan_tag : a sequence of bytes. */
-
-/* Pointer to the first byte */
-#define Bp_val(v) ((char *) (v))
-#define Val_bp(p) ((value) (p))
-/* Bytes are numbered from 0. */
-#define Byte(x, i) (((char *) (x)) [i]) /* Also an l-value. */
-#define Byte_u(x, i) (((unsigned char *) (x)) [i]) /* Also an l-value. */
-
-/* Abstract things. Their contents is not traced by the GC; therefore they
- must not contain any [value].
-*/
-#define Abstract_tag 251
-
-/* Strings. */
-#define String_tag 252
-#define String_val(x) ((char *) Bp_val(x))
-CAMLextern mlsize_t caml_string_length (value); /* size in bytes */
-
-/* Floating-point numbers. */
-#define Double_tag 253
-#define Double_wosize ((sizeof(double) / sizeof(value)))
-#ifndef ARCH_ALIGN_DOUBLE
-#define Double_val(v) (* (double *)(v))
-#define Store_double_val(v,d) (* (double *)(v) = (d))
-#else
-CAMLextern double caml_Double_val (value);
-CAMLextern void caml_Store_double_val (value,double);
-#define Double_val(v) caml_Double_val(v)
-#define Store_double_val(v,d) caml_Store_double_val(v,d)
-#endif
-
-/* Arrays of floating-point numbers. */
-#define Double_array_tag 254
-#define Double_field(v,i) Double_val((value)((double *)(v) + (i)))
-#define Store_double_field(v,i,d) do{ \
- mlsize_t caml__temp_i = (i); \
- double caml__temp_d = (d); \
- Store_double_val((value)((double *) v + caml__temp_i), caml__temp_d); \
-}while(0)
-
-/* Custom blocks. They contain a pointer to a "method suite"
- of functions (for finalization, comparison, hashing, etc)
- followed by raw data. The contents of custom blocks is not traced by
- the GC; therefore, they must not contain any [value].
- See [custom.h] for operations on method suites. */
-#define Custom_tag 255
-#define Data_custom_val(v) ((void *) &Field((v), 1))
-struct custom_operations; /* defined in [custom.h] */
-
-/* Int32.t, Int64.t and Nativeint.t are represented as custom blocks. */
-
-#define Int32_val(v) (*((int32 *) Data_custom_val(v)))
-#define Nativeint_val(v) (*((intnat *) Data_custom_val(v)))
-#ifndef ARCH_ALIGN_INT64
-#define Int64_val(v) (*((int64 *) Data_custom_val(v)))
-#else
-CAMLextern int64 caml_Int64_val(value v);
-#define Int64_val(v) caml_Int64_val(v)
-#endif
-
-/* 3- Atoms are 0-tuples. They are statically allocated once and for all. */
-
-CAMLextern header_t caml_atom_table[];
-#define Atom(tag) (Val_hp (&(caml_atom_table [(tag)])))
-
-/* Is_atom tests whether a well-formed block is statically allocated
- outside the heap. For the bytecode system, only zero-sized block (Atoms)
- fall in this class. For the native-code generator, data
- emitted by the code generator (as described in the table
- caml_data_segments) are also atoms. */
-
-#ifndef NATIVE_CODE
-#define Is_atom(v) ((v) >= Atom(0) && (v) <= Atom(255))
-#else
-CAMLextern char * caml_static_data_start, * caml_static_data_end;
-#define Is_atom(v) \
- ((((char *)(v) >= caml_static_data_start \
- && (char *)(v) < caml_static_data_end) \
- || ((v) >= Atom(0) && (v) <= Atom(255))))
-#endif
-
-/* Booleans are integers 0 or 1 */
-
-#define Val_bool(x) Val_int((x) != 0)
-#define Bool_val(x) Int_val(x)
-#define Val_false Val_int(0)
-#define Val_true Val_int(1)
-#define Val_not(x) ((value)((int)Val_false + (int)Val_true - (int)(x)))
-
-/* The unit value is 0 (tagged) */
-
-#define Val_unit Val_int(0)
-
-/* List constructors */
-#define Val_emptylist Val_int(0)
-#define Tag_cons 0
-
-/* The table of global identifiers */
-
-extern value caml_global_data;
-
-
-#endif /* CAML_MLVALUES_H */
diff --git a/src/build.ml.in b/src/build.ml.in
index 89f3e84..562849c 100755
--- a/src/build.ml.in
+++ b/src/build.ml.in
@@ -31,6 +31,8 @@ let rsvg_mls = split "@RSVG_MLS@"
let rsvg_libs = "@RSVG_LIBS@"
let canvas_mls = split "@CANVAS_MLS@"
let canvas_libs = "@CANVAS_LIBS@"
+let sourceview2_mls = split "@SOURCEVIEW2_MLS@"
+let sourceview2_libs = "@SOURCEVIEW2_LIBS@"
(* Hack to check for mingw *)
let () =
@@ -75,18 +77,20 @@ let may_remove f =
if Sys.file_exists f then Sys.remove f
type descr =
- { mls: string list; extra: string list; libs: string;
+ { mlis: string list; mls: string list; extra: string list; libs: string;
name: string; cname: string }
let libs =
- let lib ~mls ~libs ~name ?(extra=[]) ?(cname=name) () =
- {mls=mls; extra=extra; libs=rename_libs libs; name=name; cname=cname} in
+ let lib ~mls ~libs ~name ?(extra=[]) ?(mlis=[]) ?(cname=name) () =
+ {mlis; mls; extra; libs=rename_libs libs; name; cname} in
[ lib ~mls:lablgtk_mls ~extra:extra_mls ~libs:gtk_libs ~name:"lablgtk"
~cname:"lablgtk2" ();
lib ~mls:glade_mls ~libs:glade_libs ~name:"lablglade"
~cname:"lablglade2" ();
lib ~mls:rsvg_mls ~libs:rsvg_libs ~name:"lablrsvg" ();
- lib ~mls:canvas_mls ~libs:canvas_libs ~name:"lablgnomecanvas" ()]
+ lib ~mls:canvas_mls ~libs:canvas_libs ~name:"lablgnomecanvas" ();
+ lib ~mls:sourceview2_mls ~libs:sourceview2_libs
+ ~name:"lablgtksourceview2" ~mlis:["gtkSourceView2_types"] ()]
let compopts = []
(*["gtkSignal",
@@ -98,6 +102,7 @@ let compile ~comp file =
let byte d =
if d.mls <> [] then begin
+ List.iter d.mlis ~f:(fun file -> exe !ocamlc ["-c"; file^".mli"]);
List.iter (d.mls @ d.extra) ~f:
begin fun file ->
if Sys.file_exists (file ^ ".mli") then exe !ocamlc ["-c"; file^".mli"];
diff --git a/src/gData.ml b/src/gData.ml
index c6b831e..a4073bf 100644
--- a/src/gData.ml
+++ b/src/gData.ml
@@ -28,26 +28,25 @@ open Gtk
open GtkBase
open GtkData
open GObj
+open OgtkBaseProps
class adjustment_signals obj = object (self)
inherit gtkobj_signals_impl obj
- method changed = self#connect Adjustment.S.changed
- method value_changed = self#connect Adjustment.S.value_changed
+ inherit adjustment_sigs
end
-class adjustment obj = object
+class adjustment obj = object (self)
inherit gtkobj obj
+ inherit adjustment_props
method as_adjustment : Gtk.adjustment obj = obj
method connect = new adjustment_signals obj
- method set_value = Adjustment.set_value obj
method clamp_page = Adjustment.clamp_page obj
- method lower = Adjustment.get_lower obj
- method upper = Adjustment.get_upper obj
- method value = Adjustment.get_value obj
- method step_increment = Adjustment.get_step_increment obj
- method page_increment = Adjustment.get_page_increment obj
- method page_size = Adjustment.get_page_size obj
- method set_bounds = Adjustment.set_bounds obj
+ method set_bounds ?lower ?upper ?step_incr ?page_incr ?page_size () =
+ may self#set_lower lower;
+ may self#set_upper upper;
+ may self#set_step_increment step_incr;
+ may self#set_page_increment page_incr;
+ may self#set_page_size page_size
end
let adjustment ?(value=0.) ?(lower=0.) ?(upper=100.)
diff --git a/src/gData.mli b/src/gData.mli
index ce7e260..de06839 100644
--- a/src/gData.mli
+++ b/src/gData.mli
@@ -34,6 +34,12 @@ class adjustment_signals : [> adjustment] obj ->
inherit GObj.gtkobj_signals
method changed : callback:(unit -> unit) -> GtkSignal.id
method value_changed : callback:(unit -> unit) -> GtkSignal.id
+ method notify_lower : callback:(float -> unit) -> GtkSignal.id
+ method notify_page_increment : callback:(float -> unit) -> GtkSignal.id
+ method notify_page_size : callback:(float -> unit) -> GtkSignal.id
+ method notify_step_increment : callback:(float -> unit) -> GtkSignal.id
+ method notify_upper : callback:(float -> unit) -> GtkSignal.id
+ method notify_value : callback:(float -> unit) -> GtkSignal.id
end
(** A GtkObject representing an adjustable bounded value
@@ -55,6 +61,12 @@ class adjustment : Gtk.adjustment obj ->
method set_bounds :
?lower:float -> ?upper:float -> ?step_incr:float ->
?page_incr:float -> ?page_size:float -> unit -> unit
+ method set_lower : float -> unit
+ method set_page_increment : float -> unit
+ method set_page_size : float -> unit
+ method set_step_increment : float -> unit
+ method set_upper : float -> unit
+ method set_value : float -> unit
end
(** @gtkdoc gtk GtkAdjustment
diff --git a/src/gObj.ml b/src/gObj.ml
index 5f787e8..20b2163 100644
--- a/src/gObj.ml
+++ b/src/gObj.ml
@@ -278,8 +278,10 @@ and misc_ops obj = object (self)
method grab_focus () = set P.has_focus obj true
method grab_default () = set P.has_default obj true
method is_ancestor (w : widget) = Widget.is_ancestor obj w#as_widget
- method add_accelerator ~sgn:sg ~group ?modi ?flags key =
- Widget.add_accelerator obj ~sgn:sg group ~key ?modi ?flags
+ method add_accelerator : 'a. sgn:('a, unit -> unit) GtkSignal.t -> _ =
+ fun ~sgn:sg ~group ?modi ?flags key ->
+ let sg = {sg with GtkSignal.classe = `widget} in
+ Widget.add_accelerator obj ~sgn:sg group ~key ?modi ?flags
method remove_accelerator ~group ?modi key =
Widget.remove_accelerator obj group ~key ?modi
(* method lock_accelerators () = lock_accelerators obj *)
diff --git a/src/gObj.mli b/src/gObj.mli
index 6cd17df..55292d3 100644
--- a/src/gObj.mli
+++ b/src/gObj.mli
@@ -209,8 +209,8 @@ and misc_ops : Gtk.widget obj ->
inherit gobject_ops
val obj : Gtk.widget obj
method activate : unit -> bool
- method add_accelerator :
- sgn:(Gtk.widget, unit -> unit) GtkSignal.t ->
+ method add_accelerator : 'a.
+ sgn:('a, unit -> unit) GtkSignal.t ->
group:accel_group -> ?modi:Gdk.Tags.modifier list ->
?flags:Tags.accel_flag list -> Gdk.keysym -> unit
method add_selection_target :
diff --git a/src/gTree.mli b/src/gTree.mli
index 4654d3c..9fe0b72 100644
--- a/src/gTree.mli
+++ b/src/gTree.mli
@@ -735,7 +735,7 @@ class icon_view :
method spacing : int
method set_spacing : int -> unit
- method get_path_at_pos : int -> int -> Gtk.tree_path
+ method get_path_at_pos : int -> int -> Gtk.tree_path option
method selected_foreach : (Gtk.tree_path -> unit) -> unit
method get_selected_items : Gtk.tree_path list
method path_is_selected : Gtk.tree_path -> bool
diff --git a/src/gtkBase.props b/src/gtkBase.props
index c2350ce..030416c 100644
--- a/src/gtkBase.props
+++ b/src/gtkBase.props
@@ -155,7 +155,13 @@ class Item abstract wrapsig : Bin {
signal toggle
}
-class Adjustment : Object {
+class Adjustment set wrap wrapsig : Object {
+ "lower" gdouble : Read / Write
+ "page-increment" gdouble : Read / Write
+ "page-size" gdouble : Read / Write
+ "step-increment" gdouble : Read / Write
+ "upper" gdouble : Read / Write
+ "value" gdouble : Read / Write
signal changed
signal value_changed
}
diff --git a/src/gtkData.ml b/src/gtkData.ml
index cb10d67..962290b 100644
--- a/src/gtkData.ml
+++ b/src/gtkData.ml
@@ -143,30 +143,9 @@ module Adjustment = struct
value:float -> lower:float -> upper:float ->
step_incr:float -> page_incr:float -> page_size:float -> adjustment obj
= "ml_gtk_adjustment_new_bc" "ml_gtk_adjustment_new"
- external set_value : [>`adjustment] obj -> float -> unit
- = "ml_gtk_adjustment_set_value"
external clamp_page :
[>`adjustment] obj -> lower:float -> upper:float -> unit
= "ml_gtk_adjustment_clamp_page"
- external get_lower : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_lower"
- external get_upper : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_upper"
- external get_value : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_value"
- external get_step_increment : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_step_increment"
- external get_page_increment : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_page_increment"
- external get_page_size : [>`adjustment] obj -> float
- = "ml_gtk_adjustment_get_page_size"
- external set : ?lower:float -> ?upper:float -> ?step_incr:float ->
- ?page_incr:float -> ?page_size:float -> [>`adjustment] obj -> unit
- = "ml_gtk_adjustment_set_bc" "ml_gtk_adjustment_set"
- let set_bounds adj ?lower ?upper ?step_incr ?page_incr ?page_size () =
- set adj ?lower ?upper ?step_incr ?page_incr ?page_size;
- GtkSignal.emit_unit adj ~sgn:S.changed;
- set_value adj (get_value adj)
end
module Tooltips = struct
diff --git a/src/gtkSignal.ml4 b/src/gtkSignal.ml4
index 4ab9f65..91c8d2c 100644
--- a/src/gtkSignal.ml4
+++ b/src/gtkSignal.ml4
@@ -200,6 +200,6 @@ let connect ~sgn: ((sgn:('a, _) t)) ~callback ?after (obj : 'a obj) =
let connect_property ~(prop:('a, _) property) ~callback (obj : 'a obj) =
let name = "notify::" ^ prop.Gobject.name in
- let marshaller = marshal1 prop.conv name in
- connect_aux ~name ~marshaller ~callback obj
+ let callback = fun () -> callback (get prop obj) in
+ connect_aux ~name ~marshaller:marshal_unit ~callback obj
diff --git a/src/gtkTree.props b/src/gtkTree.props
index f972125..bdbd25a 100644
--- a/src/gtkTree.props
+++ b/src/gtkTree.props
@@ -252,7 +252,7 @@ class IconView set wrap wrapsig : Container {
signal selection_changed
(* signal set_scroll_adjustments : GtkAdjustment GtkAdjustment *)
- method get_path_at_pos : "int -> int -> Gtk.tree_path"
+ method get_path_at_pos : "int -> int -> Gtk.tree_path option"
method selected_foreach : "(Gtk.tree_path -> unit) -> unit"
method select_path : "Gtk.tree_path -> unit"
method unselect_path : "Gtk.tree_path -> unit"
diff --git a/src/ml_gtk.c b/src/ml_gtk.c
index c86ae02..3bc8589 100644
--- a/src/ml_gtk.c
+++ b/src/ml_gtk.c
@@ -231,9 +231,10 @@ ML_1 (gtk_object_sink, GtkObject_val, Unit)
ML_6 (gtk_adjustment_new, Float_val, Float_val, Float_val, Float_val,
Float_val, Float_val, Val_GtkObject_sink)
ML_bc6 (ml_gtk_adjustment_new)
-ML_2 (gtk_adjustment_set_value, GtkAdjustment_val, Float_val, Unit)
ML_3 (gtk_adjustment_clamp_page, GtkAdjustment_val,
Float_val, Float_val, Unit)
+/*
+ML_2 (gtk_adjustment_set_value, GtkAdjustment_val, Float_val, Unit)
Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, lower, copy_double)
Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, upper, copy_double)
Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, value, copy_double)
@@ -247,7 +248,7 @@ CAMLprim value ml_gtk_adjustment_set(value lower, value upper,
value page_size, value adjustment)
{
GtkAdjustment *adj = GtkAdjustment_val(adjustment);
-#define Update_field(name) adj->name = Option_val(name,Double_val,adj->name)
+#define Update_field(name) (adj->name = Option_val(name,Double_val,adj->name)
Update_field(lower);
Update_field(upper);
Update_field(step_increment);
@@ -257,6 +258,7 @@ CAMLprim value ml_gtk_adjustment_set(value lower, value upper,
return Val_unit;
}
ML_bc6(ml_gtk_adjustment_set)
+*/
/* gtktooltips.h */
diff --git a/src/wrappers.h b/src/wrappers.h
index fa11dd7..7a87c83 100644
--- a/src/wrappers.h
+++ b/src/wrappers.h
@@ -254,7 +254,8 @@ CAMLprim value cname##_bc (value *argv, int argn) \
/* parameter conversion */
#define Bool_ptr(x) ((long) x - 1)
#define Char_val Int_val
-#define Float_val(x) ((float)Double_val(x))
+#define Float_val Double_val
+/* #define Float_val(x) ((float)Double_val(x)) */
#define SizedString_val(x) String_val(x), string_length(x)
#define Option_val(val,unwrap,default) \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/lablgtk2.git
More information about the Pkg-ocaml-maint-commits
mailing list