Skip to content

Commit

Permalink
Add uncovered structs to imgui_structs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PGZXB committed Jul 31, 2024
1 parent 5ff5b50 commit 60d53d2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
18 changes: 17 additions & 1 deletion docs/imgui_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3356,4 +3356,20 @@
#### functions:

## Uncovered Structs

These structs don't have a wrapper class; instead, they are typedef'd as `Unit`, which allows their pointers (`CPointer<Struct>`) to be used as function parameters/return but prevents direct access to their members.

* `ImFontGlyph`
* `ImGuiContext`
* `ImGuiDockNode`
* `ImGuiDockNodeSettings`
* `ImGuiDockRequest`
* `ImGuiInputEvent`
* `ImGuiInputTextDeactivateData`
* `ImGuiStackLevelInfo`
* `ImGuiStoragePair`
* `ImGuiStyleMod`
* `ImGuiTable`
* `ImGuiTableColumn`
* `ImGuiTableColumnSettings`
* `ImGuiTableColumnsSettings`
* `ImGuiWindow`
1 change: 1 addition & 0 deletions generator/src/main.cj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ main(args: Array<String>): Int64 {
case StructType(name) => if (!definedStructNames.contains(name)) {
undefStructTypedefs.append(TypeDef(alias, "void"))
typeAlias.put(alias, UnitType)
apiInfo.addUncoveredStruct(name)
}
case _ => continue
}
Expand Down
8 changes: 6 additions & 2 deletions generator/src/utils.cj
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ class APIInfo {
}
}

func addUncoveredStruct(fn: String) {
uncoveredStructs.append(fn)
func addUncoveredStruct(structName: String) {
uncoveredStructs.append(structName)
}

func generateDocumentForGlobalFunctions<T>(os: StringWriter<T>) where T <: OutputStream {
Expand Down Expand Up @@ -926,6 +926,10 @@ class APIInfo {
}
os.writeln()
os.writeln("## Uncovered Structs")
os.writeln(
"These structs don't have a wrapper class; instead, they are typedef'd as `Unit`, " +
"which allows their pointers (`CPointer<Struct>`) to be used as function parameters/return " +
"but prevents direct access to their members.")
os.writeln()
for (s in uncoveredStructs) {
os.writeln("* `${s}`")
Expand Down

0 comments on commit 60d53d2

Please sign in to comment.