From dcdbbc74d4ea4340b18b77369c7512bb167b43f1 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Sat, 8 Oct 2022 16:34:20 -0400 Subject: almost-production-worthy KLT.c added sockets, fifos, click-to-switch, libxdo support --- experimental/keyboard-leds-trayicons.h | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 experimental/keyboard-leds-trayicons.h (limited to 'experimental/keyboard-leds-trayicons.h') diff --git a/experimental/keyboard-leds-trayicons.h b/experimental/keyboard-leds-trayicons.h new file mode 100644 index 0000000..bafb06f --- /dev/null +++ b/experimental/keyboard-leds-trayicons.h @@ -0,0 +1,49 @@ +// startdate: 2022-10-07-6 20:45 +// goal: header for KLT + +// protection header +#ifndef HEADER_KLT +#define HEADER_LKT 20221007204837 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef ENABLE_SOCKETS +#include +#include +#include +#endif +#ifdef ENABLE_LIBXDO +#include +#endif + +void *send_fifo_message(FILE *stream, const char *message); +void *send_fifo_icon_message(FILE *stream, const char *iconfile); +void sigfun_main(int sig); +void sigfun_child(int sig); +void klt_reverse(char s[]); +void itoa(int n, char s[]); +int get_indicator(Display* dpy, char* indicator); +static int handler(void* user, const char* section, const char* name, const char* value); +int send_message(char *message, const int sock, FILE *stream, const pid_t child_pid, const char *fifo, const int quit); +void *send_fifo_message(FILE *stream, const char *message); +void *send_fifo_icon_message(FILE *stream, const char *iconfile); +void sig_usr(int signo); +#ifdef ENABLE_SOCKETS +void remove_first_newline(char *string); +void *send_sock_message(int socket, const char *message); +void *send_sock_icon_message(int socket, const char *iconfile); +#endif + +// protection header +#endif -- cgit