So. Much. Work.
parent: tbd commit: b05f964
1 | use Future; |
2 | |
3 | use |
4 | , GiteratedObject, GiteratedObjectValue, | OperationError
5 | ; |
6 | |
7 | use crate::; |
8 | |
9 | use CallbackPtr; |
10 | |
11 | |
12 | |
13 | pub callback_ptr: CallbackPtr, |
14 | pub func: unsafe extern "C" fn |
15 | CallbackPtr, |
16 | &PluginState, |
17 | object: AnyObject, |
18 | , |
19 | |
20 | |
21 | |
22 | |
23 | Self |
24 | func: get_value, |
25 | callback_ptr: handler.callback_ptr, |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | unsafe extern "C" |
32 | callback: CallbackPtr, |
33 | state: &PluginState, |
34 | object: AnyObject, |
35 | ; |
36 | |
37 | ; |
38 | |
39 | |
40 | |
41 | |
42 | Fut: , |
43 | S: Clone, |
44 | O: GiteratedObject, |
45 | V: , |
46 | F: Fn(S, O) -> Fut, |
47 | |
48 | unsafe extern "C" |
49 | callback: CallbackPtr, |
50 | state: &PluginState, |
51 | mut object: AnyObject, |
52 | |
53 | let _guard = trace_span! |
54 | "get_value handler", |
55 | object = object_name, |
56 | value = value_name |
57 | |
58 | .entered; |
59 | let state = unsafe ; |
60 | |
61 | let object = unsafe ; |
62 | |
63 | // Cast the callback ptr to ourselves |
64 | let callback: *const F = transmute; |
65 | let callback = callback.as_ref .unwrap; |
66 | |
67 | let result = callback; |
68 | |
69 | // match result { |
70 | // Ok(value) => Ok(NewAnyValue::new(value)), |
71 | // Err(_) => todo!(), |
72 | // } |
73 | |
74 | todo! |
75 | |
76 | |
77 | |
78 | unsafe |
79 | |
80 | |
81 | |
82 | |
83 | func: unsafe extern "C" fn |
84 | &PluginState, |
85 | object: AnyObject, |
86 | value_name: &str, |
87 | new_value: NewAnyValue, |
88 | , |
89 | |
90 | |
91 | |
92 | unsafe extern "C" |
93 | state: &PluginState, |
94 | object: AnyObject, |
95 | value_name: &str, |
96 | new_value: NewAnyValue, |
97 | ; |
98 | |
99 | |
100 | |
101 | unsafe extern "C" |
102 | state: &PluginState, |
103 | object: AnyObject, |
104 | value_name: &str, |
105 | new_value: NewAnyValue, |
106 | |
107 | todo! |
108 | |
109 | |
110 | |
111 | |
112 | |
113 | Self |
114 | func: value_changed, |
115 | |
116 | |
117 | |
118 |