19 lines
490 B
C++
19 lines
490 B
C++
#pragma once
|
|
#include "program.h"
|
|
#include <vector>
|
|
#include "program_registry.h"
|
|
#include <unordered_map>
|
|
#include <string>
|
|
|
|
class SystemManager {
|
|
private:
|
|
DISPLAY_STATE* _display_state;
|
|
int _next_program_id = 1;
|
|
|
|
public:
|
|
std::unordered_map<std::string, void(InstalledProgram::*)()> funcMap;
|
|
std::vector<Program*> _programs;
|
|
std::vector<Program*> init(DISPLAY_STATE* display_state);
|
|
bool spawn_program(Window* window, std::string program_name);
|
|
void close_program(int id);
|
|
}; |