Skip to content

Commit 17be61c

Browse files
authored
cmd/codegen: add missing ImWchar return type (#51)
Also add missing ImGuiInputTextCallbackData.GetEventChar() method
1 parent 672737c commit 17be61c

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

cimgui_funcs.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/codegen/gengo.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ import "unsafe"
202202
"char*": constCharReturnW,
203203
"const char*": constCharReturnW,
204204
"const ImWchar*": constWCharPtrReturnW,
205+
"ImWchar": imWcharReturnW,
205206
"float": floatReturnW,
206207
"double": doubleReturnW,
207208
"int": intReturnW,

cmd/codegen/return_wrapper.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ func constWCharPtrReturnW() (returnType string, returnStmt string) {
3939
return
4040
}
4141

42+
func imWcharReturnW() (returnType string, returnStmt string) {
43+
returnType = "ImWchar"
44+
returnStmt = "return (ImWchar)(%s)"
45+
return
46+
}
47+
4248
func imVec4PtrReturnW() (returnType string, returnStmt string) {
4349
returnType = "ImVec4"
4450
returnStmt = "return newImVec4FromCPtr(%s)"

0 commit comments

Comments
 (0)