52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
// ignore_for_file: always_specify_types
|
|
// ignore_for_file: camel_case_types
|
|
// ignore_for_file: non_constant_identifier_names
|
|
|
|
// AUTO GENERATED FILE, DO NOT EDIT.
|
|
//
|
|
// Generated by `package:ffigen`.
|
|
// ignore_for_file: type=lint
|
|
import 'dart:ffi' as ffi;
|
|
|
|
/// Bindings for `src/hardware.h`.
|
|
///
|
|
/// Regenerate bindings with `dart run ffigen --config ffigen.yaml`.
|
|
///
|
|
class HardwareBindings {
|
|
/// Holds the symbol lookup function.
|
|
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
|
_lookup;
|
|
|
|
/// The symbols are looked up in [dynamicLibrary].
|
|
HardwareBindings(ffi.DynamicLibrary dynamicLibrary)
|
|
: _lookup = dynamicLibrary.lookup;
|
|
|
|
/// The symbols are looked up with [lookup].
|
|
HardwareBindings.fromLookup(
|
|
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) lookup,
|
|
) : _lookup = lookup;
|
|
|
|
/// Returns the screen border radius in logical pixels.
|
|
/// If hasValue is 0, the value is not available on this platform.
|
|
DoubleOption get_screen_border_radius() {
|
|
return _get_screen_border_radius();
|
|
}
|
|
|
|
late final _get_screen_border_radiusPtr =
|
|
_lookup<ffi.NativeFunction<DoubleOption Function()>>(
|
|
'get_screen_border_radius',
|
|
);
|
|
late final _get_screen_border_radius = _get_screen_border_radiusPtr
|
|
.asFunction<DoubleOption Function()>();
|
|
}
|
|
|
|
/// Option type for nullable double values
|
|
final class DoubleOption extends ffi.Struct {
|
|
@ffi.Double()
|
|
external double value;
|
|
|
|
/// 1 = has value, 0 = null
|
|
@ffi.Int()
|
|
external int hasValue;
|
|
}
|