Updated to use the new plugin APIs

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/389/head
Gergely Nagy 7 years ago
parent 8af093c432
commit 5399bda445

@ -26,8 +26,9 @@ Using the extension is as simple as including the header, registering it with
#include <Kaleidoscope.h>
#include <Kaleidoscope-Unicode.h>
KALEIDOSCOPE_INIT_PLUGINS(Unicode);
void setup() {
Kaleidoscope.use(&Unicode);
Kaleidoscope.setup();
Unicode.type(0x2328);

@ -1,6 +1,6 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers
* Copyright (C) 2016, 2017 Gergely Nagy
* Copyright (C) 2016, 2017, 2018 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -65,9 +65,11 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
return MACRO_NONE;
}
void setup() {
Kaleidoscope.use(&Macros, &Unicode);
KALEIDOSCOPE_INIT_PLUGINS(HostOS,
Macros,
Unicode);
void setup() {
Kaleidoscope.setup();
}

@ -1,6 +1,6 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers
* Copyright (C) 2016, 2017 Gergely Nagy
* Copyright (C) 2016, 2017, 2018 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -21,13 +21,6 @@
namespace kaleidoscope {
Unicode::Unicode(void) {
}
void Unicode::begin(void) {
::HostOS.begin();
}
void Unicode::start(void) {
switch (::HostOS.os()) {
case hostos::LINUX:

@ -1,6 +1,6 @@
/* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers
* Copyright (C) 2016, 2017 Gergely Nagy
* Copyright (C) 2016, 2017, 2018 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -22,11 +22,9 @@
#include <Kaleidoscope-HostOS.h>
namespace kaleidoscope {
class Unicode : public KaleidoscopePlugin {
class Unicode : public kaleidoscope::Plugin {
public:
Unicode(void);
void begin(void) final;
Unicode(void) {}
static void start(void);
static void input(void);

Loading…
Cancel
Save