mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-21 06:59:17 -04:00
remove usage of UnsafePointer (#594)
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import WebKit
|
||||
|
||||
@_cdecl("reload_webview")
|
||||
public func reloadWebview(webviewPtr: UnsafePointer<WKWebView>) -> () {
|
||||
let webview = webviewPtr.pointee;
|
||||
public func reloadWebview(webview: WKWebView) -> () {
|
||||
webview.window!.orderOut(webview);
|
||||
webview.reload();
|
||||
webview.window!.makeKey();
|
||||
|
||||
@@ -21,9 +21,7 @@ public func lockAppTheme(themeType: AppThemeType) {
|
||||
}
|
||||
|
||||
@_cdecl("blur_window_background")
|
||||
public func blurWindowBackground(windowPtr: UnsafePointer<NSWindow>) {
|
||||
let window = windowPtr.pointee;
|
||||
|
||||
public func blurWindowBackground(window: NSWindow) {
|
||||
let windowContent = window.contentView!;
|
||||
let blurryView = NSVisualEffectView();
|
||||
|
||||
@@ -51,9 +49,7 @@ func setInvisibleToolbar(windowPtr: NSWindow, hasToolbar: Bool) {
|
||||
}
|
||||
|
||||
@_cdecl("set_titlebar_style")
|
||||
public func setTitlebarStyle(windowPtr: UnsafePointer<NSWindow>, transparent: Bool, large: Bool) {
|
||||
let window = windowPtr.pointee;
|
||||
|
||||
public func setTitlebarStyle(window: NSWindow, transparent: Bool, large: Bool) {
|
||||
var styleMask = window.styleMask;
|
||||
|
||||
if transparent && large {
|
||||
|
||||
Reference in New Issue
Block a user