-
Notifications
You must be signed in to change notification settings - Fork 219
/
api.json
16537 lines (16536 loc) · 874 KB
/
api.json
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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"1.0.0-alpha1": {
"app": {
"doc": "`App` construction and configuration",
"classes": {
"App": {
"external": "azul_impl::app::AzAppPtr",
"is_boxed_object": true,
"doc": "Main application class",
"struct_fields": [
{"ptr": {"type": "*const c_void"}},
{"run_destructor": {"type": "bool"}}
],
"constructors": {
"new": {
"doc":"Creates a new App instance from the given `AppConfig`",
"fn_args": [
{"data": "RefAny", "doc": "The initialized data model of the application, will be passed to the `LayoutCallback` of the active windows"},
{"config": "AppConfig", "doc": "Additional configuration on how the global application should behave"}
],
"fn_body": "azul_impl::app::AzAppPtr::new(data, config)"
}
},
"functions": {
"add_window": {
"doc": "Spawn a new window on the screen when the app is run.",
"fn_args": [
{"self": "refmut"},
{"window": "WindowCreateOptions", "doc": "New window, note that this will **not** be spawned as the root window"}
],
"fn_body":"app.add_window(window)"
},
"add_image": {
"doc": "Adds a new image identified by an ID to the image cache",
"fn_args": [
{"self": "refmut"},
{"id": "String"},
{"image": "ImageRef"}
],
"fn_body": "app.add_image(id, image)"
},
"get_monitors": {
"doc": "Returns a list of monitors - useful for setting the monitor that a window should spawn on.",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "MonitorVec", "doc": "List of currently attached monitors, note that this `Vec` will be empty on wasm32"},
"fn_body":"app.get_monitors()"
},
"run": {
"doc": "Runs the application. Due to platform restrictions (specifically `WinMain` on Windows), this function never returns.",
"fn_args": [
{"self": "ref"},
{"window": "WindowCreateOptions", "doc": "Initial state of the root (main) window of the application"}
],
"fn_body":"app.run(window)"
}
}
},
"AppConfig": {
"external": "azul_impl::resources::AppConfig",
"doc": "Configuration for optional features, such as whether to enable logging or panic hooks",
"struct_fields": [
{"layout_solver": {"type": "LayoutSolver", "doc": "Which layout solver version to use, necessary so that future upgrades don't break the layout of old programs"}},
{"log_level": {"type": "AppLogLevel", "doc": "If enabled, logs error and info messages"}},
{"enable_visual_panic_hook": {"type": "bool", "doc": "If the app crashes / panics, a window with a message box pops up"}},
{"enable_logging_on_panic": {"type": "bool", "doc": "If set, a backtrace + error information gets logged to stdout (if the log_level is not `LogLevel::Off`)"}},
{"enable_tab_navigation": {"type": "bool", "doc": "Whether keyboard navigation should be enabled"}},
{"system_callbacks": {"type": "SystemCallbacks", "doc": "External callbacks to create a thread or get the curent time"}}
],
"constructors": {
"new": {
"doc": "Constructs a default `AppConfig`, uses the layout solver currently available",
"fn_args": [
{"layout_solver": "LayoutSolver"}
],
"fn_body": "AzAppConfig::new(layout_solver)"
}
}
},
"AppLogLevel": {
"doc": "Configuration to set which messages should be logged.",
"external": "azul_impl::resources::AppLogLevel",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Off": {"doc": "No logging"}},
{"Error": {"doc": "Log errors"}},
{"Warn": {"doc": "Log warnings"}},
{"Info": {"doc": "Log informational messages"}},
{"Debug": {"doc": "Log debug messages"}},
{"Trace": {"doc": "Log tracing information"}}
]
},
"LayoutSolver": {
"external": "azul_impl::resources::LayoutSolverVersion",
"doc": "Version of the layout solver to use - future binary versions of azul may have more fields here, necessary so that old compiled applications don't break with newer releases of azul. Newer layout versions are opt-in only.",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Default": {"doc": "Default, current layout solver version"}}
]
},
"SystemCallbacks": {
"external": "azul_impl::task::ExternalSystemCallbacks",
"doc": "External system callbacks to get the system time or create / manage threads",
"struct_fields": [
{"create_thread_fn": {"type": "CreateThreadFn"}},
{"get_system_time_fn": {"type": "GetSystemTimeFn"}}
],
"constructors": {
"library_internal": {
"doc": "Use the default, library-internal callbacks instead of providing your own",
"fn_args": [
],
"fn_body": "AzSystemCallbacks::rust_internal()"
}
}
}
}
},
"window": {
"doc": "Window creation / startup configuration",
"classes": {
"WindowCreateOptions": {
"external": "azul_core::window::WindowCreateOptions",
"doc": "Options on how to initially create the window",
"struct_fields": [
{"state": {"type": "WindowState", "doc": "Initial state of the window on the first frame"}},
{"size_to_content": {"type": "bool", "doc": "If set, the first UI redraw will be called with a size of (0, 0) and the window size depends on the size of the overflowing UI. This is good for windows that do not want to take up unnecessary extra space"}},
{"renderer_type": {"type": "OptionRendererOptions", "doc": "If not `None`, azul will try to create a window with the specific renderer type and **crash** if the renderer is not available for whatever reason"}},
{"theme": {"type": "OptionWindowTheme", "doc": "Initially the `theme` on the `WindowState` is set to the OS theme - use this field to override the operating systems `Dark` or `Light` mode"}},
{"create_callback": {"type": "OptionCallback", "doc": "Callback to run **once** when the window is initially created"}},
{"hot_reload": {"type": "bool", "doc": "If set to true, will hot-reload the UI every 200ms. Default: false"}}
],
"constructors": {
"new": {
"doc": "Creates a new window configuration with a custom layout callback",
"fn_args":[
{"layout_callback": "LayoutCallbackType", "doc": "The callback to call when the UI of the window should be rendered"}
],
"fn_body":"AzWindowCreateOptions::new(layout_callback)"
}
}
},
"RendererOptions": {
"doc": "Force a specific renderer: note that azul will **crash** on startup if the `RendererOptions` are not satisfied.",
"external": "azul_core::window::RendererOptions",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"vsync": {"type": "Vsync", "doc": "Force the renderer to enable VSync. Set this only if your application can't run without VSync."}},
{"srgb": {"type": "Srgb", "doc": "Force the renderer to enable SRGB (OpenGL extension). Set this only if your application can't run without correct SRGB handling and color correctness is a priority."}},
{"hw_accel": {"type": "HwAcceleration", "doc": "Force the renderer to enable hardware acceleration. Set this only if your application can't run without hardware acceleration (ex. for games)."}}
]
},
"Vsync": {
"doc": "Whether the renderer has VSync enabled",
"external": "azul_core::window::Vsync",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Enabled": {}},
{"Disabled": {}},
{"DontCare": {}}
]
},
"Srgb": {
"doc": "Does the renderer render in SRGB color space? By default, azul tries to set it to `Enabled` and falls back to `Disabled` if the OpenGL context can't be initialized properly",
"external": "azul_core::window::Srgb",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Enabled": {}},
{"Disabled": {}},
{"DontCare": {}}
]
},
"HwAcceleration": {
"doc": "Does the renderer render using hardware acceleration? By default, azul tries to set it to `Enabled` and falls back to `Disabled` if the OpenGL context can't be initialized properly",
"external": "azul_core::window::HwAcceleration",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Enabled": {}},
{"Disabled": {}},
{"DontCare": {}}
]
},
"LayoutPoint": {
"doc": "Offset in physical pixels (integer units)",
"external": "azul_impl::css::LayoutPoint",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"x": {"type": "isize", "doc": "**Note**: can be negative"}},
{"y": {"type": "isize", "doc": "**Note**: can be negative"}}
]
},
"LayoutSize": {
"doc": "Size in physical pixels (integer units)",
"external": "azul_impl::css::LayoutSize",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"width": {"type": "isize", "doc": "**Note**: can be negative"}},
{"height": {"type": "isize", "doc": "**Note**: can be negative"}}
]
},
"LayoutRect": {
"external": "azul_impl::css::LayoutRect",
"doc": "Represents a rectangle in physical pixels (integer units)",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"origin": {"type": "LayoutPoint", "doc": "**Note**: can be negative"}},
{"size": {"type": "LayoutSize", "doc": "**Note**: can be negative"}}
]
},
"RawWindowHandle": {
"doc": "Raw platform handle, for integration in / with other toolkits and custom non-azul window extensions",
"external": "azul_core::window::RawWindowHandle",
"derive": ["Copy"],
"enum_fields": [
{"IOS": {"type": "IOSHandle"}},
{"MacOS": {"type": "MacOSHandle"}},
{"Xlib": {"type": "XlibHandle"}},
{"Xcb": {"type": "XcbHandle"}},
{"Wayland": {"type": "WaylandHandle"}},
{"Windows": {"type": "WindowsHandle"}},
{"Web": {"type": "WebHandle"}},
{"Android": {"type": "AndroidHandle"}},
{"Unsupported": {}}
]
},
"IOSHandle": {
"external": "azul_core::window::IOSHandle",
"derive": ["Copy"],
"struct_fields": [
{"ui_window": {"type": "*mut c_void"}},
{"ui_view": {"type": "*mut c_void"}},
{"ui_view_controller": {"type": "*mut c_void"}}
]
},
"MacOSHandle": {
"external": "azul_core::window::MacOSHandle",
"derive": ["Copy"],
"struct_fields": [
{"ns_window": {"type": "*mut c_void"}},
{"ns_view": {"type": "*mut c_void"}}
]
},
"XlibHandle": {
"external": "azul_core::window::XlibHandle",
"derive": ["Copy"],
"struct_fields": [
{"window": {"type": "u64", "doc": "An Xlib Window"}},
{"display": {"type": "*mut c_void", "doc": "A pointer to an Xlib `Display`"}}
]
},
"XcbHandle": {
"external": "azul_core::window::XcbHandle",
"derive": ["Copy"],
"struct_fields": [
{"window": {"type": "u32", "doc": "An X11 `xcb_window_t`"}},
{"connection": {"type": "*mut c_void", "doc": "A pointer to an X server `xcb_connection_t`"}}
]
},
"WaylandHandle": {
"external": "azul_core::window::WaylandHandle",
"derive": ["Copy"],
"struct_fields": [
{"surface": {"type": "*mut c_void", "doc": "A pointer to a `wl_surface`"}},
{"display": {"type": "*mut c_void", "doc": "A pointer to a `wl_display`"}}
]
},
"WindowsHandle": {
"external": "azul_core::window::WindowsHandle",
"derive": ["Copy"],
"struct_fields": [
{"hwnd": {"type": "*mut c_void", "doc": "Pointer to a `HWND` handle"}},
{"hinstance": {"type": "*mut c_void", "doc": "Pointer to a `HINSTANCE` associated with this windows `HWND`."}}
]
},
"WebHandle": {
"external": "azul_core::window::WebHandle",
"derive": ["Copy"],
"struct_fields": [
{"id": {"type": "u32", "doc": "An ID value inserted into the data attributes of the canvas element. Set to 0 if invalid."}}
]
},
"AndroidHandle": {
"external": "azul_core::window::AndroidHandle",
"derive": ["Copy"],
"struct_fields": [
{"a_native_window": {"type": "*mut c_void", "doc": "A pointer to an `ANativeWindow`"}}
]
},
"XWindowType": {
"doc": "X11 window hint: Type of window",
"external": "azul_core::window::XWindowType",
"derive": ["Copy"],
"enum_fields": [
{"Desktop": {"doc": "A desktop feature. This can include a single window containing desktop icons with the same dimensions as the screen, allowing the desktop environment to have full control of the desktop, without the need for proxying root window clicks"}},
{"Dock": {"doc": "A dock or panel feature. Typically a Window Manager would keep such windows on top of all other windows"}},
{"Toolbar": {"doc": "Toolbar windows. \"Torn off\" from the main application"}},
{"Menu": {"doc": "Pinnable menu windows. \"Torn off\" from the main application"}},
{"Utility": {"doc": "A small persistent utility window, such as a palette or toolbox"}},
{"Splash": {"doc": "The window is a splash screen displayed as an application is starting up"}},
{"Dialog": {"doc": "This is a dialog window"}},
{"DropdownMenu": {"doc": "A dropdown menu that usually appears when the user clicks on an item in a menu bar. This property is typically used on override-redirect windows."}},
{"PopupMenu": {"doc": "A popup menu that usually appears when the user right clicks on an object. This property is typically used on override-redirect windows."}},
{"Tooltip": {"doc": "A tooltip window. Usually used to show additional information when hovering over an object with the cursor. This property is typically used on override-redirect windows."}},
{"Notification": {"doc": "The window is a notification. This property is typically used on override-redirect windows."}},
{"Combo": {"doc": "This should be used on the windows that are popped up by combo boxes. This property is typically used on override-redirect windows."}},
{"Dnd": {"doc": "This indicates the the window is being dragged. This property is typically used on override-redirect windows."}},
{"Normal": {"doc": " This is a normal, top-level window"}}
]
},
"PhysicalPositionI32": {
"doc": "Same as `LayoutPoint`, but uses `i32` instead of `isize`",
"external": "azul_core::window::PhysicalPositionI32",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"x": {"type": "i32"}},
{"y": {"type": "i32"}}
]
},
"PhysicalSizeU32": {
"doc": "Same as `LayoutPoint`, but uses `u32` instead of `isize`",
"external": "azul_core::window::PhysicalSizeU32",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"width": {"type": "u32"}},
{"height": {"type": "u32"}}
]
},
"LogicalRect": {
"doc": "Logical rectangle area (can differ based on HiDPI settings). Usually this is what you'd want for hit-testing and positioning elements.",
"external": "azul_core::window::LogicalRect",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"origin": {"type": "LogicalPosition"}},
{"size": {"type": "LogicalSize"}}
]
},
"LogicalPosition": {
"doc": "Logical position (can differ based on HiDPI settings). Usually this is what you'd want for hit-testing and positioning elements.",
"external": "azul_core::window::LogicalPosition",
"derive": ["Default", "Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"x": {"type": "f32"}},
{"y": {"type": "f32"}}
],
"constructors": {
"new": {
"fn_args":[
{"x": "f32"},
{"y": "f32"}
],
"fn_body": "AzLogicalPosition::new(x, y)"
},
"zero": {
"fn_args":[
],
"fn_body": "AzLogicalPosition::zero()"
}
}
},
"LogicalSize": {
"doc": "A size in \"logical\" (non-HiDPI-adjusted) pixels in floating-point units",
"external": "azul_core::window::LogicalSize",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"width": {"type": "f32"}},
{"height": {"type": "f32"}}
],
"functions": {
"to_physical": {
"fn_args": [
{"self": "ref"},
{"hidpi_factor": "f32"}
],
"returns": {"type": "PhysicalSizeU32"},
"fn_body": "logicalsize.to_physical(hidpi_factor)"
}
}
},
"IconKey": {
"doc": "Unique hash of a window icon, so that azul does not have to compare the actual bytes to see wether the window icon has changed.",
"external": "azul_core::window::IconKey",
"derive": ["Copy"],
"struct_fields": [
{"id": {"type": "usize", "doc": "Can be any number, just has to be unique to the application. You need to generate a new `IconKey` if the window icon of your application has changed."}}
]
},
"SmallWindowIconBytes": {
"doc": "Small (16x16x4) window icon, usually shown in the window titlebar",
"external": "azul_core::window::SmallWindowIconBytes",
"struct_fields": [
{"key": {"type": "IconKey", "doc": "Key / hash of the window icon, so that azul can detect whether the icon has changed and notify the OS about the change."}},
{"rgba_bytes": {"type": "U8Vec", "doc": "Decoded bytes of the window icon, [32x32x4] bytes in length, rgba format"}}
]
},
"LargeWindowIconBytes": {
"doc": "Large (32x32x4) window icon, usually used on high-resolution displays (instead of `SmallWindowIcon`)",
"external": "azul_core::window::LargeWindowIconBytes",
"struct_fields": [
{"key": {"type": "IconKey", "doc": "Key / hash of the taskbar icon, so that azul can detect whether the icon has changed and notify the OS about the change."}},
{"rgba_bytes": {"type": "U8Vec", "doc": "Decoded bytes of the window icon, [32x32x4] bytes in length, rgba format"}}
]
},
"WindowIcon": {
"doc": "Window \"favicon\", usually shown in the top left of the window on Windows",
"external": "azul_core::window::WindowIcon",
"enum_fields": [
{"Small": {"type": "SmallWindowIconBytes", "doc": "Low-resolution version of the favicon"}},
{"Large": {"type": "LargeWindowIconBytes", "doc": "High-resolution version of the favicon"}}
]
},
"TaskBarIcon": {
"doc": "Application taskbar icon, 256x256x4 bytes in size",
"external": "azul_core::window::TaskBarIcon",
"struct_fields": [
{"key": {"type": "IconKey", "doc": "Unique icon key so that azul can determine whether the application icon has changed and notify the OS about the change"}},
{"rgba_bytes": {"type": "U8Vec", "doc": "Decoded bytes of the taskbar icon, 256x256x4 bytes in size, rgba format"}}
]
},
"VirtualKeyCode": {
"doc": "Symbolic name for a keyboard key, does **not** take the keyboard locale into account",
"external": "azul_core::window::VirtualKeyCode",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Key1": {}},
{"Key2": {}},
{"Key3": {}},
{"Key4": {}},
{"Key5": {}},
{"Key6": {}},
{"Key7": {}},
{"Key8": {}},
{"Key9": {}},
{"Key0": {}},
{"A": {}},
{"B": {}},
{"C": {}},
{"D": {}},
{"E": {}},
{"F": {}},
{"G": {}},
{"H": {}},
{"I": {}},
{"J": {}},
{"K": {}},
{"L": {}},
{"M": {}},
{"N": {}},
{"O": {}},
{"P": {}},
{"Q": {}},
{"R": {}},
{"S": {}},
{"T": {}},
{"U": {}},
{"V": {}},
{"W": {}},
{"X": {}},
{"Y": {}},
{"Z": {}},
{"Escape": {}},
{"F1": {}},
{"F2": {}},
{"F3": {}},
{"F4": {}},
{"F5": {}},
{"F6": {}},
{"F7": {}},
{"F8": {}},
{"F9": {}},
{"F10": {}},
{"F11": {}},
{"F12": {}},
{"F13": {}},
{"F14": {}},
{"F15": {}},
{"F16": {}},
{"F17": {}},
{"F18": {}},
{"F19": {}},
{"F20": {}},
{"F21": {}},
{"F22": {}},
{"F23": {}},
{"F24": {}},
{"Snapshot": {}},
{"Scroll": {}},
{"Pause": {}},
{"Insert": {}},
{"Home": {}},
{"Delete": {}},
{"End": {}},
{"PageDown": {}},
{"PageUp": {}},
{"Left": {}},
{"Up": {}},
{"Right": {}},
{"Down": {}},
{"Back": {}},
{"Return": {}},
{"Space": {}},
{"Compose": {}},
{"Caret": {}},
{"Numlock": {}},
{"Numpad0": {}},
{"Numpad1": {}},
{"Numpad2": {}},
{"Numpad3": {}},
{"Numpad4": {}},
{"Numpad5": {}},
{"Numpad6": {}},
{"Numpad7": {}},
{"Numpad8": {}},
{"Numpad9": {}},
{"NumpadAdd": {}},
{"NumpadDivide": {}},
{"NumpadDecimal": {}},
{"NumpadComma": {}},
{"NumpadEnter": {}},
{"NumpadEquals": {}},
{"NumpadMultiply": {}},
{"NumpadSubtract": {}},
{"AbntC1": {}},
{"AbntC2": {}},
{"Apostrophe": {}},
{"Apps": {}},
{"Asterisk": {}},
{"At": {}},
{"Ax": {}},
{"Backslash": {}},
{"Calculator": {}},
{"Capital": {}},
{"Colon": {}},
{"Comma": {}},
{"Convert": {}},
{"Equals": {}},
{"Grave": {}},
{"Kana": {}},
{"Kanji": {}},
{"LAlt": {}},
{"LBracket": {}},
{"LControl": {}},
{"LShift": {}},
{"LWin": {}},
{"Mail": {}},
{"MediaSelect": {}},
{"MediaStop": {}},
{"Minus": {}},
{"Mute": {}},
{"MyComputer": {}},
{"NavigateForward": {}},
{"NavigateBackward": {}},
{"NextTrack": {}},
{"NoConvert": {}},
{"OEM102": {}},
{"Period": {}},
{"PlayPause": {}},
{"Plus": {}},
{"Power": {}},
{"PrevTrack": {}},
{"RAlt": {}},
{"RBracket": {}},
{"RControl": {}},
{"RShift": {}},
{"RWin": {}},
{"Semicolon": {}},
{"Slash": {}},
{"Sleep": {}},
{"Stop": {}},
{"Sysrq": {}},
{"Tab": {}},
{"Underline": {}},
{"Unlabeled": {}},
{"VolumeDown": {}},
{"VolumeUp": {}},
{"Wake": {}},
{"WebBack": {}},
{"WebFavorites": {}},
{"WebForward": {}},
{"WebHome": {}},
{"WebRefresh": {}},
{"WebSearch": {}},
{"WebStop": {}},
{"Yen": {}},
{"Copy": {}},
{"Paste": {}},
{"Cut": {}}
]
},
"AcceleratorKey": {
"doc": "Symbolic accelerator key (ctrl, alt, shift)",
"external": "azul_core::window::AcceleratorKey",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Ctrl": {}},
{"Alt": {}},
{"Shift": {}},
{"Key": {"type": "VirtualKeyCode"}}
]
},
"WindowSize": {
"doc": "Minimum / maximum / current size of the window in logical dimensions",
"external": "azul_core::window::WindowSize",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"dimensions": {"type": "LogicalSize", "doc": "Current dimensions in logical units"}},
{"dpi": {"type": "u32", "doc": "Actual DPI factor (default: 96)"}},
{"min_dimensions": {"type": "OptionLogicalSize", "doc": "Maximum size of the window in logical units"}},
{"max_dimensions": {"type": "OptionLogicalSize", "doc": "Minimum size of the window in logical units"}}
],
"functions": {
"get_hidpi_factor": {
"doc": "Returns the hidpi factor of the bounds",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "f32"},
"fn_body": "windowsize.get_hidpi_factor()"
}
}
},
"WindowFlags": {
"doc": "Boolean flags relating to the current window state",
"external": "azul_core::window::WindowFlags",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"frame": {"type": "WindowFrame", "doc": "Is the window currently minimized, maximized, fullscreened or normal"}},
{"is_about_to_close": {"type": "bool", "doc": "Is the window about to close on the next frame? Setting this to true will close the window."}},
{"has_decorations": {"type": "bool", "doc": "Does the window have decorations (close, minimize, maximize, title bar)?"}},
{"is_visible": {"type": "bool", "doc": "Is the window currently visible?"}},
{"is_always_on_top": {"type": "bool", "doc": "Is the window always on top?"}},
{"is_resizable": {"type": "bool", "doc": "Whether the window is resizable"}},
{"has_focus": {"type": "bool", "doc": "Whether the window is currently focused (changing this field will request user attention)"}},
{"has_extended_window_frame": {"type": "bool", "doc": "Whether the window has an \"extended frame\", i.e. the title bar is not rendered and the maximize / minimize / close buttons bleed into the window content"}},
{"has_blur_behind_window": {"type": "bool", "doc": "Whether the window has a background blur"}},
{"smooth_scroll_enabled": {"type": "bool", "doc": "Is smooth scrolling enabled for this window?"}},
{"autotab_enabled": {"type": "bool", "doc": "Is automatic TAB support enabled for this window?"}}
]
},
"WindowFrame": {
"doc": "State of the window frame (minimized, maximized, fullscreen or normal window)",
"external": "azul_core::window::WindowFrame",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Normal": {}},
{"Minimized": {}},
{"Maximized": {}},
{"Fullscreen": {}}
]
},
"DebugState": {
"doc": "Debugging information, will be rendered as an overlay on top of the UI",
"external": "azul_core::window::DebugState",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"profiler_dbg": {"type": "bool", "doc": "Display the frame profiler on screen"}},
{"render_target_dbg": {"type": "bool", "doc": "Display intermediate render targets on screen"}},
{"texture_cache_dbg": {"type": "bool", "doc": "Display all texture cache pages on screen"}},
{"gpu_time_queries": {"type": "bool", "doc": "Display GPU timing results"}},
{"gpu_sample_queries": {"type": "bool", "doc": "Query the number of pixels that pass the depth test divided and show it in the profiler as a percentage of the number of pixels in the screen (window width times height)"}},
{"disable_batching": {"type": "bool", "doc": "Render each quad with their own draw call.\r\nTerrible for performance but can help with understanding the drawing order when inspecting renderdoc or apitrace recordings"}},
{"epochs": {"type": "bool", "doc": "Display the pipeline epochs"}},
{"echo_driver_messages": {"type": "bool", "doc": "Print driver messages to stdout"}},
{"show_overdraw": {"type": "bool", "doc": "Show an overlay displaying overdraw amount"}},
{"gpu_cache_dbg": {"type": "bool", "doc": "Display the contents of GPU cache"}},
{"texture_cache_dbg_clear_evicted": {"type": "bool", "doc": "Clear evicted parts of the texture cache for debugging purposes"}},
{"picture_caching_dbg": {"type": "bool", "doc": "Show picture caching debug overlay"}},
{"primitive_dbg": {"type": "bool", "doc": "Highlight all primitives with colors based on kind"}},
{"zoom_dbg": {"type": "bool", "doc": "Draw a zoom widget showing part of the framebuffer zoomed in"}},
{"small_screen": {"type": "bool", "doc": "Scale the debug renderer down for a smaller screen. This will disrupt any mapping between debug display items and page content, so shouldn't be used with overlays like the picture caching or primitive display"}},
{"disable_opaque_pass": {"type": "bool", "doc": "Disable various bits of the WebRender pipeline, to help narrow down where slowness might be coming from"}},
{"disable_alpha_pass": {"type": "bool", "doc": "Disable alpha"}},
{"disable_clip_masks": {"type": "bool", "doc": "Disable all clip masks"}},
{"disable_text_prims": {"type": "bool", "doc": "Disable text rendering"}},
{"disable_gradient_prims": {"type": "bool", "doc": "Disable gradients"}},
{"obscure_images": {"type": "bool", "doc": "Disable image rendering"}},
{"glyph_flashing": {"type": "bool", "doc": "Taint the transparent area of the glyphs with a random opacity to easily see when glyphs are re-rasterized"}},
{"smart_profiler": {"type": "bool", "doc": "The profiler only displays information that is out of the ordinary"}},
{"invalidation_dbg": {"type": "bool", "doc": "Dump picture cache invalidation information to stdout"}},
{"tile_cache_logging_dbg": {"type": "bool", "doc": "Print debug information about tile caches"}},
{"profiler_capture": {"type": "bool", "doc": "Capture a profile of the frame to a file"}},
{"force_picture_invalidation": {"type": "bool", "doc": "Force WebRender to render a new frame, even if WR can't determine that the display has changed"}}
]
},
"KeyboardState": {
"doc": "Current keyboard state, stores what keys / characters have been pressed",
"external": "azul_core::window::KeyboardState",
"struct_fields": [
{"current_char": {"type": "OptionChar", "doc": "Currently pressed `char` - (READONLY)"}},
{"current_virtual_keycode": {"type": "OptionVirtualKeyCode", "doc": "Currently pressed `VirtualKeyCode` - (READONLY). **DO NOT USE THIS FOR TEXT INPUT, USE `current_char` and `On::TextInput` instead.**"}},
{"pressed_virtual_keycodes": {"type": "VirtualKeyCodeVec", "doc": "List of currently held-down `VirtualKeyCodes` - useful to implement combinated shortcuts (ex. `Ctrl + Shift + Right`)"}},
{"pressed_scancodes": {"type": "ScanCodeVec", "doc": "List of currently held-down `ScanCode`s (typedef for `u32`). Same as `current_virtual_keycodes`, but the scancode identifies the physical key pressed, independent of the keyboard layout. The scancode does not change if the user adjusts the host's keyboard map. Use when the physical location of the key is more important than the key's host GUI semantics, such as for movement controls in a first-person game (German keyboard: Z key, UK keyboard: Y key, etc.)"}}
],
"functions": {
"shift_down": {
"doc": "Returns if the `SHIFT` key is held down (left OR right shift)",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "bool"},
"fn_body": "keyboardstate.shift_down()"
},
"ctrl_down": {
"doc": "Returns if the `CTRL` key is held down",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "bool"},
"fn_body": "keyboardstate.ctrl_down()"
},
"alt_down": {
"doc": "Returns if the `ALT` key is held down",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "bool"},
"fn_body": "keyboardstate.alt_down()"
},
"super_down": {
"doc": "Returns if the `SUPER` (\"Windows\") key is held down",
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "bool"},
"fn_body": "keyboardstate.super_down()"
},
"is_key_down": {
"doc": "Returns if a key is held down",
"fn_args": [
{"self": "ref"},
{"key": "VirtualKeyCode"}
],
"returns": {"type": "bool"},
"fn_body": "keyboardstate.is_key_down(key)"
}
}
},
"MouseCursorType": {
"doc": "Current icon of the mouse cursor",
"external": "azul_core::window::MouseCursorType",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Default": {}},
{"Crosshair": {}},
{"Hand": {}},
{"Arrow": {}},
{"Move": {}},
{"Text": {}},
{"Wait": {}},
{"Help": {}},
{"Progress": {}},
{"NotAllowed": {}},
{"ContextMenu": {}},
{"Cell": {}},
{"VerticalText": {}},
{"Alias": {}},
{"Copy": {}},
{"NoDrop": {}},
{"Grab": {}},
{"Grabbing": {}},
{"AllScroll": {}},
{"ZoomIn": {}},
{"ZoomOut": {}},
{"EResize": {}},
{"NResize": {}},
{"NeResize": {}},
{"NwResize": {}},
{"SResize": {}},
{"SeResize": {}},
{"SwResize": {}},
{"WResize": {}},
{"EwResize": {}},
{"NsResize": {}},
{"NeswResize": {}},
{"NwseResize": {}},
{"ColResize": {}},
{"RowResize": {}}
]
},
"CursorPosition": {
"doc": "Current position of the mouse cursor, relative to the window. Set to `Uninitialized` on startup (gets initialized on the first frame).",
"external": "azul_core::window::CursorPosition",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"OutOfWindow": {"type": "LogicalPosition", "doc": "The cursor is out of bound of the window. For security reasons, tracking the cursor is not permitted by the library. The payload is set to the position where the cursor left the window."}},
{"Uninitialized": {"doc": "The cursor position is unknown because the app hasn't yet been started. This is the default value and should generally only be set on startup."}},
{"InWindow": {"type": "LogicalPosition", "doc": "Cursor position relative to the top left corner of the window"}}
],
"functions": {
"get_position": {
"fn_args": [
{"self": "ref"}
],
"returns": {"type": "OptionLogicalPosition"},
"fn_body": "cursorposition.get_position().into()"
}
}
},
"MouseState": {
"doc": "Current mouse / cursor state",
"external": "azul_core::window::MouseState",
"struct_fields": [
{"mouse_cursor_type": {"type": "OptionMouseCursorType", "doc": "Current mouse cursor type, set to `None` if the cursor is hidden. (READWRITE)"}},
{"cursor_position": {"type": "CursorPosition", "doc": "Current mouse cursor type, set to `None` if the cursor is hidden. (READWRITE)"}},
{"is_cursor_locked": {"type": "bool", "doc": "Is the mouse cursor locked to the current window (important for applications like games)? (READWRITE)"}},
{"left_down": {"type": "bool", "doc": "Is the left mouse button down? (READONLY)"}},
{"right_down": {"type": "bool", "doc": "Is the right mouse button down? (READONLY)"}},
{"middle_down": {"type": "bool", "doc": "Is the middle mouse button down? (READONLY)"}},
{"scroll_x": {"type": "OptionF32", "doc": "Scroll amount in pixels in the horizontal direction. Gets reset to 0 after every frame (READONLY)"}},
{"scroll_y": {"type": "OptionF32", "doc": "Scroll amount in pixels in the vertical direction. Gets reset to 0 after every frame (READONLY)"}}
]
},
"PlatformSpecificOptions": {
"doc": "Platform-specific window configuration, i.e. WM options that are not cross-platform",
"external": "azul_core::window::PlatformSpecificOptions",
"struct_fields": [
{"windows_options": {"type": "WindowsWindowOptions", "doc": "Windows-specific WM options"}},
{"linux_options": {"type": "LinuxWindowOptions", "doc": "Linux-specific WM options"}},
{"mac_options": {"type": "MacWindowOptions", "doc": "Mac-specific WM options"}},
{"wasm_options": {"type": "WasmWindowOptions", "doc": "Web / WASM-specific WM options"}}
]
},
"WindowsWindowOptions": {
"doc": "Window configuration specific to Win32",
"external": "azul_core::window::WindowsWindowOptions",
"struct_fields": [
{"allow_drag_drop": {"type": "bool", "doc": "STARTUP ONLY: Whether the window should allow drag + drop operations (default: true)"}},
{"no_redirection_bitmap": {"type": "bool", "doc": "STARTUP ONLY: Sets `WS_EX_NOREDIRECTIONBITMAP`"}},
{"window_icon": {"type": "OptionWindowIcon", "doc": "STARTUP ONLY: Window icon (decoded bytes), usually 32x32x4 bytes large (`ICON_SMALL`), appears at the top right corner of the window"}},
{"taskbar_icon": {"type": "OptionTaskBarIcon", "doc": "READWRITE: Taskbar icon (decoded bytes), usually 256x256x4 bytes large (`ICON_BIG`). Can be changed in callbacks / at runtime."}},
{"parent_window": {"type": "OptionHwndHandle", "doc": "READWRITE: Taskbar icon (decoded bytes), usually 256x256x4 bytes large (`ICON_BIG`). Can be changed in callbacks / at runtime."}}
]
},
"WaylandTheme": {
"doc": "CSD theme of the window title / button controls",
"external": "azul_core::window::WaylandTheme",
"struct_fields": [
{"title_bar_active_background_color": {"type": "[u8;4]"}},
{"title_bar_active_separator_color": {"type": "[u8;4]"}},
{"title_bar_active_text_color": {"type": "[u8;4]"}},
{"title_bar_inactive_background_color": {"type": "[u8;4]"}},
{"title_bar_inactive_separator_color": {"type": "[u8;4]"}},
{"title_bar_inactive_text_color": {"type": "[u8;4]"}},
{"maximize_idle_foreground_inactive_color": {"type": "[u8;4]"}},
{"minimize_idle_foreground_inactive_color": {"type": "[u8;4]"}},
{"close_idle_foreground_inactive_color": {"type": "[u8;4]"}},
{"maximize_hovered_foreground_inactive_color": {"type": "[u8;4]"}},
{"minimize_hovered_foreground_inactive_color": {"type": "[u8;4]"}},
{"close_hovered_foreground_inactive_color": {"type": "[u8;4]"}},
{"maximize_disabled_foreground_inactive_color": {"type": "[u8;4]"}},
{"minimize_disabled_foreground_inactive_color": {"type": "[u8;4]"}},
{"close_disabled_foreground_inactive_color": {"type": "[u8;4]"}},
{"maximize_idle_background_inactive_color": {"type": "[u8;4]"}},
{"minimize_idle_background_inactive_color": {"type": "[u8;4]"}},
{"close_idle_background_inactive_color": {"type": "[u8;4]"}},
{"maximize_hovered_background_inactive_color": {"type": "[u8;4]"}},
{"minimize_hovered_background_inactive_color": {"type": "[u8;4]"}},
{"close_hovered_background_inactive_color": {"type": "[u8;4]"}},
{"maximize_disabled_background_inactive_color": {"type": "[u8;4]"}},
{"minimize_disabled_background_inactive_color": {"type": "[u8;4]"}},
{"close_disabled_background_inactive_color": {"type": "[u8;4]"}},
{"maximize_idle_foreground_active_color": {"type": "[u8;4]"}},
{"minimize_idle_foreground_active_color": {"type": "[u8;4]"}},
{"close_idle_foreground_active_color": {"type": "[u8;4]"}},
{"maximize_hovered_foreground_active_color": {"type": "[u8;4]"}},
{"minimize_hovered_foreground_active_color": {"type": "[u8;4]"}},
{"close_hovered_foreground_active_color": {"type": "[u8;4]"}},
{"maximize_disabled_foreground_active_color": {"type": "[u8;4]"}},
{"minimize_disabled_foreground_active_color": {"type": "[u8;4]"}},
{"close_disabled_foreground_active_color": {"type": "[u8;4]"}},
{"maximize_idle_background_active_color": {"type": "[u8;4]"}},
{"minimize_idle_background_active_color": {"type": "[u8;4]"}},
{"close_idle_background_active_color": {"type": "[u8;4]"}},
{"maximize_hovered_background_active_color": {"type": "[u8;4]"}},
{"minimize_hovered_background_active_color": {"type": "[u8;4]"}},
{"close_hovered_background_active_color": {"type": "[u8;4]"}},
{"maximize_disabled_background_active_color": {"type": "[u8;4]"}},
{"minimize_disabled_background_active_color": {"type": "[u8;4]"}},
{"close_disabled_background_active_color": {"type": "[u8;4]"}},
{"title_bar_font": {"type": "String", "doc": "Font of the title bar, \"sans-serif\" by default"}},
{"title_bar_font_size": {"type": "f32"}}
]
},
"RendererType": {
"doc": "Renderer type of the current windows OpenGL context",
"external": "azul_core::window::RendererType",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Hardware": {"doc": "Hardware rendering active (OpenGL 3.1 / OpenGL ES 3.0)"}},
{"Software": {"doc": "Software OpenGL rendering active (swgl)"}}
]
},
"StringPair": {
"doc": "Key-value pair, used for setting WM hints values specific to GNOME",
"external": "azul_core::window::AzStringPair",
"derive": ["Serialize", "Deserialize"],
"struct_fields": [
{"key": {"type": "String"}},
{"value": {"type": "String"}}
]
},
"LinuxWindowOptions": {
"external": "azul_core::window::LinuxWindowOptions",
"struct_fields": [
{"x11_visual": {"type": "OptionX11Visual", "doc": "Which X11 visual to use for the window (unimplemented). Can only be set at window creation, can't be changed in callbacks"}},
{"x11_screen": {"type": "OptionI32", "doc": "Which screen to use when showing the window (unimplemented). Can only be set at window creation, can't be changed in callbacks"}},
{"x11_wm_classes": {"type": "StringPairVec", "doc": "Build window with `WM_CLASS` hint; defaults to the name of the binary. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"x11_override_redirect": {"type": "bool", "doc": "Build window with override-redirect flag; defaults to false. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"x11_window_types": {"type": "XWindowTypeVec", "doc": "Build window with `_NET_WM_WINDOW_TYPE` hint; defaults to `Normal`. Only relevant on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"x11_gtk_theme_variant": {"type": "OptionString", "doc": "Build window with `_GTK_THEME_VARIANT` hint set to the specified value. Currently only relevant on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"x11_resize_increments": {"type": "OptionLogicalSize", "doc": "Build window with resize increment hint. Only implemented on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"x11_base_size": {"type": "OptionLogicalSize", "doc": "Build window with base size hint. Only implemented on X11. Can only be set at window creation, can't be changed in callbacks."}},
{"wayland_app_id": {"type": "OptionString", "doc": "Build window with a given application ID. It should match the `.desktop` file distributed with the program. Only relevant on Wayland. Can only be set at window creation, can't be changed in callbacks."}},
{"wayland_theme": {"type": "OptionWaylandTheme", "doc": "Window decoration of the window minimize / maximize / close buttons"}},
{"request_user_attention": {"type": "bool", "doc": "Whether the window icon should blink to request the users attention."}},
{"window_icon": {"type": "OptionWindowIcon", "doc": "Sets the window icon of the program"}}
]
},
"MacWindowOptions": {
"external": "azul_core::window::MacWindowOptions",
"derive": ["Copy"],
"struct_fields": [
{"_reserved": {"type": "u8", "doc": "Reserved empty field"}}
]
},
"WasmWindowOptions": {
"external": "azul_core::window::WasmWindowOptions",
"derive": ["Copy"],
"struct_fields": [
{"_reserved": {"type": "u8", "doc": "Reserved empty field"}}
]
},
"FullScreenMode": {
"external": "azul_core::window::FullScreenMode",
"derive": ["Copy"],
"enum_fields": [
{"SlowFullScreen": {"doc": "- macOS: If the window is in windowed mode, transitions it slowly to fullscreen mode}\r\n- other: Does the same as `FastFullScreen`."}},
{"FastFullScreen": {"doc": "Window should immediately go into fullscreen mode (on macOS this is not the default behaviour)."}},
{"SlowWindowed": {"doc": "- macOS: If the window is in fullscreen mode, transitions slowly back to windowed state.\r\n- other: Does the same as `FastWindowed`."}},
{"FastWindowed": {"doc": "If the window is in fullscreen mode, will immediately go back to windowed mode (on macOS this is not the default behaviour)."}}
]
},
"WindowTheme": {
"doc": "Window theme, set by the operating system or `WindowCreateOptions.theme` on startup",
"external": "azul_core::window::WindowTheme",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"DarkMode": {"doc": "Dark mode theme"}},
{"LightMode": {"doc": "Light mode theme (default)"}}
]
},
"WindowPosition": {
"doc": "Position of the top left corner of the window relative to the top left of the monitor",
"external": "azul_core::window::WindowPosition",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Uninitialized": {"doc": "Window position has not been initialized yet (default, only set on startup)"}},
{"Initialized": {"type": "PhysicalPositionI32", "doc": "Initialized window position: modifying this value will move the window"}}
]
},
"ImePosition": {
"doc": "Position of the virtual keyboard necessary to insert CJK characters",
"external": "azul_core::window::ImePosition",
"derive": ["Copy", "Serialize", "Deserialize"],
"enum_fields": [
{"Uninitialized": {}},
{"Initialized": {"type": "LogicalPosition"}}
]
},
"TouchState": {
"doc": "Current state of touch devices / touch inputs",
"external": "azul_core::window::TouchState",
"derive": ["Copy"],
"struct_fields": [
{"unused": {"type": "u8"}}
]
},
"Monitor": {
"doc": "Information about a single (or many) monitors, useful for dock widgets",
"external": "azul_core::window::Monitor",
"struct_fields": [
{"id": {"type": "usize", "doc": "Internal ID for the monitor, only useful at startup to specify which screen the window should be created on (unimplemented)"}},
{"name": {"type": "OptionString", "doc": "Name of the Monitor"}},
{"size": {"type": "LayoutSize", "doc": "Size of the monitor. Note that this does not say anything about DPI (i.e. the physical, real-world size of the monitor)."}},
{"position": {"type": "LayoutPoint", "doc": "Position relative to the top left of the \"virtual\" monitor size (if two or more monitors are connected, this area will usually be a union of all monitors)"}},
{"scale_factor": {"type": "f64", "doc": "HiDPI scale factor of this monitor"}},
{"video_modes": {"type": "VideoModeVec", "doc": "List of video modes supported by this monitor"}},
{"is_primary_monitor": {"type": "bool", "doc": "Whether this monitor is set as the primary monitor"}}
]
},
"VideoMode": {
"doc": "Describes a rendering configuration for a monitor",
"external": "azul_core::window::VideoMode",
"derive": ["Copy", "Serialize", "Deserialize"],
"struct_fields": [
{"size": {"type": "LayoutSize", "doc": "Screen resolution in pixels"}},
{"bit_depth": {"type": "u16", "doc": "Returns the bit depth of this video mode, as in how many bits you have available per color. This is generally 24 bits or 32 bits on modern systems, depending on whether the alpha channel is counted or not.\r\nWayland: always returns 32.\r\niOS: always returns 32."}},
{"refresh_rate": {"type": "u16", "doc": "Returns the refresh rate of this video mode. Note: the returned refresh rate is an integer approximation, and you shouldn't rely on this value to be exact."}}
]
},