imgui_memory_editor_sys/
bindings.rs

1/* automatically generated by rust-bindgen 0.56.0 */
2
3pub type ImGuiDataType = cty::c_int;
4pub type ImU8 = cty::c_uchar;
5pub type ImU32 = cty::c_uint;
6#[repr(C)]
7#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
8pub struct MemoryEditor {
9    pub Open: bool,
10    pub ReadOnly: bool,
11    pub Cols: cty::c_int,
12    pub OptShowOptions: bool,
13    pub OptShowDataPreview: bool,
14    pub OptShowHexII: bool,
15    pub OptShowAscii: bool,
16    pub OptGreyOutZeroes: bool,
17    pub OptUpperCaseHex: bool,
18    pub OptMidColsCount: cty::c_int,
19    pub OptAddrDigitsCount: cty::c_int,
20    pub HighlightColor: ImU32,
21    pub ReadFn: ::core::option::Option<unsafe extern "C" fn(data: *const ImU8, off: usize) -> ImU8>,
22    pub WriteFn: ::core::option::Option<unsafe extern "C" fn(data: *mut ImU8, off: usize, d: ImU8)>,
23    pub HighlightFn:
24        ::core::option::Option<unsafe extern "C" fn(data: *const ImU8, off: usize) -> bool>,
25    pub ContentsWidthChanged: bool,
26    pub DataPreviewAddr: usize,
27    pub DataEditingAddr: usize,
28    pub DataEditingTakeFocus: bool,
29    pub DataInputBuf: [cty::c_char; 32usize],
30    pub AddrInputBuf: [cty::c_char; 32usize],
31    pub GotoAddr: usize,
32    pub HighlightMin: usize,
33    pub HighlightMax: usize,
34    pub PreviewEndianess: cty::c_int,
35    pub PreviewDataType: ImGuiDataType,
36}
37#[repr(i32)]
38#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
39pub enum MemoryEditor_DataFormat {
40    DataFormat_Bin = 0,
41    DataFormat_Dec = 1,
42    DataFormat_Hex = 2,
43    DataFormat_COUNT = 3,
44}
45#[repr(C)]
46#[derive(Debug, Default, Copy, Clone, PartialEq)]
47pub struct MemoryEditor_Sizes {
48    pub AddrDigitsCount: cty::c_int,
49    pub LineHeight: f32,
50    pub GlyphWidth: f32,
51    pub HexCellWidth: f32,
52    pub SpacingBetweenMidCols: f32,
53    pub PosHexStart: f32,
54    pub PosHexEnd: f32,
55    pub PosAsciiStart: f32,
56    pub PosAsciiEnd: f32,
57    pub WindowWidth: f32,
58}
59extern "C" {
60    pub fn Editor_Create(editor: *mut MemoryEditor);
61}
62extern "C" {
63    pub fn Editor_DrawContents(
64        editor: *mut MemoryEditor,
65        mem_data_void: *mut cty::c_void,
66        mem_size: usize,
67        base_display_addr: usize,
68    );
69}
70extern "C" {
71    pub fn Editor_DrawWindow(
72        editor: *mut MemoryEditor,
73        title: *const cty::c_char,
74        mem_data: *mut cty::c_void,
75        mem_size: usize,
76        base_display_addr: usize,
77    );
78}