MCPcopy Create free account
hub / github.com/Kitware/VTK / HandleCommand

Method HandleCommand

Rendering/UI/vtkAndroidRenderWindowInteractor.cxx:316–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void vtkAndroidRenderWindowInteractor::HandleCommand(int32_t cmd)
317{
318 LOGW("Handling Command");
319 switch (cmd)
320 {
321 case APP_CMD_INIT_WINDOW:
322 // The window is being shown, get it ready.
323 if (this->RenderWindow != nullptr)
324 {
325 LOGW("Creating Window");
326 this->RenderWindow->SetWindowId(this->AndroidApplication->window);
327 LOGW("Done Creating Window start");
328 this->RenderWindow->Render();
329 LOGW("Done first render");
330 }
331 break;
332 // case APP_CMD_CONFIG_CHANGED:
333 // {
334 // android seems to change window sizes at some random amount of time after this
335 // event so not much to do here as we do not really know the new size yet
336 // }
337 // break;
338 case APP_CMD_WINDOW_REDRAW_NEEDED:
339 {
340 this->RenderWindow->Render();
341 }
342 break;
343 case APP_CMD_TERM_WINDOW:
344 {
345 LOGW("Terminating Window");
346 this->RenderWindow->Finalize();
347 LOGW("Terminated");
348 // ANativeActivity_finish(this->AndroidApplication->activity);
349 }
350 break;
351 case APP_CMD_DESTROY:
352 LOGW("Destroying Application");
353 this->Done = true;
354 break;
355 }
356}
357
358static int32_t android_handle_input(struct android_app* app, AInputEvent* event)
359{

Callers 1

android_handle_cmdFunction · 0.80

Calls 3

RenderMethod · 0.65
SetWindowIdMethod · 0.45
FinalizeMethod · 0.45

Tested by

no test coverage detected