macros/src/read_events.h
2022-12-19 15:48:10 +01:00

24 lines
542 B
C

#ifndef READ_EVENTS
#define READ_EVENTS
#include <X11/Xlib.h>
#include "event.h"
/*
* Structure utilisée pour passer des arguments à la fonction
* pthread_cleanup_push.
*/
typedef struct {
int fd;
event *user_event;
Display *display;
FILE *file;
} args_cancel_thread_read;
args_cancel_thread_read * init_args_read(int fd, event *user_event, Display *display, FILE *file);
void write_event(event *new_event, FILE *file);
/* Just listen the input and write them in the parameter file. */
int listen(FILE *file);
#endif