[MacTUG] SafariFullScreen but not "Full Screen"
Dani Roloson
daroloso at uwaterloo.ca
Thu Apr 30 16:55:20 EDT 2015
This seems to work after much tweaking.
Now I need help to compile it to work on older operating systems. Help appreciated.
% swift main.swift
ID is 418876289
dspyCnt is 1
currentDisplay is 418876289
CGDisplayPixelsHigh(currentDisplay) is 1080
CGDisplayPixelsWide(currentDisplay) is 1920
% swiftc main.swift -o main
<unknown>:0: error: cannot load underlying module for 'CoreGraphics'
<unknown>:0: note: did you forget to set an SDK using -sdk or SDKROOT?
<unknown>:0: note: use "xcrun -sdk macosx swift" to select the default OS X SDK installed with Xcode
----------------------------- main.swift -----------------------------
import Foundation
import CoreGraphics
var mainID = CGMainDisplayID()
println("ID is \(mainID)")
var dErr: CGError
let maxDisplays: UInt32 = 16
var onlineDspys: [CGDirectDisplayID] = [mainID]
var dspyCnt: UInt32 = 0
dErr = CGGetOnlineDisplayList(maxDisplays, &onlineDspys, &dspyCnt)
println("dspyCnt is \(dspyCnt)")
for currentDisplay in onlineDspys {
println("currentDisplay is \(currentDisplay)")
println("CGDisplayPixelsHigh(currentDisplay) is \(CGDisplayPixelsHigh(currentDisplay))")
println("CGDisplayPixelsWide(currentDisplay) is \(CGDisplayPixelsWide(currentDisplay))")
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uwaterloo.ca/pipermail/mactug/attachments/20150430/7c05ce6a/attachment.html>
More information about the MacTUG
mailing list