feat(WebView) expose QT API - WebView::initialize()

This commit is contained in:
Stefan 2023-10-12 21:50:39 +03:00
parent 90f19ac030
commit df74bf1e65
2 changed files with 5 additions and 1 deletions

View File

@ -132,6 +132,7 @@ proc dos_chararray_delete(str: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_application_dir_path(): cstring {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_application_dir_path(): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_enable_hdpi(uiScaleFilePath: cstring) {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_enable_hdpi(uiScaleFilePath: cstring) {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_initialize_opengl() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_initialize_opengl() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qtwebview_initialize() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_try_enable_threaded_renderer() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_try_enable_threaded_renderer() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_create() {.cdecl, dynlib: dynLibName, importc.}
proc dos_qguiapplication_exec() {.cdecl, dynlib: dynLibName, importc.} proc dos_qguiapplication_exec() {.cdecl, dynlib: dynLibName, importc.}

View File

@ -61,9 +61,12 @@ proc enableHDPI*(uiScaleFilePath: string) =
proc initializeOpenGL*() = proc initializeOpenGL*() =
dos_qguiapplication_initialize_opengl() dos_qguiapplication_initialize_opengl()
proc initializeWebView*() =
dos_qtwebview_initialize()
proc tryEnableThreadedRenderer*() = proc tryEnableThreadedRenderer*() =
dos_qguiapplication_try_enable_threaded_renderer() dos_qguiapplication_try_enable_threaded_renderer()
proc applicationDirPath*(app: QGuiApplication): string = proc applicationDirPath*(app: QGuiApplication): string =
let str = dos_qguiapplication_application_dir_path() let str = dos_qguiapplication_application_dir_path()
result = $str result = $str