From 1f32cf947993d60249c7366cab3513463b726bb2 Mon Sep 17 00:00:00 2001 From: ElsTheFoxDxD Date: Wed, 1 Jan 2025 21:43:47 -0800 Subject: [PATCH 1/2] Added openURL function --- source/parin/engine.d | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/parin/engine.d b/source/parin/engine.d index 35ba8e1..8a609fe 100644 --- a/source/parin/engine.d +++ b/source/parin/engine.d @@ -1409,6 +1409,12 @@ void freeResources(Sz tag = 0) { engineState.resources.free(tag); } +/// Opens a URL in the default web browser (if available). +@trusted +void openURL(IStr url = "https://github.com/Kapendev/parin") { + rl.OpenURL(url.toCStr().getOr()); +} + /// Opens a window with the specified size and title. /// You should avoid calling this function manually. @trusted From 9bf788206f2e3cd64a25df2d7c3d5b6988a3bc56 Mon Sep 17 00:00:00 2001 From: Cyrodwd Date: Wed, 1 Jan 2025 21:48:44 -0800 Subject: [PATCH 2/2] Added OpenURL (example domain as default url) --- source/parin/engine.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/parin/engine.d b/source/parin/engine.d index 8a609fe..ca6ad8d 100644 --- a/source/parin/engine.d +++ b/source/parin/engine.d @@ -1411,7 +1411,7 @@ void freeResources(Sz tag = 0) { /// Opens a URL in the default web browser (if available). @trusted -void openURL(IStr url = "https://github.com/Kapendev/parin") { +void openURL(IStr url = "https://example.com/") { rl.OpenURL(url.toCStr().getOr()); }