using System;
namespace OpenMacroBoard.SDK {
///
/// An interface that allows you to interact with (LCD) macro boards
///
public interface IMacroBoard : IDisposable {
//
// Is raised when a key is pressed
//
//event EventHandler KeyStateChanged;
///
/// Is raised when the MarcoBoard is being disconnected or connected
///
event EventHandler ConnectionStateChanged;
///
/// Is raised when a key is pressed
///
event EventHandler ButtonPressed;
///
/// Is raised when a key is released
///
event EventHandler ButtonReleased;
///
/// Is raised when the Touchbar is tapped
///
event EventHandler TouchbarTouched;
///
/// Is raised when the Touchbar is pressed (long tap)
///
event EventHandler TouchbarPressed;
///
/// Is raised when the finger is fliped over the Touchbar
///
event EventHandler TouchFlipEvent;
///
/// Is raised when a Rotary Encoder is pressed
///
event EventHandler EncoderPressed;
///
/// Is raised when a Rotary Encoder is released
///
event EventHandler EncoderReleased;
///
/// Is raised when a Rotary Encoder is turned
///
event EventHandler EncoderTurn;
///
/// Informations about the keys and their position
///
IKeyLayout Keys {
get;
}
///
/// Gets a value indicating whether the MarcoBoard is connected.
///
Boolean IsConnected {
get;
}
///
/// Sets the brightness for this
///
/// Brightness in percent (0 - 100)
///
///
/// The brightness on the device is controlled with PWM (https://en.wikipedia.org/wiki/Pulse-width_modulation).
/// This results in a non-linear correlation between set percentage and perceived brightness.
///
///
/// In a nutshell: changing from 10 - 30 results in a bigger change than 80 - 100 (barely visible change)
/// This effect should be compensated outside this library
///
///
void SetBrightness(Byte percent);
///
/// Uploads an image for a specific button.
///
/// Specifies which key the image will be applied on
/// Bitmap. The key will be painted black if this value is null.
void SetButtonImage(Int32 keyId, KeyBitmap bitmapData);
///
/// Uploads an image for the complete LCD.
///
/// Bitmap. The key will be painted black if this value is null.
void SetFullScreenImage(KeyBitmap bitmapData);
///
/// Uploads a full image for the touchscreen window strip.
///
/// Bitmap. The key will be painted black if this value is null.
void SetWindowImage(KeyBitmap bitmapData);
///
/// Uploads an image into a rectangular region of the touchscreen window.
///
/// X-coordinate
/// Y-coordinate
/// Image width
/// Image height
/// Bitmap. The key will be painted black if this value is null.
void SetPartialWindowImage(Int32 x_pos, Int32 y_pos, KeyBitmap bitmapData);
///
/// Shows the standby logo (full-screen)
///
void ShowLogo();
///
/// Gets the firmware version.
///
///
/// Returns the firmware version
/// or if the device doesn't have a firmware.
///
String GetFirmwareVersion();
///
/// Gets the serial number.
///
///
/// Returns the serial number
/// or if the device doesn't have a serial number.
///
String GetSerialNumber();
}
}