all repos — mgba @ 9c92a29b28d1f81224ba28d5fc83a9481eccd5eb

mGBA Game Boy Advance Emulator

src/gba/gba-input.h (view raw)

 1/* Copyright (c) 2013-2014 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 GBA_INPUT_H
 7#define GBA_INPUT_H
 8
 9#include "gba.h"
10
11struct Configuration;
12
13struct GBAInputMap {
14	struct GBAInputMapImpl* maps;
15	size_t numMaps;
16};
17
18void GBAInputMapInit(struct GBAInputMap*);
19void GBAInputMapDeinit(struct GBAInputMap*);
20
21enum GBAKey GBAInputMapKey(const struct GBAInputMap*, uint32_t type, int key);
22void GBAInputBindKey(struct GBAInputMap*, uint32_t type, int key, enum GBAKey input);
23int GBAInputQueryBinding(const struct GBAInputMap*, uint32_t type, enum GBAKey input);
24
25void GBAInputMapLoad(struct GBAInputMap*, uint32_t type, const struct Configuration*);
26void GBAInputMapSave(const struct GBAInputMap*, uint32_t type, struct Configuration*);
27
28#endif