#include "act/root.h" #include "draw/window.h" #include root_controller_t::configuration_t::configuration_t(std::vector modes_p) { modes_m = modes_p; } root_controller_t::root_controller_t(root_controller_t::configuration_t configuration_p) { configuration_m = configuration_p; } root_controller_t* root_controller_factory_t::create(root_controller_t::configuration_t configuration_p) { void* ptr = malloc(sizeof(root_controller_t)); return static_cast(ptr); } factory_t::status_t root_controller_factory_t::dispose(root_controller_t* root_controller_p) { free(root_controller_p); return factory_t::status_t::ok; } controller_t::status_t root_controller_t::on_event(controller_t::event_t event_p) { if ( window_service_t* window_service = new window_service_t(); window_service_t::status_t window_status = window_service->create_window(); controller_t::status_t controller_status; switch (window_status) { case window_service_t::status_t::ok: controller_status = controller_t::status_t::ok; break; case window_service_t::status_t::error: default: controller_status = controller_t::status_t::error; break; } return controller_status; }