NoGUI: Migrate to new host abstraction

This commit is contained in:
Connor McLaughlin
2022-08-24 19:12:38 +10:00
parent 7277d29ff9
commit 6df7d9acda
30 changed files with 3475 additions and 1931 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include "common/types.h"
#include "core/system.h"
#include <functional>
#include <string>
namespace NoGUIHost {
/// Sets batch mode (exit after game shutdown).
bool InBatchMode();
void SetBatchMode(bool enabled);
/// Starts the virtual machine.
void StartSystem(SystemBootParameters params);
/// Returns the application name and version, optionally including debug/devel config indicator.
std::string GetAppNameAndVersion();
/// Returns the debug/devel config indicator.
std::string GetAppConfigSuffix();
/// Thread-safe settings access.
void SaveSettings();
/// Called on the UI thread in response to various events.
void ProcessPlatformWindowResize(s32 width, s32 height, float scale);
void ProcessPlatformMouseMoveEvent(float x, float y);
void ProcessPlatformMouseButtonEvent(s32 button, bool pressed);
void ProcessPlatformMouseWheelEvent(float x, float y);
void ProcessPlatformKeyEvent(s32 key, bool pressed);
void PlatformWindowFocusGained();
void PlatformWindowFocusLost();
bool GetSavedPlatformWindowGeometry(s32* x, s32* y, s32* width, s32* height);
void SavePlatformWindowGeometry(s32 x, s32 y, s32 width, s32 height);
} // namespace NoGUIHost