mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Format shortcut_guide according to .clang-format
This commit is contained in:
@@ -6,30 +6,39 @@
|
||||
#include <chrono>
|
||||
#include "shortcut_guide.h"
|
||||
|
||||
struct KeyEvent {
|
||||
bool key_down;
|
||||
unsigned vk_code;
|
||||
struct KeyEvent
|
||||
{
|
||||
bool key_down;
|
||||
unsigned vk_code;
|
||||
};
|
||||
|
||||
class TargetState {
|
||||
class TargetState
|
||||
{
|
||||
public:
|
||||
TargetState(int ms_delay);
|
||||
bool signal_event(unsigned vk_code, bool key_down);
|
||||
void was_hiden();
|
||||
void exit();
|
||||
void set_delay(int ms_delay);
|
||||
TargetState(int ms_delay);
|
||||
bool signal_event(unsigned vk_code, bool key_down);
|
||||
void was_hiden();
|
||||
void exit();
|
||||
void set_delay(int ms_delay);
|
||||
|
||||
private:
|
||||
KeyEvent next();
|
||||
void handle_hidden();
|
||||
void handle_timeout();
|
||||
void handle_shown();
|
||||
void thread_proc();
|
||||
std::mutex mutex;
|
||||
std::condition_variable cv;
|
||||
std::chrono::system_clock::time_point winkey_timestamp, singnal_timestamp;
|
||||
std::chrono::milliseconds delay;
|
||||
std::deque<KeyEvent> events;
|
||||
enum { Hidden, Timeout, Shown, Exiting } state = Hidden;
|
||||
bool key_was_pressed = false;
|
||||
std::thread thread;
|
||||
KeyEvent next();
|
||||
void handle_hidden();
|
||||
void handle_timeout();
|
||||
void handle_shown();
|
||||
void thread_proc();
|
||||
std::mutex mutex;
|
||||
std::condition_variable cv;
|
||||
std::chrono::system_clock::time_point winkey_timestamp, singnal_timestamp;
|
||||
std::chrono::milliseconds delay;
|
||||
std::deque<KeyEvent> events;
|
||||
enum
|
||||
{
|
||||
Hidden,
|
||||
Timeout,
|
||||
Shown,
|
||||
Exiting
|
||||
} state = Hidden;
|
||||
bool key_was_pressed = false;
|
||||
std::thread thread;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user