private static void InitBoolVariable(Variable var, String id)
{
var it = var as BoolVariable;
Variable.SetCallbacks.Add(id, new Tw.SetVarCallback(it.SetCallback));
Variable.GetCallbacks.Add(id, new Tw.GetVarCallback(it.GetCallback));
Tw.AddVarCB(var.ParentBar.Pointer, id,
Tw.VariableType.Bool8,
Variable.SetCallbacks[id],
Variable.GetCallbacks[id],
IntPtr.Zero, null);
}