Skip to content

Commit

Permalink
Fixup build system, begin Pixar USD in Swift.
Browse files Browse the repository at this point in the history
  • Loading branch information
furby-tm committed Jun 20, 2023
1 parent b02c5b5 commit b576c2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions source/creator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ if(APPLE)
set(KRAKEN_MACOS_DOCC_DIR kraken.docc)
set(SRC
creator_args.cpp
creator.cpp
Creator.swift
${KRAKEN_MACOS_DOCC_DIR}
creator.h
Expand Down
14 changes: 7 additions & 7 deletions source/kraken/anchor/apple/anchor_system.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ import AppKit
import IOKit

/* Kraken Anchor. */
import Anchor
//import Anchor

open class AnchorWindowApple : NSObject
{
var window: NSWindow
var metalDevice: MTLDevice!
var metalView: MTKView!
var dialog: Bool = false
var state: eAnchorWindowState
var state: Int
var windowDelegate: CocoaWindowDelegate

public init(title: String,
left: CGFloat,
bottom: CGFloat,
width: CGFloat,
height: CGFloat,
state: eAnchorWindowState,
state: Int,
dialog: Bool,
parent: AnchorWindowApple?)
{
Expand All @@ -46,9 +46,9 @@ open class AnchorWindowApple : NSObject
let rect = NSRect(origin: CGPoint(x: left, y: bottom), size: CGSize(width: width, height: height))
let minSize = NSSize(width: 320, height: 240)

var styleMask: NSWindowStyleMask = NSWindowStyleMask.init(integerLiteral: NSWindow.StyleMask.titled + NSWindow.StyleMask.closable + NSWindow.StyleMask.resizable)
var styleMask: NSWindow.StyleMask = .init(rawValue: NSWindow.StyleMask.titled.rawValue + NSWindow.StyleMask.closable.rawValue + NSWindow.StyleMask.resizable.rawValue)
if (!dialog) {
styleMask += NSWindowStyleMask.init(integerLiteral: NSWindowStyleMaskMiniaturizable)
styleMask = .init(rawValue: NSWindow.StyleMask.titled.rawValue + NSWindow.StyleMask.closable.rawValue + NSWindow.StyleMask.resizable.rawValue + NSWindow.StyleMask.miniaturizable.rawValue)
}

self.window = NSWindow(contentRect: rect, styleMask: styleMask, backing: .buffered, defer: false)
Expand Down Expand Up @@ -101,12 +101,12 @@ open class AnchorWindowApple : NSObject
self.window.close()
}

public func getCocoaState() -> eAnchorWindowState
public func getCocoaState() -> Int
{
return self.state
}

public func setCocoaState(newState: eAnchorWindowState)
public func setCocoaState(newState: Int)
{
self.state = newState
}
Expand Down

0 comments on commit b576c2b

Please sign in to comment.