diff --git a/README.md b/README.md index 1a66d8a1..5a80591f 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,9 @@ Using the extension is as simple as including the header, registering it with #include #include +KALEIDOSCOPE_INIT_PLUGINS(Unicode); + void setup() { - Kaleidoscope.use(&Unicode); Kaleidoscope.setup(); Unicode.type(0x2328); diff --git a/examples/Unicode/Unicode.ino b/examples/Unicode/Unicode.ino index 9d2791f3..96942f55 100644 --- a/examples/Unicode/Unicode.ino +++ b/examples/Unicode/Unicode.ino @@ -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(); } diff --git a/src/Kaleidoscope/Unicode.cpp b/src/Kaleidoscope/Unicode.cpp index bc235388..efab5be8 100644 --- a/src/Kaleidoscope/Unicode.cpp +++ b/src/Kaleidoscope/Unicode.cpp @@ -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: diff --git a/src/Kaleidoscope/Unicode.h b/src/Kaleidoscope/Unicode.h index 293fe7a7..48bbab14 100644 --- a/src/Kaleidoscope/Unicode.h +++ b/src/Kaleidoscope/Unicode.h @@ -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 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);