all repos — mgba @ ea0b6a14ccae1fa55d99b32112839988481fd65d

mGBA Game Boy Advance Emulator

src/platform/video-backend.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 VIDEO_BACKEND_H
 7#define VIDEO_BACKEND_H
 8
 9#include "util/common.h"
10
11#ifdef _WIN32
12typedef HWND WHandle;
13#else
14typedef void* WHandle;
15#endif
16
17struct VideoBackend {
18	void (*init)(struct VideoBackend*, WHandle handle);
19	void (*deinit)(struct VideoBackend*);
20	void (*swap)(struct VideoBackend*);
21	void (*clear)(struct VideoBackend*);
22	void (*resized)(struct VideoBackend*, int w, int h);
23	void (*postFrame)(struct VideoBackend*, const void* frame);
24	void (*drawFrame)(struct VideoBackend*);
25	void (*setMessage)(struct VideoBackend*, const char* message);
26	void (*clearMessage)(struct VideoBackend*);
27
28	void* user;
29
30	bool filter;
31	bool lockAspectRatio;
32};
33
34#endif