Update platforms impl

This commit is contained in:
Wojtek Figat
2023-05-28 16:45:08 +02:00
parent 81ae687238
commit 587578ccfb
6 changed files with 11 additions and 25 deletions

View File

@@ -315,15 +315,6 @@ void ApplePlatform::CreateGuid(Guid& result)
result.D = ptr[3];
}
bool ApplePlatform::CanOpenUrl(const StringView& url)
{
return false;
}
void ApplePlatform::OpenUrl(const StringView& url)
{
}
String ApplePlatform::GetExecutableFilePath()
{
char buf[PATH_MAX];

View File

@@ -87,8 +87,6 @@ public:
static String GetUserLocaleName();
static bool GetHasFocus();
static void CreateGuid(Guid& result);
static bool CanOpenUrl(const StringView& url);
static void OpenUrl(const StringView& url);
static Float2 GetDesktopSize();
static String GetMainDirectory();
static String GetExecutableFilePath();

View File

@@ -521,6 +521,15 @@ void PlatformBase::CreateGuid(Guid& result)
result = Guid(dateThingHigh, randomThing | (sequentialThing << 16), cyclesThing, dateThingLow);
}
bool PlatformBase::CanOpenUrl(const StringView& url)
{
return false;
}
void PlatformBase::OpenUrl(const StringView& url)
{
}
Float2 PlatformBase::GetMousePosition()
{
const Window* win = Engine::MainWindow;

View File

@@ -642,13 +642,13 @@ public:
/// </summary>
/// <param name="url">The URI to assign to web browser.</param>
/// <returns>True if can open URL, otherwise false.</returns>
API_FUNCTION() static bool CanOpenUrl(const StringView& url) = delete;
API_FUNCTION() static bool CanOpenUrl(const StringView& url);
/// <summary>
/// Launches a web browser and opens a given URL.
/// </summary>
/// <param name="url">The URI to assign to web browser.</param>
API_FUNCTION() static void OpenUrl(const StringView& url) = delete;
API_FUNCTION() static void OpenUrl(const StringView& url);
public:
/// <summary>

View File

@@ -148,16 +148,6 @@ bool UWPPlatform::GetHasFocus()
return true;
}
bool UWPPlatform::CanOpenUrl(const StringView& url)
{
return false;
}
void UWPPlatform::OpenUrl(const StringView& url)
{
// TODO: add support for OpenUrl on UWP
}
Float2 UWPPlatform::GetDesktopSize()
{
Float2 result;

View File

@@ -35,8 +35,6 @@ public:
static String GetUserLocaleName();
static String GetComputerName();
static bool GetHasFocus();
static bool CanOpenUrl(const StringView& url);
static void OpenUrl(const StringView& url);
static Float2 GetDesktopSize();
static Window* CreateWindow(const CreateWindowSettings& settings);
static void* LoadLibrary(const Char* filename);