123456789101112131415161718192021222324252627282930313233343536(**************************************************************************)(* ocgtk - OCaml bindings for GTK4 *)(* *)(* This program is free software; you can redistribute it *)(* and/or modify it under the terms of the GNU Library General *)(* Public License version 2, as published by the *)(* Free Software Foundation with the exception described in file *)(* COPYING which comes with the library. *)(* *)(* Based on lablgtk3 (https://github.com/garrigue/lablgtk) *)(* *)(**************************************************************************)typet=privateintexternalunsafe_of_int:int->t="%identity"letmin_value=0letmax_value=4294967295letof_intn=ifn<min_value||n>max_valuetheninvalid_arg(Printf.sprintf"UInt32.of_int: %d is out of range [%d, %d]"nmin_valuemax_value);unsafe_of_intnletto_int(v:t)=(v:>int)letmin_int=unsafe_of_intmin_valueletmax_int=unsafe_of_intmax_valueletzero=unsafe_of_int0letof_strings=of_int(int_of_strings)letto_string(v:t)=string_of_int(v:>int)letof_int64x=of_int(Int64.to_intxlandmax_value)letto_int64(v:t)=Int64.of_int(v:>int)