feat: add clipboard support

This commit is contained in:
Pascal Precht 2020-06-29 15:30:49 +02:00
parent 1dc6acc87f
commit f037d58687
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,7 @@ proc dos_qapplication_exec() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qapplication_quit() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qapplication_icon(filename: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qapplication_delete() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qapplication_clipboard_setText(content: cstring) {.cdecl, dynlib: dynLibName, importc.}
# QGuiApplication
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}

View File

@ -14,6 +14,9 @@ proc quit*(application: QApplication) =
proc icon*(application: QApplication, filename: string) =
dos_qapplication_icon(filename.cstring)
proc setClipboardText*(text: string = "") =
dos_qapplication_clipboard_setText(text.cstring)
proc delete*(application: QApplication) =
## Delete the given QApplication
if application.deleted: