This commit is contained in:
Felix Kratz 2022-06-09 19:41:07 +02:00
parent 5531582067
commit e82f2a96e9
2 changed files with 11 additions and 2 deletions

View file

@ -25,10 +25,10 @@ void custom_events_init(struct custom_events* custom_events) {
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_SYSTEM_WOKE), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_ENTERED), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_EXITED), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_ENTERED_GLOBAL), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_EXITED_GLOBAL), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_CLICKED), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_SYSTEM_WILL_SLEEP), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_ENTERED_GLOBAL), NULL);
custom_events_append(custom_events, string_copy(COMMAND_SUBSCRIBE_MOUSE_EXITED_GLOBAL), NULL);
}
void custom_events_append(struct custom_events* custom_events, char* name, char* notification) {

View file

@ -1,6 +1,15 @@
#pragma once
#include "misc/helpers.h"
#define UPDATE_FRONT_APP_SWITCHED 1ULL
#define UPDATE_SPACE_CHANGE 1ULL << 1
#define UPDATE_DISPLAY_CHANGE 1ULL << 2
#define UPDATE_SYSTEM_WOKE 1ULL << 3
#define UPDATE_MOUSE_ENTERED 1ULL << 4
#define UPDATE_MOUSE_EXITED 1ULL << 5
#define UPDATE_MOUSE_CLICKED 1ULL << 6
#define UPDATE_SYSTEM_WILL_SLEEP 1ULL << 7
extern void* g_workspace_context;
extern void workspace_create_custom_observer(void** context, char* name);