2016-11-05 18:47:09 +00:00
|
|
|
//
|
|
|
|
// KeyboardMachine.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 05/11/2016.
|
|
|
|
// Copyright © 2016 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef KeyboardMachine_h
|
|
|
|
#define KeyboardMachine_h
|
|
|
|
|
|
|
|
namespace KeyboardMachine {
|
|
|
|
|
|
|
|
class Machine {
|
|
|
|
public:
|
2017-07-22 21:39:51 +00:00
|
|
|
/*!
|
|
|
|
Indicates that the key @c key has been either pressed or released, according to
|
|
|
|
the state of @c isPressed.
|
|
|
|
*/
|
2016-11-05 18:47:09 +00:00
|
|
|
virtual void set_key_state(uint16_t key, bool isPressed) = 0;
|
2017-07-22 21:39:51 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
Instructs that all keys should now be treated as released.
|
|
|
|
*/
|
2016-11-05 18:47:09 +00:00
|
|
|
virtual void clear_all_keys() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* KeyboardMachine_h */
|