swiftui-sys 0.0.1

Raw FFI bindings to SwiftUI via generated @_cdecl bridge
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
//! Raw FFI bindings to SwiftUI via a generated Swift `@_cdecl` bridge.
//!
//! This crate is auto-generated by `swift-bridge-gen`. Do not edit manually.
//! The ergonomic API is in the `swiftui` crate.
//!
//! All functions require `libSwiftUIBridge.dylib` to be loaded via `dlopen`
//! before use. Use [`load`] to load and resolve all symbols.

//!
//! ## Citation
//!
//! ```bibtex
//! @software{rswift,
//!   author       = {Eugene Hauptmann},
//!   title        = {rswift},
//!   year         = {2025},
//!   url          = {https://github.com/eugenehp/rswift},
//!   note         = {Build native Apple apps from Rust}
//! }
//! ```
//!
//! ## License
//!
//! GPL-3.0 — Copyright © 2025 [Eugene Hauptmann](https://github.com/eugenehp)

#![allow(non_snake_case, dead_code)]

use core::ffi::{c_char, c_void};
use std::ffi::CString;

pub type Handle = *mut c_void;

unsafe extern "C" {
    fn dlopen(path: *const c_char, mode: i32) -> *mut c_void;
    fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void;
}

fn sym(h: *mut c_void, name: &core::ffi::CStr) -> *mut c_void {
    let p = unsafe { dlsym(h, name.as_ptr()) };
    assert!(!p.is_null(), "Symbol not found: {}", name.to_str().unwrap());
    p
}

/// All resolved function pointers from the Swift bridge dylib.
pub struct Fns {
    // Views
    pub text: unsafe extern "C" fn(*const u8, usize) -> Handle,
    pub styled_text: unsafe extern "C" fn(*const u8, usize, f32, i32, f32, f32, f32, f32) -> Handle,
    pub system_image: unsafe extern "C" fn(*const u8, usize) -> Handle,
    pub spacer: unsafe extern "C" fn() -> Handle,
    pub divider: unsafe extern "C" fn() -> Handle,
    pub color: unsafe extern "C" fn(f32, f32, f32, f32) -> Handle,
    pub progress: unsafe extern "C" fn(f32, f32) -> Handle,
    pub toggle: unsafe extern "C" fn(*const u8, usize, bool) -> Handle,
    pub textfield: unsafe extern "C" fn(*const u8, usize, *const u8, usize) -> Handle,
    pub button: unsafe extern "C" fn(
        *const u8,
        usize,
        unsafe extern "C" fn(*mut c_void),
        *mut c_void,
    ) -> Handle,

    // Stacks
    pub vstack: unsafe extern "C" fn(*const Handle, usize) -> Handle,
    pub hstack: unsafe extern "C" fn(*const Handle, usize) -> Handle,
    pub zstack: unsafe extern "C" fn(*const Handle, usize) -> Handle,
    pub scroll_view: unsafe extern "C" fn(Handle) -> Handle,

    // Modifiers
    pub padding: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub frame: unsafe extern "C" fn(Handle, f32, f32) -> Handle,
    pub background_color: unsafe extern "C" fn(Handle, f32, f32, f32, f32) -> Handle,
    pub corner_radius: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub opacity: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub border: unsafe extern "C" fn(Handle, f32, f32, f32, f32) -> Handle,
    pub foreground_color: unsafe extern "C" fn(Handle, f32, f32, f32, f32) -> Handle,
    pub shadow: unsafe extern "C" fn(Handle, f32, f32, f32, f32, f32, f32) -> Handle,
    pub offset: unsafe extern "C" fn(Handle, f32, f32) -> Handle,
    pub scale: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub rotation: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub hidden: unsafe extern "C" fn(Handle) -> Handle,
    pub disabled: unsafe extern "C" fn(Handle, bool) -> Handle,
    pub overlay: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub clip_circle: unsafe extern "C" fn(Handle) -> Handle,
    pub font_system: unsafe extern "C" fn(Handle, f32, i32) -> Handle,

    // Additional views
    pub label: unsafe extern "C" fn(*const u8, usize, *const u8, usize) -> Handle,
    pub slider: unsafe extern "C" fn(f32, f32, f32) -> Handle,
    pub link: unsafe extern "C" fn(*const u8, usize, *const u8, usize) -> Handle,

    // Gestures
    pub on_tap:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,
    pub on_long_press:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,

    // Bound controls
    pub bound_textfield: unsafe extern "C" fn(
        *const u8,
        usize,
        *const u8,
        usize,
        unsafe extern "C" fn(*const u8, usize, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub bound_toggle: unsafe extern "C" fn(
        *const u8,
        usize,
        bool,
        unsafe extern "C" fn(bool, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub bound_slider: unsafe extern "C" fn(
        f32,
        f32,
        f32,
        unsafe extern "C" fn(f32, *mut c_void),
        *mut c_void,
    ) -> Handle,

    // List / Sheet / Alert / Animation
    pub list: unsafe extern "C" fn(*const Handle, usize) -> Handle,
    pub sheet: unsafe extern "C" fn(Handle, Handle, bool) -> Handle,
    pub alert: unsafe extern "C" fn(Handle, *const u8, usize, *const u8, usize, bool) -> Handle,
    pub animation: unsafe extern "C" fn(Handle, i32) -> Handle,

    // Extra modifiers
    pub blur: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub brightness: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub saturation: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub grayscale: unsafe extern "C" fn(Handle, f32) -> Handle,
    pub help_text: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub line_limit: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub fixed_size_mod: unsafe extern "C" fn(Handle) -> Handle,
    pub aspect_ratio: unsafe extern "C" fn(Handle, f32, i32) -> Handle,
    pub clipped: unsafe extern "C" fn(Handle) -> Handle,
    pub tint: unsafe extern "C" fn(Handle, f32, f32, f32) -> Handle,
    pub badge: unsafe extern "C" fn(Handle, i32) -> Handle,

    // Extra views
    pub secure_field: unsafe extern "C" fn(*const u8, usize, *const u8, usize) -> Handle,
    pub text_editor: unsafe extern "C" fn(*const u8, usize) -> Handle,
    pub stepper: unsafe extern "C" fn(*const u8, usize, i32, i32, i32) -> Handle,
    pub group_box: unsafe extern "C" fn(*const u8, usize, Handle) -> Handle,

    // TabView / Picker / Menu
    pub tabview: unsafe extern "C" fn(
        *const Handle,
        *const *const u8,
        *const usize,
        *const *const u8,
        *const usize,
        usize,
    ) -> Handle,
    pub bound_picker: unsafe extern "C" fn(
        *const u8,
        usize,
        *const *const u8,
        *const usize,
        usize,
        i32,
        unsafe extern "C" fn(i32, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub menu: unsafe extern "C" fn(*const u8, usize, Handle) -> Handle,
    pub context_menu: unsafe extern "C" fn(Handle, Handle) -> Handle,

    // Nav / Toolbar / Grid / Form
    pub navigation_title: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub toolbar: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub grid: unsafe extern "C" fn(*const Handle, usize, i32) -> Handle,
    pub form: unsafe extern "C" fn(*const Handle, usize) -> Handle,
    pub section: unsafe extern "C" fn(*const u8, usize, *const Handle, usize) -> Handle,

    // Per-view lifecycle
    pub on_appear:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,
    pub on_disappear:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,

    // Bold / Italic on any view
    pub bold_mod: unsafe extern "C" fn(Handle) -> Handle,
    pub italic_mod: unsafe extern "C" fn(Handle) -> Handle,

    // Popover
    pub popover: unsafe extern "C" fn(Handle, Handle, bool) -> Handle,

    // Remaining modifiers
    pub color_invert: unsafe extern "C" fn(Handle) -> Handle,
    pub ignores_safe_area: unsafe extern "C" fn(Handle) -> Handle,
    pub confirmation_dialog: unsafe extern "C" fn(Handle, *const u8, usize, bool, Handle) -> Handle,
    pub keyboard_shortcut: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub focusable: unsafe extern "C" fn(Handle) -> Handle,
    pub truncation_mode: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub multiline_alignment: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub minimum_scale_factor: unsafe extern "C" fn(Handle, f32) -> Handle,

    // Accessibility
    pub accessibility_label: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub accessibility_hint: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub accessibility_hidden: unsafe extern "C" fn(Handle, bool) -> Handle,
    pub accessibility_value: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,

    // Animation extended
    pub animation_duration: unsafe extern "C" fn(Handle, i32, f32) -> Handle,
    pub animation_spring_params: unsafe extern "C" fn(Handle, f32, f32) -> Handle,
    pub transition: unsafe extern "C" fn(Handle, i32) -> Handle,

    // Gestures
    pub on_drag: unsafe extern "C" fn(
        Handle,
        unsafe extern "C" fn(f32, f32, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub on_magnify:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(f32, *mut c_void), *mut c_void) -> Handle,
    pub on_rotate:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(f32, *mut c_void), *mut c_void) -> Handle,

    // Canvas / Geometry / ScrollViewReader / Timeline
    pub geometry_reader: unsafe extern "C" fn(
        unsafe extern "C" fn(f32, f32, *mut c_void) -> Handle,
        *mut c_void,
    ) -> Handle,
    pub scroll_view_reader: unsafe extern "C" fn(Handle) -> Handle,
    pub scrollable_id: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub timeline_view: unsafe extern "C" fn(
        f32,
        unsafe extern "C" fn(f32, *mut c_void) -> Handle,
        *mut c_void,
    ) -> Handle,

    // withAnimation / matchedGeometry / task
    pub with_animation:
        unsafe extern "C" fn(i32, f32, unsafe extern "C" fn(*mut c_void), *mut c_void),
    pub matched_geometry: unsafe extern "C" fn(Handle, *const u8, usize) -> Handle,
    pub task:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,
    pub photos_picker: unsafe extern "C" fn(
        *const u8,
        usize,
        unsafe extern "C" fn(*const u8, usize, *mut c_void),
        *mut c_void,
    ) -> Handle,

    // Map / Video
    pub map: unsafe extern "C" fn(f32, f32, f32, f32) -> Handle,
    pub video_player: unsafe extern "C" fn(*const u8, usize) -> Handle,

    // Searchable / Refreshable / SwipeActions
    pub searchable: unsafe extern "C" fn(
        Handle,
        unsafe extern "C" fn(*const u8, usize, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub refreshable:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,
    pub swipe_actions_delete:
        unsafe extern "C" fn(Handle, unsafe extern "C" fn(*mut c_void), *mut c_void) -> Handle,
    pub swipe_actions_custom: unsafe extern "C" fn(Handle, Handle, i32) -> Handle,

    // Batch modifiers
    pub blend_mode: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub mask: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub drawing_group: unsafe extern "C" fn(Handle) -> Handle,
    pub allows_hit_testing: unsafe extern "C" fn(Handle, bool) -> Handle,
    pub content_shape: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub safe_area_inset_bottom: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub safe_area_inset_top: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub list_row_background: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub list_row_separator: unsafe extern "C" fn(Handle, bool) -> Handle,
    pub overlay_aligned: unsafe extern "C" fn(Handle, Handle, i32) -> Handle,
    pub background_aligned: unsafe extern "C" fn(Handle, Handle, i32) -> Handle,
    pub preferred_color_scheme: unsafe extern "C" fn(Handle, bool) -> Handle,

    // AppStorage
    pub app_storage_get_string:
        unsafe extern "C" fn(*const u8, usize, *mut *mut c_void, *mut usize) -> bool,
    pub app_storage_set_string: unsafe extern "C" fn(*const u8, usize, *const u8, usize),
    pub app_storage_get_int: unsafe extern "C" fn(*const u8, usize) -> isize,
    pub app_storage_set_int: unsafe extern "C" fn(*const u8, usize, isize),
    pub app_storage_get_bool: unsafe extern "C" fn(*const u8, usize) -> bool,
    pub app_storage_set_bool: unsafe extern "C" fn(*const u8, usize, bool),

    // NavigationStack / NavigationLink
    pub navigation_stack: unsafe extern "C" fn(Handle) -> Handle,
    pub navigation_link: unsafe extern "C" fn(*const u8, usize, Handle) -> Handle,

    // onChange / containerRelativeFrame / Canvas / Phase animation
    pub on_change_int: unsafe extern "C" fn(
        Handle,
        isize,
        unsafe extern "C" fn(isize, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub container_relative_frame: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub canvas_commands: unsafe extern "C" fn(f32, f32, *const f32, usize) -> Handle,
    pub phase_animation: unsafe extern "C" fn(Handle, i32) -> Handle,
    pub phase_animation_scale: unsafe extern "C" fn(Handle, *const f32, usize) -> Handle,

    // Custom bezier / Keyframes / ScrollTo / FocusState / Table
    pub animation_bezier: unsafe extern "C" fn(Handle, f32, f32, f32, f32, f32) -> Handle,
    pub keyframe_animation: unsafe extern "C" fn(Handle, *const f32, usize, bool) -> Handle,
    pub scroll_reader_create: unsafe extern "C" fn(Handle) -> Handle,
    pub scroll_to: unsafe extern "C" fn(Handle, *const u8, usize),
    pub focus_model_create: unsafe extern "C" fn() -> *mut c_void,
    pub focus_model_set: unsafe extern "C" fn(*mut c_void, *const u8, usize),
    pub focus_model_clear: unsafe extern "C" fn(*mut c_void),
    pub focusable_textfield: unsafe extern "C" fn(
        *const u8,
        usize,
        *const u8,
        usize,
        *const u8,
        usize,
        unsafe extern "C" fn(*const u8, usize, *mut c_void),
        *mut c_void,
        *mut c_void,
    ) -> Handle,

    // Symbol effects
    pub symbol_effect_bounce: unsafe extern "C" fn(Handle) -> Handle,
    pub symbol_effect_pulse: unsafe extern "C" fn(Handle) -> Handle,
    pub symbol_effect_variable_color: unsafe extern "C" fn(Handle) -> Handle,

    // Remaining views
    pub disclosure_group: unsafe extern "C" fn(*const u8, usize, Handle) -> Handle,
    pub labeled_content: unsafe extern "C" fn(*const u8, usize, Handle) -> Handle,
    pub navigation_split_view: unsafe extern "C" fn(Handle, Handle) -> Handle,
    pub content_unavailable:
        unsafe extern "C" fn(*const u8, usize, *const u8, usize, *const u8, usize) -> Handle,
    pub share_link: unsafe extern "C" fn(*const u8, usize, *const u8, usize) -> Handle,

    // Missing views
    pub async_image: unsafe extern "C" fn(*const u8, usize) -> Handle,
    pub color_picker_bound: unsafe extern "C" fn(
        *const u8,
        usize,
        f32,
        f32,
        f32,
        unsafe extern "C" fn(f32, f32, f32, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub date_picker_bound: unsafe extern "C" fn(
        *const u8,
        usize,
        f64,
        unsafe extern "C" fn(f64, *mut c_void),
        *mut c_void,
    ) -> Handle,
    pub empty_view: unsafe extern "C" fn() -> Handle,
    pub lazy_hgrid: unsafe extern "C" fn(*const Handle, usize, i32) -> Handle,
    pub timer_start:
        unsafe extern "C" fn(f32, unsafe extern "C" fn(*mut c_void), *mut c_void) -> *mut c_void,
    pub timer_stop: unsafe extern "C" fn(*mut c_void),

    // Lifecycle
    pub release: unsafe extern "C" fn(Handle),
    pub retain: unsafe extern "C" fn(Handle),

    // Window
    pub show_window: unsafe extern "C" fn(Handle, *const u8, usize, f32, f32),

    // Snapshot (optional — may be null)
    pub snapshot:
        Option<unsafe extern "C" fn(Handle, f32, f32, *mut *mut c_void, *mut usize) -> bool>,
    pub snapshot_free: Option<unsafe extern "C" fn(*mut c_void, usize)>,
    pub compare_png:
        Option<unsafe extern "C" fn(*const c_void, usize, *const c_void, usize, f32) -> f32>,
}

/// Load the Swift bridge dylib and resolve all symbols.
#[allow(clippy::missing_transmute_annotations)]
pub fn load(path: &str) -> Result<Fns, String> {
    unsafe {
        // Load SwiftUI framework
        dlopen(
            c"/System/Library/Frameworks/SwiftUI.framework/SwiftUI".as_ptr(),
            1,
        );

        let cpath = CString::new(path).unwrap();
        let h = dlopen(cpath.as_ptr(), 2);
        if h.is_null() {
            return Err(format!("Failed to load {path}"));
        }

        let snap_ptr = dlsym(h, c"snapshot_view_handle".as_ptr());
        let free_ptr = dlsym(h, c"free_snapshot".as_ptr());
        let cmp_ptr = dlsym(h, c"compare_png_bytes".as_ptr());

        Ok(Fns {
            text: std::mem::transmute(sym(h, c"swiftui_text")),
            styled_text: std::mem::transmute(sym(h, c"swiftui_text_styled")),
            system_image: std::mem::transmute(sym(h, c"swiftui_system_image")),
            spacer: std::mem::transmute(sym(h, c"swiftui_spacer")),
            divider: std::mem::transmute(sym(h, c"swiftui_divider")),
            color: std::mem::transmute(sym(h, c"swiftui_color")),
            progress: std::mem::transmute(sym(h, c"swiftui_progress")),
            toggle: std::mem::transmute(sym(h, c"swiftui_toggle")),
            textfield: std::mem::transmute(sym(h, c"swiftui_textfield")),
            button: std::mem::transmute(sym(h, c"swiftui_button")),
            vstack: std::mem::transmute(sym(h, c"swiftui_vstack")),
            hstack: std::mem::transmute(sym(h, c"swiftui_hstack")),
            zstack: std::mem::transmute(sym(h, c"swiftui_zstack")),
            scroll_view: std::mem::transmute(sym(h, c"swiftui_scroll_view")),
            padding: std::mem::transmute(sym(h, c"swiftui_padding")),
            frame: std::mem::transmute(sym(h, c"swiftui_frame")),
            background_color: std::mem::transmute(sym(h, c"swiftui_background_color")),
            corner_radius: std::mem::transmute(sym(h, c"swiftui_corner_radius")),
            opacity: std::mem::transmute(sym(h, c"swiftui_opacity")),
            border: std::mem::transmute(sym(h, c"swiftui_border")),
            foreground_color: std::mem::transmute(sym(h, c"swiftui_foreground_color")),
            shadow: std::mem::transmute(sym(h, c"swiftui_shadow")),
            offset: std::mem::transmute(sym(h, c"swiftui_offset")),
            scale: std::mem::transmute(sym(h, c"swiftui_scale")),
            rotation: std::mem::transmute(sym(h, c"swiftui_rotation")),
            hidden: std::mem::transmute(sym(h, c"swiftui_hidden")),
            disabled: std::mem::transmute(sym(h, c"swiftui_disabled")),
            overlay: std::mem::transmute(sym(h, c"swiftui_overlay")),
            clip_circle: std::mem::transmute(sym(h, c"swiftui_clip_circle")),
            font_system: std::mem::transmute(sym(h, c"swiftui_font_system")),
            label: std::mem::transmute(sym(h, c"swiftui_label")),
            slider: std::mem::transmute(sym(h, c"swiftui_slider")),
            link: std::mem::transmute(sym(h, c"swiftui_link")),
            on_tap: std::mem::transmute(sym(h, c"swiftui_on_tap")),
            on_long_press: std::mem::transmute(sym(h, c"swiftui_on_long_press")),
            bound_textfield: std::mem::transmute(sym(h, c"swiftui_bound_textfield")),
            bound_toggle: std::mem::transmute(sym(h, c"swiftui_bound_toggle")),
            bound_slider: std::mem::transmute(sym(h, c"swiftui_bound_slider")),
            list: std::mem::transmute(sym(h, c"swiftui_list")),
            sheet: std::mem::transmute(sym(h, c"swiftui_sheet")),
            alert: std::mem::transmute(sym(h, c"swiftui_alert")),
            animation: std::mem::transmute(sym(h, c"swiftui_animation")),
            blur: std::mem::transmute(sym(h, c"swiftui_blur")),
            brightness: std::mem::transmute(sym(h, c"swiftui_brightness")),
            saturation: std::mem::transmute(sym(h, c"swiftui_saturation")),
            grayscale: std::mem::transmute(sym(h, c"swiftui_grayscale")),
            help_text: std::mem::transmute(sym(h, c"swiftui_help")),
            line_limit: std::mem::transmute(sym(h, c"swiftui_line_limit")),
            fixed_size_mod: std::mem::transmute(sym(h, c"swiftui_fixed_size")),
            aspect_ratio: std::mem::transmute(sym(h, c"swiftui_aspect_ratio")),
            clipped: std::mem::transmute(sym(h, c"swiftui_clipped")),
            tint: std::mem::transmute(sym(h, c"swiftui_tint")),
            badge: std::mem::transmute(sym(h, c"swiftui_badge")),
            secure_field: std::mem::transmute(sym(h, c"swiftui_secure_field")),
            text_editor: std::mem::transmute(sym(h, c"swiftui_text_editor")),
            stepper: std::mem::transmute(sym(h, c"swiftui_stepper")),
            group_box: std::mem::transmute(sym(h, c"swiftui_group_box")),
            tabview: std::mem::transmute(sym(h, c"swiftui_tabview")),
            bound_picker: std::mem::transmute(sym(h, c"swiftui_bound_picker")),
            menu: std::mem::transmute(sym(h, c"swiftui_menu")),
            context_menu: std::mem::transmute(sym(h, c"swiftui_context_menu")),
            navigation_title: std::mem::transmute(sym(h, c"swiftui_navigation_title")),
            toolbar: std::mem::transmute(sym(h, c"swiftui_toolbar")),
            grid: std::mem::transmute(sym(h, c"swiftui_grid")),
            form: std::mem::transmute(sym(h, c"swiftui_form")),
            section: std::mem::transmute(sym(h, c"swiftui_section")),
            on_appear: std::mem::transmute(sym(h, c"swiftui_on_appear")),
            on_disappear: std::mem::transmute(sym(h, c"swiftui_on_disappear")),
            bold_mod: std::mem::transmute(sym(h, c"swiftui_bold")),
            italic_mod: std::mem::transmute(sym(h, c"swiftui_italic")),
            popover: std::mem::transmute(sym(h, c"swiftui_popover")),
            color_invert: std::mem::transmute(sym(h, c"swiftui_color_invert")),
            ignores_safe_area: std::mem::transmute(sym(h, c"swiftui_ignores_safe_area")),
            confirmation_dialog: std::mem::transmute(sym(h, c"swiftui_confirmation_dialog")),
            keyboard_shortcut: std::mem::transmute(sym(h, c"swiftui_keyboard_shortcut")),
            focusable: std::mem::transmute(sym(h, c"swiftui_focusable")),
            truncation_mode: std::mem::transmute(sym(h, c"swiftui_truncation_mode")),
            multiline_alignment: std::mem::transmute(sym(h, c"swiftui_multiline_alignment")),
            minimum_scale_factor: std::mem::transmute(sym(h, c"swiftui_minimum_scale_factor")),
            accessibility_label: std::mem::transmute(sym(h, c"swiftui_accessibility_label")),
            accessibility_hint: std::mem::transmute(sym(h, c"swiftui_accessibility_hint")),
            accessibility_hidden: std::mem::transmute(sym(h, c"swiftui_accessibility_hidden")),
            accessibility_value: std::mem::transmute(sym(h, c"swiftui_accessibility_value")),
            disclosure_group: std::mem::transmute(sym(h, c"swiftui_disclosure_group")),
            labeled_content: std::mem::transmute(sym(h, c"swiftui_labeled_content")),
            navigation_split_view: std::mem::transmute(sym(h, c"swiftui_navigation_split_view")),
            content_unavailable: std::mem::transmute(sym(h, c"swiftui_content_unavailable")),
            share_link: std::mem::transmute(sym(h, c"swiftui_share_link")),
            blend_mode: std::mem::transmute(sym(h, c"swiftui_blend_mode")),
            mask: std::mem::transmute(sym(h, c"swiftui_mask")),
            drawing_group: std::mem::transmute(sym(h, c"swiftui_drawing_group")),
            allows_hit_testing: std::mem::transmute(sym(h, c"swiftui_allows_hit_testing")),
            content_shape: std::mem::transmute(sym(h, c"swiftui_content_shape")),
            safe_area_inset_bottom: std::mem::transmute(sym(h, c"swiftui_safe_area_inset_bottom")),
            safe_area_inset_top: std::mem::transmute(sym(h, c"swiftui_safe_area_inset_top")),
            list_row_background: std::mem::transmute(sym(h, c"swiftui_list_row_background")),
            list_row_separator: std::mem::transmute(sym(h, c"swiftui_list_row_separator")),
            overlay_aligned: std::mem::transmute(sym(h, c"swiftui_overlay_aligned")),
            background_aligned: std::mem::transmute(sym(h, c"swiftui_background_aligned")),
            preferred_color_scheme: std::mem::transmute(sym(h, c"swiftui_preferred_color_scheme")),
            app_storage_get_string: std::mem::transmute(sym(h, c"swiftui_app_storage_get_string")),
            app_storage_set_string: std::mem::transmute(sym(h, c"swiftui_app_storage_set_string")),
            app_storage_get_int: std::mem::transmute(sym(h, c"swiftui_app_storage_get_int")),
            app_storage_set_int: std::mem::transmute(sym(h, c"swiftui_app_storage_set_int")),
            app_storage_get_bool: std::mem::transmute(sym(h, c"swiftui_app_storage_get_bool")),
            app_storage_set_bool: std::mem::transmute(sym(h, c"swiftui_app_storage_set_bool")),
            navigation_stack: std::mem::transmute(sym(h, c"swiftui_navigation_stack")),
            navigation_link: std::mem::transmute(sym(h, c"swiftui_navigation_link")),
            on_change_int: std::mem::transmute(sym(h, c"swiftui_on_change_int")),
            container_relative_frame: std::mem::transmute(sym(
                h,
                c"swiftui_container_relative_frame",
            )),
            canvas_commands: std::mem::transmute(sym(h, c"swiftui_canvas_commands")),
            phase_animation: std::mem::transmute(sym(h, c"swiftui_phase_animation")),
            phase_animation_scale: std::mem::transmute(sym(h, c"swiftui_phase_animation_scale")),
            animation_bezier: std::mem::transmute(sym(h, c"swiftui_animation_bezier")),
            keyframe_animation: std::mem::transmute(sym(h, c"swiftui_keyframe_animation")),
            scroll_reader_create: std::mem::transmute(sym(h, c"swiftui_scroll_reader_create")),
            scroll_to: std::mem::transmute(sym(h, c"swiftui_scroll_to")),
            focus_model_create: std::mem::transmute(sym(h, c"swiftui_focus_model_create")),
            focus_model_set: std::mem::transmute(sym(h, c"swiftui_focus_model_set")),
            focus_model_clear: std::mem::transmute(sym(h, c"swiftui_focus_model_clear")),
            focusable_textfield: std::mem::transmute(sym(h, c"swiftui_focusable_textfield")),
            async_image: std::mem::transmute(sym(h, c"swiftui_async_image")),
            color_picker_bound: std::mem::transmute(sym(h, c"swiftui_color_picker_bound")),
            date_picker_bound: std::mem::transmute(sym(h, c"swiftui_date_picker_bound")),
            empty_view: std::mem::transmute(sym(h, c"swiftui_empty_view")),
            lazy_hgrid: std::mem::transmute(sym(h, c"swiftui_lazy_hgrid")),
            timer_start: std::mem::transmute(sym(h, c"swiftui_timer_start")),
            timer_stop: std::mem::transmute(sym(h, c"swiftui_timer_stop")),
            symbol_effect_bounce: std::mem::transmute(sym(h, c"swiftui_symbol_effect_bounce")),
            symbol_effect_pulse: std::mem::transmute(sym(h, c"swiftui_symbol_effect_pulse")),
            symbol_effect_variable_color: std::mem::transmute(sym(
                h,
                c"swiftui_symbol_effect_variable_color",
            )),
            animation_duration: std::mem::transmute(sym(h, c"swiftui_animation_duration")),
            animation_spring_params: std::mem::transmute(sym(
                h,
                c"swiftui_animation_spring_params",
            )),
            transition: std::mem::transmute(sym(h, c"swiftui_transition")),
            on_drag: std::mem::transmute(sym(h, c"swiftui_on_drag")),
            on_magnify: std::mem::transmute(sym(h, c"swiftui_on_magnify")),
            on_rotate: std::mem::transmute(sym(h, c"swiftui_on_rotate")),
            geometry_reader: std::mem::transmute(sym(h, c"swiftui_geometry_reader")),
            scroll_view_reader: std::mem::transmute(sym(h, c"swiftui_scroll_view_reader")),
            scrollable_id: std::mem::transmute(sym(h, c"swiftui_scrollable_id")),
            timeline_view: std::mem::transmute(sym(h, c"swiftui_timeline_view")),
            with_animation: std::mem::transmute(sym(h, c"swiftui_with_animation")),
            matched_geometry: std::mem::transmute(sym(h, c"swiftui_matched_geometry")),
            task: std::mem::transmute(sym(h, c"swiftui_task")),
            photos_picker: std::mem::transmute(sym(h, c"swiftui_photos_picker")),
            map: std::mem::transmute(sym(h, c"swiftui_map")),
            video_player: std::mem::transmute(sym(h, c"swiftui_video_player")),
            searchable: std::mem::transmute(sym(h, c"swiftui_searchable")),
            refreshable: std::mem::transmute(sym(h, c"swiftui_refreshable")),
            swipe_actions_delete: std::mem::transmute(sym(h, c"swiftui_swipe_actions_delete")),
            swipe_actions_custom: std::mem::transmute(sym(h, c"swiftui_swipe_actions_custom")),
            release: std::mem::transmute(sym(h, c"swiftui_release")),
            retain: std::mem::transmute(sym(h, c"swiftui_retain")),
            show_window: std::mem::transmute(sym(h, c"swiftui_show_window")),
            snapshot: if snap_ptr.is_null() {
                None
            } else {
                Some(std::mem::transmute(snap_ptr))
            },
            snapshot_free: if free_ptr.is_null() {
                None
            } else {
                Some(std::mem::transmute(free_ptr))
            },
            compare_png: if cmp_ptr.is_null() {
                None
            } else {
                Some(std::mem::transmute(cmp_ptr))
            },
        })
    }
}