mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 15:19:56 +09:00
Rewrite linux global hotkey to not depend on any libraries (also allows it to work on non-systemd systems(?)), remove unused gsr-window-name
This commit is contained in:
22
tools/gsr-global-hotkeys/hotplug.h
Normal file
22
tools/gsr-global-hotkeys/hotplug.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef HOTPLUG_H
|
||||
#define HOTPLUG_H
|
||||
|
||||
/* C stdlib */
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int fd;
|
||||
bool event_is_add;
|
||||
bool subsystem_is_input;
|
||||
char event_data[1024];
|
||||
} hotplug_event;
|
||||
|
||||
typedef void (*hotplug_device_added_callback)(const char *devname, void *userdata);
|
||||
|
||||
bool hotplug_event_init(hotplug_event *self);
|
||||
void hotplug_event_deinit(hotplug_event *self);
|
||||
|
||||
int hotplug_event_steal_fd(hotplug_event *self);
|
||||
void hotplug_event_process_event_data(hotplug_event *self, int fd, hotplug_device_added_callback callback, void *userdata);
|
||||
|
||||
#endif /* HOTPLUG_H */
|
||||
Reference in New Issue
Block a user