mirror of https://github.com/status-im/nimqml.git
feat: get text from the clipboard
This commit is contained in:
parent
d1b79f8a4c
commit
7baaeee7b9
|
@ -138,6 +138,7 @@ proc dos_qguiapplication_icon(filename: cstring) {.cdecl, dynlib: dynLibName, im
|
|||
proc dos_qguiapplication_delete() {.cdecl, dynlib: dynLibName, importc.}
|
||||
|
||||
proc dos_qguiapplication_clipboard_setText(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
|
||||
proc dos_qguiapplication_clipboard_getText(): cstring {.cdecl, dynlib: dynLibName, importc.}
|
||||
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.}
|
||||
|
|
|
@ -35,6 +35,11 @@ proc quit*(self: QGuiApplication) =
|
|||
proc setClipboardText*(text: string = "") =
|
||||
dos_qguiapplication_clipboard_setText(text.cstring)
|
||||
|
||||
proc getClipboardText*(): string =
|
||||
let str = dos_qguiapplication_clipboard_getText()
|
||||
result = $str
|
||||
dos_chararray_delete(str)
|
||||
|
||||
proc installSelfSignedCertificate*(certificate: string) =
|
||||
dos_add_self_signed_certificate(certificate.cstring)
|
||||
|
||||
|
|
Loading…
Reference in New Issue