2019-11-19 12:15:20 +01:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "internal.hpp"
|
2019-11-19 12:26:31 +01:00
|
|
|
#include "vkvm.hpp"
|
2019-10-16 16:27:14 +02:00
|
|
|
|
|
|
|
int main() {
|
2019-11-19 12:15:20 +01:00
|
|
|
vkvm::initialize(0);
|
|
|
|
|
|
|
|
vkvm::registerEvent(vkvm::EventType::Redraw, [](){
|
|
|
|
vkvm::log(vkvm::INFO, "redraw event callback");
|
|
|
|
});
|
|
|
|
|
|
|
|
vkvm::registerEvent(vkvm::EventType::Timer, [](){
|
|
|
|
vkvm::log(vkvm::INFO, "timer event callback");
|
|
|
|
});
|
|
|
|
|
|
|
|
std::string input;
|
|
|
|
while(input != "exit"){
|
|
|
|
std::cout << "type r for redraw and t for timer (exit to exit)" << std::endl;
|
|
|
|
std::cout << "> ";
|
|
|
|
std::getline(std::cin, input);
|
|
|
|
|
|
|
|
if(input == "r"){
|
|
|
|
vkvm::callEvent(vkvm::Redraw);
|
|
|
|
}
|
|
|
|
if(input == "t"){
|
|
|
|
vkvm::callEvent(vkvm::Timer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2019-10-16 16:27:14 +02:00
|
|
|
}
|