flagsOf
Utility function for combining bitfields to make passing flag arguments to methods more readable and explicit instead of chaining or
calls in the argument list.
// chaining or
val app = Application(
"org.gtkkn.samples.gtk.playground",
ApplicationFlags.FLAGS_NONE or
ApplicationFlags.HANDLES_OPEN or
ApplicationFlags.IS_LAUNCHER,
)
// using flagsOf
val app = Application(
"org.gtkkn.samples.gtk.playground",
flagsOf(
ApplicationFlags.FLAGS_NONE,
ApplicationFlags.HANDLES_OPEN,
ApplicationFlags.IS_LAUNCHER,
),
)
Content copied to clipboard