mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-06 23:06:24 +09:00
Add led indicator setting, use one setting for notifications, move it under general
This commit is contained in:
27
include/LedIndicator.hpp
Normal file
27
include/LedIndicator.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <mglpp/system/Clock.hpp>
|
||||
|
||||
namespace gsr {
|
||||
class LedIndicator {
|
||||
public:
|
||||
LedIndicator(Display *dpy);
|
||||
LedIndicator(const LedIndicator&) = delete;
|
||||
LedIndicator& operator=(const LedIndicator&) = delete;
|
||||
~LedIndicator();
|
||||
|
||||
void set_led(bool enabled);
|
||||
void blink();
|
||||
void update();
|
||||
private:
|
||||
void update_led(bool new_state);
|
||||
private:
|
||||
Display *dpy = nullptr;
|
||||
Atom scroll_lock_atom = None;
|
||||
bool led_indicator_on = false;
|
||||
bool led_enabled = false;
|
||||
bool perform_blink = false;
|
||||
mgl::Clock blink_timer;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user