|
1 | 1 | package main |
2 | 2 |
|
3 | 3 | // Wrapper for return value |
4 | | -type returnWrapper func(f FuncDef) (returnType string, returnStmt string) |
| 4 | +type returnWrapper func() (returnType string, returnStmt string) |
5 | 5 |
|
6 | | -func boolReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 6 | +func boolReturnW() (returnType string, returnStmt string) { |
7 | 7 | returnType = "bool" |
8 | 8 | returnStmt = "return %s == C.bool(true)\n" |
9 | 9 | return |
10 | 10 | } |
11 | 11 |
|
12 | | -func constCharReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 12 | +func constCharReturnW() (returnType string, returnStmt string) { |
13 | 13 | returnType = "string" |
14 | 14 | returnStmt = "return C.GoString(%s)" |
15 | 15 | return |
16 | 16 | } |
17 | 17 |
|
18 | | -func floatReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 18 | +func floatReturnW() (returnType string, returnStmt string) { |
19 | 19 | returnType = "float32" |
20 | 20 | returnStmt = "return float32(%s)" |
21 | 21 | return |
22 | 22 | } |
23 | 23 |
|
24 | | -func doubleReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 24 | +func doubleReturnW() (returnType string, returnStmt string) { |
25 | 25 | returnType = "float64" |
26 | 26 | returnStmt = "return float64(%s)" |
27 | 27 | return |
28 | 28 | } |
29 | 29 |
|
30 | | -func intReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 30 | +func intReturnW() (returnType string, returnStmt string) { |
31 | 31 | returnType = "int" |
32 | 32 | returnStmt = "return int(%s)" |
33 | 33 | return |
34 | 34 | } |
35 | 35 |
|
36 | | -func constWCharPtrReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 36 | +func constWCharPtrReturnW() (returnType string, returnStmt string) { |
37 | 37 | returnType = "*ImWchar" |
38 | 38 | returnStmt = "return (*ImWchar)(%s)" |
39 | 39 | return |
40 | 40 | } |
41 | 41 |
|
42 | | -func imVec4PtrReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 42 | +func imVec4PtrReturnW() (returnType string, returnStmt string) { |
43 | 43 | returnType = "ImVec4" |
44 | 44 | returnStmt = "return newImVec4FromCPtr(%s)" |
45 | 45 | return |
46 | 46 | } |
47 | 47 |
|
48 | | -func imVec4ReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 48 | +func imVec4ReturnW() (returnType string, returnStmt string) { |
49 | 49 | returnType = "ImVec4" |
50 | 50 | returnStmt = "return newImVec4FromC(%s)" |
51 | 51 | return |
52 | 52 | } |
53 | 53 |
|
54 | | -func imVec2ReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 54 | +func imVec2ReturnW() (returnType string, returnStmt string) { |
55 | 55 | returnType = "ImVec2" |
56 | 56 | returnStmt = "return newImVec2FromC(%s)" |
57 | 57 | return |
58 | 58 | } |
59 | 59 |
|
60 | | -func imColorReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 60 | +func imColorReturnW() (returnType string, returnStmt string) { |
61 | 61 | returnType = "ImColor" |
62 | 62 | returnStmt = "return newImColorFromC(%s)" |
63 | 63 | return |
64 | 64 | } |
65 | 65 |
|
66 | | -func imPlotPointReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 66 | +func imPlotPointReturnW() (returnType string, returnStmt string) { |
67 | 67 | returnType = "ImPlotPoint" |
68 | 68 | returnStmt = "return newImPlotPointFromC(%s)" |
69 | 69 | return |
70 | 70 | } |
71 | 71 |
|
72 | | -func imRectReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 72 | +func imRectReturnW() (returnType string, returnStmt string) { |
73 | 73 | returnType = "ImRect" |
74 | 74 | returnStmt = "return newImRectFromC(%s)" |
75 | 75 | return |
76 | 76 | } |
77 | 77 |
|
78 | | -func imTableColumnIdxReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 78 | +func imTableColumnIdxReturnW() (returnType string, returnStmt string) { |
79 | 79 | returnType = "ImGuiTableColumnIdx" |
80 | 80 | returnStmt = "return ImGuiTableColumnIdx(%s)" |
81 | 81 | return |
82 | 82 | } |
83 | 83 |
|
84 | | -func imTableDrawChannelIdxReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 84 | +func imTableDrawChannelIdxReturnW() (returnType string, returnStmt string) { |
85 | 85 | returnType = "ImGuiTableDrawChannelIdx" |
86 | 86 | returnStmt = "return ImGuiTableDrawChannelIdx(%s)" |
87 | 87 | return |
88 | 88 | } |
89 | 89 |
|
90 | | -func voidPtrReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 90 | +func voidPtrReturnW() (returnType string, returnStmt string) { |
91 | 91 | returnType = "unsafe.Pointer" |
92 | 92 | returnStmt = "return unsafe.Pointer(%s)" |
93 | 93 | return |
94 | 94 | } |
95 | 95 |
|
96 | | -func u32ReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 96 | +func u32ReturnW() (returnType string, returnStmt string) { |
97 | 97 | returnType = "uint32" |
98 | 98 | returnStmt = "return uint32(%s)" |
99 | 99 | return |
100 | 100 | } |
101 | 101 |
|
102 | | -func uintReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 102 | +func uintReturnW() (returnType string, returnStmt string) { |
103 | 103 | returnType = "uint32" |
104 | 104 | returnStmt = "return uint32(%s)" |
105 | 105 | return |
106 | 106 | } |
107 | 107 |
|
108 | | -func uint64ReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 108 | +func uint64ReturnW() (returnType string, returnStmt string) { |
109 | 109 | returnType = "uint64" |
110 | 110 | returnStmt = "return uint64(%s)" |
111 | 111 | return |
112 | 112 | } |
113 | 113 |
|
114 | | -func idReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 114 | +func idReturnW() (returnType string, returnStmt string) { |
115 | 115 | returnType = "ImGuiID" |
116 | 116 | returnStmt = "return ImGuiID(%s)" |
117 | 117 | return |
118 | 118 | } |
119 | 119 |
|
120 | | -func textureIdReturnW(f FuncDef) (returnType string, returnStmt string) { |
| 120 | +func textureIdReturnW() (returnType string, returnStmt string) { |
121 | 121 | returnType = "ImTextureID" |
122 | 122 | returnStmt = "return ImTextureID(%s)" |
123 | 123 | return |
|
0 commit comments