// This file is part of KDDockWidgets.
// SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
// Contact KDAB at <info@kdab.com> for commercial licensing options.

// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
// ignore_for_file: type=lint
import 'dart:ffi' as ffi;

class NativeLibrary {
  /// Holds the symbol lookup function.
  final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
      _lookup;

  /// The symbols are looked up in [dynamicLibrary].
  NativeLibrary(ffi.DynamicLibrary dynamicLibrary)
      : _lookup = dynamicLibrary.lookup;

  /// The symbols are looked up with [lookup].
  NativeLibrary.fromLookup(
      ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
          lookup)
      : _lookup = lookup;

  void on_flutter_droparea_widget_resized(
    ffi.Pointer<ffi.Void> host,
    int width,
    int height,
  ) {
    return _on_flutter_droparea_widget_resized(
      host,
      width,
      height,
    );
  }

  late final _on_flutter_droparea_widget_resizedPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int,
              ffi.Int)>>('on_flutter_droparea_widget_resized');
  late final _on_flutter_droparea_widget_resized =
      _on_flutter_droparea_widget_resizedPtr
          .asFunction<void Function(ffi.Pointer<ffi.Void>, int, int)>();

  void on_separator_mouse_button_event(
    ffi.Pointer<ffi.Void> separator,
    int pressed,
  ) {
    return _on_separator_mouse_button_event(
      separator,
      pressed,
    );
  }

  late final _on_separator_mouse_button_eventPtr = _lookup<
          ffi
          .NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int)>>(
      'on_separator_mouse_button_event');
  late final _on_separator_mouse_button_event =
      _on_separator_mouse_button_eventPtr
          .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();

  void on_separator_mouse_move_event(
    ffi.Pointer<ffi.Void> separator,
    double x,
    double y,
  ) {
    return _on_separator_mouse_move_event(
      separator,
      x,
      y,
    );
  }

  late final _on_separator_mouse_move_eventPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float,
              ffi.Float)>>('on_separator_mouse_move_event');
  late final _on_separator_mouse_move_event = _on_separator_mouse_move_eventPtr
      .asFunction<void Function(ffi.Pointer<ffi.Void>, double, double)>();

  ffi.Pointer<ffi.Void> create_host() {
    return _create_host();
  }

  late final _create_hostPtr =
      _lookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
          'create_host');
  late final _create_host =
      _create_hostPtr.asFunction<ffi.Pointer<ffi.Void> Function()>();

  void delete_host(
    ffi.Pointer<ffi.Void> host,
  ) {
    return _delete_host(
      host,
    );
  }

  late final _delete_hostPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
          'delete_host');
  late final _delete_host =
      _delete_hostPtr.asFunction<void Function(ffi.Pointer<ffi.Void>)>();

  ffi.Pointer<ffi.Void> create_guest(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(
                    ffi.Pointer<ffi.Void> guest,
                    ffi.Int x,
                    ffi.Int y,
                    ffi.Int width,
                    ffi.Int height,
                    ffi.Int is_visible)>>
        callback,
  ) {
    return _create_guest(
      host,
      callback,
    );
  }

  late final _create_guestPtr = _lookup<
      ffi.NativeFunction<
          ffi.Pointer<ffi.Void> Function(
              ffi.Pointer<ffi.Void>,
              ffi.Pointer<
                  ffi.NativeFunction<
                      ffi.Void Function(
                          ffi.Pointer<ffi.Void> guest,
                          ffi.Int x,
                          ffi.Int y,
                          ffi.Int width,
                          ffi.Int height,
                          ffi.Int is_visible)>>)>>('create_guest');
  late final _create_guest = _create_guestPtr.asFunction<
      ffi.Pointer<ffi.Void> Function(
          ffi.Pointer<ffi.Void>,
          ffi.Pointer<
              ffi.NativeFunction<
                  ffi.Void Function(
                      ffi.Pointer<ffi.Void> guest,
                      ffi.Int x,
                      ffi.Int y,
                      ffi.Int width,
                      ffi.Int height,
                      ffi.Int is_visible)>>)>();

  void delete_guest(
    ffi.Pointer<ffi.Void> host,
  ) {
    return _delete_guest(
      host,
    );
  }

  late final _delete_guestPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
          'delete_guest');
  late final _delete_guest =
      _delete_guestPtr.asFunction<void Function(ffi.Pointer<ffi.Void>)>();

  void insert_item(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<ffi.Void> guest,
    int location,
  ) {
    return _insert_item(
      host,
      guest,
      location,
    );
  }

  late final _insert_itemPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
              ffi.Int)>>('insert_item');
  late final _insert_item = _insert_itemPtr.asFunction<
      void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();

  void insert_item_relative_to(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<ffi.Void> guest,
    ffi.Pointer<ffi.Void> relativeToGuest,
    int location,
  ) {
    return _insert_item_relative_to(
      host,
      guest,
      relativeToGuest,
      location,
    );
  }

  late final _insert_item_relative_toPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
              ffi.Pointer<ffi.Void>, ffi.Int)>>('insert_item_relative_to');
  late final _insert_item_relative_to = _insert_item_relative_toPtr.asFunction<
      void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
          ffi.Pointer<ffi.Void>, int)>();

  void remove_guest(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<ffi.Void> guest,
  ) {
    return _remove_guest(
      host,
      guest,
    );
  }

  late final _remove_guestPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>('remove_guest');
  late final _remove_guest = _remove_guestPtr.asFunction<
      void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();

  /// Separators are created and destroyed by KDDW
  void set_separator_added_callback(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Pointer<ffi.Void> host,
                    ffi.Pointer<ffi.Void> separator, ffi.Int isVertical)>>
        callback,
  ) {
    return _set_separator_added_callback(
      host,
      callback,
    );
  }

  late final _set_separator_added_callbackPtr = _lookup<
          ffi.NativeFunction<
              ffi.Void Function(
                  ffi.Pointer<ffi.Void>,
                  ffi.Pointer<
                      ffi.NativeFunction<
                          ffi.Void Function(
                              ffi.Pointer<ffi.Void> host,
                              ffi.Pointer<ffi.Void> separator,
                              ffi.Int isVertical)>>)>>(
      'set_separator_added_callback');
  late final _set_separator_added_callback =
      _set_separator_added_callbackPtr.asFunction<
          void Function(
              ffi.Pointer<ffi.Void>,
              ffi.Pointer<
                  ffi.NativeFunction<
                      ffi.Void Function(
                          ffi.Pointer<ffi.Void> host,
                          ffi.Pointer<ffi.Void> separator,
                          ffi.Int isVertical)>>)>();

  void set_separator_removed_callback(
    ffi.Pointer<ffi.Void> host,
    ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Pointer<ffi.Void> host,
                    ffi.Pointer<ffi.Void> separator)>>
        callback,
  ) {
    return _set_separator_removed_callback(
      host,
      callback,
    );
  }

  late final _set_separator_removed_callbackPtr = _lookup<
          ffi.NativeFunction<
              ffi.Void Function(
                  ffi.Pointer<ffi.Void>,
                  ffi.Pointer<
                      ffi.NativeFunction<
                          ffi.Void Function(ffi.Pointer<ffi.Void> host,
                              ffi.Pointer<ffi.Void> separator)>>)>>(
      'set_separator_removed_callback');
  late final _set_separator_removed_callback =
      _set_separator_removed_callbackPtr.asFunction<
          void Function(
              ffi.Pointer<ffi.Void>,
              ffi.Pointer<
                  ffi.NativeFunction<
                      ffi.Void Function(ffi.Pointer<ffi.Void> host,
                          ffi.Pointer<ffi.Void> separator)>>)>();

  void set_separator_changed_callback(
    ffi.Pointer<ffi.Void> separator,
    ffi.Pointer<
            ffi.NativeFunction<
                ffi.Void Function(ffi.Pointer<ffi.Void> separator, ffi.Int x,
                    ffi.Int y, ffi.Int width, ffi.Int height)>>
        callback,
  ) {
    return _set_separator_changed_callback(
      separator,
      callback,
    );
  }

  late final _set_separator_changed_callbackPtr = _lookup<
          ffi.NativeFunction<
              ffi.Void Function(
                  ffi.Pointer<ffi.Void>,
                  ffi.Pointer<
                      ffi.NativeFunction<
                          ffi.Void Function(
                              ffi.Pointer<ffi.Void> separator,
                              ffi.Int x,
                              ffi.Int y,
                              ffi.Int width,
                              ffi.Int height)>>)>>(
      'set_separator_changed_callback');
  late final _set_separator_changed_callback =
      _set_separator_changed_callbackPtr.asFunction<
          void Function(
              ffi.Pointer<ffi.Void>,
              ffi.Pointer<
                  ffi.NativeFunction<
                      ffi.Void Function(
                          ffi.Pointer<ffi.Void> separator,
                          ffi.Int x,
                          ffi.Int y,
                          ffi.Int width,
                          ffi.Int height)>>)>();
}
