From 8d9ffd1a938ad7916da32712e3fc36001eab054e Mon Sep 17 00:00:00 2001 From: thorio Date: Sun, 1 Oct 2023 10:04:16 +0200 Subject: [PATCH] Add cursor color bindings --- include/cfl_input.h | 2 ++ src/cfl_input.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/cfl_input.h b/include/cfl_input.h index f400cb1..1df05be 100644 --- a/include/cfl_input.h +++ b/include/cfl_input.h @@ -22,6 +22,8 @@ extern "C" { int widget##_copy(widget *, int clipboard); \ int widget##_undo(widget *); \ int widget##_copy_cuts(widget *); \ + unsigned int widget##_cursor_color(widget *); \ + void widget##_set_cursor_color(widget *, unsigned int s); \ int widget##_text_font(widget *); \ void widget##_set_text_font(widget *, int s); \ unsigned int widget##_text_color(widget *); \ diff --git a/src/cfl_input.cpp b/src/cfl_input.cpp index 682be8d..a120416 100644 --- a/src/cfl_input.cpp +++ b/src/cfl_input.cpp @@ -70,6 +70,13 @@ LOCK(auto ret = self->cut()); \ return ret; \ } \ + unsigned int widget##_cursor_color(widget *self) { \ + LOCK(auto ret = self->cursor_color()); \ + return ret; \ + } \ + void widget##_set_cursor_color(widget *self, unsigned int s) { \ + LOCK(self->cursor_color(s)); \ + } \ int widget##_text_font(widget *self) { \ LOCK(auto ret = self->textfont()); \ return ret; \