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

@@ -42,11 +42,6 @@ const wchar_t* OverlayWindow::get_name()
return app_name.c_str();
}
const wchar_t** OverlayWindow::get_events()
{
return nullptr;
}
bool OverlayWindow::get_config(wchar_t* buffer, int* buffer_size)
{
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);
@@ -213,11 +208,6 @@ bool OverlayWindow::is_enabled()
return _enabled;
}
intptr_t OverlayWindow::signal_event(const wchar_t* name, intptr_t data)
{
return 0;
}
intptr_t OverlayWindow::signal_event(LowlevelKeyboardEvent* event)
{
if (!_enabled)

View File

@@ -1,10 +1,11 @@
#pragma once
#include <interface/powertoy_module_interface.h>
#include <interface/lowlevel_keyboard_event_data.h>
#include "overlay_window.h"
#include "resource.h"
#include <common/LowlevelKeyboardEvent.h>
// We support only one instance of the overlay
extern class OverlayWindow* instance;
@@ -16,7 +17,6 @@ public:
OverlayWindow();
virtual const wchar_t* get_name() override;
virtual const wchar_t** get_events() override;
virtual bool get_config(wchar_t* buffer, int* buffer_size) override;
virtual void set_config(const wchar_t* config) override;
@@ -24,18 +24,11 @@ public:
virtual void disable() override;
virtual bool is_enabled() override;
// PowerToys interface method, not used
virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override;
virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override {}
virtual void signal_system_menu_action(const wchar_t* name) override {}
void on_held();
void on_held_press(DWORD vkCode);
void quick_hide();
void was_hidden();
// Method called from LowLevelKeyboardProc
intptr_t signal_event(LowlevelKeyboardEvent* event);
virtual void destroy() override;