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.h>
#include <Kaleidoscope-Unicode.h> #include <Kaleidoscope-Unicode.h>
KALEIDOSCOPE_INIT_PLUGINS(Unicode);
void setup() { void setup() {
Kaleidoscope.use(&Unicode);
Kaleidoscope.setup(); Kaleidoscope.setup();
Unicode.type(0x2328); Unicode.type(0x2328);

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers * 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 * 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 * 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; return MACRO_NONE;
} }
void setup() { KALEIDOSCOPE_INIT_PLUGINS(HostOS,
Kaleidoscope.use(&Macros, &Unicode); Macros,
Unicode);
void setup() {
Kaleidoscope.setup(); Kaleidoscope.setup();
} }

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers * 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 * 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 * it under the terms of the GNU General Public License as published by
@ -21,13 +21,6 @@
namespace kaleidoscope { namespace kaleidoscope {
Unicode::Unicode(void) {
}
void Unicode::begin(void) {
::HostOS.begin();
}
void Unicode::start(void) { void Unicode::start(void) {
switch (::HostOS.os()) { switch (::HostOS.os()) {
case hostos::LINUX: case hostos::LINUX:

@ -1,6 +1,6 @@
/* -*- mode: c++ -*- /* -*- mode: c++ -*-
* Kaleidoscope-Unicode -- Unicode input helpers * 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 * 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 * it under the terms of the GNU General Public License as published by
@ -22,11 +22,9 @@
#include <Kaleidoscope-HostOS.h> #include <Kaleidoscope-HostOS.h>
namespace kaleidoscope { namespace kaleidoscope {
class Unicode : public KaleidoscopePlugin { class Unicode : public kaleidoscope::Plugin {
public: public:
Unicode(void); Unicode(void) {}
void begin(void) final;
static void start(void); static void start(void);
static void input(void); static void input(void);

Loading…
Cancel
Save