all repos — mgba @ cc1fb12d2f219a0530ff9687107ceb19fb842c99

mGBA Game Boy Advance Emulator

src/gba/context/gui-runner.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef GUI_RUNNER_H
 7#define GUI_RUNNER_H
 8
 9#include "gba/context/context.h"
10#include "util/gui.h"
11
12struct GBAGUIRunner {
13	struct GBAContext context;
14	struct GUIParams params;
15
16	void (*setup)(struct GBAGUIRunner*);
17	void (*teardown)(struct GBAGUIRunner*);
18	void (*gameLoaded)(struct GBAGUIRunner*);
19	void (*gameUnloaded)(struct GBAGUIRunner*);
20	void (*prepareForFrame)(struct GBAGUIRunner*);
21	void (*drawFrame)(struct GBAGUIRunner*, bool faded);
22	uint16_t (*pollGameInput)(struct GBAGUIRunner*);
23};
24
25void GBAGUIInit(struct GBAGUIRunner*, const char* port);
26void GBAGUIDeinit(struct GBAGUIRunner*);
27void GBAGUIRunloop(struct GBAGUIRunner*);
28
29#endif