const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;

Gtk.init(null, 0);

let b1 = new Gtk.Button();
let b2 = new Gtk.Button();

function convert(binding, inValue, outValue) {
    print('convert in/outValue:', inValue.get_float(), outValue.get_float());
    outValue.set_float(inValue.get_float());
    print('convert outValue:', outValue.get_float());
    return true;
}

let binding = b1.bind_property_full('xalign', b2, 'xalign',
        GObject.BindingFlags.BIDIRECTIONAL, convert, convert);

print("b1.xalign", b1.xalign);
print("b2.xalign", b2.xalign);

b1.xalign = 0.75;

print("b1.xalign", b1.xalign);
print("b2.xalign", b2.xalign);  // prints 0 due to outValue not being used
