├── .gitignore ├── .gitmodules ├── .ruby-version ├── CHANGELOG.md ├── LICENSE.md ├── Package.swift ├── README.md ├── Silica.podspec ├── Silica.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── Silica.xccheckout └── Silica ├── Silica-Info.plist ├── Silica-Prefix.pch ├── Silica.h ├── Sources ├── NSRunningApplication+Silica.h ├── NSRunningApplication+Silica.m ├── NSScreen+Silica.h ├── NSScreen+Silica.m ├── SIAccessibilityElement.h ├── SIAccessibilityElement.m ├── SIApplication.h ├── SIApplication.m ├── SISystemWideElement.h ├── SISystemWideElement.m ├── SIUniversalAccessHelper.h ├── SIUniversalAccessHelper.m ├── SIWindow.h └── SIWindow.m ├── en.lproj └── InfoPlist.strings └── include ├── CGSAccessibility.h ├── CGSCIFilter.h ├── CGSConnection.h ├── CGSCursor.h ├── CGSDebug.h ├── CGSDevice.h ├── CGSDisplays.h ├── CGSEvent.h ├── CGSHotKeys.h ├── CGSInternal.h ├── CGSMisc.h ├── CGSRegion.h ├── CGSSession.h ├── CGSSpace.h ├── CGSSurface.h ├── CGSTile.h ├── CGSTransitions.h ├── CGSWindow.h ├── CGSWorkspace.h ├── NSRunningApplication+Silica.h ├── NSScreen+Silica.h ├── SIAccessibilityElement.h ├── SIApplication.h ├── SISystemWideElement.h ├── SIUniversalAccessHelper.h ├── SIWindow.h └── Silica.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .build/ 3 | .DS_Store 4 | */build/* 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | DerivedData 17 | .idea/ 18 | *.hmap 19 | Pods 20 | build -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "CGSInternal"] 2 | path = Silica/Sources/CGSInternal 3 | url = https://github.com/ianyh/CGSInternal.git 4 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.1 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CHANGELOG 2 | 3 | Next 4 | ---- 5 | 6 | ### Breaking Changes 7 | 8 | - Added nullability notations for better swift support. 9 | 10 | ### Enhancements 11 | 12 | ### Fixes 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 SiO2 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.7 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "Silica", 6 | defaultLocalization: "en", 7 | products: [ 8 | .library( 9 | name: "Silica", 10 | targets: ["Silica"]) 11 | ], 12 | targets: [ 13 | .target( 14 | name: "Silica", 15 | path: "Silica", 16 | publicHeadersPath: "include") 17 | ] 18 | ) 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Silica 2 | ====== 3 | 4 | Silica is a window management framework for OS X. It provides many of the mechanisms that one would want when managing windows. You can access lists of windows, move and resize them, minimize and unminimize them, hide and unhide applications, and more. 5 | 6 | Silica is very much in beta and the API is very likely to undergo breaking changes. 7 | -------------------------------------------------------------------------------- /Silica.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Silica" 3 | s.version = "0.3.7" 4 | s.summary = "A framework for Cocoa window management." 5 | s.description = <<-DESC 6 | Silica is a framework for window management on macOS. 7 | DESC 8 | s.homepage = "https://github.com/ianyh/Silica" 9 | s.license = 'MIT' 10 | s.authors = { "Ian Ynda-Hummel" => "ianynda@gmail.com", "Steven Degutis" => "steven@cleancoders.com" } 11 | s.platform = :osx, '10.11' 12 | s.source = { :git => "https://github.com/ianyh/Silica.git", :tag => '0.3.7', :submodules => true } 13 | s.source_files = 'Silica', 'Silica/**/*.{h,m}', 'CGSInternal/*.h' 14 | s.exclude_files = 'Silica/Exclude' 15 | s.frameworks = 'AppKit', 'IOKit', 'Carbon' 16 | s.requires_arc = true 17 | end 18 | -------------------------------------------------------------------------------- /Silica.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 53; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 403D9EE92A94496400F278F2 /* Silica.h in Headers */ = {isa = PBXBuildFile; fileRef = 403D9EE82A94496400F278F2 /* Silica.h */; }; 11 | 404B0FFA1800EBE300309019 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 404B0FF91800EBE300309019 /* Carbon.framework */; }; 12 | 4063AFDA17FB937A00E942E2 /* SISystemWideElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4063AFD817FB937A00E942E2 /* SISystemWideElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 4063AFDB17FB937A00E942E2 /* SISystemWideElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 4063AFD917FB937A00E942E2 /* SISystemWideElement.m */; }; 14 | 40AE16152A93A99700E14536 /* CGSTile.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16002A93A99700E14536 /* CGSTile.h */; }; 15 | 40AE16162A93A99700E14536 /* CGSSurface.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16012A93A99700E14536 /* CGSSurface.h */; }; 16 | 40AE16172A93A99700E14536 /* CGSTransitions.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16022A93A99700E14536 /* CGSTransitions.h */; }; 17 | 40AE16182A93A99700E14536 /* CGSRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16032A93A99700E14536 /* CGSRegion.h */; }; 18 | 40AE16192A93A99700E14536 /* CGSWorkspace.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16042A93A99700E14536 /* CGSWorkspace.h */; }; 19 | 40AE161A2A93A99700E14536 /* CGSHotKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16052A93A99700E14536 /* CGSHotKeys.h */; }; 20 | 40AE161B2A93A99700E14536 /* CGSAccessibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16062A93A99700E14536 /* CGSAccessibility.h */; }; 21 | 40AE161C2A93A99700E14536 /* CGSMisc.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16072A93A99700E14536 /* CGSMisc.h */; }; 22 | 40AE161E2A93A99700E14536 /* CGSWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16092A93A99700E14536 /* CGSWindow.h */; }; 23 | 40AE161F2A93A99700E14536 /* CGSCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE160A2A93A99700E14536 /* CGSCursor.h */; }; 24 | 40AE16212A93A99700E14536 /* CGSDisplays.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE160C2A93A99700E14536 /* CGSDisplays.h */; }; 25 | 40AE16222A93A99700E14536 /* CGSInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE160D2A93A99700E14536 /* CGSInternal.h */; }; 26 | 40AE16232A93A99700E14536 /* CGSCIFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE160E2A93A99700E14536 /* CGSCIFilter.h */; }; 27 | 40AE16242A93A99700E14536 /* CGSConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE160F2A93A99700E14536 /* CGSConnection.h */; }; 28 | 40AE16252A93A99700E14536 /* CGSSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16102A93A99700E14536 /* CGSSession.h */; }; 29 | 40AE16262A93A99700E14536 /* CGSDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16112A93A99700E14536 /* CGSDevice.h */; }; 30 | 40AE16272A93A99700E14536 /* CGSSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16122A93A99700E14536 /* CGSSpace.h */; }; 31 | 40AE16282A93A99700E14536 /* CGSEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16132A93A99700E14536 /* CGSEvent.h */; }; 32 | 40AE16292A93A99700E14536 /* CGSDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 40AE16142A93A99700E14536 /* CGSDebug.h */; }; 33 | 40AE162A2A93AA4700E14536 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 942474BD17DF67D700BF9B61 /* Foundation.framework */; }; 34 | 40AE162C2A93AAB900E14536 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40AE162B2A93AAB900E14536 /* ApplicationServices.framework */; }; 35 | 40FC6ACC17FA599C00856CE7 /* SIApplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FC6ACA17FA599C00856CE7 /* SIApplication.h */; settings = {ATTRIBUTES = (Public, ); }; }; 36 | 40FC6ACD17FA599C00856CE7 /* SIApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 40FC6ACB17FA599C00856CE7 /* SIApplication.m */; }; 37 | 40FC6AD017FA5A1B00856CE7 /* SIAccessibilityElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FC6ACE17FA5A1B00856CE7 /* SIAccessibilityElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; 38 | 40FC6AD117FA5A1B00856CE7 /* SIAccessibilityElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 40FC6ACF17FA5A1B00856CE7 /* SIAccessibilityElement.m */; }; 39 | 40FC6AD417FA606A00856CE7 /* NSRunningApplication+Silica.h in Headers */ = {isa = PBXBuildFile; fileRef = 40FC6AD217FA606A00856CE7 /* NSRunningApplication+Silica.h */; settings = {ATTRIBUTES = (Public, ); }; }; 40 | 40FC6AD517FA606A00856CE7 /* NSRunningApplication+Silica.m in Sources */ = {isa = PBXBuildFile; fileRef = 40FC6AD317FA606A00856CE7 /* NSRunningApplication+Silica.m */; }; 41 | 942474B917DF67D700BF9B61 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 942474B817DF67D700BF9B61 /* Cocoa.framework */; }; 42 | 942474C317DF67D700BF9B61 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 942474C117DF67D700BF9B61 /* InfoPlist.strings */; }; 43 | 942474D217DF690700BF9B61 /* SIWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 942474CE17DF690700BF9B61 /* SIWindow.h */; settings = {ATTRIBUTES = (Public, ); }; }; 44 | 942474D317DF690700BF9B61 /* SIWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 942474CF17DF690700BF9B61 /* SIWindow.m */; }; 45 | 942474D417DF690700BF9B61 /* NSScreen+Silica.h in Headers */ = {isa = PBXBuildFile; fileRef = 942474D017DF690700BF9B61 /* NSScreen+Silica.h */; settings = {ATTRIBUTES = (Public, ); }; }; 46 | 942474D517DF690700BF9B61 /* NSScreen+Silica.m in Sources */ = {isa = PBXBuildFile; fileRef = 942474D117DF690700BF9B61 /* NSScreen+Silica.m */; }; 47 | 942474E417DF693600BF9B61 /* SIUniversalAccessHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 942474DE17DF693600BF9B61 /* SIUniversalAccessHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; 48 | 942474E517DF693600BF9B61 /* SIUniversalAccessHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 942474DF17DF693600BF9B61 /* SIUniversalAccessHelper.m */; }; 49 | 942474E717DF695A00BF9B61 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 942474E617DF695A00BF9B61 /* IOKit.framework */; }; 50 | /* End PBXBuildFile section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | 403D9EE82A94496400F278F2 /* Silica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Silica.h; sourceTree = ""; }; 54 | 404B0FF91800EBE300309019 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; 55 | 4063AFD817FB937A00E942E2 /* SISystemWideElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SISystemWideElement.h; sourceTree = ""; }; 56 | 4063AFD917FB937A00E942E2 /* SISystemWideElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SISystemWideElement.m; sourceTree = ""; }; 57 | 40AE16002A93A99700E14536 /* CGSTile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSTile.h; sourceTree = ""; }; 58 | 40AE16012A93A99700E14536 /* CGSSurface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSSurface.h; sourceTree = ""; }; 59 | 40AE16022A93A99700E14536 /* CGSTransitions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSTransitions.h; sourceTree = ""; }; 60 | 40AE16032A93A99700E14536 /* CGSRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSRegion.h; sourceTree = ""; }; 61 | 40AE16042A93A99700E14536 /* CGSWorkspace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSWorkspace.h; sourceTree = ""; }; 62 | 40AE16052A93A99700E14536 /* CGSHotKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSHotKeys.h; sourceTree = ""; }; 63 | 40AE16062A93A99700E14536 /* CGSAccessibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSAccessibility.h; sourceTree = ""; }; 64 | 40AE16072A93A99700E14536 /* CGSMisc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSMisc.h; sourceTree = ""; }; 65 | 40AE16092A93A99700E14536 /* CGSWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSWindow.h; sourceTree = ""; }; 66 | 40AE160A2A93A99700E14536 /* CGSCursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSCursor.h; sourceTree = ""; }; 67 | 40AE160C2A93A99700E14536 /* CGSDisplays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSDisplays.h; sourceTree = ""; }; 68 | 40AE160D2A93A99700E14536 /* CGSInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSInternal.h; sourceTree = ""; }; 69 | 40AE160E2A93A99700E14536 /* CGSCIFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSCIFilter.h; sourceTree = ""; }; 70 | 40AE160F2A93A99700E14536 /* CGSConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSConnection.h; sourceTree = ""; }; 71 | 40AE16102A93A99700E14536 /* CGSSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSSession.h; sourceTree = ""; }; 72 | 40AE16112A93A99700E14536 /* CGSDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSDevice.h; sourceTree = ""; }; 73 | 40AE16122A93A99700E14536 /* CGSSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSSpace.h; sourceTree = ""; }; 74 | 40AE16132A93A99700E14536 /* CGSEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSEvent.h; sourceTree = ""; }; 75 | 40AE16142A93A99700E14536 /* CGSDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CGSDebug.h; sourceTree = ""; }; 76 | 40AE162B2A93AAB900E14536 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; }; 77 | 40FC6ACA17FA599C00856CE7 /* SIApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SIApplication.h; sourceTree = ""; }; 78 | 40FC6ACB17FA599C00856CE7 /* SIApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SIApplication.m; sourceTree = ""; }; 79 | 40FC6ACE17FA5A1B00856CE7 /* SIAccessibilityElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SIAccessibilityElement.h; sourceTree = ""; }; 80 | 40FC6ACF17FA5A1B00856CE7 /* SIAccessibilityElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SIAccessibilityElement.m; sourceTree = ""; }; 81 | 40FC6AD217FA606A00856CE7 /* NSRunningApplication+Silica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSRunningApplication+Silica.h"; sourceTree = ""; }; 82 | 40FC6AD317FA606A00856CE7 /* NSRunningApplication+Silica.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSRunningApplication+Silica.m"; sourceTree = ""; }; 83 | 942474B517DF67D700BF9B61 /* Silica.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Silica.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 84 | 942474B817DF67D700BF9B61 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 85 | 942474BB17DF67D700BF9B61 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 86 | 942474BC17DF67D700BF9B61 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 87 | 942474BD17DF67D700BF9B61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 88 | 942474C017DF67D700BF9B61 /* Silica-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Silica-Info.plist"; sourceTree = ""; }; 89 | 942474C217DF67D700BF9B61 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 90 | 942474C417DF67D700BF9B61 /* Silica-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Silica-Prefix.pch"; sourceTree = ""; }; 91 | 942474CE17DF690700BF9B61 /* SIWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SIWindow.h; sourceTree = ""; }; 92 | 942474CF17DF690700BF9B61 /* SIWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SIWindow.m; sourceTree = ""; }; 93 | 942474D017DF690700BF9B61 /* NSScreen+Silica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSScreen+Silica.h"; sourceTree = ""; }; 94 | 942474D117DF690700BF9B61 /* NSScreen+Silica.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSScreen+Silica.m"; sourceTree = ""; }; 95 | 942474DE17DF693600BF9B61 /* SIUniversalAccessHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SIUniversalAccessHelper.h; sourceTree = ""; }; 96 | 942474DF17DF693600BF9B61 /* SIUniversalAccessHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SIUniversalAccessHelper.m; sourceTree = ""; }; 97 | 942474E617DF695A00BF9B61 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 98 | B9247E988D3D43269A89E5D3 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 99 | /* End PBXFileReference section */ 100 | 101 | /* Begin PBXFrameworksBuildPhase section */ 102 | 942474B117DF67D700BF9B61 /* Frameworks */ = { 103 | isa = PBXFrameworksBuildPhase; 104 | buildActionMask = 2147483647; 105 | files = ( 106 | 40AE162C2A93AAB900E14536 /* ApplicationServices.framework in Frameworks */, 107 | 404B0FFA1800EBE300309019 /* Carbon.framework in Frameworks */, 108 | 942474E717DF695A00BF9B61 /* IOKit.framework in Frameworks */, 109 | 942474B917DF67D700BF9B61 /* Cocoa.framework in Frameworks */, 110 | 40AE162A2A93AA4700E14536 /* Foundation.framework in Frameworks */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | 40AE15F62A93A46F00E14536 /* Sources */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 40AE15FF2A93A99700E14536 /* CGSInternal */, 121 | 40FC6AD217FA606A00856CE7 /* NSRunningApplication+Silica.h */, 122 | 40FC6AD317FA606A00856CE7 /* NSRunningApplication+Silica.m */, 123 | 942474D017DF690700BF9B61 /* NSScreen+Silica.h */, 124 | 942474D117DF690700BF9B61 /* NSScreen+Silica.m */, 125 | 40FC6ACE17FA5A1B00856CE7 /* SIAccessibilityElement.h */, 126 | 40FC6ACF17FA5A1B00856CE7 /* SIAccessibilityElement.m */, 127 | 40FC6ACA17FA599C00856CE7 /* SIApplication.h */, 128 | 40FC6ACB17FA599C00856CE7 /* SIApplication.m */, 129 | 4063AFD817FB937A00E942E2 /* SISystemWideElement.h */, 130 | 4063AFD917FB937A00E942E2 /* SISystemWideElement.m */, 131 | 942474DE17DF693600BF9B61 /* SIUniversalAccessHelper.h */, 132 | 942474DF17DF693600BF9B61 /* SIUniversalAccessHelper.m */, 133 | 942474CE17DF690700BF9B61 /* SIWindow.h */, 134 | 942474CF17DF690700BF9B61 /* SIWindow.m */, 135 | ); 136 | path = Sources; 137 | sourceTree = ""; 138 | }; 139 | 40AE15FB2A93A83900E14536 /* include */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | ); 143 | path = include; 144 | sourceTree = ""; 145 | }; 146 | 40AE15FF2A93A99700E14536 /* CGSInternal */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 40AE16002A93A99700E14536 /* CGSTile.h */, 150 | 40AE16012A93A99700E14536 /* CGSSurface.h */, 151 | 40AE16022A93A99700E14536 /* CGSTransitions.h */, 152 | 40AE16032A93A99700E14536 /* CGSRegion.h */, 153 | 40AE16042A93A99700E14536 /* CGSWorkspace.h */, 154 | 40AE16052A93A99700E14536 /* CGSHotKeys.h */, 155 | 40AE16062A93A99700E14536 /* CGSAccessibility.h */, 156 | 40AE16072A93A99700E14536 /* CGSMisc.h */, 157 | 40AE16092A93A99700E14536 /* CGSWindow.h */, 158 | 40AE160A2A93A99700E14536 /* CGSCursor.h */, 159 | 40AE160C2A93A99700E14536 /* CGSDisplays.h */, 160 | 40AE160D2A93A99700E14536 /* CGSInternal.h */, 161 | 40AE160E2A93A99700E14536 /* CGSCIFilter.h */, 162 | 40AE160F2A93A99700E14536 /* CGSConnection.h */, 163 | 40AE16102A93A99700E14536 /* CGSSession.h */, 164 | 40AE16112A93A99700E14536 /* CGSDevice.h */, 165 | 40AE16122A93A99700E14536 /* CGSSpace.h */, 166 | 40AE16132A93A99700E14536 /* CGSEvent.h */, 167 | 40AE16142A93A99700E14536 /* CGSDebug.h */, 168 | ); 169 | path = CGSInternal; 170 | sourceTree = ""; 171 | }; 172 | 942474AB17DF67D700BF9B61 = { 173 | isa = PBXGroup; 174 | children = ( 175 | 942474BE17DF67D700BF9B61 /* Silica */, 176 | 942474B717DF67D700BF9B61 /* Frameworks */, 177 | 942474B617DF67D700BF9B61 /* Products */, 178 | ); 179 | sourceTree = ""; 180 | usesTabs = 0; 181 | }; 182 | 942474B617DF67D700BF9B61 /* Products */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 942474B517DF67D700BF9B61 /* Silica.framework */, 186 | ); 187 | name = Products; 188 | sourceTree = ""; 189 | }; 190 | 942474B717DF67D700BF9B61 /* Frameworks */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 40AE162B2A93AAB900E14536 /* ApplicationServices.framework */, 194 | 404B0FF91800EBE300309019 /* Carbon.framework */, 195 | 942474E617DF695A00BF9B61 /* IOKit.framework */, 196 | 942474B817DF67D700BF9B61 /* Cocoa.framework */, 197 | 942474BA17DF67D700BF9B61 /* Other Frameworks */, 198 | B9247E988D3D43269A89E5D3 /* libPods.a */, 199 | ); 200 | name = Frameworks; 201 | sourceTree = ""; 202 | }; 203 | 942474BA17DF67D700BF9B61 /* Other Frameworks */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 942474BB17DF67D700BF9B61 /* AppKit.framework */, 207 | 942474BC17DF67D700BF9B61 /* CoreData.framework */, 208 | 942474BD17DF67D700BF9B61 /* Foundation.framework */, 209 | ); 210 | name = "Other Frameworks"; 211 | sourceTree = ""; 212 | }; 213 | 942474BE17DF67D700BF9B61 /* Silica */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 403D9EE82A94496400F278F2 /* Silica.h */, 217 | 40AE15FB2A93A83900E14536 /* include */, 218 | 40AE15F62A93A46F00E14536 /* Sources */, 219 | 942474BF17DF67D700BF9B61 /* Supporting Files */, 220 | ); 221 | path = Silica; 222 | sourceTree = ""; 223 | }; 224 | 942474BF17DF67D700BF9B61 /* Supporting Files */ = { 225 | isa = PBXGroup; 226 | children = ( 227 | 942474C017DF67D700BF9B61 /* Silica-Info.plist */, 228 | 942474C117DF67D700BF9B61 /* InfoPlist.strings */, 229 | 942474C417DF67D700BF9B61 /* Silica-Prefix.pch */, 230 | ); 231 | name = "Supporting Files"; 232 | sourceTree = ""; 233 | }; 234 | /* End PBXGroup section */ 235 | 236 | /* Begin PBXHeadersBuildPhase section */ 237 | 942474B217DF67D700BF9B61 /* Headers */ = { 238 | isa = PBXHeadersBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 40AE16252A93A99700E14536 /* CGSSession.h in Headers */, 242 | 40AE161A2A93A99700E14536 /* CGSHotKeys.h in Headers */, 243 | 40AE16162A93A99700E14536 /* CGSSurface.h in Headers */, 244 | 40FC6AD017FA5A1B00856CE7 /* SIAccessibilityElement.h in Headers */, 245 | 942474D217DF690700BF9B61 /* SIWindow.h in Headers */, 246 | 40AE16172A93A99700E14536 /* CGSTransitions.h in Headers */, 247 | 40AE16262A93A99700E14536 /* CGSDevice.h in Headers */, 248 | 942474D417DF690700BF9B61 /* NSScreen+Silica.h in Headers */, 249 | 40AE16272A93A99700E14536 /* CGSSpace.h in Headers */, 250 | 40FC6AD417FA606A00856CE7 /* NSRunningApplication+Silica.h in Headers */, 251 | 40AE161C2A93A99700E14536 /* CGSMisc.h in Headers */, 252 | 40AE16292A93A99700E14536 /* CGSDebug.h in Headers */, 253 | 40AE16222A93A99700E14536 /* CGSInternal.h in Headers */, 254 | 40AE16192A93A99700E14536 /* CGSWorkspace.h in Headers */, 255 | 40AE16152A93A99700E14536 /* CGSTile.h in Headers */, 256 | 40AE161B2A93A99700E14536 /* CGSAccessibility.h in Headers */, 257 | 40AE161F2A93A99700E14536 /* CGSCursor.h in Headers */, 258 | 40AE16242A93A99700E14536 /* CGSConnection.h in Headers */, 259 | 403D9EE92A94496400F278F2 /* Silica.h in Headers */, 260 | 40AE16212A93A99700E14536 /* CGSDisplays.h in Headers */, 261 | 40AE16282A93A99700E14536 /* CGSEvent.h in Headers */, 262 | 4063AFDA17FB937A00E942E2 /* SISystemWideElement.h in Headers */, 263 | 40FC6ACC17FA599C00856CE7 /* SIApplication.h in Headers */, 264 | 40AE16232A93A99700E14536 /* CGSCIFilter.h in Headers */, 265 | 40AE16182A93A99700E14536 /* CGSRegion.h in Headers */, 266 | 40AE161E2A93A99700E14536 /* CGSWindow.h in Headers */, 267 | 942474E417DF693600BF9B61 /* SIUniversalAccessHelper.h in Headers */, 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXHeadersBuildPhase section */ 272 | 273 | /* Begin PBXNativeTarget section */ 274 | 942474B417DF67D700BF9B61 /* Silica */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = 942474CA17DF67D700BF9B61 /* Build configuration list for PBXNativeTarget "Silica" */; 277 | buildPhases = ( 278 | 942474B017DF67D700BF9B61 /* Sources */, 279 | 942474B117DF67D700BF9B61 /* Frameworks */, 280 | 942474B217DF67D700BF9B61 /* Headers */, 281 | 942474B317DF67D700BF9B61 /* Resources */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | ); 287 | name = Silica; 288 | productName = Silica; 289 | productReference = 942474B517DF67D700BF9B61 /* Silica.framework */; 290 | productType = "com.apple.product-type.framework"; 291 | }; 292 | /* End PBXNativeTarget section */ 293 | 294 | /* Begin PBXProject section */ 295 | 942474AC17DF67D700BF9B61 /* Project object */ = { 296 | isa = PBXProject; 297 | attributes = { 298 | BuildIndependentTargetsInParallel = YES; 299 | LastUpgradeCheck = 1430; 300 | ORGANIZATIONNAME = SiO2; 301 | TargetAttributes = { 302 | 942474B417DF67D700BF9B61 = { 303 | LastSwiftMigration = 1430; 304 | }; 305 | }; 306 | }; 307 | buildConfigurationList = 942474AF17DF67D700BF9B61 /* Build configuration list for PBXProject "Silica" */; 308 | compatibilityVersion = "Xcode 3.2"; 309 | developmentRegion = en; 310 | hasScannedForEncodings = 0; 311 | knownRegions = ( 312 | en, 313 | Base, 314 | ); 315 | mainGroup = 942474AB17DF67D700BF9B61; 316 | productRefGroup = 942474B617DF67D700BF9B61 /* Products */; 317 | projectDirPath = ""; 318 | projectRoot = ""; 319 | targets = ( 320 | 942474B417DF67D700BF9B61 /* Silica */, 321 | ); 322 | }; 323 | /* End PBXProject section */ 324 | 325 | /* Begin PBXResourcesBuildPhase section */ 326 | 942474B317DF67D700BF9B61 /* Resources */ = { 327 | isa = PBXResourcesBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | 942474C317DF67D700BF9B61 /* InfoPlist.strings in Resources */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | /* End PBXResourcesBuildPhase section */ 335 | 336 | /* Begin PBXSourcesBuildPhase section */ 337 | 942474B017DF67D700BF9B61 /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | 4063AFDB17FB937A00E942E2 /* SISystemWideElement.m in Sources */, 342 | 40FC6AD517FA606A00856CE7 /* NSRunningApplication+Silica.m in Sources */, 343 | 40FC6ACD17FA599C00856CE7 /* SIApplication.m in Sources */, 344 | 40FC6AD117FA5A1B00856CE7 /* SIAccessibilityElement.m in Sources */, 345 | 942474D317DF690700BF9B61 /* SIWindow.m in Sources */, 346 | 942474D517DF690700BF9B61 /* NSScreen+Silica.m in Sources */, 347 | 942474E517DF693600BF9B61 /* SIUniversalAccessHelper.m in Sources */, 348 | ); 349 | runOnlyForDeploymentPostprocessing = 0; 350 | }; 351 | /* End PBXSourcesBuildPhase section */ 352 | 353 | /* Begin PBXVariantGroup section */ 354 | 942474C117DF67D700BF9B61 /* InfoPlist.strings */ = { 355 | isa = PBXVariantGroup; 356 | children = ( 357 | 942474C217DF67D700BF9B61 /* en */, 358 | ); 359 | name = InfoPlist.strings; 360 | sourceTree = ""; 361 | }; 362 | /* End PBXVariantGroup section */ 363 | 364 | /* Begin XCBuildConfiguration section */ 365 | 942474C817DF67D700BF9B61 /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 369 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 370 | CLANG_CXX_LIBRARY = "libc++"; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 373 | CLANG_WARN_BOOL_CONVERSION = YES; 374 | CLANG_WARN_COMMA = YES; 375 | CLANG_WARN_CONSTANT_CONVERSION = YES; 376 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 377 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 378 | CLANG_WARN_EMPTY_BODY = YES; 379 | CLANG_WARN_ENUM_CONVERSION = YES; 380 | CLANG_WARN_INFINITE_RECURSION = YES; 381 | CLANG_WARN_INT_CONVERSION = YES; 382 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 384 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 385 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 386 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 387 | CLANG_WARN_STRICT_PROTOTYPES = YES; 388 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 389 | CLANG_WARN_UNREACHABLE_CODE = YES; 390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 391 | COPY_PHASE_STRIP = NO; 392 | DEAD_CODE_STRIPPING = YES; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | ENABLE_TESTABILITY = YES; 395 | GCC_C_LANGUAGE_STANDARD = gnu99; 396 | GCC_DYNAMIC_NO_PIC = NO; 397 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 398 | GCC_NO_COMMON_BLOCKS = YES; 399 | GCC_OPTIMIZATION_LEVEL = 0; 400 | GCC_PREPROCESSOR_DEFINITIONS = ( 401 | "DEBUG=1", 402 | "$(inherited)", 403 | ); 404 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | MACOSX_DEPLOYMENT_TARGET = 10.8; 413 | ONLY_ACTIVE_ARCH = YES; 414 | SDKROOT = macosx; 415 | SWIFT_VERSION = 5.0; 416 | }; 417 | name = Debug; 418 | }; 419 | 942474C917DF67D700BF9B61 /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | buildSettings = { 422 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 423 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 424 | CLANG_CXX_LIBRARY = "libc++"; 425 | CLANG_ENABLE_OBJC_ARC = YES; 426 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 427 | CLANG_WARN_BOOL_CONVERSION = YES; 428 | CLANG_WARN_COMMA = YES; 429 | CLANG_WARN_CONSTANT_CONVERSION = YES; 430 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 431 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 432 | CLANG_WARN_EMPTY_BODY = YES; 433 | CLANG_WARN_ENUM_CONVERSION = YES; 434 | CLANG_WARN_INFINITE_RECURSION = YES; 435 | CLANG_WARN_INT_CONVERSION = YES; 436 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 437 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 438 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 439 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 440 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 441 | CLANG_WARN_STRICT_PROTOTYPES = YES; 442 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 443 | CLANG_WARN_UNREACHABLE_CODE = YES; 444 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 445 | COPY_PHASE_STRIP = YES; 446 | DEAD_CODE_STRIPPING = YES; 447 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 448 | ENABLE_STRICT_OBJC_MSGSEND = YES; 449 | GCC_C_LANGUAGE_STANDARD = gnu99; 450 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 451 | GCC_NO_COMMON_BLOCKS = YES; 452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 453 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 454 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 455 | GCC_WARN_UNDECLARED_SELECTOR = YES; 456 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 457 | GCC_WARN_UNUSED_FUNCTION = YES; 458 | GCC_WARN_UNUSED_VARIABLE = YES; 459 | MACOSX_DEPLOYMENT_TARGET = 10.8; 460 | SDKROOT = macosx; 461 | SWIFT_COMPILATION_MODE = wholemodule; 462 | SWIFT_VERSION = 5.0; 463 | }; 464 | name = Release; 465 | }; 466 | 942474CB17DF67D700BF9B61 /* Debug */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | CLANG_ENABLE_MODULES = YES; 470 | COMBINE_HIDPI_IMAGES = YES; 471 | DEAD_CODE_STRIPPING = YES; 472 | DEFINES_MODULE = YES; 473 | DYLIB_COMPATIBILITY_VERSION = 1; 474 | DYLIB_CURRENT_VERSION = 1; 475 | ENABLE_MODULE_VERIFIER = YES; 476 | FRAMEWORK_VERSION = A; 477 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 478 | GCC_PREFIX_HEADER = "Silica/Silica-Prefix.pch"; 479 | HEADER_SEARCH_PATHS = "Silica/Sources/**"; 480 | INFOPLIST_FILE = "Silica/Silica-Info.plist"; 481 | MACOSX_DEPLOYMENT_TARGET = 10.15; 482 | MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; 483 | MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11"; 484 | PRODUCT_BUNDLE_IDENTIFIER = "org.sio2.${PRODUCT_NAME:rfc1034identifier}"; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 487 | WRAPPER_EXTENSION = framework; 488 | }; 489 | name = Debug; 490 | }; 491 | 942474CC17DF67D700BF9B61 /* Release */ = { 492 | isa = XCBuildConfiguration; 493 | buildSettings = { 494 | CLANG_ENABLE_MODULES = YES; 495 | COMBINE_HIDPI_IMAGES = YES; 496 | DEAD_CODE_STRIPPING = YES; 497 | DEFINES_MODULE = YES; 498 | DYLIB_COMPATIBILITY_VERSION = 1; 499 | DYLIB_CURRENT_VERSION = 1; 500 | ENABLE_MODULE_VERIFIER = YES; 501 | FRAMEWORK_VERSION = A; 502 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 503 | GCC_PREFIX_HEADER = "Silica/Silica-Prefix.pch"; 504 | HEADER_SEARCH_PATHS = "Silica/Sources/**"; 505 | INFOPLIST_FILE = "Silica/Silica-Info.plist"; 506 | MACOSX_DEPLOYMENT_TARGET = 10.15; 507 | MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; 508 | MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11"; 509 | PRODUCT_BUNDLE_IDENTIFIER = "org.sio2.${PRODUCT_NAME:rfc1034identifier}"; 510 | PRODUCT_NAME = "$(TARGET_NAME)"; 511 | WRAPPER_EXTENSION = framework; 512 | }; 513 | name = Release; 514 | }; 515 | /* End XCBuildConfiguration section */ 516 | 517 | /* Begin XCConfigurationList section */ 518 | 942474AF17DF67D700BF9B61 /* Build configuration list for PBXProject "Silica" */ = { 519 | isa = XCConfigurationList; 520 | buildConfigurations = ( 521 | 942474C817DF67D700BF9B61 /* Debug */, 522 | 942474C917DF67D700BF9B61 /* Release */, 523 | ); 524 | defaultConfigurationIsVisible = 0; 525 | defaultConfigurationName = Release; 526 | }; 527 | 942474CA17DF67D700BF9B61 /* Build configuration list for PBXNativeTarget "Silica" */ = { 528 | isa = XCConfigurationList; 529 | buildConfigurations = ( 530 | 942474CB17DF67D700BF9B61 /* Debug */, 531 | 942474CC17DF67D700BF9B61 /* Release */, 532 | ); 533 | defaultConfigurationIsVisible = 0; 534 | defaultConfigurationName = Release; 535 | }; 536 | /* End XCConfigurationList section */ 537 | }; 538 | rootObject = 942474AC17DF67D700BF9B61 /* Project object */; 539 | } 540 | -------------------------------------------------------------------------------- /Silica.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Silica.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Silica.xcodeproj/project.xcworkspace/xcshareddata/Silica.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 20CEAEAA-5F8D-45D1-A695-E06696EA92DC 9 | IDESourceControlProjectName 10 | Silica 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | BE91C9C5ADF3ADEE2969E31AF581A0C779CC0273 14 | https://github.com/ianyh/Silica.git 15 | 16 | IDESourceControlProjectPath 17 | Silica.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | BE91C9C5ADF3ADEE2969E31AF581A0C779CC0273 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/ianyh/Silica.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | BE91C9C5ADF3ADEE2969E31AF581A0C779CC0273 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | BE91C9C5ADF3ADEE2969E31AF581A0C779CC0273 36 | IDESourceControlWCCName 37 | Silica 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Silica/Silica-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSHumanReadableCopyright 26 | Copyright © 2013 SiO2. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Silica/Silica-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Silica' target in the 'Silica' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Silica/Silica.h: -------------------------------------------------------------------------------- 1 | // 2 | // Silica.h 3 | // Silica 4 | // 5 | // Created by Steven on 9/10/13. 6 | // Copyright (c) 2013 SiO2. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | #import "CGSConnection.h" 14 | #import "CGSDisplays.h" 15 | #import "CGSSpace.h" 16 | #import "NSRunningApplication+Silica.h" 17 | #import "NSScreen+Silica.h" 18 | #import "SIAccessibilityElement.h" 19 | #import "SIApplication.h" 20 | #import "SISystemWideElement.h" 21 | #import "SIUniversalAccessHelper.h" 22 | #import "SIWindow.h" 23 | -------------------------------------------------------------------------------- /Silica/Sources/NSRunningApplication+Silica.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSRunningApplication+Manageable.h 3 | // Silica 4 | // 5 | 6 | #import 7 | 8 | /** 9 | * A category defining helper methods on NSRunningApplication that are generally useful for window management. 10 | */ 11 | @interface NSRunningApplication (Silica) 12 | 13 | /** 14 | * Returns a BOOL indicating whether or not the application is an agent. 15 | * 16 | * @return YES if the application is an agent and NO otherwise. 17 | */ 18 | - (BOOL)isAgent; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Silica/Sources/NSRunningApplication+Silica.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSRunningApplication+Manageable.m 3 | // Silica 4 | // 5 | 6 | #import "NSRunningApplication+Silica.h" 7 | 8 | @implementation NSRunningApplication (Silica) 9 | 10 | - (BOOL)isAgent { 11 | if (self.bundleURL == nil) { 12 | return NO; 13 | } 14 | NSBundle *bundle = [NSBundle bundleWithURL:self.bundleURL]; 15 | if (bundle.infoDictionary == nil) { 16 | return NO; 17 | } 18 | return [bundle.infoDictionary[@"LSUIElement"] boolValue]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Silica/Sources/NSScreen+Silica.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSScreen+Silica.h 3 | // Silica 4 | // 5 | 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | * A category defining helper methods on NSScreen that are generally useful for window management. 13 | */ 14 | @interface NSScreen (Silica) 15 | 16 | /** 17 | * Returns the frame of the screen adjusted to a global coordinate system. 18 | * 19 | * @return The frame of the screen adjusted to a global coordinate system. 20 | */ 21 | - (CGRect)frameIncludingDockAndMenu; 22 | 23 | /** 24 | * Returns the frame of the screen adjusted to a global coordinate system and adjusted to not include the dock or the menu. 25 | * 26 | * @return The frame of the screen adjusted to a global coordinate system and adjusted to not include the dock or the menu. 27 | */ 28 | - (CGRect)frameWithoutDockOrMenu; 29 | 30 | /** 31 | * Returns the next screen in the global coordinate space. 32 | * 33 | * @return The next screen in the global coordinate space. 34 | */ 35 | - (NSScreen *)nextScreen; 36 | 37 | /** 38 | * Returns the previous screen in the global coordinate space. 39 | * 40 | * @return The previous screen in the global coordinate space. 41 | */ 42 | - (NSScreen *)previousScreen; 43 | 44 | /** 45 | * Rotates the screen by the supplied degrees. 46 | * 47 | * @param degrees An integer expected to be one of (0, 90, 180, 270) 48 | * 49 | * @return YES if the rotation was successful and NO otherwise. 50 | */ 51 | - (BOOL)rotateTo:(int)degrees; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Silica/Sources/NSScreen+Silica.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSScreen+Silica.m 3 | // Silica 4 | // 5 | 6 | #import "NSScreen+Silica.h" 7 | 8 | @implementation NSScreen (Silica) 9 | 10 | + (NSScreen *)originScreen { 11 | for (NSScreen *screen in self.screens) { 12 | if (CGPointEqualToPoint(screen.frame.origin, CGPointZero)) { 13 | return screen; 14 | } 15 | } 16 | return nil; 17 | } 18 | 19 | - (CGRect)frameIncludingDockAndMenu { 20 | NSScreen *primaryScreen = [NSScreen originScreen]; 21 | CGRect f = self.frame; 22 | f.origin.y = NSHeight([primaryScreen frame]) - NSHeight(f) - f.origin.y; 23 | return f; 24 | } 25 | 26 | - (CGRect)frameWithoutDockOrMenu { 27 | NSScreen *primaryScreen = [NSScreen originScreen]; 28 | CGRect f = [self visibleFrame]; 29 | f.origin.y = NSHeight([primaryScreen frame]) - NSHeight(f) - f.origin.y; 30 | return f; 31 | } 32 | 33 | - (BOOL)rotateTo:(int)degrees { 34 | int rotation = kIOScaleRotate0; 35 | 36 | if (degrees == 0) 37 | rotation = kIOScaleRotate0; 38 | else if (degrees == 90) 39 | rotation = kIOScaleRotate0; 40 | else if (degrees == 180) 41 | rotation = kIOScaleRotate0; 42 | else if (degrees == 270) 43 | rotation = kIOScaleRotate0; 44 | 45 | NSRect frame = [self frame]; 46 | 47 | CGDirectDisplayID displays[50]; 48 | CGDisplayCount displayCount; 49 | CGError err = CGGetDisplaysWithRect(frame, 50, displays, &displayCount); 50 | 51 | if (err != kCGErrorSuccess || displayCount != 1) 52 | return NO; 53 | 54 | io_service_t service = CGDisplayIOServicePort(displays[0]); 55 | IOOptionBits options = (0x00000400 | (rotation) << 16); 56 | IOServiceRequestProbe(service, options); 57 | 58 | return YES; 59 | } 60 | 61 | - (NSScreen *)nextScreen { 62 | NSArray *screens = [NSScreen screens]; 63 | NSUInteger idx = [screens indexOfObject:self]; 64 | 65 | idx += 1; 66 | if (idx == [screens count]) 67 | idx = 0; 68 | 69 | return [screens objectAtIndex:idx]; 70 | } 71 | 72 | - (NSScreen *)previousScreen { 73 | NSArray *screens = [NSScreen screens]; 74 | NSUInteger idx = [screens indexOfObject:self]; 75 | 76 | idx -= 1; 77 | if (idx == -1) 78 | idx = [screens count] - 1; 79 | 80 | return [screens objectAtIndex:idx]; 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Silica/Sources/SIAccessibilityElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIAccessibilityElement.h 3 | // Silica 4 | // 5 | 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @class SIApplication; 12 | 13 | /** 14 | * Object encapsulating an accessibility element. An accessibility element is anything from a button in a window to a running application. 15 | */ 16 | @interface SIAccessibilityElement : NSObject 17 | 18 | /** 19 | * The C-level accessibility element. 20 | * 21 | * This is exposed primarily for the purposes of subclassing. 22 | */ 23 | @property (nonatomic, assign, readonly) AXUIElementRef axElementRef; 24 | 25 | /** 26 | * :nodoc: 27 | */ 28 | - (instancetype)init NS_UNAVAILABLE; 29 | 30 | /** 31 | * Initializes the receiver as a wrapper around the supplied accessibility reference. 32 | * 33 | * This is the designated initializer of this class. 34 | * 35 | * @param axElementRef The accessibility element that is being encapsulated. Must not be nil. 36 | * 37 | * @return A SIAccessibilityElement instance encapsulating the supplied AXUIElement. 38 | */ 39 | - (instancetype)initWithAXElement:(AXUIElementRef)axElementRef; 40 | 41 | /** 42 | * Returns a BOOL indicating whether or not the element can be resized. 43 | * 44 | * @return YES if the element can be resized and NO otherwise. 45 | */ 46 | - (BOOL)isResizable; 47 | 48 | /** 49 | * Returns a BOOL indicating whether or not the element can be moved. 50 | * 51 | * @return YES if the element can be resized and NO otherwise. 52 | */ 53 | - (BOOL)isMovable; 54 | 55 | /** 56 | * Returns the string value corresponding to the supplied key. 57 | * 58 | * @param accessibilityValueKey The accessibility key to get the value from. 59 | * 60 | * @return The string value corresponding to the supplied key. The return value is nil if the attribute does not exist or if the attribute is not a string. 61 | */ 62 | - (nullable NSString *)stringForKey:(CFStringRef)accessibilityValueKey; 63 | 64 | /** 65 | * Returns the number value corresponding to the supplied key. 66 | * 67 | * @param accessibilityValueKey The accessibility key to get the value from. 68 | * 69 | * @return The number value corresponding to the supplied key. The return value is nil if the attribute does not exist or if the attribute is not a number. 70 | */ 71 | - (nullable NSNumber *)numberForKey:(CFStringRef)accessibilityValueKey; 72 | 73 | /** 74 | * Returns the array value corresponding to the supplied key. 75 | * 76 | * @param accessibilityValueKey The accessibility key to get the value from. 77 | * 78 | * @return The array value corresponding to the supplied key. The return value is nil if the attribute does not exist or if the attribute is not an array. 79 | */ 80 | - (nullable NSArray *)arrayForKey:(CFStringRef)accessibilityValueKey; 81 | 82 | /** 83 | * Returns the accessibility element corresponding to the supplied key. 84 | * 85 | * @param accessibilityValueKey The accessibility key to get the value from. 86 | * 87 | * @return The accessibility element corresponding to the supplied key. The return value is nil if the attribute does not exist or if the attribute is not an accessibility element. 88 | */ 89 | - (nullable SIAccessibilityElement *)elementForKey:(CFStringRef)accessibilityValueKey; 90 | 91 | /** 92 | * Returns the frame of the accessibility element. 93 | * 94 | * @return The frame of the accessibility element or CGRectNull if the element has no frame. 95 | */ 96 | - (CGRect)frame; 97 | 98 | /** 99 | * Updates the frame of the accessibility element. 100 | * 101 | * Updates the frame of the accessibility element to match the input frame as closely as possible given known parameters. 102 | * 103 | * The frame's size may be ignored if the size is not appreciably different from the current size. 104 | * 105 | * @param frame The frame to move the element to. 106 | */ 107 | - (void)setFrame:(CGRect)frame; 108 | 109 | /** 110 | * Updates the frame of the accessibility element. 111 | * 112 | * Updates the frame of the accessibility element to match the input frame as closely as possible given known parameters. 113 | * 114 | * The frame's size will be ignored if its difference from the current frame is below the given threshold. 115 | * 116 | * @param frame The frame to move the element to. 117 | * @param threshold The size difference (from curent size) below which resize requests will be ignored 118 | */ 119 | - (void)setFrame:(CGRect)frame withThreshold:(CGSize)threshold; 120 | 121 | /** 122 | * Updates the position of the accessibility element. 123 | * 124 | * @param position The point to move the accessibility element to. 125 | */ 126 | - (void)setPosition:(CGPoint)position; 127 | 128 | /** 129 | * Updates the size of the accessibility element. 130 | * 131 | * @warning There are cases in which this method may fail. Accessibility seems to fail under a variety of conditions (e.g., increasing height while decreasing width). Callers should generally avoid calling this method and call setFrame: instead. 132 | * 133 | * @param size The size to fit the accessibility element to. 134 | */ 135 | - (void)setSize:(CGSize)size; 136 | 137 | /** 138 | * Enables enhanced user interface 139 | * 140 | * @param accessibilityValueKey The accessibility key to get the value from. 141 | * 142 | * @return YES if success, NO otherwise. 143 | * 144 | */ 145 | - (BOOL)setFlag:(BOOL)flag forKey:(CFStringRef)accessibilityValueKey; 146 | 147 | /** 148 | * Returns the pid of the process that owns the accessibility element. 149 | * 150 | * @return The pid of the process that owns the accessibility element. 151 | */ 152 | - (pid_t)processIdentifier; 153 | 154 | /** 155 | * Returns the application that owns the element. 156 | * 157 | * @return A SIApplication instance for the application that owns the element. 158 | */ 159 | - (nullable SIApplication *)app; 160 | 161 | @end 162 | 163 | NS_ASSUME_NONNULL_END 164 | -------------------------------------------------------------------------------- /Silica/Sources/SIAccessibilityElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIAccessibilityElement.m 3 | // Silica 4 | // 5 | 6 | #import 7 | #import "SIAccessibilityElement.h" 8 | #import "SIApplication.h" 9 | 10 | #define kAXEnhancedUserInterfaceKey CFSTR("AXEnhancedUserInterface") 11 | 12 | @interface SIAccessibilityElement () 13 | @property (nonatomic, assign) AXUIElementRef axElementRef; 14 | @end 15 | 16 | @implementation SIAccessibilityElement 17 | 18 | #pragma mark Lifecycle 19 | 20 | - (instancetype)init { return nil; } 21 | 22 | - (instancetype)initWithAXElement:(AXUIElementRef)axElementRef { 23 | self = [super init]; 24 | if (self) { 25 | self.axElementRef = CFRetain(axElementRef); 26 | } 27 | return self; 28 | } 29 | 30 | - (void)dealloc { 31 | CFRelease(_axElementRef); 32 | } 33 | 34 | #pragma mark NSObject 35 | 36 | - (NSString *)description { 37 | return [NSString stringWithFormat:@"%@ ", super.description, [self stringForKey:kAXTitleAttribute], self.processIdentifier]; 38 | } 39 | 40 | - (BOOL)isEqual:(id)object { 41 | if (!object) 42 | return NO; 43 | 44 | if (![object isKindOfClass:[self class]]) 45 | return NO; 46 | 47 | SIAccessibilityElement *otherElement = object; 48 | if (CFEqual(self.axElementRef, otherElement.axElementRef)) 49 | return YES; 50 | 51 | return NO; 52 | } 53 | 54 | - (NSUInteger)hash { 55 | return CFHash(self.axElementRef); 56 | } 57 | 58 | #pragma mark NSCopying 59 | 60 | - (id)copyWithZone:(NSZone *)zone { 61 | return [[[self class] allocWithZone:zone] initWithAXElement:self.axElementRef]; 62 | } 63 | 64 | #pragma mark Public Accessors 65 | 66 | - (BOOL)isResizable { 67 | Boolean sizeWriteable = false; 68 | AXError error = AXUIElementIsAttributeSettable(self.axElementRef, kAXSizeAttribute, &sizeWriteable); 69 | if (error != kAXErrorSuccess) return NO; 70 | 71 | return sizeWriteable; 72 | } 73 | 74 | - (BOOL)isMovable { 75 | Boolean positionWriteable = false; 76 | AXError error = AXUIElementIsAttributeSettable(self.axElementRef, kAXPositionAttribute, &positionWriteable); 77 | if (error != kAXErrorSuccess) return NO; 78 | 79 | return positionWriteable; 80 | } 81 | 82 | - (NSString *)stringForKey:(CFStringRef)accessibilityValueKey { 83 | CFTypeRef valueRef; 84 | AXError error; 85 | 86 | error = AXUIElementCopyAttributeValue(self.axElementRef, accessibilityValueKey, &valueRef); 87 | 88 | if (error != kAXErrorSuccess || !valueRef) return nil; 89 | if (CFGetTypeID(valueRef) != CFStringGetTypeID()) return nil; 90 | 91 | return CFBridgingRelease(valueRef); 92 | } 93 | 94 | - (NSNumber *)numberForKey:(CFStringRef)accessibilityValueKey { 95 | CFTypeRef valueRef; 96 | AXError error; 97 | 98 | error = AXUIElementCopyAttributeValue(self.axElementRef, accessibilityValueKey, &valueRef); 99 | 100 | if (error != kAXErrorSuccess || !valueRef) return nil; 101 | if (CFGetTypeID(valueRef) != CFNumberGetTypeID() && CFGetTypeID(valueRef) != CFBooleanGetTypeID()) return nil; 102 | 103 | return CFBridgingRelease(valueRef); 104 | } 105 | 106 | - (NSArray *)arrayForKey:(CFStringRef)accessibilityValueKey { 107 | CFArrayRef arrayRef; 108 | AXError error; 109 | 110 | error = AXUIElementCopyAttributeValues(self.axElementRef, accessibilityValueKey, 0, 100, &arrayRef); 111 | 112 | if (error != kAXErrorSuccess || !arrayRef) return nil; 113 | 114 | return CFBridgingRelease(arrayRef); 115 | } 116 | 117 | - (SIAccessibilityElement *)elementForKey:(CFStringRef)accessibilityValueKey { 118 | CFTypeRef valueRef; 119 | AXError error; 120 | 121 | error = AXUIElementCopyAttributeValue(self.axElementRef, accessibilityValueKey, &valueRef); 122 | 123 | if (error != kAXErrorSuccess || !valueRef) return nil; 124 | if (CFGetTypeID(valueRef) != AXUIElementGetTypeID()) return nil; 125 | 126 | SIAccessibilityElement *element = [[SIAccessibilityElement alloc] initWithAXElement:(AXUIElementRef)valueRef]; 127 | 128 | CFRelease(valueRef); 129 | 130 | return element; 131 | } 132 | 133 | - (CGRect)frame { 134 | CFTypeRef pointRef; 135 | CFTypeRef sizeRef; 136 | AXError error; 137 | 138 | error = AXUIElementCopyAttributeValue(self.axElementRef, kAXPositionAttribute, &pointRef); 139 | if (error != kAXErrorSuccess || !pointRef) return CGRectNull; 140 | 141 | error = AXUIElementCopyAttributeValue(self.axElementRef, kAXSizeAttribute, &sizeRef); 142 | if (error != kAXErrorSuccess || !sizeRef) return CGRectNull; 143 | 144 | CGPoint point; 145 | CGSize size; 146 | bool success; 147 | 148 | success = AXValueGetValue(pointRef, kAXValueCGPointType, &point); 149 | if (!success) return CGRectNull; 150 | 151 | success = AXValueGetValue(sizeRef, kAXValueCGSizeType, &size); 152 | if (!success) return CGRectNull; 153 | 154 | CGRect frame = { .origin.x = point.x, .origin.y = point.y, .size.width = size.width, .size.height = size.height }; 155 | 156 | return frame; 157 | } 158 | 159 | - (void)setFrame:(CGRect)frame { 160 | CGSize threshold = { .width = 25, .height = 25 }; 161 | [self setFrame:frame withThreshold:threshold]; 162 | } 163 | 164 | - (void)setFrame:(CGRect)frame withThreshold:(CGSize)threshold { 165 | // We only want to set the size if the size has actually changed more than a given amount. 166 | CGRect currentFrame = self.frame; 167 | BOOL shouldSetSize = self.isResizable 168 | && (fabs(currentFrame.size.width - frame.size.width) >= threshold.width 169 | || fabs(currentFrame.size.height - frame.size.height) >= threshold.height); 170 | 171 | SIApplication *application = [self app]; 172 | BOOL flag = [[application numberForKey:kAXEnhancedUserInterfaceKey] boolValue]; 173 | if (flag) { 174 | [application setFlag:NO forKey:kAXEnhancedUserInterfaceKey]; 175 | } 176 | 177 | // We set the size before and after setting the position because the 178 | // accessibility APIs are really finicky with setting size. 179 | // Note: this still occasionally silently fails to set the correct size. 180 | if (shouldSetSize) { 181 | self.size = frame.size; 182 | } 183 | 184 | if (!CGPointEqualToPoint(currentFrame.origin, frame.origin)) { 185 | self.position = frame.origin; 186 | } 187 | 188 | if (shouldSetSize) { 189 | self.size = frame.size; 190 | } 191 | 192 | if (flag) { 193 | [application setFlag:flag forKey:kAXEnhancedUserInterfaceKey]; 194 | } 195 | } 196 | 197 | - (void)setPosition:(CGPoint)position { 198 | AXValueRef positionRef = AXValueCreate(kAXValueCGPointType, &position); 199 | AXError error; 200 | 201 | if (!CGPointEqualToPoint(position, [self frame].origin)) { 202 | error = AXUIElementSetAttributeValue(self.axElementRef, kAXPositionAttribute, positionRef); 203 | if (error != kAXErrorSuccess) { 204 | return; 205 | } 206 | } 207 | } 208 | 209 | - (void)setSize:(CGSize)size { 210 | AXValueRef sizeRef = AXValueCreate(kAXValueCGSizeType, &size); 211 | AXError error; 212 | 213 | if (!CGSizeEqualToSize(size, [self frame].size)) { 214 | error = AXUIElementSetAttributeValue(self.axElementRef, kAXSizeAttribute, sizeRef); 215 | if (error != kAXErrorSuccess) { 216 | return; 217 | } 218 | } 219 | } 220 | 221 | - (BOOL)setFlag:(BOOL)flag forKey:(CFStringRef)accessibilityValueKey { 222 | AXError error; 223 | 224 | error = AXUIElementSetAttributeValue(self.axElementRef, accessibilityValueKey, flag ? kCFBooleanTrue : kCFBooleanFalse); 225 | 226 | return error != kAXErrorSuccess; 227 | } 228 | 229 | - (pid_t)processIdentifier { 230 | pid_t processIdentifier; 231 | AXError error; 232 | 233 | error = AXUIElementGetPid(self.axElementRef, &processIdentifier); 234 | 235 | if (error != kAXErrorSuccess) return -1; 236 | 237 | return processIdentifier; 238 | } 239 | 240 | - (SIApplication *)app { 241 | NSRunningApplication *runningApplication = [NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier]; 242 | if (!runningApplication) { 243 | return nil; 244 | } 245 | return [SIApplication applicationWithRunningApplication:runningApplication]; 246 | } 247 | 248 | @end 249 | -------------------------------------------------------------------------------- /Silica/Sources/SIApplication.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIApplication.h 3 | // Silica 4 | // 5 | 6 | #import 7 | #import "SIAccessibilityElement.h" 8 | #import "SIWindow.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /** 13 | * Block type for the handling of accessibility notifications. 14 | * 15 | * @param accessibilityElement The accessibility element that the accessibility notification pertains to. Will always be an element either owned by the application or the application itself. 16 | */ 17 | typedef void (^SIAXNotificationHandler)(SIAccessibilityElement *accessibilityElement); 18 | 19 | /** 20 | * Accessibility wrapper for application elements. 21 | */ 22 | @interface SIApplication : SIAccessibilityElement 23 | 24 | /** 25 | * Attempts to construct an accessibility wrapper from an NSRunningApplication instance. 26 | * 27 | * @param runningApplication A running application in the shared workspace. 28 | * 29 | * @return A SIApplication instance if an accessibility element could be constructed from the running application instance. Returns nil otherwise. 30 | */ 31 | + (instancetype)applicationWithRunningApplication:(NSRunningApplication *)runningApplication; 32 | 33 | /** 34 | * Returns all SIApplication instaces for all running applications. 35 | * 36 | * @return All SIApplication instaces for all running applications. 37 | */ 38 | + (nullable NSArray *)runningApplications; 39 | 40 | /** 41 | * Registers a notification handler for an accessibility notification. 42 | * 43 | * Note that a strong reference to the handler is maintained, so any memory captured by the block will not be released until the notification handler is unregistered by calling unobserveNotification:withElement: 44 | * 45 | * @param notification The notification to register a handler for. 46 | * @param accessibilityElement The accessibility element associated with the notification. Must be an element owned by the application or the application itself. 47 | * @param handler A block to be called when the notification is received for the accessibility element. 48 | * @return YES if adding the observer succeeded, NO otherwise 49 | */ 50 | - (BOOL)observeNotification:(CFStringRef)notification withElement:(SIAccessibilityElement *)accessibilityElement handler:(SIAXNotificationHandler)handler; 51 | 52 | /** 53 | * Unregisters a notification handler for an accessibility notification. 54 | * 55 | * If a notification handler was previously registered for the notification and accessibility element the application will unregister the notification handler and release its reference to the handler block and any captured state therein. 56 | * 57 | * @param notification The notification to unregister a handler for. 58 | * @param accessibilityElement The accessibility element associated with the notification. Must be an element owned by the application or the application itself. 59 | */ 60 | - (void)unobserveNotification:(CFStringRef)notification withElement:(SIAccessibilityElement *)accessibilityElement; 61 | 62 | /** 63 | * Returns an array of SIWindow objects for all windows in the application. 64 | * 65 | * @return An array of SIWindow objects for all windows in the application. 66 | */ 67 | - (NSArray *)windows; 68 | 69 | /** 70 | * Returns an array of SIWindow objects for all windows in the application that are currently visible. 71 | * 72 | * @return An array of SIWindow objects for all windows in the application that are currently visible. 73 | */ 74 | - (NSArray *)visibleWindows; 75 | 76 | /** 77 | * Returns the title of the application. 78 | * 79 | * @return The title of the application. 80 | */ 81 | - (nullable NSString *)title; 82 | 83 | /** 84 | * Returns a BOOL indicating whether or not the application is hidden. 85 | * 86 | * @return YES if the application is hidden and NO otherwise. 87 | */ 88 | - (BOOL)isHidden; 89 | 90 | /** 91 | * Hides the application. 92 | */ 93 | - (void)hide; 94 | 95 | /** 96 | * Unhides the application. 97 | */ 98 | - (void)unhide; 99 | 100 | /** 101 | * Sends the application a kill signal. 102 | */ 103 | - (void)kill; 104 | 105 | /** 106 | * Sends the application a kill -9 signal. 107 | */ 108 | - (void)kill9; 109 | 110 | /** 111 | * Drops any cached windows so that the windows returned by a call to windows will be representative of the most up to date state of the application. 112 | */ 113 | - (void)dropWindowsCache; 114 | 115 | @end 116 | 117 | NS_ASSUME_NONNULL_END 118 | -------------------------------------------------------------------------------- /Silica/Sources/SIApplication.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIApplication.m 3 | // Silica 4 | // 5 | 6 | #import "SIApplication.h" 7 | 8 | #import 9 | #import "SIWindow.h" 10 | #import "SIUniversalAccessHelper.h" 11 | 12 | @interface SIApplicationObservation : NSObject 13 | @property (nonatomic, strong) NSString *notification; 14 | @property (nonatomic, copy) SIAXNotificationHandler handler; 15 | @end 16 | 17 | @implementation SIApplicationObservation 18 | @end 19 | 20 | @interface SIApplication () 21 | @property (nonatomic, assign) AXObserverRef observerRef; 22 | @property (nonatomic, strong) NSMutableDictionary *elementToObservations; 23 | 24 | @property (nonatomic, strong) NSMutableArray *cachedWindows; 25 | @end 26 | 27 | @implementation SIApplication 28 | 29 | #pragma mark Lifecycle 30 | 31 | + (instancetype)applicationWithRunningApplication:(NSRunningApplication *)runningApplication { 32 | AXUIElementRef axElementRef = AXUIElementCreateApplication(runningApplication.processIdentifier); 33 | SIApplication *application = [[SIApplication alloc] initWithAXElement:axElementRef]; 34 | CFRelease(axElementRef); 35 | return application; 36 | } 37 | 38 | + (NSArray *)runningApplications { 39 | if (![SIUniversalAccessHelper isAccessibilityTrusted]) 40 | return nil; 41 | 42 | NSMutableArray *apps = [NSMutableArray array]; 43 | 44 | for (NSRunningApplication *runningApp in [[NSWorkspace sharedWorkspace] runningApplications]) { 45 | SIApplication *app = [SIApplication applicationWithRunningApplication:runningApp]; 46 | [apps addObject:app]; 47 | } 48 | 49 | return apps; 50 | } 51 | 52 | - (void)dealloc { 53 | if (_observerRef) { 54 | CFRunLoopRemoveSource(CFRunLoopGetMain(), AXObserverGetRunLoopSource(_observerRef), kCFRunLoopDefaultMode); 55 | for (SIAccessibilityElement *element in self.elementToObservations.allKeys) { 56 | for (SIApplicationObservation *observation in self.elementToObservations[element]) { 57 | AXObserverRemoveNotification(_observerRef, element.axElementRef, (__bridge CFStringRef)observation.notification); 58 | } 59 | } 60 | CFRunLoopSourceInvalidate(AXObserverGetRunLoopSource(_observerRef)); 61 | CFRelease(_observerRef); 62 | } 63 | } 64 | 65 | #pragma mark AXObserver 66 | 67 | void observerCallback(AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *refcon) { 68 | SIAXNotificationHandler callback = (__bridge SIAXNotificationHandler)refcon; 69 | SIWindow *window = [[SIWindow alloc] initWithAXElement:element]; 70 | callback(window); 71 | } 72 | 73 | - (BOOL)observeNotification:(CFStringRef)notification withElement:(SIAccessibilityElement *)accessibilityElement handler:(SIAXNotificationHandler)handler { 74 | if (!self.observerRef) { 75 | AXObserverRef observerRef; 76 | AXError error = AXObserverCreate(self.processIdentifier, &observerCallback, &observerRef); 77 | 78 | if (error != kAXErrorSuccess) return NO; 79 | 80 | CFRunLoopAddSource(CFRunLoopGetMain(), AXObserverGetRunLoopSource(observerRef), kCFRunLoopDefaultMode); 81 | 82 | self.observerRef = observerRef; 83 | self.elementToObservations = [NSMutableDictionary dictionaryWithCapacity:1]; 84 | } 85 | 86 | AXError error = AXObserverAddNotification(self.observerRef, accessibilityElement.axElementRef, notification, (__bridge void *)handler); 87 | 88 | if (error != kAXErrorSuccess) return NO; 89 | 90 | SIApplicationObservation *observation = [[SIApplicationObservation alloc] init]; 91 | observation.notification = (__bridge NSString *)notification; 92 | observation.handler = handler; 93 | 94 | if (!self.elementToObservations[accessibilityElement]) { 95 | self.elementToObservations[accessibilityElement] = [NSMutableArray array]; 96 | } 97 | [self.elementToObservations[accessibilityElement] addObject:observation]; 98 | 99 | return YES; 100 | } 101 | 102 | - (void)unobserveNotification:(CFStringRef)notification withElement:(SIAccessibilityElement *)accessibilityElement { 103 | NSArray *observations = self.elementToObservations[accessibilityElement]; 104 | for (SIApplicationObservation *observation in observations) { 105 | AXObserverRemoveNotification(self.observerRef, accessibilityElement.axElementRef, (__bridge CFStringRef)observation.notification); 106 | } 107 | [self.elementToObservations removeObjectForKey:accessibilityElement]; 108 | 109 | if (self.elementToObservations.count == 0 && self.observerRef) { 110 | CFRunLoopSourceInvalidate(AXObserverGetRunLoopSource(self.observerRef)); 111 | self.observerRef = nil; 112 | } 113 | } 114 | 115 | #pragma mark Public Accessors 116 | 117 | - (NSArray *)windows { 118 | if (!self.cachedWindows) { 119 | self.cachedWindows = [NSMutableArray array]; 120 | NSArray *windowRefs = [self arrayForKey:kAXWindowsAttribute]; 121 | for (NSUInteger index = 0; index < windowRefs.count; ++index) { 122 | AXUIElementRef windowRef = (__bridge AXUIElementRef)windowRefs[index]; 123 | SIWindow *window = [[SIWindow alloc] initWithAXElement:windowRef]; 124 | 125 | [self.cachedWindows addObject:window]; 126 | } 127 | } 128 | return self.cachedWindows; 129 | } 130 | 131 | - (NSArray *)visibleWindows { 132 | return [self.windows filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SIWindow *window, NSDictionary *bindings) { 133 | return ![[window app] isHidden] && ![window isWindowMinimized] && [window isNormalWindow]; 134 | }]]; 135 | } 136 | 137 | - (NSString *)title { 138 | return [self stringForKey:kAXTitleAttribute]; 139 | } 140 | 141 | - (BOOL)isHidden { 142 | return [[self numberForKey:kAXHiddenAttribute] boolValue]; 143 | } 144 | 145 | - (void)hide { 146 | [[NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier] hide]; 147 | } 148 | 149 | - (void)unhide { 150 | [[NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier] unhide]; 151 | } 152 | 153 | - (void)kill { 154 | [[NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier] terminate]; 155 | } 156 | 157 | - (void)kill9 { 158 | [[NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier] forceTerminate]; 159 | } 160 | 161 | - (void)dropWindowsCache { 162 | self.cachedWindows = nil; 163 | } 164 | 165 | @end 166 | -------------------------------------------------------------------------------- /Silica/Sources/SISystemWideElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // SISystemWideElement.h 3 | // Silica 4 | // 5 | 6 | #import 7 | #import "SIAccessibilityElement.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | * Wrapper around the system-wide element. 13 | */ 14 | @interface SISystemWideElement : SIAccessibilityElement 15 | 16 | /** 17 | * Returns a globally shared reference to the system-wide accessibility element. 18 | * 19 | * @return A globally shared reference to the system-wide accessibility element. 20 | */ 21 | + (SISystemWideElement *)systemWideElement; 22 | 23 | /** 24 | * Shifts to space at the provided index. 25 | * 26 | * @param space The space to switch to. 27 | */ 28 | + (void)switchToSpace:(NSUInteger)space; 29 | 30 | /** 31 | * Generates an event with the relevant shortcut information to switch to the space at the given index. 32 | * 33 | * @param space The space to switch to. 34 | */ 35 | + (nullable NSEvent *)eventForSwitchingToSpace:(NSUInteger)space; 36 | 37 | /** 38 | * Perform a space switch event. 39 | * 40 | * @param event The event to perform the keyboard shortcut 41 | */ 42 | + (void)switchToSpaceWithEvent:(NSEvent *)event; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Silica/Sources/SISystemWideElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // SISystemWideElement.m 3 | // Silica 4 | // 5 | 6 | #import "SISystemWideElement.h" 7 | 8 | #import 9 | #import "CGSInternal/CGSHotKeys.h" 10 | 11 | @implementation SISystemWideElement 12 | 13 | + (SISystemWideElement *)systemWideElement { 14 | static SISystemWideElement *sharedElement = nil; 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | AXUIElementRef elementRef = AXUIElementCreateSystemWide(); 18 | sharedElement = [[SISystemWideElement alloc] initWithAXElement:elementRef]; 19 | CFRelease(elementRef); 20 | }); 21 | return sharedElement; 22 | } 23 | 24 | + (void)switchToSpace:(NSUInteger)space { 25 | NSEvent *event = [self eventForSwitchingToSpace:space]; 26 | [self switchToSpaceWithEvent:event]; 27 | } 28 | 29 | + (NSEvent *)eventForSwitchingToSpace:(NSUInteger)space { 30 | if (space < 1 || space > 16) return nil; 31 | 32 | CGSSymbolicHotKey hotKey = (unsigned short)(118 + space - 1); 33 | CGSModifierFlags flags; 34 | CGKeyCode keyCode = 0; 35 | CGError error = CGSGetSymbolicHotKeyValue(hotKey, nil, &keyCode, &flags); 36 | 37 | if (error != kCGErrorSuccess) return nil; 38 | 39 | if (!CGSIsSymbolicHotKeyEnabled(hotKey)) { 40 | error = CGSSetSymbolicHotKeyEnabled(hotKey, true); 41 | } 42 | 43 | CGEventRef keyboardEvent = CGEventCreateKeyboardEvent(NULL, keyCode, true); 44 | CGEventSetFlags(keyboardEvent, (CGEventFlags)flags); 45 | 46 | NSEvent *event = [NSEvent eventWithCGEvent:keyboardEvent]; 47 | 48 | CFRelease(keyboardEvent); 49 | 50 | return event; 51 | } 52 | 53 | + (void)switchToSpaceWithEvent:(NSEvent *)event { 54 | if (event == nil) return; 55 | 56 | CGEventRef keyboardEventUp = CGEventCreateKeyboardEvent(NULL, event.keyCode, false); 57 | 58 | CGEventSetFlags(keyboardEventUp, 0); 59 | 60 | // Send the shortcut command to get Mission Control to switch spaces from under the window. 61 | CGEventPost(kCGHIDEventTap, event.CGEvent); 62 | CGEventPost(kCGHIDEventTap, keyboardEventUp); 63 | 64 | CFRelease(keyboardEventUp); 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Silica/Sources/SIUniversalAccessHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIUniversalAccessHelper.h 3 | // Silica 4 | // 5 | 6 | #import 7 | 8 | @interface SIUniversalAccessHelper : NSObject 9 | 10 | /** 11 | * @return YES if the current process has accessibility permissions and NO otherwise. 12 | */ 13 | + (BOOL)isAccessibilityTrusted; 14 | 15 | /** 16 | * @return YES if accessibility is enabled and NO otherwise. 17 | */ 18 | + (BOOL)accessibilityEnabled DEPRECATED_ATTRIBUTE; 19 | 20 | /** 21 | * If accessibility is not enabled presents an alert requesting that the user enable accessibility. 22 | */ 23 | + (void)complainIfNeeded DEPRECATED_ATTRIBUTE; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Silica/Sources/SIUniversalAccessHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIUniversalAccessHelper.m 3 | // Silica 4 | // 5 | 6 | #import 7 | #import "SIUniversalAccessHelper.h" 8 | 9 | @implementation SIUniversalAccessHelper 10 | 11 | + (BOOL)isAccessibilityTrusted { 12 | return AXIsProcessTrustedWithOptions(NULL); 13 | } 14 | 15 | + (BOOL)accessibilityEnabled { 16 | return AXAPIEnabled(); 17 | } 18 | 19 | + (void)complainIfNeeded { 20 | if (!self.isAccessibilityTrusted) { 21 | [NSApp activateIgnoringOtherApps:YES]; 22 | 23 | NSString *applicationName = NSBundle.mainBundle.infoDictionary[(__bridge NSString *)kCFBundleNameKey]; 24 | NSString *alertTitle = [NSString stringWithFormat:@"%@ Requires Universal Access", applicationName]; 25 | NSString *firstLine = [NSString stringWithFormat:@"For %@ to function properly, access for assistive devices must be enabled first.\n\n", applicationName]; 26 | 27 | NSInteger result = NSRunAlertPanel(alertTitle, 28 | firstLine, 29 | @"To enable this feature, click \"Enable access for assistive devices\" in the Universal Access pane of System Preferences.", 30 | @"Open Universal Access", 31 | @"Dismiss", 32 | nil); 33 | 34 | if (result == NSAlertDefaultReturn) { 35 | NSString *src = @"tell application \"System Preferences\"\nactivate\nset current pane to pane \"com.apple.preference.universalaccess\"\nend tell"; 36 | NSAppleScript *a = [[NSAppleScript alloc] initWithSource:src]; 37 | [a executeAndReturnError:nil]; 38 | } 39 | } 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Silica/Sources/SIWindow.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIWindow.h 3 | // Silica 4 | // 5 | 6 | #import 7 | #import "SIAccessibilityElement.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @class SIApplication; 12 | 13 | /** 14 | * Encapsulates a window element. 15 | */ 16 | @interface SIWindow : SIAccessibilityElement 17 | 18 | #pragma mark Window Accessors 19 | /**--------------------------------------------------------------------------------------- 20 | * @name Window Accessors 21 | * --------------------------------------------------------------------------------------- 22 | */ 23 | 24 | /** 25 | * Returns all windows. 26 | * 27 | * @return An array of SIWindow objects representing all windows. 28 | */ 29 | + (nullable NSArray *)allWindows; 30 | 31 | /** 32 | * Returns all windows currently visible. 33 | * 34 | * @return An array of SIWindow objects representing all windows currently visible. 35 | */ 36 | + (nullable NSArray *)visibleWindows; 37 | 38 | /** 39 | * Returns the currently focused window. 40 | * 41 | * @return A SIWindow object representing the currently focused window or nil if no window is focused. 42 | */ 43 | + (nullable SIWindow *)focusedWindow; 44 | 45 | /** 46 | * Takes the window's screen and returns all other windows on the same screen. 47 | * 48 | * @return An array of SIWindow objects representing all other windows on the same screen. 49 | */ 50 | - (nullable NSArray *)otherWindowsOnSameScreen; 51 | 52 | /** 53 | * Returns all other visible windows, excluding the current window. 54 | * 55 | * @return An array of SIWindow objects representing all other windows across all screens. 56 | */ 57 | - (nullable NSArray *)otherWindowsOnAllScreens; 58 | 59 | /** 60 | * Returns all windows in the global coordinate system whose centers lie to the west of the current window's center. 61 | * 62 | * @return An array of SIWindow objects whose centers are to the west of the current window's center. 63 | */ 64 | - (nullable NSArray *)windowsToWest; 65 | 66 | /** 67 | * Returns all windows in the global coordinate system whose centers lie to the east of the current window's center. 68 | * 69 | * @return An array of SIWindow objects whose centers are to the east of the current window's center. 70 | */ 71 | - (nullable NSArray *)windowsToEast; 72 | 73 | /** 74 | * Returns all windows in the global coordinate system whose centers lie to the north of the current window's center. 75 | * 76 | * @return An array of SIWindow objects whose centers are to the north of the current window's center. 77 | */ 78 | - (nullable NSArray *)windowsToNorth; 79 | 80 | /** 81 | * Returns all windows in the global coordinate system whose centers lie to the south of the current window's center. 82 | * 83 | * @return An array of SIWindow objects whose centers are to the south of the current window's center. 84 | */ 85 | - (nullable NSArray *)windowsToSouth; 86 | 87 | #pragma mark Window Properties 88 | /**--------------------------------------------------------------------------------------- 89 | * @name Window Properties 90 | * --------------------------------------------------------------------------------------- 91 | */ 92 | 93 | /** 94 | * Returns the window ID of the window. 95 | * 96 | * @return The window ID of the window. 97 | */ 98 | - (CGWindowID)windowID; 99 | 100 | /** 101 | * Returns the title of the window. 102 | * 103 | * @return The title of the window or nil if the window has no title. 104 | */ 105 | - (nullable NSString *)title; 106 | 107 | /** 108 | * Returns a BOOL indicating whether or not the window is minimized. 109 | * 110 | * @return YES if the window is minimized and NO otherwise. 111 | */ 112 | - (BOOL)isWindowMinimized; 113 | 114 | /** 115 | * Returns a BOOL indicating whether or not the window is normal, i.e., if its role is a standard window. 116 | * 117 | * @return YES if the window is normal and NO otherwise. 118 | */ 119 | - (BOOL)isNormalWindow; 120 | 121 | /** 122 | * Returns a BOOL indicating whether or not the window is a sheet. 123 | * 124 | * @return YES if the window is a sheet and NO otherwise. 125 | */ 126 | - (BOOL)isSheet; 127 | 128 | /** 129 | * Returns a BOOL indicating whether or not the window is active and on screen. 130 | * 131 | * @return YES if the window is active and on screen and NO otherwise. 132 | */ 133 | - (BOOL)isActive; 134 | 135 | /** 136 | * Returns a BOOL indicating whether or not the window is on screen. 137 | * 138 | * @return YES if the window is on screen and NO otherwise. 139 | */ 140 | - (BOOL)isOnScreen; 141 | 142 | #pragma mark Screen 143 | /**--------------------------------------------------------------------------------------- 144 | * @name Screen 145 | * --------------------------------------------------------------------------------------- 146 | */ 147 | 148 | /** 149 | * Returns the screen that the window is most on. The algorithm is area-based such that the screen that contains the most of the window's area is considered to be the window's screen. 150 | * 151 | * @return A NSScreen instance for the screen that the window is most on. 152 | */ 153 | - (nullable NSScreen *)screen; 154 | 155 | /** 156 | * Moves the window to the given screen. 157 | * 158 | * The window is always positioned at the screen's origin. 159 | * 160 | * @param screen The screen on which the window should be moved to. 161 | */ 162 | - (void)moveToScreen:(NSScreen *)screen; 163 | 164 | #pragma mark Space 165 | /**--------------------------------------------------------------------------------------- 166 | * @name Space 167 | * --------------------------------------------------------------------------------------- 168 | */ 169 | 170 | /** 171 | * Moves the window to a given space. The space is provided as a number between 1 and 16, which corresponds to the numerical index of the space defined by Mission Control. 172 | * 173 | * @param space The space on which to move the window. 174 | */ 175 | - (void)moveToSpace:(NSUInteger)space; 176 | 177 | /** 178 | * Moves the window to a space using the shortcut defined by the provided event. 179 | * 180 | * @param event The event used to switch to a given space. 181 | */ 182 | - (void)moveToSpaceWithEvent:(NSEvent *)event; 183 | 184 | #pragma mark Window Actions 185 | /**--------------------------------------------------------------------------------------- 186 | * @name Window Actions 187 | * --------------------------------------------------------------------------------------- 188 | */ 189 | 190 | /** 191 | * Update the frame of the window to encompass the entire screen, excluding dock and menu bar. 192 | */ 193 | - (void)maximize; 194 | 195 | /** 196 | * Minimize the window. 197 | */ 198 | - (void)minimize; 199 | 200 | /** 201 | * Unminimize the window. 202 | */ 203 | - (void)unMinimize; 204 | 205 | #pragma mark Window Focus 206 | /**--------------------------------------------------------------------------------------- 207 | * @name Window Focus 208 | * --------------------------------------------------------------------------------------- 209 | */ 210 | 211 | /** 212 | * Bring the current window into focus. 213 | * 214 | * @return YES if the window was successfully brought into focus and NO otherwise. 215 | */ 216 | - (BOOL)focusWindow; 217 | 218 | /** 219 | Perform a raise action without bringing the application into focus. 220 | @return YES if the window was successfully raised and NO otherwise. 221 | */ 222 | - (BOOL)raiseWindow; 223 | 224 | /** 225 | * Move window focus to the first window to the west of the current window. 226 | */ 227 | - (void)focusWindowLeft; 228 | 229 | /** 230 | * Move window focus to the first window to the east of the current window. 231 | */ 232 | - (void)focusWindowRight; 233 | 234 | /** 235 | * Move window focus to the first window to the north of the current window. 236 | */ 237 | - (void)focusWindowUp; 238 | 239 | /** 240 | * Move window focus to the first window to the south of the current window. 241 | */ 242 | - (void)focusWindowDown; 243 | 244 | @end 245 | 246 | NS_ASSUME_NONNULL_END 247 | -------------------------------------------------------------------------------- /Silica/Sources/SIWindow.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIWindow.m 3 | // Silica 4 | // 5 | 6 | #import "SIWindow.h" 7 | 8 | #import 9 | #import "CGSInternal/CGSConnection.h" 10 | #import "CGSInternal/CGSHotKeys.h" 11 | #import "CGSInternal/CGSSpace.h" 12 | #import "NSScreen+Silica.h" 13 | #import "SIApplication.h" 14 | #import "SISystemWideElement.h" 15 | #import "SIUniversalAccessHelper.h" 16 | 17 | AXError _AXUIElementGetWindow(AXUIElementRef element, CGWindowID *idOut); 18 | 19 | @interface SIWindow () 20 | @property (nonatomic, assign) CGWindowID _windowID; 21 | @end 22 | 23 | @implementation SIWindow 24 | 25 | #pragma mark Window Accessors 26 | 27 | + (NSArray *)allWindows { 28 | if (![SIUniversalAccessHelper isAccessibilityTrusted]) return nil; 29 | 30 | NSMutableArray *windows = [NSMutableArray array]; 31 | 32 | for (SIApplication *application in [SIApplication runningApplications]) { 33 | [windows addObjectsFromArray:[application windows]]; 34 | } 35 | 36 | return windows; 37 | } 38 | 39 | + (NSArray *)visibleWindows { 40 | if (![SIUniversalAccessHelper isAccessibilityTrusted]) return nil; 41 | 42 | return [[self allWindows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SIWindow *win, NSDictionary *bindings) { 43 | return ![[win app] isHidden] 44 | && ![win isWindowMinimized] 45 | && [win isNormalWindow]; 46 | }]]; 47 | } 48 | 49 | + (SIWindow *)focusedWindow { 50 | if (![SIUniversalAccessHelper isAccessibilityTrusted]) return nil; 51 | 52 | CFTypeRef applicationRef; 53 | AXUIElementCopyAttributeValue([SISystemWideElement systemWideElement].axElementRef, kAXFocusedApplicationAttribute, &applicationRef); 54 | 55 | if (applicationRef) { 56 | CFTypeRef windowRef; 57 | AXError result = AXUIElementCopyAttributeValue(applicationRef, (CFStringRef)NSAccessibilityFocusedWindowAttribute, &windowRef); 58 | 59 | CFRelease(applicationRef); 60 | 61 | if (result == kAXErrorSuccess) { 62 | SIWindow *window = [[SIWindow alloc] initWithAXElement:windowRef]; 63 | 64 | if ([window isSheet]) { 65 | SIAccessibilityElement *parent = [window elementForKey:kAXParentAttribute]; 66 | if (parent) { 67 | return [[SIWindow alloc] initWithAXElement:parent.axElementRef]; 68 | } 69 | } 70 | 71 | return window; 72 | } 73 | } 74 | 75 | return nil; 76 | } 77 | 78 | - (NSArray *)otherWindowsOnSameScreen { 79 | return [[SIWindow visibleWindows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SIWindow *win, NSDictionary *bindings) { 80 | return ![self isEqual:win] && [[self screen] isEqual: [win screen]]; 81 | }]]; 82 | } 83 | 84 | - (NSArray *)otherWindowsOnAllScreens { 85 | return [[SIWindow visibleWindows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(SIWindow *win, NSDictionary *bindings) { 86 | return ![self isEqual:win]; 87 | }]]; 88 | } 89 | 90 | - (NSArray *)windowsToWest { 91 | return [[self windowsInDirectionFn:^double(double angle) { return M_PI - fabs(angle); } 92 | shouldDisregardFn:^BOOL(double deltaX, double deltaY) { return (deltaX >= 0); }] valueForKeyPath:@"win"]; 93 | } 94 | 95 | - (NSArray *)windowsToEast { 96 | return [[self windowsInDirectionFn:^double(double angle) { return 0.0 - angle; } 97 | shouldDisregardFn:^BOOL(double deltaX, double deltaY) { return (deltaX <= 0); }] valueForKeyPath:@"win"]; 98 | } 99 | 100 | - (NSArray *)windowsToNorth { 101 | return [[self windowsInDirectionFn:^double(double angle) { return -M_PI_2 - angle; } 102 | shouldDisregardFn:^BOOL(double deltaX, double deltaY) { return (deltaY >= 0); }] valueForKeyPath:@"win"]; 103 | } 104 | 105 | - (NSArray *)windowsToSouth { 106 | return [[self windowsInDirectionFn:^double(double angle) { return M_PI_2 - angle; } 107 | shouldDisregardFn:^BOOL(double deltaX, double deltaY) { return (deltaY <= 0); }] valueForKeyPath:@"win"]; 108 | } 109 | 110 | #pragma mark Window Properties 111 | 112 | - (CGWindowID)windowID { 113 | if (self._windowID == kCGNullWindowID) { 114 | CGWindowID windowID; 115 | AXError error = _AXUIElementGetWindow(self.axElementRef, &windowID); 116 | if (error != kAXErrorSuccess) { 117 | return NO; 118 | } 119 | 120 | self._windowID = windowID; 121 | } 122 | 123 | return self._windowID; 124 | } 125 | 126 | - (NSString *)title { 127 | return [self stringForKey:kAXTitleAttribute]; 128 | } 129 | 130 | - (NSString *)role { 131 | return [self stringForKey:kAXRoleAttribute]; 132 | } 133 | 134 | - (NSString *)subrole { 135 | return [self stringForKey:kAXSubroleAttribute]; 136 | } 137 | 138 | - (BOOL)isWindowMinimized { 139 | return [[self numberForKey:kAXMinimizedAttribute] boolValue]; 140 | } 141 | 142 | - (BOOL)isNormalWindow { 143 | NSString *subrole = [self subrole]; 144 | if (subrole) { 145 | return [subrole isEqualToString:(__bridge NSString *)kAXStandardWindowSubrole]; 146 | } 147 | return YES; 148 | } 149 | 150 | - (BOOL)isSheet { 151 | return [[self stringForKey:kAXRoleAttribute] isEqualToString:(__bridge NSString *)kAXSheetRole]; 152 | } 153 | 154 | - (BOOL)isActive { 155 | if ([[self numberForKey:kAXHiddenAttribute] boolValue]) return NO; 156 | if ([[self numberForKey:kAXMinimizedAttribute] boolValue]) return NO; 157 | return YES; 158 | } 159 | 160 | - (BOOL)isOnScreen { 161 | if (!self.isActive) { 162 | return NO; 163 | } 164 | 165 | CFArrayRef windowDescriptions = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID); 166 | BOOL isActive = NO; 167 | for (NSDictionary *dictionary in (__bridge NSArray *)windowDescriptions) { 168 | CGWindowID otherWindowID = [dictionary[(__bridge NSString *)kCGWindowNumber] intValue]; 169 | if (otherWindowID == self.windowID) { 170 | isActive = YES; 171 | break; 172 | } 173 | } 174 | 175 | CFRelease(windowDescriptions); 176 | 177 | return isActive; 178 | } 179 | 180 | #pragma mark Screen 181 | 182 | - (NSScreen *)screen { 183 | CGRect windowFrame = [self frame]; 184 | 185 | CGFloat lastVolume = 0; 186 | NSScreen *lastScreen = nil; 187 | 188 | for (NSScreen *screen in [NSScreen screens]) { 189 | CGRect screenFrame = [screen frameIncludingDockAndMenu]; 190 | CGRect intersection = CGRectIntersection(windowFrame, screenFrame); 191 | CGFloat volume = intersection.size.width * intersection.size.height; 192 | 193 | if (volume > lastVolume) { 194 | lastVolume = volume; 195 | lastScreen = screen; 196 | } 197 | } 198 | 199 | return lastScreen; 200 | } 201 | 202 | - (void)moveToScreen:(NSScreen *)screen { 203 | self.position = screen.frameWithoutDockOrMenu.origin; 204 | } 205 | 206 | #pragma mark Space 207 | 208 | - (void)moveToSpace:(NSUInteger)space { 209 | NSEvent *event = [SISystemWideElement eventForSwitchingToSpace:space]; 210 | if (event == nil) return; 211 | 212 | [self moveToSpaceWithEvent:event]; 213 | } 214 | 215 | - (void)moveToSpaceWithEvent:(NSEvent *)event { 216 | SIAccessibilityElement *minimizeButtonElement = [self elementForKey:kAXMinimizeButtonAttribute]; 217 | CGRect minimizeButtonFrame = minimizeButtonElement.frame; 218 | CGRect windowFrame = self.frame; 219 | 220 | CGPoint mouseCursorPoint = { 221 | .x = (minimizeButtonElement ? CGRectGetMidX(minimizeButtonFrame) : windowFrame.origin.x + 5.0), 222 | .y = windowFrame.origin.y + fabs(windowFrame.origin.y - CGRectGetMinY(minimizeButtonFrame)) / 2.0 223 | }; 224 | 225 | CGEventRef mouseMoveEvent = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, mouseCursorPoint, kCGMouseButtonLeft); 226 | CGEventRef mouseDragEvent = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDragged, mouseCursorPoint, kCGMouseButtonLeft); 227 | CGEventRef mouseDownEvent = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDown, mouseCursorPoint, kCGMouseButtonLeft); 228 | CGEventRef mouseUpEvent = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseUp, mouseCursorPoint, kCGMouseButtonLeft); 229 | 230 | CGEventSetFlags(mouseMoveEvent, 0); 231 | CGEventSetFlags(mouseDownEvent, 0); 232 | CGEventSetFlags(mouseUpEvent, 0); 233 | 234 | // Move the mouse into place at the window's toolbar 235 | CGEventPost(kCGHIDEventTap, mouseMoveEvent); 236 | // Mouse down to set up the drag 237 | CGEventPost(kCGHIDEventTap, mouseDownEvent); 238 | // Drag event to grab hold of the window 239 | CGEventPost(kCGHIDEventTap, mouseDragEvent); 240 | 241 | // Make a slight delay to make sure the window is grabbed 242 | double delayInSeconds = 0.05; 243 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 244 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 245 | // Send the shortcut command to get Mission Control to switch spaces from under the window 246 | [SISystemWideElement switchToSpaceWithEvent:event]; 247 | 248 | // Make a slight delay to finish the space transition animation 249 | double delayInSeconds = 0.4; 250 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 251 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 252 | // Let go of the window. 253 | CGEventPost(kCGHIDEventTap, mouseUpEvent); 254 | CFRelease(mouseUpEvent); 255 | }); 256 | }); 257 | 258 | CFRelease(mouseMoveEvent); 259 | CFRelease(mouseDownEvent); 260 | } 261 | 262 | #pragma mark Window Actions 263 | 264 | - (void)maximize { 265 | CGRect screenRect = [[self screen] frameWithoutDockOrMenu]; 266 | [self setFrame: screenRect]; 267 | } 268 | 269 | - (void)minimize { 270 | [self setWindowMinimized:YES]; 271 | } 272 | 273 | - (void)unMinimize { 274 | [self setWindowMinimized:NO]; 275 | } 276 | 277 | - (void)setWindowMinimized:(BOOL)flag { 278 | [self setWindowProperty:NSAccessibilityMinimizedAttribute withValue:@(flag)]; 279 | } 280 | 281 | - (BOOL)setWindowProperty:(NSString *)propType withValue:(id)value { 282 | if ([value isKindOfClass:[NSNumber class]]) { 283 | AXError result = AXUIElementSetAttributeValue(self.axElementRef, (__bridge CFStringRef)(propType), (__bridge CFTypeRef)(value)); 284 | if (result == kAXErrorSuccess) 285 | return YES; 286 | } 287 | return NO; 288 | } 289 | 290 | #pragma mark Window Focus 291 | 292 | - (BOOL)focusWindow { 293 | NSRunningApplication *runningApplication = [NSRunningApplication runningApplicationWithProcessIdentifier:self.processIdentifier]; 294 | BOOL success = [runningApplication activateWithOptions:NSApplicationActivateIgnoringOtherApps]; 295 | if (!success) { 296 | return NO; 297 | } 298 | 299 | return [self raiseWindow]; 300 | } 301 | 302 | - (BOOL)raiseWindow { 303 | AXError error = AXUIElementPerformAction(self.axElementRef, kAXRaiseAction); 304 | if (error != kAXErrorSuccess) { 305 | return NO; 306 | } 307 | 308 | return YES; 309 | } 310 | 311 | NSPoint SIMidpoint(NSRect r) { 312 | return NSMakePoint(NSMidX(r), NSMidY(r)); 313 | } 314 | 315 | - (NSArray *)windowsInDirectionFn:(double(^)(double angle))whichDirectionFn 316 | shouldDisregardFn:(BOOL(^)(double deltaX, double deltaY))shouldDisregardFn { 317 | SIWindow *thisWindow = [SIWindow focusedWindow]; 318 | NSPoint startingPoint = SIMidpoint([thisWindow frame]); 319 | 320 | NSArray *otherWindows = [thisWindow otherWindowsOnAllScreens]; 321 | NSMutableArray *closestOtherWindows = [NSMutableArray arrayWithCapacity:[otherWindows count]]; 322 | 323 | for (SIWindow *win in otherWindows) { 324 | NSPoint otherPoint = SIMidpoint([win frame]); 325 | 326 | double deltaX = otherPoint.x - startingPoint.x; 327 | double deltaY = otherPoint.y - startingPoint.y; 328 | 329 | if (shouldDisregardFn(deltaX, deltaY)) 330 | continue; 331 | 332 | double angle = atan2(deltaY, deltaX); 333 | double distance = hypot(deltaX, deltaY); 334 | 335 | double angleDifference = whichDirectionFn(angle); 336 | 337 | double score = distance / cos(angleDifference / 2.0); 338 | 339 | [closestOtherWindows addObject:@{ 340 | @"score": @(score), 341 | @"win": win, 342 | }]; 343 | } 344 | 345 | NSArray *sortedOtherWindows = [closestOtherWindows sortedArrayUsingComparator:^NSComparisonResult(NSDictionary* pair1, NSDictionary* pair2) { 346 | return [[pair1 objectForKey:@"score"] compare:[pair2 objectForKey:@"score"]]; 347 | }]; 348 | 349 | return sortedOtherWindows; 350 | } 351 | 352 | - (void)focusFirstValidWindowIn:(NSArray*)closestWindows { 353 | for (SIWindow *win in closestWindows) { 354 | if ([win focusWindow]) break; 355 | } 356 | } 357 | 358 | - (void)focusWindowLeft { 359 | [self focusFirstValidWindowIn:[self windowsToWest]]; 360 | } 361 | 362 | - (void)focusWindowRight { 363 | [self focusFirstValidWindowIn:[self windowsToEast]]; 364 | } 365 | 366 | - (void)focusWindowUp { 367 | [self focusFirstValidWindowIn:[self windowsToNorth]]; 368 | } 369 | 370 | - (void)focusWindowDown { 371 | [self focusFirstValidWindowIn:[self windowsToSouth]]; 372 | } 373 | 374 | @end 375 | -------------------------------------------------------------------------------- /Silica/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Silica/include/CGSAccessibility.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSAccessibility.h -------------------------------------------------------------------------------- /Silica/include/CGSCIFilter.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSCIFilter.h -------------------------------------------------------------------------------- /Silica/include/CGSConnection.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSConnection.h -------------------------------------------------------------------------------- /Silica/include/CGSCursor.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSCursor.h -------------------------------------------------------------------------------- /Silica/include/CGSDebug.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSDebug.h -------------------------------------------------------------------------------- /Silica/include/CGSDevice.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSDevice.h -------------------------------------------------------------------------------- /Silica/include/CGSDisplays.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSDisplays.h -------------------------------------------------------------------------------- /Silica/include/CGSEvent.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSEvent.h -------------------------------------------------------------------------------- /Silica/include/CGSHotKeys.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSHotKeys.h -------------------------------------------------------------------------------- /Silica/include/CGSInternal.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSInternal.h -------------------------------------------------------------------------------- /Silica/include/CGSMisc.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSMisc.h -------------------------------------------------------------------------------- /Silica/include/CGSRegion.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSRegion.h -------------------------------------------------------------------------------- /Silica/include/CGSSession.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSSession.h -------------------------------------------------------------------------------- /Silica/include/CGSSpace.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSSpace.h -------------------------------------------------------------------------------- /Silica/include/CGSSurface.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSSurface.h -------------------------------------------------------------------------------- /Silica/include/CGSTile.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSTile.h -------------------------------------------------------------------------------- /Silica/include/CGSTransitions.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSTransitions.h -------------------------------------------------------------------------------- /Silica/include/CGSWindow.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSWindow.h -------------------------------------------------------------------------------- /Silica/include/CGSWorkspace.h: -------------------------------------------------------------------------------- 1 | ../Sources/CGSInternal/CGSWorkspace.h -------------------------------------------------------------------------------- /Silica/include/NSRunningApplication+Silica.h: -------------------------------------------------------------------------------- 1 | ../Sources/NSRunningApplication+Silica.h -------------------------------------------------------------------------------- /Silica/include/NSScreen+Silica.h: -------------------------------------------------------------------------------- 1 | ../Sources/NSScreen+Silica.h -------------------------------------------------------------------------------- /Silica/include/SIAccessibilityElement.h: -------------------------------------------------------------------------------- 1 | ../Sources/SIAccessibilityElement.h -------------------------------------------------------------------------------- /Silica/include/SIApplication.h: -------------------------------------------------------------------------------- 1 | ../Sources/SIApplication.h -------------------------------------------------------------------------------- /Silica/include/SISystemWideElement.h: -------------------------------------------------------------------------------- 1 | ../Sources/SISystemWideElement.h -------------------------------------------------------------------------------- /Silica/include/SIUniversalAccessHelper.h: -------------------------------------------------------------------------------- 1 | ../Sources/SIUniversalAccessHelper.h -------------------------------------------------------------------------------- /Silica/include/SIWindow.h: -------------------------------------------------------------------------------- 1 | ../Sources/SIWindow.h -------------------------------------------------------------------------------- /Silica/include/Silica.h: -------------------------------------------------------------------------------- 1 | ../Silica.h --------------------------------------------------------------------------------