Skip to content

The example of gallery can't be compiled successfully by vlang0.2.4 #1

@fly-github-fly

Description

@fly-github-fly

C:/V/vlib/viup/attributes.v:89:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
87 | C.IupSetStrAttribute(control, name.to_upper().trim_space().str, value.trim_space().str)
88 |
89 | return control
| ~~~~~~~
90 | }
91 |
C:/V/vlib/viup/attributes.v:104:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
102 | }
103 |
104 | return control
| ~~~~~~~
105 | }
106 |
C:/V/vlib/viup/attributes.v:112:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
110 | C.IupSetAttribute(control, '${name}_data'.to_upper().trim_space().str, charptr(data))
111 |
112 | return control
| ~~~~~~~
113 | }
114 |
C:/V/vlib/viup/attributes.v:118:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
116 | pub fn (control &Control) unset_attr(name string) &Control {
117 | C.IupSetAttribute(control, name.to_upper().trim_space().str, C.NULL)
118 | return control
| ~~~~~~~
119 | }
C:/V/vlib/viup/callbacks.v:134:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
132 | // on_action is triggered when the primary function of the element is performed (e.g. clicking a button)
133 | pub fn (control &Control) on_action(func ActionFunc) &Control {
134 | C.IupSetCallback(control, 'ACTION', func)
| ~~~~~~~~
135 | return control
136 | }
C:/V/vlib/viup/callbacks.v:135:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
133 | pub fn (control &Control) on_action(func ActionFunc) &Control {
134 | C.IupSetCallback(control, 'ACTION', func)
135 | return control
| ~~~~~~~
136 | }
137 |
C:/V/vlib/viup/callbacks.v:139:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
137 |
138 | pub fn (control &Control) on_branch_open(func BranchOpenFunc) &Control {
139 | C.IupSetCallback(control, 'BRANCHOPEN_CB', func)
| ~~~~~~~~~~~~~~~
140 | return control
141 | }
C:/V/vlib/viup/callbacks.v:140:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
138 | pub fn (control &Control) on_branch_open(func BranchOpenFunc) &Control {
139 | C.IupSetCallback(control, 'BRANCHOPEN_CB', func)
140 | return control
| ~~~~~~~
141 | }
142 |
C:/V/vlib/viup/callbacks.v:144:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
142 |
143 | pub fn (control &Control) on_branch_close(func BranchCloseFunc) &Control {
144 | C.IupSetCallback(control, 'BRANCHCLOSE_CB', func)
| ~~~~~~~~~~~~~~~~
145 | return control
146 | }
C:/V/vlib/viup/callbacks.v:145:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
143 | pub fn (control &Control) on_branch_close(func BranchCloseFunc) &Control {
144 | C.IupSetCallback(control, 'BRANCHCLOSE_CB', func)
145 | return control
| ~~~~~~~
146 | }
147 |
C:/V/vlib/viup/callbacks.v:150:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
148 | // on_button occurs when a button is clicked
149 | pub fn (control &Control) on_button(func ButtonFunc) &Control {
150 | C.IupSetCallback(control, 'BUTTON_CB', func)
| ~~~~~~~~~~~
151 | return control
152 | }
C:/V/vlib/viup/callbacks.v:151:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
149 | pub fn (control &Control) on_button(func ButtonFunc) &Control {
150 | C.IupSetCallback(control, 'BUTTON_CB', func)
151 | return control
| ~~~~~~~
152 | }
153 |
C:/V/vlib/viup/callbacks.v:156:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
154 | // on_button_press occurs when a button is pressed, but not released
155 | pub fn (control &Control) on_button_press(func ButtonPressFunc) &Control {
156 | C.IupSetCallback(control, 'BUTTON_PRESS_CB', func)
| ~~~~~~~~~~~~~~~~~
157 | return control
158 | }
C:/V/vlib/viup/callbacks.v:157:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
155 | pub fn (control &Control) on_button_press(func ButtonPressFunc) &Control {
156 | C.IupSetCallback(control, 'BUTTON_PRESS_CB', func)
157 | return control
| ~~~~~~~
158 | }
159 |
C:/V/vlib/viup/callbacks.v:162:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
160 | // on_button_release occurs when a button is pressed and then released
161 | pub fn (control &Control) on_button_release(func ButtonReleaseFunc) &Control {
162 | C.IupSetCallback(control, 'BUTTON_RELEASE_CB', func)
| ~~~~~~~~~~~~~~~~~~~
163 | return control
164 | }
C:/V/vlib/viup/callbacks.v:163:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
161 | pub fn (control &Control) on_button_release(func ButtonReleaseFunc) &Control {
162 | C.IupSetCallback(control, 'BUTTON_RELEASE_CB', func)
163 | return control
| ~~~~~~~
164 | }
165 |
C:/V/vlib/viup/callbacks.v:167:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
165 |
166 | pub fn (control &Control) on_caret(func CaretFunc) &Control {
167 | C.IupSetCallback(control, 'CARET_CB', func)
| ~~~~~~~~~~
168 | return control
169 | }
C:/V/vlib/viup/callbacks.v:168:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
166 | pub fn (control &Control) on_caret(func CaretFunc) &Control {
167 | C.IupSetCallback(control, 'CARET_CB', func)
168 | return control
| ~~~~~~~
169 | }
170 |
C:/V/vlib/viup/callbacks.v:172:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
170 |
171 | pub fn (control &Control) on_cell(func CellFunc) &Control {
172 | C.IupSetCallback(control, 'CELL_CB', func)
| ~~~~~~~~~
173 | return control
174 | }
C:/V/vlib/viup/callbacks.v:173:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
171 | pub fn (control &Control) on_cell(func CellFunc) &Control {
172 | C.IupSetCallback(control, 'CELL_CB', func)
173 | return control
| ~~~~~~~
174 | }
175 |
C:/V/vlib/viup/callbacks.v:178:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
176 | // on_change occurs when the value in an input is changed
177 | pub fn (control &Control) on_change(func ChangeFunc) &Control {
178 | C.IupSetCallback(control, 'CHANGE_CB', func)
| ~~~~~~~~~~~
179 | return control
180 | }
C:/V/vlib/viup/callbacks.v:179:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
177 | pub fn (control &Control) on_change(func ChangeFunc) &Control {
178 | C.IupSetCallback(control, 'CHANGE_CB', func)
179 | return control
| ~~~~~~~
180 | }
181 |
C:/V/vlib/viup/callbacks.v:184:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
182 | // on_dbl_click occurs when an element is double-clicked
183 | pub fn (control &Control) on_dbl_click(func DblClickFunc) &Control {
184 | C.IupSetCallback(control, 'DBLCLICK_CB', func)
| ~~~~~~~~~~~~~
185 | return control
186 | }
C:/V/vlib/viup/callbacks.v:185:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
183 | pub fn (control &Control) on_dbl_click(func DblClickFunc) &Control {
184 | C.IupSetCallback(control, 'DBLCLICK_CB', func)
185 | return control
| ~~~~~~~
186 | }
187 |
C:/V/vlib/viup/callbacks.v:190:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
188 | // on_destroy occurs when an element is freed
189 | pub fn (control &Control) on_destroy(func DestroyFunc) &Control {
190 | C.IupSetCallback(control, 'DESTROY_CB', func)
| ~~~~~~~~~~~~
191 | return control
192 | }
C:/V/vlib/viup/callbacks.v:191:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
189 | pub fn (control &Control) on_destroy(func DestroyFunc) &Control {
190 | C.IupSetCallback(control, 'DESTROY_CB', func)
191 | return control
| ~~~~~~~
192 | }
193 |
C:/V/vlib/viup/callbacks.v:195:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
193 |
194 | pub fn (control &Control) on_detached(func DetachedFunc) &Control {
195 | C.IupSetCallback(control, 'DETACHED_CB', func)
| ~~~~~~~~~~~~~
196 | return control
197 | }
C:/V/vlib/viup/callbacks.v:196:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
194 | pub fn (control &Control) on_detached(func DetachedFunc) &Control {
195 | C.IupSetCallback(control, 'DETACHED_CB', func)
196 | return control
| ~~~~~~~
197 | }
198 |
C:/V/vlib/viup/callbacks.v:201:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
199 | // on_drag occurs when an element is being dragged
200 | pub fn (control &Control) on_drag(func DragFunc) &Control {
201 | C.IupSetCallback(control, 'DRAG_CB', func)
| ~~~~~~~~~
202 | return control
203 | }
C:/V/vlib/viup/callbacks.v:202:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
200 | pub fn (control &Control) on_drag(func DragFunc) &Control {
201 | C.IupSetCallback(control, 'DRAG_CB', func)
202 | return control
| ~~~~~~~
203 | }
204 |
C:/V/vlib/viup/callbacks.v:207:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
205 | // on_drag_drop occurs when an element is dragged and then dropped
206 | pub fn (control &Control) on_drag_drop(func DragDropFunc) &Control {
207 | C.IupSetCallback(control, 'DRAGDROP_CB', func)
| ~~~~~~~~~~~~~
208 | return control
209 | }
C:/V/vlib/viup/callbacks.v:208:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
206 | pub fn (control &Control) on_drag_drop(func DragDropFunc) &Control {
207 | C.IupSetCallback(control, 'DRAGDROP_CB', func)
208 | return control
| ~~~~~~~
209 | }
210 |
C:/V/vlib/viup/callbacks.v:213:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
211 | // on_draw occurs when an element needs to be redrawn (applies to Canvas elements)
212 | pub fn (control &Control) on_draw(func DrawFunc) &Control {
213 | C.IupSetCallback(control, 'ACTION', func)
| ~~~~~~~~
214 | return control
215 | }
C:/V/vlib/viup/callbacks.v:214:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
212 | pub fn (control &Control) on_draw(func DrawFunc) &Control {
213 | C.IupSetCallback(control, 'ACTION', func)
214 | return control
| ~~~~~~~
215 | }
216 |
C:/V/vlib/viup/callbacks.v:218:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
216 |
217 | pub fn (control &Control) on_drop_down(func DropDownFunc) &Control {
218 | C.IupSetCallback(control, 'DROPDOWN_CB', func)
| ~~~~~~~~~~~~~
219 | return control
220 | }
C:/V/vlib/viup/callbacks.v:219:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
217 | pub fn (control &Control) on_drop_down(func DropDownFunc) &Control {
218 | C.IupSetCallback(control, 'DROPDOWN_CB', func)
219 | return control
| ~~~~~~~
220 | }
221 |
C:/V/vlib/viup/callbacks.v:223:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
221 |
222 | pub fn (control &Control) on_drop_files(func DropFilesFunc) &Control {
223 | C.IupSetCallback(control, 'DROPFILES_CB', func)
| ~~~~~~~~~~~~~~
224 | return control
225 | }
C:/V/vlib/viup/callbacks.v:224:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
222 | pub fn (control &Control) on_drop_files(func DropFilesFunc) &Control {
223 | C.IupSetCallback(control, 'DROPFILES_CB', func)
224 | return control
| ~~~~~~~
225 | }
226 |
C:/V/vlib/viup/callbacks.v:229:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
227 | // on_edit occurs when an element is being edited
228 | pub fn (control &Control) on_edit(func EditFunc) &Control {
229 | C.IupSetCallback(control, 'EDIT_CB', func)
| ~~~~~~~~~
230 | return control
231 | }
C:/V/vlib/viup/callbacks.v:230:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
228 | pub fn (control &Control) on_edit(func EditFunc) &Control {
229 | C.IupSetCallback(control, 'EDIT_CB', func)
230 | return control
| ~~~~~~~
231 | }
232 |
C:/V/vlib/viup/callbacks.v:234:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
232 |
233 | pub fn (control &Control) on_entered(func EnteredFunc) &Control {
234 | C.IupSetCallback(control, 'ENTERWINDOW_CB', func)
| ~~~~~~~~~~~~~~~~
235 | return control
236 | }
C:/V/vlib/viup/callbacks.v:235:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
233 | pub fn (control &Control) on_entered(func EnteredFunc) &Control {
234 | C.IupSetCallback(control, 'ENTERWINDOW_CB', func)
235 | return control
| ~~~~~~~
236 | }
237 |
C:/V/vlib/viup/callbacks.v:239:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
237 |
238 | pub fn (control &Control) on_execute_branch(func ExecuteBranchFunc) &Control {
239 | C.IupSetCallback(control, 'EXECUTEBRANCH_CB', func)
| ~~~~~~~~~~~~~~~~~~
240 | return control
241 | }
C:/V/vlib/viup/callbacks.v:240:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
238 | pub fn (control &Control) on_execute_branch(func ExecuteBranchFunc) &Control {
239 | C.IupSetCallback(control, 'EXECUTEBRANCH_CB', func)
240 | return control
| ~~~~~~~
241 | }
242 |
C:/V/vlib/viup/callbacks.v:244:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
242 |
243 | pub fn (control &Control) on_execute_left(func ExecuteLeafFunc) &Control {
244 | C.IupSetCallback(control, 'EXECUTELEAF_CB', func)
| ~~~~~~~~~~~~~~~~
245 | return control
246 | }
C:/V/vlib/viup/callbacks.v:245:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
243 | pub fn (control &Control) on_execute_left(func ExecuteLeafFunc) &Control {
244 | C.IupSetCallback(control, 'EXECUTELEAF_CB', func)
245 | return control
| ~~~~~~~
246 | }
247 |
C:/V/vlib/viup/callbacks.v:249:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
247 |
248 | pub fn (control &Control) on_exited(func ExitedFunc) &Control {
249 | C.IupSetCallback(control, 'LEAVEWINDOW_CB', func)
| ~~~~~~~~~~~~~~~~
250 | return control
251 | }
C:/V/vlib/viup/callbacks.v:250:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
248 | pub fn (control &Control) on_exited(func ExitedFunc) &Control {
249 | C.IupSetCallback(control, 'LEAVEWINDOW_CB', func)
250 | return control
| ~~~~~~~
251 | }
252 |
C:/V/vlib/viup/callbacks.v:254:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
252 |
253 | pub fn (control &Control) on_extended(func ExtendedFunc) &Control {
254 | C.IupSetCallback(control, 'EXTENDED_CB', func)
| ~~~~~~~~~~~~~
255 | return control
256 | }
C:/V/vlib/viup/callbacks.v:255:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
253 | pub fn (control &Control) on_extended(func ExtendedFunc) &Control {
254 | C.IupSetCallback(control, 'EXTENDED_CB', func)
255 | return control
| ~~~~~~~
256 | }
257 |
C:/V/vlib/viup/callbacks.v:259:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
257 |
258 | pub fn (control &Control) on_extra_button(func ExtraButtonFunc) &Control {
259 | C.IupSetCallback(control, 'EXTRABUTTON_CB', func)
| ~~~~~~~~~~~~~~~~
260 | return control
261 | }
C:/V/vlib/viup/callbacks.v:260:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
258 | pub fn (control &Control) on_extra_button(func ExtraButtonFunc) &Control {
259 | C.IupSetCallback(control, 'EXTRABUTTON_CB', func)
260 | return control
| ~~~~~~~
261 | }
262 |
C:/V/vlib/viup/callbacks.v:264:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
262 |
263 | pub fn (control &Control) on_flat_action(func FlatActionFunc) &Control {
264 | C.IupSetCallback(control, 'FLAT_ACTION', func)
| ~~~~~~~~~~~~~
265 | return control
266 | }
C:/V/vlib/viup/callbacks.v:265:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
263 | pub fn (control &Control) on_flat_action(func FlatActionFunc) &Control {
264 | C.IupSetCallback(control, 'FLAT_ACTION', func)
265 | return control
| ~~~~~~~
266 | }
267 |
C:/V/vlib/viup/callbacks.v:270:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
268 | // on_focused occurs when an element receives focus
269 | pub fn (control &Control) on_focused(func FocusedFunc) &Control {
270 | C.IupSetCallback(control, 'GETFOCUS_CB', func)
| ~~~~~~~~~~~~~
271 | return control
272 | }
C:/V/vlib/viup/callbacks.v:271:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
269 | pub fn (control &Control) on_focused(func FocusedFunc) &Control {
270 | C.IupSetCallback(control, 'GETFOCUS_CB', func)
271 | return control
| ~~~~~~~
272 | }
273 |
C:/V/vlib/viup/callbacks.v:276:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
274 | // on_help occurs when the focused element has the "help" method called on it
275 | pub fn (control &Control) on_help(func HelpFunc) &Control {
276 | C.IupSetCallback(control, 'HELP_CB', func)
| ~~~~~~~~~
277 | return control
278 | }
C:/V/vlib/viup/callbacks.v:277:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
275 | pub fn (control &Control) on_help(func HelpFunc) &Control {
276 | C.IupSetCallback(control, 'HELP_CB', func)
277 | return control
| ~~~~~~~
278 | }
279 |
C:/V/vlib/viup/callbacks.v:282:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
280 | // on_key occurs when any key is pressed down
281 | pub fn (control &Control) on_key(func KeyFunc) &Control {
282 | C.IupSetCallback(control, 'K_ANY', func)
| ~~~~~~~
283 | return control
284 | }
C:/V/vlib/viup/callbacks.v:283:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
281 | pub fn (control &Control) on_key(func KeyFunc) &Control {
282 | C.IupSetCallback(control, 'K_ANY', func)
283 | return control
| ~~~~~~~
284 | }
285 |
C:/V/vlib/viup/callbacks.v:288:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
286 | // on_key_press occurs when a key is fully pressed and released
287 | pub fn (control &Control) on_key_press(func KeyPressFunc) &Control {
288 | C.IupSetCallback(control, 'KEYPRESS_CB', func)
| ~~~~~~~~~~~~~
289 | return control
290 | }
C:/V/vlib/viup/callbacks.v:289:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
287 | pub fn (control &Control) on_key_press(func KeyPressFunc) &Control {
288 | C.IupSetCallback(control, 'KEYPRESS_CB', func)
289 | return control
| ~~~~~~~
290 | }
291 |
C:/V/vlib/viup/callbacks.v:293:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
291 |
292 | pub fn (control &Control) on_map(func MapFunc) &Control {
293 | C.IupSetCallback(control, 'MAP_CB', func)
| ~~~~~~~~
294 | return control
295 | }
C:/V/vlib/viup/callbacks.v:294:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
292 | pub fn (control &Control) on_map(func MapFunc) &Control {
293 | C.IupSetCallback(control, 'MAP_CB', func)
294 | return control
| ~~~~~~~
295 | }
296 |
C:/V/vlib/viup/callbacks.v:298:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
296 |
297 | pub fn (control &Control) on_motion(func MotionFunc) &Control {
298 | C.IupSetCallback(control, 'MOTION_CB', func)
| ~~~~~~~~~~~
299 | return control
300 | }
C:/V/vlib/viup/callbacks.v:299:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
297 | pub fn (control &Control) on_motion(func MotionFunc) &Control {
298 | C.IupSetCallback(control, 'MOTION_CB', func)
299 | return control
| ~~~~~~~
300 | }
301 |
C:/V/vlib/viup/callbacks.v:304:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
302 | // on_mouse_button occurs when any mouse button is pressed
303 | pub fn (control &Control) on_mouse_button(func MouseButtonFunc) &Control {
304 | C.IupSetCallback(control, 'BUTTON_CB', func)
| ~~~~~~~~~~~
305 | return control
306 | }
C:/V/vlib/viup/callbacks.v:305:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
303 | pub fn (control &Control) on_mouse_button(func MouseButtonFunc) &Control {
304 | C.IupSetCallback(control, 'BUTTON_CB', func)
305 | return control
| ~~~~~~~
306 | }
307 |
C:/V/vlib/viup/callbacks.v:310:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
308 | // on_mouse_move occurs whenever mouse movement has happened
309 | pub fn (control &Control) on_mouse_move(func MouseMoveFunc) &Control {
310 | C.IupSetCallback(control, 'MOUSEMOVE_CB', func)
| ~~~~~~~~~~~~~~
311 | return control
312 | }
C:/V/vlib/viup/callbacks.v:311:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
309 | pub fn (control &Control) on_mouse_move(func MouseMoveFunc) &Control {
310 | C.IupSetCallback(control, 'MOUSEMOVE_CB', func)
311 | return control
| ~~~~~~~
312 | }
313 |
C:/V/vlib/viup/callbacks.v:315:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
313 |
314 | pub fn (control &Control) on_multiselect(func MultiSelectFunc) &Control {
315 | C.IupSetCallback(control, 'MULTISELECT_CB', func)
| ~~~~~~~~~~~~~~~~
316 | return control
317 | }
C:/V/vlib/viup/callbacks.v:316:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
314 | pub fn (control &Control) on_multiselect(func MultiSelectFunc) &Control {
315 | C.IupSetCallback(control, 'MULTISELECT_CB', func)
316 | return control
| ~~~~~~~
317 | }
318 |
C:/V/vlib/viup/callbacks.v:320:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
318 |
319 | pub fn (control &Control) on_multiselection(func MultiSelectionFunc) &Control {
320 | C.IupSetCallback(control, 'MULTISELECTION_CB', func)
| ~~~~~~~~~~~~~~~~~~~
321 | return control
322 | }
C:/V/vlib/viup/callbacks.v:321:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
319 | pub fn (control &Control) on_multiselection(func MultiSelectionFunc) &Control {
320 | C.IupSetCallback(control, 'MULTISELECTION_CB', func)
321 | return control
| ~~~~~~~
322 | }
323 |
C:/V/vlib/viup/callbacks.v:325:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
323 |
324 | pub fn (control &Control) on_multiunselect(func MultiUnselectionFunc) &Control {
325 | C.IupSetCallback(control, 'MULTIUNSELECTION_CB', func)
| ~~~~~~~~~~~~~~~~~~~~~
326 | return control
327 | }
C:/V/vlib/viup/callbacks.v:326:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
324 | pub fn (control &Control) on_multiunselect(func MultiUnselectionFunc) &Control {
325 | C.IupSetCallback(control, 'MULTIUNSELECTION_CB', func)
326 | return control
| ~~~~~~~
327 | }
328 |
C:/V/vlib/viup/callbacks.v:330:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
328 |
329 | pub fn (control &Control) on_node_removed(func NodeRemovedFunc) &Control {
330 | C.IupSetCallback(control, 'NODEREMOVED_CB', func)
| ~~~~~~~~~~~~~~~~
331 | return control
332 | }
C:/V/vlib/viup/callbacks.v:331:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
329 | pub fn (control &Control) on_node_removed(func NodeRemovedFunc) &Control {
330 | C.IupSetCallback(control, 'NODEREMOVED_CB', func)
331 | return control
| ~~~~~~~
332 | }
333 |
C:/V/vlib/viup/callbacks.v:335:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
333 |
334 | pub fn (control &Control) on_open_close(func OpenCloseFunc) &Control {
335 | C.IupSetCallback(control, 'OPENCLOSE_CB', func)
| ~~~~~~~~~~~~~~
336 | return control
337 | }
C:/V/vlib/viup/callbacks.v:336:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
334 | pub fn (control &Control) on_open_close(func OpenCloseFunc) &Control {
335 | C.IupSetCallback(control, 'OPENCLOSE_CB', func)
336 | return control
| ~~~~~~~
337 | }
338 |
C:/V/vlib/viup/callbacks.v:340:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
338 |
339 | pub fn (control &Control) on_rename(func RenameFunc) &Control {
340 | C.IupSetCallback(control, 'RENAME_CB', func)
| ~~~~~~~~~~~
341 | return control
342 | }
C:/V/vlib/viup/callbacks.v:341:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
339 | pub fn (control &Control) on_rename(func RenameFunc) &Control {
340 | C.IupSetCallback(control, 'RENAME_CB', func)
341 | return control
| ~~~~~~~
342 | }
343 |
C:/V/vlib/viup/callbacks.v:346:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
344 | // on_resize occurs whenever an element is resized
345 | pub fn (control &Control) on_resize(func ResizeFunc) &Control {
346 | C.IupSetCallback(control, 'RESIZE_CB', func)
| ~~~~~~~~~~~
347 | return control
348 | }
C:/V/vlib/viup/callbacks.v:347:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
345 | pub fn (control &Control) on_resize(func ResizeFunc) &Control {
346 | C.IupSetCallback(control, 'RESIZE_CB', func)
347 | return control
| ~~~~~~~
348 | }
349 |
C:/V/vlib/viup/callbacks.v:352:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
350 | // on_right_click occurs whenever a right-click even is detected
351 | pub fn (control &Control) on_right_click(func RightClickFunc) &Control {
352 | C.IupSetCallback(control, 'RIGHTCLICK_CB', func)
| ~~~~~~~~~~~~~~~
353 | return control
354 | }
C:/V/vlib/viup/callbacks.v:353:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
351 | pub fn (control &Control) on_right_click(func RightClickFunc) &Control {
352 | C.IupSetCallback(control, 'RIGHTCLICK_CB', func)
353 | return control
| ~~~~~~~
354 | }
355 |
C:/V/vlib/viup/callbacks.v:357:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
355 |
356 | pub fn (control &Control) on_restored(func RestoredFunc) &Control {
357 | C.IupSetCallback(control, 'RESTORED_CB', func)
| ~~~~~~~~~~~~~
358 | return control
359 | }
C:/V/vlib/viup/callbacks.v:358:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
356 | pub fn (control &Control) on_restored(func RestoredFunc) &Control {
357 | C.IupSetCallback(control, 'RESTORED_CB', func)
358 | return control
| ~~~~~~~
359 | }
360 |
C:/V/vlib/viup/callbacks.v:363:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
361 | // on_select occurs whenever a value is selected in an element
362 | pub fn (control &Control) on_select(func SelectFunc) &Control {
363 | C.IupSetCallback(control, 'SELECT_CB', func)
| ~~~~~~~~~~~
364 | return control
365 | }
C:/V/vlib/viup/callbacks.v:364:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
362 | pub fn (control &Control) on_select(func SelectFunc) &Control {
363 | C.IupSetCallback(control, 'SELECT_CB', func)
364 | return control
| ~~~~~~~
365 | }
366 |
C:/V/vlib/viup/callbacks.v:368:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
366 |
367 | pub fn (control &Control) on_selection(func SelectionFunc) &Control {
368 | C.IupSetCallback(control, 'SELECTION_CB', func)
| ~~~~~~~~~~~~~~
369 | return control
370 | }
C:/V/vlib/viup/callbacks.v:369:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
367 | pub fn (control &Control) on_selection(func SelectionFunc) &Control {
368 | C.IupSetCallback(control, 'SELECTION_CB', func)
369 | return control
| ~~~~~~~
370 | }
371 |
C:/V/vlib/viup/callbacks.v:373:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
371 |
372 | pub fn (control &Control) on_scroll(func ScrollFunc) &Control {
373 | C.IupSetCallback(control, 'SCROLL_CB', func)
| ~~~~~~~~~~~
374 | return control
375 | }
C:/V/vlib/viup/callbacks.v:374:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
372 | pub fn (control &Control) on_scroll(func ScrollFunc) &Control {
373 | C.IupSetCallback(control, 'SCROLL_CB', func)
374 | return control
| ~~~~~~~
375 | }
376 |
C:/V/vlib/viup/callbacks.v:378:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
376 |
377 | pub fn (control &Control) on_show_rename(func ShowRenameFunc) &Control {
378 | C.IupSetCallback(control, 'SHOWRENAME_CB', func)
| ~~~~~~~~~~~~~~~
379 | return control
380 | }
C:/V/vlib/viup/callbacks.v:379:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
377 | pub fn (control &Control) on_show_rename(func ShowRenameFunc) &Control {
378 | C.IupSetCallback(control, 'SHOWRENAME_CB', func)
379 | return control
| ~~~~~~~
380 | }
381 |
C:/V/vlib/viup/callbacks.v:383:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
381 |
382 | pub fn (control &Control) on_switch(func SwitchFunc) &Control {
383 | C.IupSetCallback(control, 'SWITCH_CB', func)
| ~~~~~~~~~~~
384 | return control
385 | }
C:/V/vlib/viup/callbacks.v:384:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
382 | pub fn (control &Control) on_switch(func SwitchFunc) &Control {
383 | C.IupSetCallback(control, 'SWITCH_CB', func)
384 | return control
| ~~~~~~~
385 | }
386 |
C:/V/vlib/viup/callbacks.v:389:28: error: cannot use string as charptr in argument 2 to C.IupSetCallback
387 | // on_tab_change occurs when a tab is selected
388 | pub fn (control &Control) on_tab_change(func TabChangeFunc) &Control {
389 | C.IupSetCallback(control, 'TABCHANGE_CB', func)
| ~~~~~~~~~~~~~~
390 | return control
391 | }
C:/V/vlib/viup/callbacks.v:390:9: error: control cannot be returned outside unsafe blocks as it might refer to an object stored on stack. Consider declaring viup.Control as [heap].
388 | pub fn (control &Control) on_tab_change(func TabChangeFunc) &Control {
389 | C.IupSetCallback(control, 'TABCHANGE_CB', func)
390 | return control
| ~~~~~~~
391 | }
392 |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions