- the big mergecheit
This commit is contained in:
34
z80viewer.h
Normal file
34
z80viewer.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <SDL2/SDL.h>
|
||||
#include <vector>
|
||||
|
||||
class z80viewer;
|
||||
|
||||
struct viewer_t
|
||||
{
|
||||
char name[12];
|
||||
z80viewer *viewer;
|
||||
};
|
||||
|
||||
class z80viewer
|
||||
{
|
||||
public:
|
||||
virtual void show() = 0;
|
||||
virtual void refresh() = 0;
|
||||
virtual void hide() = 0;
|
||||
virtual void focus() = 0;
|
||||
virtual bool handleEvent(SDL_Event *e) = 0;
|
||||
|
||||
static void registerViewer(const char *name, z80viewer *viewer);
|
||||
static z80viewer *getViewer(const char *name);
|
||||
static void refreshAll();
|
||||
static bool handleEvents(SDL_Event *e);
|
||||
|
||||
protected:
|
||||
SDL_Window *win = nullptr;
|
||||
SDL_Renderer *ren = nullptr;
|
||||
SDL_Texture *tex = nullptr;
|
||||
SDL_Texture *uitex = nullptr;
|
||||
|
||||
static std::vector<viewer_t> viewers;
|
||||
};
|
||||
Reference in New Issue
Block a user