JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Structure refactoring

Amber - ⁨1⁩ year ago

parent: tbd commit: ⁨a8f41ac

⁨giterated-abi/src/vtable/plugin_initialization.rs⁩ - ⁨1616⁩ bytes
Raw
1 #[repr(C)]
2 pub struct HostVTable {}
3
4 #[repr(C)]
5 #[derive(Clone, Copy)]
6 pub struct Initialization {
7 pub register_object:
8 unsafe extern "C" fn(*mut PluginInitializationState, &'static str, &'static VTable<Object>),
9 pub register_operation: unsafe extern "C" fn(
10 *mut PluginInitializationState,
11 &'static str,
12 &'static str,
13 &'static VTable<Operation>,
14 ),
15 pub register_setting: unsafe extern "C" fn(
16 *mut PluginInitializationState,
17 &'static str,
18 &'static str,
19 &'static VTable<Setting>,
20 ),
21 pub register_value: unsafe extern "C" fn(
22 *mut PluginInitializationState,
23 &'static str,
24 &'static str,
25 &'static VTable<Value>,
26 ),
27
28 pub operation_handler: unsafe extern "C" fn(
29 *mut PluginInitializationState,
30 &'static str,
31 &'static str,
32 CallbackPtr<OperationHandlerCallback>,
33 ),
34
35 pub value_getter: unsafe extern "C" fn(
36 *mut PluginInitializationState,
37 &'static str,
38 &'static str,
39 CallbackPtr<ValueGetterCallback>,
40 ),
41
42 pub setting_getter: unsafe extern "C" fn(
43 *mut PluginInitializationState,
44 &'static str,
45 &'static str,
46 CallbackPtr<SettingGetterCallback>,
47 ),
48 }
49
50 impl ObjectABI for Initialization {
51 type VTable = Initialization;
52 }
53
54 impl Debug for Initialization {
55 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
56 f.debug_struct("InitializationVTable").finish()
57 }
58 }
59
60 unsafe impl Sync for Initialization {}
61 unsafe impl Send for Initialization {}
62