PowerToys interface: remove powertoys events and system_menu_helper functionality (#5323)

This commit is contained in:
Andrey Nekrasov
2020-07-31 14:06:13 +03:00
committed by GitHub
parent cff654ae69
commit 49b56d9b52
42 changed files with 116 additions and 1163 deletions

View File

@@ -3,8 +3,8 @@
#include <thread>
#include <queue>
#include <mutex>
#include <interface/lowlevel_keyboard_event_data.h>
#include <LowlevelKeyboardEvent.h>
// Available states for the KeyDelay state machine.
enum class KeyDelayState
{

View File

@@ -2,8 +2,8 @@
#include <mutex>
#include "KeyboardManagerConstants.h"
#include "../common/keyboard_layout.h"
#include "../common/LowlevelKeyboardEvent.h"
#include <functional>
#include <interface/lowlevel_keyboard_event_data.h>
#include <variant>
#include "Shortcut.h"
#include "RemapShortcut.h"

View File

@@ -2,7 +2,6 @@
#include "Shortcut.h"
#include "../common/keyboard_layout.h"
#include "../common/shared_constants.h"
#include <interface/lowlevel_keyboard_event_data.h>
#include "Helpers.h"
#include "InputInterface.h"

View File

@@ -1,9 +1,10 @@
#pragma once
#include <interface/lowlevel_keyboard_event_data.h>
#include <map>
#include <mutex>
#include "keyboardmanager/common/KeyboardManagerConstants.h"
#include <common/LowlevelKeyboardEvent.h>
class InputInterface;
class KeyboardManagerState;
class Shortcut;

View File

@@ -1,7 +1,5 @@
#include "pch.h"
#include <interface/powertoy_module_interface.h>
#include <interface/lowlevel_keyboard_event_data.h>
#include <interface/win_hook_event_data.h>
#include <common/settings_objects.h>
#include <common/shared_constants.h>
#include "resource.h"
@@ -235,16 +233,6 @@ public:
return app_name.c_str();
}
// Return array of the names of all events that this powertoy listens for, with
// nullptr as the last element of the array. Nullptr can also be returned for empty
// list.
virtual const wchar_t** get_events() override
{
static const wchar_t* events[] = { ll_keyboard, nullptr };
return events;
}
// Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{
@@ -339,16 +327,6 @@ public:
return m_enabled;
}
// Handle incoming event, data is event-specific
virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override
{
return 0;
}
virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override {}
virtual void signal_system_menu_action(const wchar_t* name) override {}
// Hook procedure definition
static LRESULT CALLBACK hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
{

View File

@@ -2,7 +2,8 @@
#include <keyboardmanager/common/InputInterface.h>
#include <vector>
#include <functional>
#include <interface/lowlevel_keyboard_event_data.h>
#include <common/LowlevelKeyboardEvent.h>
// Class for mocked keyboard input
class MockedInput :