feat: Add support for downloading and copying an image by url

This commit is contained in:
Khushboo Mehta 2022-03-29 00:14:57 +02:00
parent eb20a5ffb9
commit f27cf5b19d
2 changed files with 9 additions and 1 deletions

View File

@ -141,6 +141,8 @@ proc dos_qguiapplication_clipboard_setText(content: cstring) {.cdecl, dynlib: dy
proc dos_qguiapplication_installEventFilter(engine: DosStatusEvent) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_clipboard_setImage(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_download_image(imageSource: cstring, filePath: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_clipboard_setImageByUrl(url: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_download_imageByUrl(url: cstring, filePath: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_add_self_signed_certificate(content: cstring) {.cdecl, dynlib: dynLibName, importc.}

View File

@ -41,9 +41,15 @@ proc installSelfSignedCertificate*(certificate: string) =
proc setClipboardImage*(text: string = "") =
dos_qguiapplication_clipboard_setImage(text.cstring)
proc setClipboardImageByUrl*(url: string = "") =
dos_qguiapplication_clipboard_setImageByUrl(url.cstring)
proc downloadImage*(imageSource: string = "", filePath = "") =
dos_qguiapplication_download_image(imageSource.cstring, filePath.cstring)
proc downloadImageByUrl*(url: string = "", filePath = "") =
dos_qguiapplication_download_imageByUrl(url.cstring, filePath.cstring)
proc enableHDPI*(uiScaleFilePath: string) =
dos_qguiapplication_enable_hdpi(uiScaleFilePath)