mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "qtcommon.h"
|
|
#include "extenwindow.h"
|
|
#include "host/host.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class MainWindow;
|
|
}
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
public:
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
private:
|
|
inline static constexpr auto HOOK_SAVE_FILE = u8"SavedHooks.txt";
|
|
inline static constexpr auto GAME_SAVE_FILE = u8"SavedGames.txt";
|
|
|
|
inline static thread_local bool ok = false;
|
|
|
|
void closeEvent(QCloseEvent*) override;
|
|
void ProcessConnected(DWORD processId);
|
|
void ProcessDisconnected(DWORD processId);
|
|
void ThreadAdded(TextThread& thread);
|
|
void ThreadRemoved(TextThread& thread);
|
|
bool SentenceReceived(TextThread& thread, std::wstring& sentence);
|
|
QString TextThreadString(TextThread& thread);
|
|
ThreadParam ParseTextThreadString(QString ttString);
|
|
DWORD GetSelectedProcessId();
|
|
std::array<InfoForExtension, 10> GetMiscInfo(TextThread& thread);
|
|
std::optional<std::wstring> UserSelectedProcess();
|
|
void AttachProcess();
|
|
void LaunchProcess();
|
|
void DetachProcess();
|
|
void ForgetProcess();
|
|
void AddHook();
|
|
void RemoveHooks();
|
|
void SaveHooks();
|
|
void FindHooks();
|
|
void Settings();
|
|
void Extensions();
|
|
void ViewThread(int index);
|
|
|
|
Ui::MainWindow* ui;
|
|
ExtenWindow* extenWindow;
|
|
std::unordered_set<DWORD> alreadyAttached;
|
|
bool autoAttach = false, autoAttachSavedOnly = true;
|
|
uint64_t savedThreadCtx = 0, savedThreadCtx2 = 0;
|
|
wchar_t savedThreadCode[1000] = {};
|
|
TextThread* current = nullptr;
|
|
};
|