aboutsummaryrefslogtreecommitdiff
path: root/experimental/keyboard-leds-trayicons.h
blob: bafb06f742a8d724ec9b982b7be9d4c7794c9a2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// startdate: 2022-10-07-6 20:45
// goal: header for KLT

// protection header
#ifndef HEADER_KLT
#define HEADER_LKT 20221007204837

#include <ctype.h>
#include <fcntl.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <ini.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <signal.h>
#ifdef ENABLE_SOCKETS
#include <sys/un.h>
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#ifdef ENABLE_LIBXDO
#include <xdo.h>
#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
bgstack15