qtbridge_interfaces/generated/qabstract_list_model/
proxy_rust_bridge.rs

1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only
3
4use super::proxy_rust::QAbstractListModelProxyRust;
5#[cxx::bridge]
6pub mod ffi {
7    unsafe extern "C++" {
8        include!("qtbridge-type-lib/src/generated/core/qhash/cpp/qhash_i32_qbytearray.h");
9        type QHash_i32_QByteArray = qtbridge_type_lib::QHash_i32_QByteArray;
10        include!("qtbridge-type-lib/src/generated/core/qmodelindex/cpp/qmodelindex.h");
11        type QModelIndex = qtbridge_type_lib::QModelIndex;
12        include!("qtbridge-type-lib/src/generated/core/qvariant/cpp/qvariant.h");
13        type QVariant = qtbridge_type_lib::QVariant;
14    }
15    extern "Rust" {
16        type QAbstractListModelProxyRust;
17        # [Self = QAbstractListModelProxyRust]
18        # [cxx_name = dropSelf]
19        unsafe fn drop_self(self_ptr: *mut QAbstractListModelProxyRust);
20        # [cxx_name = index]
21        fn index(&self, row: i32, column: i32, parent: &QModelIndex) -> QModelIndex;
22        # [cxx_name = rowCount]
23        fn row_count(&self, parent: &QModelIndex) -> i32;
24        # [cxx_name = data]
25        fn data(&self, index: &QModelIndex, role: i32) -> QVariant;
26        # [cxx_name = roleNames]
27        fn role_names(&self) -> QHash_i32_QByteArray;
28        # [cxx_name = setData]
29        fn set_data(&mut self, index: &QModelIndex, value: &QVariant, role: i32) -> bool;
30        # [cxx_name = removeRows]
31        fn remove_rows(&mut self, first: i32, count: i32, parent: &QModelIndex) -> bool;
32        # [cxx_name = sibling]
33        fn sibling(&self, row: i32, column: i32, idx: &QModelIndex) -> QModelIndex;
34
35        # [cxx_name = invokeSlot]
36        fn invoke_slot(&self, slot_id: u32, args: &[*const u8], outputs: &[*mut u8]);
37        # [cxx_name = invokeSlotMut]
38        fn invoke_slot_mut(&mut self, slot_id: u32, args: &[*const u8], outputs: &[*mut u8]);
39        # [cxx_name = readProperty]
40        fn read_property(&self, prop_id: u32) -> QVariant;
41        # [cxx_name = writeProperty]
42        fn write_property(&mut self, prop_id: u32, value: &QVariant);
43    }
44}
45unsafe impl cxx::ExternType for QAbstractListModelProxyRust {
46    type Id = cxx::type_id!(QAbstractListModelProxyRust);
47    type Kind = cxx::kind::Trivial;
48}