imgui_rs/
imgui.rs

1#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
2use libc::{c_void, c_char, c_int, c_uint, c_ushort, c_float, c_uchar, c_long, size_t};
3use std::mem;
4
5pub type ptrdiff_t = c_long;
6pub type ImU32 = c_uint;
7pub type ImWchar = c_ushort;
8pub type ImTextureID = *mut c_void;
9pub type ImGuiID = ImU32;
10pub type ImGuiCol = c_int;
11pub type ImGuiStyleVar = c_int;
12pub type ImGuiKey = c_int;
13pub type ImGuiAlign = c_int;
14pub type ImGuiColorEditMode = c_int;
15pub type ImGuiMouseCursor = c_int;
16pub type ImGuiWindowFlags = c_int;
17pub type ImGuiSetCond = c_int;
18pub type ImGuiInputTextFlags = c_int;
19pub type ImGuiSelectableFlags = c_int;
20pub type ImGuiTextEditCallback = Option<unsafe extern "C" fn(data: *mut ImGuiTextEditCallbackData) -> c_int>;
21
22pub type Enum_ImGuiWindowFlags_ = c_uint;
23pub const ImGuiWindowFlags_NoTitleBar: c_uint = 1;
24pub const ImGuiWindowFlags_NoResize: c_uint = 2;
25pub const ImGuiWindowFlags_NoMove: c_uint = 4;
26pub const ImGuiWindowFlags_NoScrollbar: c_uint = 8;
27pub const ImGuiWindowFlags_NoScrollWithMouse: c_uint = 16;
28pub const ImGuiWindowFlags_NoCollapse: c_uint = 32;
29pub const ImGuiWindowFlags_AlwaysAutoResize: c_uint = 64;
30pub const ImGuiWindowFlags_ShowBorders: c_uint = 128;
31pub const ImGuiWindowFlags_NoSavedSettings: c_uint = 256;
32pub const ImGuiWindowFlags_NoInputs: c_uint = 512;
33pub const ImGuiWindowFlags_MenuBar: c_uint = 1024;
34pub const ImGuiWindowFlags_HorizontalScrollbar: c_uint = 2048;
35pub const ImGuiWindowFlags_NoFocusOnAppearing: c_uint = 4096;
36pub const ImGuiWindowFlags_NoBringToFrontOnFocus: c_uint = 8192;
37pub const ImGuiWindowFlags_ChildWindow: c_uint = 1048576;
38pub const ImGuiWindowFlags_ChildWindowAutoFitX: c_uint = 2097152;
39pub const ImGuiWindowFlags_ChildWindowAutoFitY: c_uint = 4194304;
40pub const ImGuiWindowFlags_ComboBox: c_uint = 8388608;
41pub const ImGuiWindowFlags_Tooltip: c_uint = 16777216;
42pub const ImGuiWindowFlags_Popup: c_uint = 33554432;
43pub const ImGuiWindowFlags_Modal: c_uint = 67108864;
44pub const ImGuiWindowFlags_ChildMenu: c_uint = 134217728;
45
46pub type Enum_ImGuiInputTextFlags_ = c_uint;
47pub const ImGuiInputTextFlags_CharsDecimal: c_uint = 1;
48pub const ImGuiInputTextFlags_CharsHexadecimal: c_uint = 2;
49pub const ImGuiInputTextFlags_CharsUppercase: c_uint = 4;
50pub const ImGuiInputTextFlags_CharsNoBlank: c_uint = 8;
51pub const ImGuiInputTextFlags_AutoSelectAll: c_uint = 16;
52pub const ImGuiInputTextFlags_EnterReturnsTrue: c_uint = 32;
53pub const ImGuiInputTextFlags_CallbackCompletion: c_uint = 64;
54pub const ImGuiInputTextFlags_CallbackHistory: c_uint = 128;
55pub const ImGuiInputTextFlags_CallbackAlways: c_uint = 256;
56pub const ImGuiInputTextFlags_CallbackCharFilter: c_uint = 512;
57pub const ImGuiInputTextFlags_AllowTabInput: c_uint = 1024;
58pub const ImGuiInputTextFlags_CtrlEnterForNewLine: c_uint = 2048;
59pub const ImGuiInputTextFlags_NoHorizontalScroll: c_uint = 4096;
60pub const ImGuiInputTextFlags_AlwaysInsertMode: c_uint = 8192;
61pub const ImGuiInputTextFlags_ReadOnly: c_uint = 16384;
62pub const ImGuiInputTextFlags_Password: c_uint = 32768;
63pub const ImGuiInputTextFlags_Multiline: c_uint = 1048576;
64
65pub type Enum_ImGuiSelectableFlags_ = c_uint;
66pub const ImGuiSelectableFlags_DontClosePopups: c_uint = 1;
67pub const ImGuiSelectableFlags_SpanAllColumns: c_uint = 2;
68
69pub type Enum_ImGuiKey_ = c_uint;
70pub const ImGuiKey_Tab: c_uint = 0;
71pub const ImGuiKey_LeftArrow: c_uint = 1;
72pub const ImGuiKey_RightArrow: c_uint = 2;
73pub const ImGuiKey_UpArrow: c_uint = 3;
74pub const ImGuiKey_DownArrow: c_uint = 4;
75pub const ImGuiKey_PageUp: c_uint = 5;
76pub const ImGuiKey_PageDown: c_uint = 6;
77pub const ImGuiKey_Home: c_uint = 7;
78pub const ImGuiKey_End: c_uint = 8;
79pub const ImGuiKey_Delete: c_uint = 9;
80pub const ImGuiKey_Backspace: c_uint = 10;
81pub const ImGuiKey_Enter: c_uint = 11;
82pub const ImGuiKey_Escape: c_uint = 12;
83pub const ImGuiKey_A: c_uint = 13;
84pub const ImGuiKey_C: c_uint = 14;
85pub const ImGuiKey_V: c_uint = 15;
86pub const ImGuiKey_X: c_uint = 16;
87pub const ImGuiKey_Y: c_uint = 17;
88pub const ImGuiKey_Z: c_uint = 18;
89pub const ImGuiKey_COUNT: c_uint = 19;
90
91pub type Enum_ImGuiCol_ = c_uint;
92pub const ImGuiCol_Text: c_uint = 0;
93pub const ImGuiCol_TextDisabled: c_uint = 1;
94pub const ImGuiCol_WindowBg: c_uint = 2;
95pub const ImGuiCol_ChildWindowBg: c_uint = 3;
96pub const ImGuiCol_Border: c_uint = 4;
97pub const ImGuiCol_BorderShadow: c_uint = 5;
98pub const ImGuiCol_FrameBg: c_uint = 6;
99pub const ImGuiCol_FrameBgHovered: c_uint = 7;
100pub const ImGuiCol_FrameBgActive: c_uint = 8;
101pub const ImGuiCol_TitleBg: c_uint = 9;
102pub const ImGuiCol_TitleBgCollapsed: c_uint = 10;
103pub const ImGuiCol_TitleBgActive: c_uint = 11;
104pub const ImGuiCol_MenuBarBg: c_uint = 12;
105pub const ImGuiCol_ScrollbarBg: c_uint = 13;
106pub const ImGuiCol_ScrollbarGrab: c_uint = 14;
107pub const ImGuiCol_ScrollbarGrabHovered: c_uint = 15;
108pub const ImGuiCol_ScrollbarGrabActive: c_uint = 16;
109pub const ImGuiCol_ComboBg: c_uint = 17;
110pub const ImGuiCol_CheckMark: c_uint = 18;
111pub const ImGuiCol_SliderGrab: c_uint = 19;
112pub const ImGuiCol_SliderGrabActive: c_uint = 20;
113pub const ImGuiCol_Button: c_uint = 21;
114pub const ImGuiCol_ButtonHovered: c_uint = 22;
115pub const ImGuiCol_ButtonActive: c_uint = 23;
116pub const ImGuiCol_Header: c_uint = 24;
117pub const ImGuiCol_HeaderHovered: c_uint = 25;
118pub const ImGuiCol_HeaderActive: c_uint = 26;
119pub const ImGuiCol_Column: c_uint = 27;
120pub const ImGuiCol_ColumnHovered: c_uint = 28;
121pub const ImGuiCol_ColumnActive: c_uint = 29;
122pub const ImGuiCol_ResizeGrip: c_uint = 30;
123pub const ImGuiCol_ResizeGripHovered: c_uint = 31;
124pub const ImGuiCol_ResizeGripActive: c_uint = 32;
125pub const ImGuiCol_CloseButton: c_uint = 33;
126pub const ImGuiCol_CloseButtonHovered: c_uint = 34;
127pub const ImGuiCol_CloseButtonActive: c_uint = 35;
128pub const ImGuiCol_PlotLines: c_uint = 36;
129pub const ImGuiCol_PlotLinesHovered: c_uint = 37;
130pub const ImGuiCol_PlotHistogram: c_uint = 38;
131pub const ImGuiCol_PlotHistogramHovered: c_uint = 39;
132pub const ImGuiCol_TextSelectedBg: c_uint = 40;
133pub const ImGuiCol_TooltipBg: c_uint = 41;
134pub const ImGuiCol_ModalWindowDarkening: c_uint = 42;
135pub const ImGuiCol_COUNT: c_uint = 43;
136
137pub type Enum_ImGuiStyleVar_ = c_uint;
138pub const ImGuiStyleVar_Alpha: c_uint = 0;
139pub const ImGuiStyleVar_WindowPadding: c_uint = 1;
140pub const ImGuiStyleVar_WindowRounding: c_uint = 2;
141pub const ImGuiStyleVar_WindowMinSize: c_uint = 3;
142pub const ImGuiStyleVar_ChildWindowRounding: c_uint = 4;
143pub const ImGuiStyleVar_FramePadding: c_uint = 5;
144pub const ImGuiStyleVar_FrameRounding: c_uint = 6;
145pub const ImGuiStyleVar_ItemSpacing: c_uint = 7;
146pub const ImGuiStyleVar_ItemInnerSpacing: c_uint = 8;
147pub const ImGuiStyleVar_IndentSpacing: c_uint = 9;
148pub const ImGuiStyleVar_GrabMinSize: c_uint = 10;
149
150pub type Enum_ImGuiAlign_ = c_uint;
151pub const ImGuiAlign_Left: c_uint = 1;
152pub const ImGuiAlign_Center: c_uint = 2;
153pub const ImGuiAlign_Right: c_uint = 4;
154pub const ImGuiAlign_Top: c_uint = 8;
155pub const ImGuiAlign_VCenter: c_uint = 16;
156pub const ImGuiAlign_Default: c_uint = 9;
157
158pub type Enum_ImGuiColorEditMode_ = c_int;
159pub const ImGuiColorEditMode_UserSelect: c_int = -2;
160pub const ImGuiColorEditMode_UserSelectShowButton: c_int = -1;
161pub const ImGuiColorEditMode_RGB: c_int = 0;
162pub const ImGuiColorEditMode_HSV: c_int = 1;
163pub const ImGuiColorEditMode_HEX: c_int = 2;
164
165pub type Enum_ImGuiMouseCursor_ = c_uint;
166pub const ImGuiMouseCursor_Arrow: c_uint = 0;
167pub const ImGuiMouseCursor_TextInput: c_uint = 1;
168pub const ImGuiMouseCursor_Move: c_uint = 2;
169pub const ImGuiMouseCursor_ResizeNS: c_uint = 3;
170pub const ImGuiMouseCursor_ResizeEW: c_uint = 4;
171pub const ImGuiMouseCursor_ResizeNESW: c_uint = 5;
172pub const ImGuiMouseCursor_ResizeNWSE: c_uint = 6;
173pub const ImGuiMouseCursor_Count_: c_uint = 7;
174
175pub type Enum_ImGuiSetCond_ = c_uint;
176pub const ImGuiSetCond_Always: c_uint = 1;
177pub const ImGuiSetCond_Once: c_uint = 2;
178pub const ImGuiSetCond_FirstUseEver: c_uint = 4;
179pub const ImGuiSetCond_Appearing: c_uint = 8;
180
181#[repr(C)]
182#[derive(Copy)]
183pub struct ImVector<T> {
184    pub Size: c_int,
185    pub Capacity: c_int,
186    pub Data: *mut T,
187}
188impl<T> Clone for ImVector<T> {
189    fn clone(&self) -> Self {
190        panic!("TODO")
191    }
192}
193impl<T> Default for ImVector<T> {
194    fn default() -> Self {
195        unsafe { mem::zeroed() }
196    }
197}
198
199#[repr(C)]
200#[derive(Copy)]
201pub struct ImVec2 {
202    pub x: c_float,
203    pub y: c_float,
204}
205impl Clone for ImVec2 {
206    fn clone(&self) -> Self {
207        *self
208    }
209}
210impl Default for ImVec2 {
211    fn default() -> Self {
212        unsafe { mem::zeroed() }
213    }
214}
215
216#[repr(C)]
217#[derive(Copy)]
218pub struct ImVec4 {
219    pub x: c_float,
220    pub y: c_float,
221    pub z: c_float,
222    pub w: c_float,
223}
224impl Clone for ImVec4 {
225    fn clone(&self) -> Self {
226        *self
227    }
228}
229impl Default for ImVec4 {
230    fn default() -> Self {
231        unsafe { mem::zeroed() }
232    }
233}
234
235#[repr(C)]
236#[derive(Copy)]
237pub struct ImGuiStyle {
238    pub Alpha: c_float,
239    pub WindowPadding: ImVec2,
240    pub WindowMinSize: ImVec2,
241    pub WindowRounding: c_float,
242    pub WindowTitleAlign: ImGuiAlign,
243    pub ChildWindowRounding: c_float,
244    pub FramePadding: ImVec2,
245    pub FrameRounding: c_float,
246    pub ItemSpacing: ImVec2,
247    pub ItemInnerSpacing: ImVec2,
248    pub TouchExtraPadding: ImVec2,
249    pub WindowFillAlphaDefault: c_float,
250    pub IndentSpacing: c_float,
251    pub ColumnsMinSpacing: c_float,
252    pub ScrollbarSize: c_float,
253    pub ScrollbarRounding: c_float,
254    pub GrabMinSize: c_float,
255    pub GrabRounding: c_float,
256    pub DisplayWindowPadding: ImVec2,
257    pub DisplaySafeAreaPadding: ImVec2,
258    pub AntiAliasedLines: u8,
259    pub AntiAliasedShapes: u8,
260    pub CurveTessellationTol: c_float,
261    pub Colors: [ImVec4; 43usize],
262}
263impl Clone for ImGuiStyle {
264    fn clone(&self) -> Self {
265        *self
266    }
267}
268impl Default for ImGuiStyle {
269    fn default() -> Self {
270        unsafe { mem::zeroed() }
271    }
272}
273
274#[repr(C)]
275#[derive(Copy)]
276pub struct ImGuiIO {
277    pub DisplaySize: ImVec2,
278    pub DeltaTime: c_float,
279    pub IniSavingRate: c_float,
280    pub IniFilename: *const c_char,
281    pub LogFilename: *const c_char,
282    pub MouseDoubleClickTime: c_float,
283    pub MouseDoubleClickMaxDist: c_float,
284    pub MouseDragThreshold: c_float,
285    pub KeyMap: [c_int; 19usize],
286    pub KeyRepeatDelay: c_float,
287    pub KeyRepeatRate: c_float,
288    pub UserData: *mut c_void,
289    pub Fonts: *mut ImFontAtlas,
290    pub FontGlobalScale: c_float,
291    pub FontAllowUserScaling: u8,
292    pub DisplayFramebufferScale: ImVec2,
293    pub DisplayVisibleMin: ImVec2,
294    pub DisplayVisibleMax: ImVec2,
295    pub RenderDrawListsFn: Option<unsafe extern "C" fn(data: *mut ImDrawData) -> ()>,
296    pub GetClipboardTextFn: Option<extern "C" fn() -> *const c_char>,
297    pub SetClipboardTextFn: Option<unsafe extern "C" fn(text: *const c_char) -> ()>,
298    pub MemAllocFn: Option<extern "C" fn(sz: size_t) -> *mut c_void>,
299    pub MemFreeFn: Option<unsafe extern "C" fn(ptr: *mut c_void) -> ()>,
300    pub ImeSetInputScreenPosFn: Option<extern "C" fn(x: c_int, y: c_int) -> ()>,
301    pub ImeWindowHandle: *mut c_void,
302    pub MousePos: ImVec2,
303    pub MouseDown: [u8; 5usize],
304    pub MouseWheel: c_float,
305    pub MouseDrawCursor: u8,
306    pub KeyCtrl: u8,
307    pub KeyShift: u8,
308    pub KeyAlt: u8,
309    pub KeysDown: [u8; 512usize],
310    pub InputCharacters: [ImWchar; 17usize],
311    pub WantCaptureMouse: u8,
312    pub WantCaptureKeyboard: u8,
313    pub WantTextInput: u8,
314    pub Framerate: c_float,
315    pub MetricsAllocs: c_int,
316    pub MetricsRenderVertices: c_int,
317    pub MetricsRenderIndices: c_int,
318    pub MetricsActiveWindows: c_int,
319    pub MousePosPrev: ImVec2,
320    pub MouseDelta: ImVec2,
321    pub MouseClicked: [u8; 5usize],
322    pub MouseClickedPos: [ImVec2; 5usize],
323    pub MouseClickedTime: [c_float; 5usize],
324    pub MouseDoubleClicked: [u8; 5usize],
325    pub MouseReleased: [u8; 5usize],
326    pub MouseDownOwned: [u8; 5usize],
327    pub MouseDownDuration: [c_float; 5usize],
328    pub MouseDownDurationPrev: [c_float; 5usize],
329    pub MouseDragMaxDistanceSqr: [c_float; 5usize],
330    pub KeysDownDuration: [c_float; 512usize],
331    pub KeysDownDurationPrev: [c_float; 512usize],
332}
333impl Clone for ImGuiIO {
334    fn clone(&self) -> Self {
335        *self
336    }
337}
338impl Default for ImGuiIO {
339    fn default() -> Self {
340        unsafe { mem::zeroed() }
341    }
342}
343
344#[repr(C)]
345#[derive(Copy)]
346pub struct ImGuiOnceUponAFrame {
347    pub RefFrame: c_int,
348}
349impl Clone for ImGuiOnceUponAFrame {
350    fn clone(&self) -> Self {
351        *self
352    }
353}
354impl Default for ImGuiOnceUponAFrame {
355    fn default() -> Self {
356        unsafe { mem::zeroed() }
357    }
358}
359
360#[repr(C)]
361#[derive(Copy)]
362pub struct ImGuiTextFilter {
363    pub InputBuf: [c_char; 256usize],
364    pub Filters: ImVector<Struct_TextRange>,
365    pub CountGrep: c_int,
366}
367impl Clone for ImGuiTextFilter {
368    fn clone(&self) -> Self {
369        *self
370    }
371}
372impl Default for ImGuiTextFilter {
373    fn default() -> Self {
374        unsafe { mem::zeroed() }
375    }
376}
377
378#[repr(C)]
379#[derive(Copy)]
380pub struct Struct_TextRange {
381    pub b: *const c_char,
382    pub e: *const c_char,
383}
384impl Clone for Struct_TextRange {
385    fn clone(&self) -> Self {
386        *self
387    }
388}
389impl Default for Struct_TextRange {
390    fn default() -> Self {
391        unsafe { mem::zeroed() }
392    }
393}
394
395#[repr(C)]
396#[derive(Copy)]
397pub struct ImGuiTextBuffer {
398    pub Buf: ImVector<c_char>,
399}
400impl Clone for ImGuiTextBuffer {
401    fn clone(&self) -> Self {
402        *self
403    }
404}
405impl Default for ImGuiTextBuffer {
406    fn default() -> Self {
407        unsafe { mem::zeroed() }
408    }
409}
410
411#[repr(C)]
412#[derive(Copy)]
413pub struct ImGuiStorage {
414    pub Data: ImVector<Struct_Pair>,
415}
416impl Clone for ImGuiStorage {
417    fn clone(&self) -> Self {
418        *self
419    }
420}
421impl Default for ImGuiStorage {
422    fn default() -> Self {
423        unsafe { mem::zeroed() }
424    }
425}
426
427#[repr(C)]
428#[derive(Copy)]
429pub struct Struct_Pair {
430    pub key: ImGuiID,
431    pub _bindgen_data_1_: [u64; 1usize],
432}
433impl Struct_Pair {
434    pub unsafe fn val_i(&mut self) -> *mut c_int {
435        let raw: *mut u8 = mem::transmute(&self._bindgen_data_1_);
436        mem::transmute(raw.offset(0))
437    }
438    pub unsafe fn val_f(&mut self) -> *mut c_float {
439        let raw: *mut u8 = mem::transmute(&self._bindgen_data_1_);
440        mem::transmute(raw.offset(0))
441    }
442    pub unsafe fn val_p(&mut self) -> *mut *mut c_void {
443        let raw: *mut u8 = mem::transmute(&self._bindgen_data_1_);
444        mem::transmute(raw.offset(0))
445    }
446}
447impl Clone for Struct_Pair {
448    fn clone(&self) -> Self {
449        *self
450    }
451}
452impl Default for Struct_Pair {
453    fn default() -> Self {
454        unsafe { mem::zeroed() }
455    }
456}
457
458#[repr(C)]
459#[derive(Copy)]
460pub struct ImGuiTextEditCallbackData {
461    pub EventFlag: ImGuiInputTextFlags,
462    pub Flags: ImGuiInputTextFlags,
463    pub UserData: *mut c_void,
464    pub ReadOnly: u8,
465    pub EventChar: ImWchar,
466    pub EventKey: ImGuiKey,
467    pub Buf: *mut c_char,
468    pub BufSize: c_int,
469    pub BufDirty: u8,
470    pub CursorPos: c_int,
471    pub SelectionStart: c_int,
472    pub SelectionEnd: c_int,
473}
474impl Clone for ImGuiTextEditCallbackData {
475    fn clone(&self) -> Self {
476        *self
477    }
478}
479impl Default for ImGuiTextEditCallbackData {
480    fn default() -> Self {
481        unsafe { mem::zeroed() }
482    }
483}
484
485#[repr(C)]
486#[derive(Copy)]
487pub struct ImColor {
488    pub Value: ImVec4,
489}
490impl Clone for ImColor {
491    fn clone(&self) -> Self {
492        *self
493    }
494}
495impl Default for ImColor {
496    fn default() -> Self {
497        unsafe { mem::zeroed() }
498    }
499}
500
501#[repr(C)]
502#[derive(Copy)]
503pub struct ImGuiListClipper {
504    pub ItemsHeight: c_float,
505    pub ItemsCount: c_int,
506    pub DisplayStart: c_int,
507    pub DisplayEnd: c_int,
508}
509impl Clone for ImGuiListClipper {
510    fn clone(&self) -> Self {
511        *self
512    }
513}
514impl Default for ImGuiListClipper {
515    fn default() -> Self {
516        unsafe { mem::zeroed() }
517    }
518}
519
520pub type ImDrawCallback = Option<unsafe extern "C" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd) -> ()>;
521
522#[repr(C)]
523#[derive(Copy)]
524pub struct ImDrawCmd {
525    pub ElemCount: c_uint,
526    pub ClipRect: ImVec4,
527    pub TextureId: ImTextureID,
528    pub UserCallback: ImDrawCallback,
529    pub UserCallbackData: *mut c_void,
530}
531impl Clone for ImDrawCmd {
532    fn clone(&self) -> Self {
533        *self
534    }
535}
536impl Default for ImDrawCmd {
537    fn default() -> Self {
538        unsafe { mem::zeroed() }
539    }
540}
541
542pub type ImDrawIdx = c_ushort;
543
544#[repr(C)]
545#[derive(Copy)]
546pub struct ImDrawVert {
547    pub pos: ImVec2,
548    pub uv: ImVec2,
549    pub col: ImU32,
550}
551impl Clone for ImDrawVert {
552    fn clone(&self) -> Self {
553        *self
554    }
555}
556impl Default for ImDrawVert {
557    fn default() -> Self {
558        unsafe { mem::zeroed() }
559    }
560}
561
562#[repr(C)]
563#[derive(Copy)]
564pub struct ImDrawChannel {
565    pub CmdBuffer: ImVector<ImDrawCmd>,
566    pub IdxBuffer: ImVector<ImDrawIdx>,
567}
568impl Clone for ImDrawChannel {
569    fn clone(&self) -> Self {
570        *self
571    }
572}
573impl Default for ImDrawChannel {
574    fn default() -> Self {
575        unsafe { mem::zeroed() }
576    }
577}
578
579#[repr(C)]
580#[derive(Copy)]
581pub struct ImDrawList {
582    pub CmdBuffer: ImVector<ImDrawCmd>,
583    pub IdxBuffer: ImVector<ImDrawIdx>,
584    pub VtxBuffer: ImVector<ImDrawVert>,
585    pub _OwnerName: *const c_char,
586    pub _VtxCurrentIdx: c_uint,
587    pub _VtxWritePtr: *mut ImDrawVert,
588    pub _IdxWritePtr: *mut ImDrawIdx,
589    pub _ClipRectStack: ImVector<ImVec4>,
590    pub _TextureIdStack: ImVector<ImTextureID>,
591    pub _Path: ImVector<ImVec2>,
592    pub _ChannelsCurrent: c_int,
593    pub _ChannelsCount: c_int,
594    pub _Channels: ImVector<ImDrawChannel>,
595}
596impl Clone for ImDrawList {
597    fn clone(&self) -> Self {
598        *self
599    }
600}
601impl Default for ImDrawList {
602    fn default() -> Self {
603        unsafe { mem::zeroed() }
604    }
605}
606
607#[repr(C)]
608#[derive(Copy)]
609pub struct ImDrawData {
610    pub Valid: u8,
611    pub CmdLists: *mut *mut ImDrawList,
612    pub CmdListsCount: c_int,
613    pub TotalVtxCount: c_int,
614    pub TotalIdxCount: c_int,
615}
616impl Clone for ImDrawData {
617    fn clone(&self) -> Self {
618        *self
619    }
620}
621impl Default for ImDrawData {
622    fn default() -> Self {
623        unsafe { mem::zeroed() }
624    }
625}
626
627#[repr(C)]
628#[derive(Copy)]
629pub struct ImFontConfig {
630    pub FontData: *mut c_void,
631    pub FontDataSize: c_int,
632    pub FontDataOwnedByAtlas: u8,
633    pub FontNo: c_int,
634    pub SizePixels: c_float,
635    pub OversampleH: c_int,
636    pub OversampleV: c_int,
637    pub PixelSnapH: u8,
638    pub GlyphExtraSpacing: ImVec2,
639    pub GlyphRanges: *const ImWchar,
640    pub MergeMode: u8,
641    pub MergeGlyphCenterV: u8,
642    pub Name: [c_char; 32usize],
643    pub DstFont: *mut ImFont,
644}
645impl Clone for ImFontConfig {
646    fn clone(&self) -> Self {
647        *self
648    }
649}
650impl Default for ImFontConfig {
651    fn default() -> Self {
652        unsafe { mem::zeroed() }
653    }
654}
655
656#[repr(C)]
657#[derive(Copy)]
658pub struct ImFontAtlas {
659    pub TexID: *mut c_void,
660    pub TexPixelsAlpha8: *mut c_uchar,
661    pub TexPixelsRGBA32: *mut c_uint,
662    pub TexWidth: c_int,
663    pub TexHeight: c_int,
664    pub TexDesiredWidth: c_int,
665    pub TexUvWhitePixel: ImVec2,
666    pub Fonts: ImVector<*const ImFont>,
667    pub ConfigData: ImVector<ImFontConfig>,
668}
669impl Clone for ImFontAtlas {
670    fn clone(&self) -> Self {
671        *self
672    }
673}
674impl Default for ImFontAtlas {
675    fn default() -> Self {
676        unsafe { mem::zeroed() }
677    }
678}
679
680#[repr(C)]
681#[derive(Copy)]
682pub struct ImFont {
683    pub FontSize: c_float,
684    pub Scale: c_float,
685    pub DisplayOffset: ImVec2,
686    pub FallbackChar: ImWchar,
687    pub ConfigData: *mut ImFontConfig,
688    pub ConfigDataCount: c_int,
689    pub Ascent: c_float,
690    pub Descent: c_float,
691    pub ContainerAtlas: *mut ImFontAtlas,
692    pub Glyphs: ImVector<Struct_Glyph>,
693    pub FallbackGlyph: *const Struct_Glyph,
694    pub FallbackXAdvance: c_float,
695    pub IndexXAdvance: ImVector<c_float>,
696    pub IndexLookup: ImVector<c_int>,
697}
698impl Clone for ImFont {
699    fn clone(&self) -> Self {
700        *self
701    }
702}
703impl Default for ImFont {
704    fn default() -> Self {
705        unsafe { mem::zeroed() }
706    }
707}
708
709#[repr(C)]
710#[derive(Copy)]
711pub struct Struct_Glyph {
712    pub Codepoint: ImWchar,
713    pub XAdvance: c_float,
714    pub X0: c_float,
715    pub Y0: c_float,
716    pub X1: c_float,
717    pub Y1: c_float,
718    pub U0: c_float,
719    pub V0: c_float,
720    pub U1: c_float,
721    pub V1: c_float,
722}
723impl Clone for Struct_Glyph {
724    fn clone(&self) -> Self {
725        *self
726    }
727}
728impl Default for Struct_Glyph {
729    fn default() -> Self {
730        unsafe { mem::zeroed() }
731    }
732}
733
734#[link(name = "imgui")]
735extern "C" {
736    pub fn igGetIO() -> *mut ImGuiIO;
737    pub fn igGetStyle() -> *mut ImGuiStyle;
738    pub fn igGetDrawData() -> *mut ImDrawData;
739    pub fn igNewFrame() -> ();
740    pub fn igRender() -> ();
741    pub fn igShutdown() -> ();
742    pub fn igShowUserGuide() -> ();
743    pub fn igShowStyleEditor(_ref: *mut ImGuiStyle) -> ();
744    pub fn igShowTestWindow(opened: *mut u8) -> ();
745    pub fn igShowMetricsWindow(opened: *mut u8) -> ();
746    pub fn igBegin(name: *const c_char, p_opened: *mut u8, flags: ImGuiWindowFlags) -> u8;
747    pub fn igBegin2(name: *const c_char, p_opened: *mut u8, size_on_first_use: ImVec2, bg_alpha: c_float, flags: ImGuiWindowFlags) -> u8;
748    pub fn igEnd() -> ();
749    pub fn igBeginChild(str_id: *const c_char, size: ImVec2, border: u8, extra_flags: ImGuiWindowFlags) -> u8;
750    pub fn igBeginChildEx(id: ImGuiID, size: ImVec2, border: u8, extra_flags: ImGuiWindowFlags) -> u8;
751    pub fn igEndChild() -> ();
752    pub fn igGetContentRegionMax(out: *mut ImVec2) -> ();
753    pub fn igGetContentRegionAvail(out: *mut ImVec2) -> ();
754    pub fn igGetContentRegionAvailWidth() -> c_float;
755    pub fn igGetWindowContentRegionMin(out: *mut ImVec2) -> ();
756    pub fn igGetWindowContentRegionMax(out: *mut ImVec2) -> ();
757    pub fn igGetWindowContentRegionWidth() -> c_float;
758    pub fn igGetWindowDrawList() -> *mut ImDrawList;
759    pub fn igGetWindowFont() -> *mut ImFont;
760    pub fn igGetWindowFontSize() -> c_float;
761    pub fn igSetWindowFontScale(scale: c_float) -> ();
762    pub fn igGetWindowPos(out: *mut ImVec2) -> ();
763    pub fn igGetWindowSize(out: *mut ImVec2) -> ();
764    pub fn igGetWindowWidth() -> c_float;
765    pub fn igGetWindowHeight() -> c_float;
766    pub fn igIsWindowCollapsed() -> u8;
767    pub fn igSetNextWindowPos(pos: ImVec2, cond: ImGuiSetCond) -> ();
768    pub fn igSetNextWindowPosCenter(cond: ImGuiSetCond) -> ();
769    pub fn igSetNextWindowSize(size: ImVec2, cond: ImGuiSetCond) -> ();
770    pub fn igSetNextWindowContentSize(size: ImVec2) -> ();
771    pub fn igSetNextWindowContentWidth(width: c_float) -> ();
772    pub fn igSetNextWindowCollapsed(collapsed: u8, cond: ImGuiSetCond) -> ();
773    pub fn igSetNextWindowFocus() -> ();
774    pub fn igSetWindowPos(pos: ImVec2, cond: ImGuiSetCond) -> ();
775    pub fn igSetWindowSize(size: ImVec2, cond: ImGuiSetCond) -> ();
776    pub fn igSetWindowCollapsed(collapsed: u8, cond: ImGuiSetCond) -> ();
777    pub fn igSetWindowFocus() -> ();
778    pub fn igSetWindowPosByName(name: *const c_char, pos: ImVec2, cond: ImGuiSetCond) -> ();
779    pub fn igSetWindowSize2(name: *const c_char, size: ImVec2, cond: ImGuiSetCond) -> ();
780    pub fn igSetWindowCollapsed2(name: *const c_char, collapsed: u8, cond: ImGuiSetCond) -> ();
781    pub fn igSetWindowFocus2(name: *const c_char) -> ();
782    pub fn igGetScrollX() -> c_float;
783    pub fn igGetScrollY() -> c_float;
784    pub fn igGetScrollMaxX() -> c_float;
785    pub fn igGetScrollMaxY() -> c_float;
786    pub fn igSetScrollX(scroll_x: c_float) -> ();
787    pub fn igSetScrollY(scroll_y: c_float) -> ();
788    pub fn igSetScrollHere(center_y_ratio: c_float) -> ();
789    pub fn igSetScrollFromPosY(pos_y: c_float, center_y_ratio: c_float) -> ();
790    pub fn igSetKeyboardFocusHere(offset: c_int) -> ();
791    pub fn igSetStateStorage(tree: *mut ImGuiStorage) -> ();
792    pub fn igGetStateStorage() -> *mut ImGuiStorage;
793    pub fn igPushFont(font: *mut ImFont) -> ();
794    pub fn igPopFont() -> ();
795    pub fn igPushStyleColor(idx: ImGuiCol, col: ImVec4) -> ();
796    pub fn igPopStyleColor(count: c_int) -> ();
797    pub fn igPushStyleVar(idx: ImGuiStyleVar, val: c_float) -> ();
798    pub fn igPushStyleVarVec(idx: ImGuiStyleVar, val: ImVec2) -> ();
799    pub fn igPopStyleVar(count: c_int) -> ();
800    pub fn igGetColorU32(idx: ImGuiCol, alpha_mul: c_float) -> ImU32;
801    pub fn igGetColorU32Vec(col: *const ImVec4) -> ImU32;
802    pub fn igPushItemWidth(item_width: c_float) -> ();
803    pub fn igPopItemWidth() -> ();
804    pub fn igCalcItemWidth() -> c_float;
805    pub fn igPushTextWrapPos(wrap_pos_x: c_float) -> ();
806    pub fn igPopTextWrapPos() -> ();
807    pub fn igPushAllowKeyboardFocus(v: u8) -> ();
808    pub fn igPopAllowKeyboardFocus() -> ();
809    pub fn igPushButtonRepeat(repeat: u8) -> ();
810    pub fn igPopButtonRepeat() -> ();
811    pub fn igBeginGroup() -> ();
812    pub fn igEndGroup() -> ();
813    pub fn igSeparator() -> ();
814    pub fn igSameLine(local_pos_x: c_float, spacing_w: c_float) -> ();
815    pub fn igSpacing() -> ();
816    pub fn igDummy(size: *const ImVec2) -> ();
817    pub fn igIndent() -> ();
818    pub fn igUnindent() -> ();
819    pub fn igColumns(count: c_int, id: *const c_char, border: u8) -> ();
820    pub fn igNextColumn() -> ();
821    pub fn igGetColumnIndex() -> c_int;
822    pub fn igGetColumnOffset(column_index: c_int) -> c_float;
823    pub fn igSetColumnOffset(column_index: c_int, offset_x: c_float) -> ();
824    pub fn igGetColumnWidth(column_index: c_int) -> c_float;
825    pub fn igGetColumnsCount() -> c_int;
826    pub fn igGetCursorPos(pOut: *mut ImVec2) -> ();
827    pub fn igGetCursorPosX() -> c_float;
828    pub fn igGetCursorPosY() -> c_float;
829    pub fn igSetCursorPos(local_pos: ImVec2) -> ();
830    pub fn igSetCursorPosX(x: c_float) -> ();
831    pub fn igSetCursorPosY(y: c_float) -> ();
832    pub fn igGetCursorStartPos(pOut: *mut ImVec2) -> ();
833    pub fn igGetCursorScreenPos(pOut: *mut ImVec2) -> ();
834    pub fn igSetCursorScreenPos(pos: ImVec2) -> ();
835    pub fn igAlignFirstTextHeightToWidgets() -> ();
836    pub fn igGetTextLineHeight() -> c_float;
837    pub fn igGetTextLineHeightWithSpacing() -> c_float;
838    pub fn igGetItemsLineHeightWithSpacing() -> c_float;
839    pub fn igPushIdStr(str_id: *const c_char) -> ();
840    pub fn igPushIdStrRange(str_begin: *const c_char, str_end: *const c_char) -> ();
841    pub fn igPushIdPtr(ptr_id: *const c_void) -> ();
842    pub fn igPushIdInt(int_id: c_int) -> ();
843    pub fn igPopId() -> ();
844    pub fn igGetIdStr(str_id: *const c_char) -> ImGuiID;
845    pub fn igGetIdStrRange(str_begin: *const c_char, str_end: *const c_char) -> ImGuiID;
846    pub fn igGetIdPtr(ptr_id: *const c_void) -> ImGuiID;
847    pub fn igText(fmt: *const c_char, ...) -> ();
848    pub fn igTextColored(col: ImVec4, fmt: *const c_char, ...) -> ();
849    pub fn igTextDisabled(fmt: *const c_char, ...) -> ();
850    pub fn igTextWrapped(fmt: *const c_char, ...) -> ();
851    pub fn igTextUnformatted(text: *const c_char, text_end: *const c_char) -> ();
852    pub fn igLabelText(label: *const c_char, fmt: *const c_char, ...) -> ();
853    pub fn igBullet() -> ();
854    pub fn igBulletText(fmt: *const c_char, ...) -> ();
855    pub fn igButton(label: *const c_char, size: ImVec2) -> u8;
856    pub fn igSmallButton(label: *const c_char) -> u8;
857    pub fn igInvisibleButton(str_id: *const c_char, size: ImVec2) -> u8;
858    pub fn igImage(user_texture_id: ImTextureID, size: ImVec2, uv0: ImVec2, uv1: ImVec2, tint_col: ImVec4, border_col: ImVec4) -> ();
859    pub fn igImageButton(user_texture_id: ImTextureID, size: ImVec2, uv0: ImVec2, uv1: ImVec2, frame_padding: c_int, bg_col: ImVec4, tint_col: ImVec4) -> u8;
860    pub fn igCollapsingHeader(label: *const c_char, str_id: *const c_char, display_frame: u8, default_open: u8) -> u8;
861    pub fn igCheckbox(label: *const c_char, v: *mut u8) -> u8;
862    pub fn igCheckboxFlags(label: *const c_char, flags: *mut c_uint, flags_value: c_uint) -> u8;
863    pub fn igRadioButtonBool(label: *const c_char, active: u8) -> u8;
864    pub fn igRadioButton(label: *const c_char, v: *mut c_int, v_button: c_int) -> u8;
865    pub fn igCombo(label: *const c_char, current_item: *mut c_int, items: *mut *const c_char, items_count: c_int, height_in_items: c_int) -> u8;
866    pub fn igCombo2(label: *const c_char, current_item: *mut c_int, items_separated_by_zeros: *const c_char, height_in_items: c_int) -> u8;
867    pub fn igCombo3(label: *const c_char, current_item: *mut c_int, items_getter: Option<unsafe extern "C" fn(data: *mut c_void, idx: c_int, out_text: *mut *const c_char) -> u8>, data: *mut c_void, items_count: c_int, height_in_items: c_int) -> u8;
868    pub fn igColorButton(col: ImVec4, small_height: u8, outline_border: u8) -> u8;
869    pub fn igColorEdit3(label: *const c_char, col: *mut c_float) -> u8;
870    pub fn igColorEdit4(label: *const c_char, col: *mut c_float, show_alpha: u8) -> u8;
871    pub fn igColorEditMode(mode: ImGuiColorEditMode) -> ();
872    pub fn igPlotLines(label: *const c_char, values: *const c_float, values_count: c_int, values_offset: c_int, overlay_text: *const c_char, scale_min: c_float, scale_max: c_float, graph_size: ImVec2, stride: c_int) -> ();
873    pub fn igPlotLines2(label: *const c_char, values_getter: Option<unsafe extern "C" fn(data: *mut c_void, idx: c_int) -> c_float>, data: *mut c_void, values_count: c_int, values_offset: c_int, overlay_text: *const c_char, scale_min: c_float, scale_max: c_float, graph_size: ImVec2) -> ();
874    pub fn igPlotHistogram(label: *const c_char, values: *const c_float, values_count: c_int, values_offset: c_int, overlay_text: *const c_char, scale_min: c_float, scale_max: c_float, graph_size: ImVec2, stride: c_int) -> ();
875    pub fn igPlotHistogram2(label: *const c_char, values_getter: Option<unsafe extern "C" fn(data: *mut c_void, idx: c_int) -> c_float>, data: *mut c_void, values_count: c_int, values_offset: c_int, overlay_text: *const c_char, scale_min: c_float, scale_max: c_float, graph_size: ImVec2) -> ();
876    pub fn igProgressBar(fraction: c_float, size_arg: *const ImVec2, overlay: *const c_char) -> ();
877    pub fn igSliderFloat(label: *const c_char, v: *mut c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
878    pub fn igSliderFloat2(label: *const c_char, v: *mut c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
879    pub fn igSliderFloat3(label: *const c_char, v: *mut c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
880    pub fn igSliderFloat4(label: *const c_char, v: *mut c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
881    pub fn igSliderAngle(label: *const c_char, v_rad: *mut c_float, v_degrees_min: c_float, v_degrees_max: c_float) -> u8;
882    pub fn igSliderInt(label: *const c_char, v: *mut c_int, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
883    pub fn igSliderInt2(label: *const c_char, v: *mut c_int, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
884    pub fn igSliderInt3(label: *const c_char, v: *mut c_int, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
885    pub fn igSliderInt4(label: *const c_char, v: *mut c_int, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
886    pub fn igVSliderFloat(label: *const c_char, size: ImVec2, v: *mut c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
887    pub fn igVSliderInt(label: *const c_char, size: ImVec2, v: *mut c_int, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
888    pub fn igDragFloat(label: *const c_char, v: *mut c_float, v_speed: c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
889    pub fn igDragFloat2(label: *const c_char, v: *mut c_float, v_speed: c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
890    pub fn igDragFloat3(label: *const c_char, v: *mut c_float, v_speed: c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
891    pub fn igDragFloat4(label: *const c_char, v: *mut c_float, v_speed: c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, power: c_float) -> u8;
892    pub fn igDragFloatRange2(label: *const c_char, v_current_min: *mut c_float, v_current_max: *mut c_float, v_speed: c_float, v_min: c_float, v_max: c_float, display_format: *const c_char, display_format_max: *const c_char, power: c_float) -> u8;
893    pub fn igDragInt(label: *const c_char, v: *mut c_int, v_speed: c_float, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
894    pub fn igDragInt2(label: *const c_char, v: *mut c_int, v_speed: c_float, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
895    pub fn igDragInt3(label: *const c_char, v: *mut c_int, v_speed: c_float, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
896    pub fn igDragInt4(label: *const c_char, v: *mut c_int, v_speed: c_float, v_min: c_int, v_max: c_int, display_format: *const c_char) -> u8;
897    pub fn igDragIntRange2(label: *const c_char, v_current_min: *mut c_int, v_current_max: *mut c_int, v_speed: c_float, v_min: c_int, v_max: c_int, display_format: *const c_char, display_format_max: *const c_char) -> u8;
898    pub fn igInputText(label: *const c_char, buf: *mut c_char, buf_size: size_t, flags: ImGuiInputTextFlags, callback: ImGuiTextEditCallback, user_data: *mut c_void) -> u8;
899    pub fn igInputTextMultiline(label: *const c_char, buf: *mut c_char, buf_size: size_t, size: ImVec2, flags: ImGuiInputTextFlags, callback: ImGuiTextEditCallback, user_data: *mut c_void) -> u8;
900    pub fn igInputFloat(label: *const c_char, v: *mut c_float, step: c_float, step_fast: c_float, decimal_precision: c_int, extra_flags: ImGuiInputTextFlags) -> u8;
901    pub fn igInputFloat2(label: *const c_char, v: *mut c_float, decimal_precision: c_int, extra_flags: ImGuiInputTextFlags) -> u8;
902    pub fn igInputFloat3(label: *const c_char, v: *mut c_float, decimal_precision: c_int, extra_flags: ImGuiInputTextFlags) -> u8;
903    pub fn igInputFloat4(label: *const c_char, v: *mut c_float, decimal_precision: c_int, extra_flags: ImGuiInputTextFlags) -> u8;
904    pub fn igInputInt(label: *const c_char, v: *mut c_int, step: c_int, step_fast: c_int, extra_flags: ImGuiInputTextFlags) -> u8;
905    pub fn igInputInt2(label: *const c_char, v: *mut c_int, extra_flags: ImGuiInputTextFlags) -> u8;
906    pub fn igInputInt3(label: *const c_char, v: *mut c_int, extra_flags: ImGuiInputTextFlags) -> u8;
907    pub fn igInputInt4(label: *const c_char, v: *mut c_int, extra_flags: ImGuiInputTextFlags) -> u8;
908    pub fn igTreeNode(str_label_id: *const c_char) -> u8;
909    pub fn igTreeNodeStr(str_id: *const c_char, fmt: *const c_char, ...) -> u8;
910    pub fn igTreeNodePtr(ptr_id: *const c_void, fmt: *const c_char, ...) -> u8;
911    pub fn igTreePushStr(str_id: *const c_char) -> ();
912    pub fn igTreePushPtr(ptr_id: *const c_void) -> ();
913    pub fn igTreePop() -> ();
914    pub fn igSetNextTreeNodeOpened(opened: u8, cond: ImGuiSetCond) -> ();
915    pub fn igSelectable(label: *const c_char, selected: u8, flags: ImGuiSelectableFlags, size: ImVec2) -> u8;
916    pub fn igSelectableEx(label: *const c_char, p_selected: *mut u8, flags: ImGuiSelectableFlags, size: ImVec2) -> u8;
917    pub fn igListBox(label: *const c_char, current_item: *mut c_int, items: *mut *const c_char, items_count: c_int, height_in_items: c_int) -> u8;
918    pub fn igListBox2(label: *const c_char, current_item: *mut c_int, items_getter: Option<unsafe extern "C" fn(data: *mut c_void, idx: c_int, out_text: *mut *const c_char) -> u8>, data: *mut c_void, items_count: c_int, height_in_items: c_int) -> u8;
919    pub fn igListBoxHeader(label: *const c_char, size: ImVec2) -> u8;
920    pub fn igListBoxHeader2(label: *const c_char, items_count: c_int, height_in_items: c_int) -> u8;
921    pub fn igListBoxFooter() -> ();
922    pub fn igValueBool(prefix: *const c_char, b: u8) -> ();
923    pub fn igValueInt(prefix: *const c_char, v: c_int) -> ();
924    pub fn igValueUInt(prefix: *const c_char, v: c_uint) -> ();
925    pub fn igValueFloat(prefix: *const c_char, v: c_float, float_format: *const c_char) -> ();
926    pub fn igValueColor(prefix: *const c_char, v: ImVec4) -> ();
927    pub fn igValueColor2(prefix: *const c_char, v: c_uint) -> ();
928    pub fn igSetTooltip(fmt: *const c_char, ...) -> ();
929    pub fn igBeginTooltip() -> ();
930    pub fn igEndTooltip() -> ();
931    pub fn igBeginMainMenuBar() -> u8;
932    pub fn igEndMainMenuBar() -> ();
933    pub fn igBeginMenuBar() -> u8;
934    pub fn igEndMenuBar() -> ();
935    pub fn igBeginMenu(label: *const c_char, enabled: u8) -> u8;
936    pub fn igEndMenu() -> ();
937    pub fn igMenuItem(label: *const c_char, shortcut: *const c_char, selected: u8, enabled: u8) -> u8;
938    pub fn igMenuItemPtr(label: *const c_char, shortcut: *const c_char, p_selected: *mut u8, enabled: u8) -> u8;
939    pub fn igOpenPopup(str_id: *const c_char) -> ();
940    pub fn igBeginPopup(str_id: *const c_char) -> u8;
941    pub fn igBeginPopupModal(name: *const c_char, p_opened: *mut u8, extra_flags: ImGuiWindowFlags) -> u8;
942    pub fn igBeginPopupContextItem(str_id: *const c_char, mouse_button: c_int) -> u8;
943    pub fn igBeginPopupContextWindow(also_over_items: u8, str_id: *const c_char, mouse_button: c_int) -> u8;
944    pub fn igBeginPopupContextVoid(str_id: *const c_char, mouse_button: c_int) -> u8;
945    pub fn igEndPopup() -> ();
946    pub fn igCloseCurrentPopup() -> ();
947    pub fn igLogToTTY(max_depth: c_int) -> ();
948    pub fn igLogToFile(max_depth: c_int, filename: *const c_char) -> ();
949    pub fn igLogToClipboard(max_depth: c_int) -> ();
950    pub fn igLogFinish() -> ();
951    pub fn igLogButtons() -> ();
952    pub fn igLogText(fmt: *const c_char, ...) -> ();
953    pub fn igIsItemHovered() -> u8;
954    pub fn igIsItemHoveredRect() -> u8;
955    pub fn igIsItemActive() -> u8;
956    pub fn igIsItemVisible() -> u8;
957    pub fn igIsAnyItemHovered() -> u8;
958    pub fn igIsAnyItemActive() -> u8;
959    pub fn igGetItemRectMin(pOut: *mut ImVec2) -> ();
960    pub fn igGetItemRectMax(pOut: *mut ImVec2) -> ();
961    pub fn igGetItemRectSize(pOut: *mut ImVec2) -> ();
962    pub fn igIsWindowHovered() -> u8;
963    pub fn igIsWindowFocused() -> u8;
964    pub fn igIsRootWindowFocused() -> u8;
965    pub fn igIsRootWindowOrAnyChildFocused() -> u8;
966    pub fn igIsRectVisible(item_size: ImVec2) -> u8;
967    pub fn igIsPosHoveringAnyWindow(pos: ImVec2) -> u8;
968    pub fn igGetTime() -> c_float;
969    pub fn igGetFrameCount() -> c_int;
970    pub fn igGetStyleColName(idx: ImGuiCol) -> *const c_char;
971    pub fn igCalcItemRectClosestPoint(pOut: *mut ImVec2, pos: ImVec2, on_edge: u8, outward: c_float) -> ();
972    pub fn igCalcTextSize(pOut: *mut ImVec2, text: *const c_char, text_end: *const c_char, hide_text_after_double_hash: u8, wrap_width: c_float) -> ();
973    pub fn igCalcListClipping(items_count: c_int, items_height: c_float, out_items_display_start: *mut c_int, out_items_display_end: *mut c_int) -> ();
974    pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, extra_flags: ImGuiWindowFlags) -> u8;
975    pub fn igEndChildFrame() -> ();
976    pub fn igColorConvertU32ToFloat4(pOut: *mut ImVec4, _in: ImU32) -> ();
977    pub fn igColorConvertFloat4ToU32(_in: ImVec4) -> ImU32;
978    pub fn igColorConvertRGBtoHSV(r: c_float, g: c_float, b: c_float, out_h: *mut c_float, out_s: *mut c_float, out_v: *mut c_float) -> ();
979    pub fn igColorConvertHSVtoRGB(h: c_float, s: c_float, v: c_float, out_r: *mut c_float, out_g: *mut c_float, out_b: *mut c_float) -> ();
980    pub fn igGetKeyIndex(key: ImGuiKey) -> c_int;
981    pub fn igIsKeyDown(key_index: c_int) -> u8;
982    pub fn igIsKeyPressed(key_index: c_int, repeat: u8) -> u8;
983    pub fn igIsKeyReleased(key_index: c_int) -> u8;
984    pub fn igIsMouseDown(button: c_int) -> u8;
985    pub fn igIsMouseClicked(button: c_int, repeat: u8) -> u8;
986    pub fn igIsMouseDoubleClicked(button: c_int) -> u8;
987    pub fn igIsMouseReleased(button: c_int) -> u8;
988    pub fn igIsMouseHoveringWindow() -> u8;
989    pub fn igIsMouseHoveringAnyWindow() -> u8;
990    pub fn igIsMouseHoveringRect(pos_min: ImVec2, pos_max: ImVec2, clip: u8) -> u8;
991    pub fn igIsMouseDragging(button: c_int, lock_threshold: c_float) -> u8;
992    pub fn igGetMousePos(pOut: *mut ImVec2) -> ();
993    pub fn igGetMousePosOnOpeningCurrentPopup(pOut: *mut ImVec2) -> ();
994    pub fn igGetMouseDragDelta(pOut: *mut ImVec2, button: c_int, lock_threshold: c_float) -> ();
995    pub fn igResetMouseDragDelta(button: c_int) -> ();
996    pub fn igGetMouseCursor() -> ImGuiMouseCursor;
997    pub fn igSetMouseCursor(_type: ImGuiMouseCursor) -> ();
998    pub fn igCaptureKeyboardFromApp() -> ();
999    pub fn igCaptureMouseFromApp() -> ();
1000    pub fn igMemAlloc(sz: size_t) -> *mut c_void;
1001    pub fn igMemFree(ptr: *mut c_void) -> ();
1002    pub fn igGetClipboardText() -> *const c_char;
1003    pub fn igSetClipboardText(text: *const c_char) -> ();
1004    pub fn igGetVersion() -> *const c_char;
1005    pub fn igGetInternalState() -> *mut c_void;
1006    pub fn igGetInternalStateSize() -> size_t;
1007    pub fn igSetInternalState(state: *mut c_void, construct: u8) -> ();
1008    pub fn ImFontAtlas_GetTexDataAsRGBA32(atlas: *mut ImFontAtlas, out_pixels: *mut *mut c_uchar, out_width: *mut c_int, out_height: *mut c_int, out_bytes_per_pixel: *mut c_int) -> ();
1009    pub fn ImFontAtlas_GetTexDataAsAlpha8(atlas: *mut ImFontAtlas, out_pixels: *mut *mut c_uchar, out_width: *mut c_int, out_height: *mut c_int, out_bytes_per_pixel: *mut c_int) -> ();
1010    pub fn ImFontAtlas_SetTexID(atlas: *mut ImFontAtlas, tex: *mut c_void) -> ();
1011    pub fn ImFontAtlas_AddFont(atlas: *mut ImFontAtlas, font_cfg: *const ImFontConfig) -> *mut ImFont;
1012    pub fn ImFontAtlas_AddFontDefault(atlas: *mut ImFontAtlas, font_cfg: *const ImFontConfig) -> *mut ImFont;
1013    pub fn ImFontAtlas_AddFontFromFileTTF(atlas: *mut ImFontAtlas, filename: *const c_char, size_pixels: c_float, font_cfg: *const ImFontConfig, glyph_ranges: *const ImWchar) -> *mut ImFont;
1014    pub fn ImFontAtlas_AddFontFromMemoryTTF(atlas: *mut ImFontAtlas, ttf_data: *mut c_void, ttf_size: c_int, size_pixels: c_float, font_cfg: *const ImFontConfig, glyph_ranges: *const ImWchar) -> *mut ImFont;
1015    pub fn ImFontAtlas_AddFontFromMemoryCompressedTTF(atlas: *mut ImFontAtlas, compressed_ttf_data: *const c_void, compressed_ttf_size: c_int, size_pixels: c_float, font_cfg: *const ImFontConfig, glyph_ranges: *const ImWchar) -> *mut ImFont;
1016    pub fn ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(atlas: *mut ImFontAtlas, compressed_ttf_data_base85: *const c_char, size_pixels: c_float, font_cfg: *const ImFontConfig, glyph_ranges: *const ImWchar) -> *mut ImFont;
1017    pub fn ImFontAtlas_ClearTexData(atlas: *mut ImFontAtlas) -> ();
1018    pub fn ImFontAtlas_Clear(atlas: *mut ImFontAtlas) -> ();
1019    pub fn ImGuiIO_AddInputCharacter(c: c_ushort) -> ();
1020    pub fn ImGuiIO_AddInputCharactersUTF8(utf8_chars: *const c_char) -> ();
1021    pub fn ImGuiIO_ClearInputCharacters() -> ();
1022    pub fn ImDrawData_DeIndexAllBuffers(drawData: *mut ImDrawData) -> ();
1023    pub fn ImDrawList_GetVertexBufferSize(list: *mut ImDrawList) -> c_int;
1024    pub fn ImDrawList_GetVertexPtr(list: *mut ImDrawList, n: c_int) -> *mut ImDrawVert;
1025    pub fn ImDrawList_GetIndexBufferSize(list: *mut ImDrawList) -> c_int;
1026    pub fn ImDrawList_GetIndexPtr(list: *mut ImDrawList, n: c_int) -> *mut ImDrawIdx;
1027    pub fn ImDrawList_GetCmdSize(list: *mut ImDrawList) -> c_int;
1028    pub fn ImDrawList_GetCmdPtr(list: *mut ImDrawList, n: c_int) -> *mut ImDrawCmd;
1029    pub fn ImDrawList_Clear(list: *mut ImDrawList) -> ();
1030    pub fn ImDrawList_ClearFreeMemory(list: *mut ImDrawList) -> ();
1031    pub fn ImDrawList_PushClipRect(list: *mut ImDrawList, clip_rect: ImVec4) -> ();
1032    pub fn ImDrawList_PushClipRectFullScreen(list: *mut ImDrawList) -> ();
1033    pub fn ImDrawList_PopClipRect(list: *mut ImDrawList) -> ();
1034    pub fn ImDrawList_PushTextureID(list: *mut ImDrawList, texture_id: ImTextureID) -> ();
1035    pub fn ImDrawList_PopTextureID(list: *mut ImDrawList) -> ();
1036    pub fn ImDrawList_AddLine(list: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32, thickness: c_float) -> ();
1037    pub fn ImDrawList_AddRect(list: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32, rounding: c_float, rounding_corners: c_int) -> ();
1038    pub fn ImDrawList_AddRectFilled(list: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32, rounding: c_float, rounding_corners: c_int) -> ();
1039    pub fn ImDrawList_AddRectFilledMultiColor(list: *mut ImDrawList, a: ImVec2, b: ImVec2, col_upr_left: ImU32, col_upr_right: ImU32, col_bot_right: ImU32, col_bot_left: ImU32) -> ();
1040    pub fn ImDrawList_AddTriangleFilled(list: *mut ImDrawList, a: ImVec2, b: ImVec2, c: ImVec2, col: ImU32) -> ();
1041    pub fn ImDrawList_AddCircle(list: *mut ImDrawList, centre: ImVec2, radius: c_float, col: ImU32, num_segments: c_int) -> ();
1042    pub fn ImDrawList_AddCircleFilled(list: *mut ImDrawList, centre: ImVec2, radius: c_float, col: ImU32, num_segments: c_int) -> ();
1043    pub fn ImDrawList_AddText(list: *mut ImDrawList, pos: ImVec2, col: ImU32, text_begin: *const c_char, text_end: *const c_char) -> ();
1044    pub fn ImDrawList_AddTextExt(list: *mut ImDrawList, font: *const ImFont, font_size: c_float, pos: ImVec2, col: ImU32, text_begin: *const c_char, text_end: *const c_char, wrap_width: c_float, cpu_fine_clip_rect: *const ImVec4) -> ();
1045    pub fn ImDrawList_AddImage(list: *mut ImDrawList, user_texture_id: ImTextureID, a: ImVec2, b: ImVec2, uv0: ImVec2, uv1: ImVec2, col: ImU32) -> ();
1046    pub fn ImDrawList_AddPolyline(list: *mut ImDrawList, points: *const ImVec2, num_points: c_int, col: ImU32, closed: u8, thickness: c_float, anti_aliased: u8) -> ();
1047    pub fn ImDrawList_AddConvexPolyFilled(list: *mut ImDrawList, points: *const ImVec2, num_points: c_int, col: ImU32, anti_aliased: u8) -> ();
1048    pub fn ImDrawList_AddBezierCurve(list: *mut ImDrawList, pos0: ImVec2, cp0: ImVec2, cp1: ImVec2, pos1: ImVec2, col: ImU32, thickness: c_float, num_segments: c_int) -> ();
1049    pub fn ImDrawList_PathClear(list: *mut ImDrawList) -> ();
1050    pub fn ImDrawList_PathLineTo(list: *mut ImDrawList, pos: ImVec2) -> ();
1051    pub fn ImDrawList_PathLineToMergeDuplicate(list: *mut ImDrawList, pos: ImVec2) -> ();
1052    pub fn ImDrawList_PathFill(list: *mut ImDrawList, col: ImU32) -> ();
1053    pub fn ImDrawList_PathStroke(list: *mut ImDrawList, col: ImU32, closed: u8, thickness: c_float) -> ();
1054    pub fn ImDrawList_PathArcTo(list: *mut ImDrawList, centre: ImVec2, radius: c_float, a_min: c_float, a_max: c_float, num_segments: c_int) -> ();
1055    pub fn ImDrawList_PathArcToFast(list: *mut ImDrawList, centre: ImVec2, radius: c_float, a_min_of_12: c_int, a_max_of_12: c_int) -> ();
1056    pub fn ImDrawList_PathBezierCurveTo(list: *mut ImDrawList, p1: ImVec2, p2: ImVec2, p3: ImVec2, num_segments: c_int) -> ();
1057    pub fn ImDrawList_PathRect(list: *mut ImDrawList, rect_min: ImVec2, rect_max: ImVec2, rounding: c_float, rounding_corners: c_int) -> ();
1058    pub fn ImDrawList_ChannelsSplit(list: *mut ImDrawList, channels_count: c_int) -> ();
1059    pub fn ImDrawList_ChannelsMerge(list: *mut ImDrawList) -> ();
1060    pub fn ImDrawList_ChannelsSetCurrent(list: *mut ImDrawList, channel_index: c_int) -> ();
1061    pub fn ImDrawList_AddCallback(list: *mut ImDrawList, callback: ImDrawCallback, callback_data: *mut c_void) -> ();
1062    pub fn ImDrawList_AddDrawCmd(list: *mut ImDrawList) -> ();
1063    pub fn ImDrawList_PrimReserve(list: *mut ImDrawList, idx_count: c_int, vtx_count: c_int) -> ();
1064    pub fn ImDrawList_PrimRect(list: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32) -> ();
1065    pub fn ImDrawList_PrimRectUV(list: *mut ImDrawList, a: ImVec2, b: ImVec2, uv_a: ImVec2, uv_b: ImVec2, col: ImU32) -> ();
1066    pub fn ImDrawList_PrimVtx(list: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32) -> ();
1067    pub fn ImDrawList_PrimWriteVtx(list: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32) -> ();
1068    pub fn ImDrawList_PrimWriteIdx(list: *mut ImDrawList, idx: ImDrawIdx) -> ();
1069    pub fn ImDrawList_UpdateClipRect(list: *mut ImDrawList) -> ();
1070    pub fn ImDrawList_UpdateTextureID(list: *mut ImDrawList) -> ();
1071
1072    pub fn gl3wInit() -> ();
1073    pub fn ImGui_ImplSdlGL3_Init(window: *mut c_void) -> bool;
1074    pub fn ImGui_ImplSdlGL3_Shutdown();
1075    pub fn ImGui_ImplSdlGL3_NewFrame();
1076}