-
Notifications
You must be signed in to change notification settings - Fork 0
/
cimgui.yml
253 lines (250 loc) · 13.4 KB
/
cimgui.yml
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
GENERATOR:
PackageName: imgui
PackageDescription: "Package imgui provides Go bindings for cimgui which is a C-wrapper for Dear ImGui by ocornut"
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
Includes:
- "cimgui.h"
- "patch.h"
Options:
SafeStrings: true
StructAccessors: true
FlagGroups:
- {name: CFLAGS, flags: [-DCIMGUI_DEFINE_ENUMS_AND_STRUCTS,"-I${SRCDIR}/cimgui"]}
- {name: LDFLAGS, flags: ["-L${SRCDIR}/cimgui", -lcimgui]}
PARSER:
IncludePaths:
SourcesPaths:
- cimgui/cimgui.h
- patch.h
Defines:
CIMGUI_DEFINE_ENUMS_AND_STRUCTS: 1
__builtin_va_start: {}
__builtin_va_end: {}
TRANSLATOR:
ConstRules:
defines: eval
enum: expand
Rules:
global:
# include everything
- {action: accept, from: "^ig"}
- {action: accept, from: "^Im"}
- {action: accept, from: "_fn$"}
# accept manual additions in path.h
- {action: accept, from: "M$"}
# ignore variadic functions
- {action: ignore, from: "^igText$"}
- {action: ignore, from: "^igTextColored$"}
- {action: ignore, from: "^igTextDisabled$"}
- {action: ignore, from: "^igTextWrapped$"}
- {action: ignore, from: "^igLabelText$"}
- {action: ignore, from: "^igBulletText$"}
- {action: ignore, from: "^igTreeNodeStrStr$"}
- {action: ignore, from: "^igTreeNodePtr$"}
- {action: ignore, from: "^igTreeNodeExStrStr$"}
- {action: ignore, from: "^igTreeNodeExPtr$"}
- {action: ignore, from: "^igSetTooltip$"}
- {action: ignore, from: "^igLogText$"}
- {action: ignore, from: "^ImGuiTextBuffer_appendf$"}
# ignore va_list functions
- {action: ignore, from: "^igTextV$"}
- {action: ignore, from: "^igTextColoredV$"}
- {action: ignore, from: "^igTextDisabledV$"}
- {action: ignore, from: "^igTextWrappedV$"}
- {action: ignore, from: "^igLabelTextV$"}
- {action: ignore, from: "^igBulletTextV$"}
- {action: ignore, from: "^igTreeNodeVPtr$"}
- {action: ignore, from: "^igTreeNodeVStr$"}
- {action: ignore, from: "^igTreeNodeExVStr$"}
- {action: ignore, from: "^igTreeNodeExVPtr$"}
- {action: ignore, from: "^igSetTooltipV$"}
- {action: ignore, from: "^ImGuiTextBuffer_appendfv$"}
# ignore functions which take function pointers as parameters
- {action: ignore, from: "^igComboFnPtr$"}
- {action: ignore, from: "^igListBoxFnPtr$"}
- {action: ignore, from: "^igPlotLinesFnPtr$"}
- {action: ignore, from: "^igPlotHistogramFnPtr$"}
- {action: ignore, from: "^igSetAllocatorFunctions$"}
# remove double namings
- {action: replace, from: "^ImGuiIO_ImGuiIO", to: "IOCreate"}
- {action: replace, from: "^ImVec2_ImVec2", to: "Vec2Create"}
- {action: replace, from: "^ImVec4_ImVec4", to: "Vec4Create"}
- {action: replace, from: "^ImGuiStoragePair_ImGuiStoragePair", to: "ImGuiStoragePairCreate"}
- {action: replace, from: "^ImGuiOnceUponAFrame_ImGuiOnceUponAFrame", to: "OnceUponAFrameCreate"}
- {action: replace, from: "^ImGuiTextFilter_ImGuiTextFilter", to: "TextFilterCreate"}
- {action: replace, from: "^ImGuiTextRange_ImGuiTextRange", to: "TextRangeCreate"}
- {action: replace, from: "^ImGuiTextRange_ImGuiTextRangeStr", to: "TextRangeStrCreate"}
- {action: replace, from: "^ImGuiTextBuffer_ImGuiTextBuffer", to: "TextBufferCreate"}
- {action: replace, from: "^ImGuiListClipper_ImGuiListClipper", to: "ListClipperCreate"}
- {action: replace, from: "^ImColor_ImColor", to: "ColorCreate"}
- {action: replace, from: "^ImColor_ImColorInt", to: "ColorIntCreate"}
- {action: replace, from: "^ImColor_ImColorU32", to: "ColorU32Create"}
- {action: replace, from: "^ImColor_ImColorFloat", to: "ColorFloatCreate"}
- {action: replace, from: "^ImColor_ImColorVec4", to: "ColorVec4Create"}
- {action: replace, from: "^ImDrawCmd_ImDrawCmd", to: "DrawCmdCreate"}
- {action: replace, from: "^ImDrawListSplitter_ImDrawListSplitter", to: "DrawListSplitterCreate"}
- {action: replace, from: "^ImDrawList_ImDrawList", to: "DrawListCreate"}
- {action: replace, from: "^ImDrawData_ImDrawData", to: "DrawDataCreate"}
- {action: replace, from: "^ImFontConfig_ImFontConfig", to: "FontConfigCreate"}
- {action: replace, from: "^ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder", to: "FontGlyphRangesBuilderCreate"}
- {action: replace, from: "^ImFontAtlasCustomRect_ImFontAtlasCustomRect", to: "FontAtlasCustomRectCreate"}
- {action: replace, from: "^ImFontAtlas_ImFontAtlas", to: "FontAtlasCreate"}
- {action: replace, from: "^ImFont_ImFont", to: "FontCreate"}
# remove prefix
- {action: replace, from: "ImVec2", to: "Vec2"}
- {action: replace, from: "ImVec4", to: "Vec4"}
- {action: replace, from: "^ImDrawList_AddDrawCmd", to: "AddDrawCmd"}
- {action: replace, from: "^igColorConvertRGBtoHSV", to: "RGBtoHSV"}
- {action: replace, from: "^igColorConvertHSVtoRGB", to: "HSVtoRGB"}
- {action: replace, from: "^ig"}
- {action: replace, from: "ImGui"}
- {action: replace, from: "^Im"}
- {transform: export}
const:
# include everything
- {action: accept, from: "^Im"}
# remove some prefix
- {action: replace, from: "^ImGuiDataType_$", to: "DataTypeFlags"}
- {action: replace, from: "^ImGuiDataDir_$", to: "DirFlags"}
- {action: replace, from: "^ImGuiDataKey_$", to: "KeyFlags"}
- {action: replace, from: "^ImGuiDataNavInput_$", to: "NavInputFlags"}
- {action: replace, from: "^ImGuiCol", to: "ColFlags"}
- {action: replace, from: "^ImGuiStyleVar_$", to: "StyleVarFlags"}
- {action: replace, from: "^ImGuiCond_$", to: "CondFlags"}
- {transform: export}
type:
# include everything
- {action: accept, from: "^Im"}
- {transform: export}
private:
# exclude everything
- {transform: unexport}
post-global:
- {load: snakecase}
PtrTips:
struct:
#- {target: "^ImDrawData$", tips: [0, sref, 0, 0, 0, 0, 0, 0]}
function:
# ensure that all function accept correct parameters
- {target: "^ImFontAtlas_GetTexDataAsAlpha8$", tips: [sref, ref, ref, ref, ref]}
- {target: "^ImVec(2|4)_destroy$", tips: [ref]}
- {target: "^ig(Create|Destroy)Context$", tips: [ref]}
- {target: "^igSetCurrentContext$", tips: [ref]}
- {target: "^igShow(Demo|About|Metrics)Window$", tips: [ref]}
- {target: "^igShowStyleEditor$", tips: [ref]}
- {target: "^igStyleColors(Dark|Classic|Light)$", tips: [ref]}
- {target: "^igBegin$", tips: [0,ref,0]}
- {target: "^igPushFont$", tips: [ref]}
- {target: "^igCheckbox$", tips: [0,ref]}
- {target: "^igCheckboxFlags$", tips: [0,ref,0]}
- {target: "^igRadioButtonIntPtr$", tips: [0,ref,0]}
- {target: "^igCombo$", tips: [0,ref,0,0,0]}
- {target: "^igComboStr$", tips: [0,ref,0,0]}
- {target: "^igComboFnPtr$", tips: [0,ref,0,0,0,0]}
- {target: "^igDragFloat$", tips: [0,ref,0,0,0,0,0]}
- {target: "^igDragFloatRange2$", tips: [0,ref,ref,0,0,0,0,0,0]}
- {target: "^igDragInt$", tips: [0,ref,0,0,0,0]}
- {target: "^igDragIntRange2$", tips: [0,ref,ref,0,0,0,0,0]}
- {target: "^igSliderFloat$", tips: [0,ref,0,0,0,0]}
- {target: "^igSliderAngle$", tips: [0,ref,0,0,0]}
- {target: "^igSliderInt$", tips: [0,ref,0,0,0]}
- {target: "^igVSliderFloat$", tips: [0,0,ref,0,0,0,0]}
- {target: "^igVSliderInt$", tips: [0,0,ref,0,0,0]}
- {target: "^igInputFloat$", tips: [0,ref,0,0,0,0]}
- {target: "^igInputInt$", tips: [0,ref,0,0,0]}
- {target: "^igInputDouble$", tips: [0,ref,0,0,0,0]}
- {target: "^igColorPicker4$", tips: [0,0,0,ref]}
- {target: "^igCollapsingHeaderBoolPtr$", tips: [0,ref,0]}
- {target: "^igSelectableBoolPtr$", tips: [0,ref,0,0]}
- {target: "^igListBoxStr_arr$", tips: [0,ref,0,0,0]}
- {target: "^igListBoxFnPtr$", tips: [0,ref,0,0,0,0]}
- {target: "^igMenuItemBoolPtr$", tips: [0,0,ref,0]}
- {target: "^igBeginPopupModal$", tips: [0,ref,0]}
- {target: "^igBeginTabItem$", tips: [0,ref,0]}
- {target: "^igShowDemoWindow$", tips: [ref]}
- {target: "^igCalcListClipping$", tips: [0,0,ref,ref]}
- {target: "^igIsMousePosValid$", tips: [ref]}
- {target: "^igSaveIniSettingsToMemory$", tips: [ref]}
- {target: "^ImGuiStyle_destroy$", tips: [ref]}
- {target: "^ImGuiStyle_ScaleAllSizes$", tips: [ref,0]}
- {target: "^ImGuiIO_AddInputCharacter(sUTF8)?$", tips: [ref,0]}
- {target: "^ImGuiIO_ClearInputCharacters$", tips: [ref]}
- {target: "^ImGuiIO_destroy$", tips: [ref]}
- {target: "^ImGuiInputTextCallbackData_destroy$", tips: [ref]}
- {target: "^ImGuiInputTextCallbackData_DeleteChars$", tips: [ref,0,0]}
- {target: "^ImGuiInputTextCallbackData_InsertChars$", tips: [ref,0,0]}
- {target: "^ImGuiInputTextCallbackData_HasSelection$", tips: [ref]}
- {target: "^ImGuiPayload_destroy$", tips: [ref]}
- {target: "^ImGuiPayload_Clear$", tips: [ref]}
- {target: "^ImGuiPayload_IsDataType$", tips: [ref,0]}
- {target: "^ImGuiPayload_IsPreview$", tips: [ref]}
- {target: "^ImGuiPayload_IsDelivery$", tips: [ref]}
- {target: "^ImGuiOnceUponAFrame_destroy$", tips: [ref]}
- {target: "^ImGuiTextFilter_destroy$", tips: [ref]}
- {target: "^ImGuiTextFilter_Draw$", tips: [ref,0,0]}
- {target: "^ImGuiTextFilter_PassFilter$", tips: [ref,0,0]}
- {target: "^ImGuiTextFilter_Build$", tips: [ref]}
- {target: "^ImGuiTextFilter_Clear$", tips: [ref]}
- {target: "^ImGuiTextFilter_IsActive$", tips: [ref]}
- {target: "^ImGuiTextRange_destroy$", tips: [ref]}
- {target: "^ImGuiTextRange_empty$", tips: [ref]}
- {target: "^ImGuiTextRange_split$", tips: [ref,0,0]}
- {target: "^ImGuiTextBuffer_destroy$", tips: [ref]}
- {target: "^ImGuiTextBuffer_begin$", tips: [ref]}
- {target: "^ImGuiTextBuffer_end$", tips: [ref]}
- {target: "^ImGuiTextBuffer_size$", tips: [ref]}
- {target: "^ImGuiTextBuffer_empty$", tips: [ref]}
- {target: "^ImGuiTextBuffer_clear$", tips: [ref]}
- {target: "^ImGuiTextBuffer_reserve$", tips: [ref,0]}
- {target: "^ImGuiTextBuffer_c_str$", tips: [ref]}
- {target: "^ImGuiTextBuffer_append$", tips: [ref,0,0]}
- {target: "^ImGuiTextBuffer_appendfv$", tips: [ref,0,0]}
- {target: "^ImGuiStoragePair_destroy$", tips: [ref]}
- {target: "^ImGuiStoragePair_ImGuiStoragePairPtr$", tips: [0,ref]}
- {target: "^ImGuiStorage_Clear$", tips: [ref]}
- {target: "^ImGuiStorage_Get", tips: [ref,0,0]}
- {target: "^ImGuiStorage_Set", tips: [ref,0,0]}
- {target: "^ImGuiStorage_BuildSortByKey$", tips: [ref]}
- {target: "^ImGuiListClipper_", tips: [ref]}
- {target: "^ImColor_destroy$", tips: [ref]}
- {target: "^ImColor_SetHSV$", tips: [ref,0,0,0,0]}
- {target: "^ImColor_HSV$", tips: [ref,0,0,0,0]}
- {target: "^ImDrawListSplitter_", tips: [ref,ref]}
- {target: "^ImDrawList_", tips: [ref,ref]}
- {target: "^ImDrawList_AddTextFontPtr$", tips: [ref,ref,0,0,0,0,0,0,ref]}
- {target: "^ImDrawData_", tips: [ref]}
- {target: "^ImFontConfig_", tips: [ref]}
- {target: "^ImFontGlyphRangesBuilder_", tips: [ref]}
- {target: "^ImFontGlyphRangesBuilder_AddRanges$", tips: [ref,ref]}
- {target: "^ImFontGlyphRangesBuilder_BuildRanges$", tips: [ref,ref]}
- {target: "^ImFontAtlasCustomRect_", tips: [ref]}
- {target: "^ImFontAtlas_", tips: [ref,ref]}
- {target: "^ImFontAtlas_AddFontFromFileTTF$", tips: [ref,0,0,ref,ref]}
- {target: "^ImFontAtlas_AddFontFromMemoryTTF$", tips: [ref,0,0,0,ref,ref]}
- {target: "^ImFontAtlas_AddFontFromMemoryCompressedTTF$", tips: [ref,0,0,0,ref,ref]}
- {target: "^ImFontAtlas_AddFontFromMemoryCompressedBase85TTF$", tips: [ref,0,0,ref,ref]}
- {target: "^ImFontAtlas_GetTexDataAs", tips: [ref,sref,ref,ref,ref]}
- {target: "^ImFontAtlas_CalcCustomRectUV$", tips: [ref,ref,ref,ref]}
- {target: "^ImFontAtlas_GetMouseCursorTexData$", tips: [ref,0,ref,ref,0,0]}
- {target: "^ImFont_", tips: [ref]}
- {target: "^ImFont_Render", tips: [ref,ref]}
- {target: "^igGet(Window|Content|Font|Cursor|Item|Mouse)", tips: [ref]}
- {target: "^igCalcTextSize_nonUDT$", tips: [ref,0,0,0,0]}
- {target: "^igColorConvertU32ToFloat4_nonUDT$", tips: [ref,0]}
- {target: "^ImColor_HSV_non(UDT)$", tips: [ref,ref,0,0,0,0]}
- {target: "^ImColor_HSV_nonUDT2$", tips: [ref,0,0,0,0]}
- {target: "^ImDrawList_GetClipRect", tips: [ref,ref]}
- {target: "^ImFont_CalcTextSizeA_nonUDT$", tips: [ref,ref,0,0,0,0,0,0]}
- {target: "^ImFont_CalcTextSizeA_nonUDT2$", tips: [ref,0,0,0,0,0,0]}
- {target: "^ImGuiTextBuffer_appendf$", tips: [ref,0]}
- {target: "^igColorConvert", tips: [0,0,0,ref,ref,ref]}
- {target: "^ImVector_ImWchar_", tips: [ref]}
TypeTips:
function:
MemTips:
# using raw c types for union structs
- {target: "^ImGuiStoragePair$", self: raw}
# using raw c types for "problematic" structs
- {target: "^ImFontAtlas$", self: raw}
# cgo_helpers.go 4017 - ref9392acd2.TextureId, cTextureId_allocs = **(**C.ImTextureID)(unsafe.Pointer(&x.TextureId)), cgoAllocsUnknown
# cgo_helpers.go 5495 - refce07fef6.Data, cData_allocs = *(**C.ImTextureID)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&x.Data)).Data)), cgoAllocsUnknown