button property

GhosttyMouseButton? get button

Implementation

bindings.GhosttyMouseButton? get button {
  _ensureOpen();
  final out = calloc<ffi.UnsignedInt>();
  try {
    final hasButton = bindings.ghostty_mouse_event_get_button(_handle, out);
    if (!hasButton) {
      return null;
    }
    return bindings.GhosttyMouseButton.fromValue(out.value);
  } finally {
    calloc.free(out);
  }
}
set button (GhosttyMouseButton? value)

Implementation

set button(bindings.GhosttyMouseButton? value) {
  _ensureOpen();
  if (value == null) {
    bindings.ghostty_mouse_event_clear_button(_handle);
    return;
  }
  bindings.ghostty_mouse_event_set_button(_handle, value);
}