2016-08-19 04:08:38 +00:00
|
|
|
//
|
|
|
|
// mouseWrapper.h
|
|
|
|
// a2bejwld
|
|
|
|
//
|
|
|
|
// Created by Jeremy Rand on 2016-08-17.
|
|
|
|
// Copyright © 2016 Jeremy Rand. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef __a2bejwld__mouseWrapper__
|
|
|
|
#define __a2bejwld__mouseWrapper__
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
|
|
|
|
// Types
|
|
|
|
|
|
|
|
typedef struct tMouseCallbacks {
|
|
|
|
bool (*mouseSelectSquare)(tSquare square);
|
2016-08-23 03:47:29 +00:00
|
|
|
bool (*mouseSwapSquare)(tDirection dir);
|
2016-08-19 04:08:38 +00:00
|
|
|
} tMouseCallbacks;
|
|
|
|
|
|
|
|
|
|
|
|
// API
|
|
|
|
|
2016-08-20 04:08:29 +00:00
|
|
|
extern bool initMouse(tMouseCallbacks *callbacks);
|
2016-08-19 04:08:38 +00:00
|
|
|
extern void shutdownMouse(void);
|
2020-03-10 02:59:38 +00:00
|
|
|
extern bool hasMouse(void);
|
2016-08-19 04:08:38 +00:00
|
|
|
extern bool pollMouse(void);
|
2016-08-24 05:18:19 +00:00
|
|
|
extern void moveMouseToSquare(tSquare square);
|
2016-08-19 04:08:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* defined(__a2bejwld__mouseWrapper__) */
|