mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 05:06:36 +02:00
FancyZones and Shortcut Guide initial commit
Co-authored-by: Alexis Campailla <alexis@janeasystems.com> Co-authored-by: Bret Anderson <bretan@microsoft.com> Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com> Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Jeff Bogdan <jeffbog@microsoft.com> Co-authored-by: March Rogers <marchr@microsoft.com> Co-authored-by: Mike Harsh <mharsh@microsoft.com> Co-authored-by: Nachum Bundak <Nachum.Bundak@microsoft.com> Co-authored-by: Oliver Jones <ojones@microsoft.com> Co-authored-by: Patrick Little <plittle@microsoft.com>
This commit is contained in:
committed by
Bartosz Sosnowski
parent
10c5396099
commit
8431b80e48
19
src/runner/powertoys_events.h
Normal file
19
src/runner/powertoys_events.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <interface/powertoy_module_interface.h>
|
||||
#include <string>
|
||||
|
||||
class PowertoysEvents {
|
||||
public:
|
||||
void register_receiver(const std::wstring& event, PowertoyModuleIface* module);
|
||||
void unregister_receiver(PowertoyModuleIface* module);
|
||||
intptr_t signal_event(const std::wstring& event, intptr_t data);
|
||||
private:
|
||||
std::shared_mutex mutex;
|
||||
std::unordered_map<std::wstring, std::vector<PowertoyModuleIface*>> receivers;
|
||||
};
|
||||
|
||||
PowertoysEvents& powertoys_events();
|
||||
|
||||
void first_subscribed(const std::wstring& event);
|
||||
void last_unsubscribed(const std::wstring& event);
|
||||
|
||||
Reference in New Issue
Block a user