-
Notifications
You must be signed in to change notification settings - Fork 2
files core monitor touchbarutilitywidgets swift 499fb517
ventaphobia edited this page Apr 23, 2026
·
1 revision
- Area: Touch Bar and Pock widget runtime.
- This page records the file's current repository role, source metadata, and recent commit history.
- Review nearby tests and commit pages before changing this file.
| Field | Value |
|---|---|
| Source path | Core-Monitor/TouchBarUtilityWidgets.swift |
| Wiki area | Touch Bar and Pock widget runtime |
| Exists in current checkout | True |
| Size | 24869 bytes |
| Binary | False |
| Line count | 722 |
| Extension | .swift |
AppKit, CoreAudio, Foundation, IOKit
| Kind | Name | Line |
|---|---|---|
| protocol | TouchBarThemable |
6 |
| struct | TouchBarTheme |
10 |
| func | hash |
41 |
| class | ControlCenterTouchBarWidget |
50 |
| enum | ActionTag |
55 |
| func | setup |
81 |
| func | invokeAction |
118 |
| func | adjustVolume |
133 |
| func | applyTheme |
138 |
| enum | SystemVolume |
150 |
| enum | SystemBrightness |
211 |
| class | ControlCenterSliderPresenter |
231 |
| enum | SliderKind |
233 |
| func | present |
267 |
| func | dismiss |
284 |
| func | touchBar |
292 |
| class | ControlCenterSliderView |
306 |
| func | setup |
329 |
| func | configureButton |
355 |
| func | currentValue |
370 |
| func | setValue |
379 |
| func | applyTheme |
389 |
| func | stepDown |
398 |
| func | stepUp |
403 |
| func | sliderChanged |
408 |
| func | closePressed |
412 |
| class | MeterControl |
417 |
| func | set |
465 |
| class | RAMPressureTouchBarWidget |
471 |
| func | setup |
489 |
| func | update |
505 |
| func | applyTheme |
517 |
| class | DockTouchBarWidget |
523 |
| func | setup |
543 |
| func | reload |
575 |
| func | applyTheme |
582 |
| func | rebuildStack |
587 |
| func | mergedItems |
643 |
| func | launchItem |
668 |
| func | loadDockItems |
680 |
| func | loadPersistentItems |
696 |
| struct | DockTouchBarItem |
713 |
| Commit | Date | Subject |
|---|---|---|
ce9e812 |
2026-04-16 | Fix Xcode 16.2 CI compatibility |
3fff2ff |
2026-04-16 | Fix Xcode 16.2 CI compatibility |
5b96f6f |
2026-04-16 | Fix Xcode 16.2 CI compatibility |
0ef6575 |
2026-04-16 | Unify monitor refresh delivery paths |
4db7203 |
2026-04-16 | Reduce redundant Touch Bar and menu refresh work |
6675114 |
2026-04-13 | e |
679aae6 |
2026-04-12 | changes. |
2664fd1 |
2026-04-11 | Update Core Monitor |
- Prefer focused changes that respect the ownership described above.
- If this file touches helper trust, SMC writes, startup, or permissions, update the relevant support docs and tests.
- If this file is generated or an asset manifest, verify the producing workflow instead of hand-editing generated payloads.
import AppKit
import Foundation
import CoreAudio
import IOKit
import IOKit.graphics
protocol TouchBarThemable: AnyObject {
var theme: TouchBarTheme { get set }
}
struct TouchBarTheme: Equatable, Hashable {
let primaryTextColor: NSColor
let secondaryTextColor: NSColor
let pillBackgroundColor: NSColor
let pillBorderColor: NSColor
let barOutlineColor: NSColor
static let dark = TouchBarTheme(
primaryTextColor: .white,
secondaryTextColor: NSColor.white.withAlphaComponent(0.72),
pillBackgroundColor: NSColor.white.withAlphaComponent(0.08),
pillBorderColor: NSColor.white.withAlphaComponent(0.15),
barOutlineColor: NSColor.white.withAlphaComponent(0.35)
)
static let light = TouchBarTheme(
primaryTextColor: .labelColor,
secondaryTextColor: NSColor.secondaryLabelColor,
pillBackgroundColor: NSColor.black.withAlphaComponent(0.06),
pillBorderColor: NSColor.black.withAlphaComponent(0.12),
barOutlineColor: NSColor.black.withAlphaComponent(0.25)
)
static func == (lhs: TouchBarTheme, rhs: TouchBarTheme) -> Bool {
lhs.primaryTextColor == rhs.primaryTextColor &&
lhs.secondaryTextColor == rhs.secondaryTextColor &&
lhs.pillBackgroundColor == rhs.pillBackgroundColor &&
lhs.pillBorderColor == rhs.pillBorderColor &&
lhs.barOutlineColor == rhs.barOutlineColor
}
- Home
- Start Here
- Product Overview
- Runtime Architecture
- Monitoring Pipeline
- Fan Control
- Privileged Helper
- Touch Bar
- Release Automation
- Security Model
- File Index (279)
- Every Commit (401)
- Chronological Change Log
- Removed Parts
- All Deleted Paths
- Branches And Tags
- Wiki Manifest
- Start Here
- Product Overview
- Source Map
- Runtime Architecture
- App Startup And Lifecycle
- Dashboard Architecture
- Menu Bar Architecture
- Monitoring Pipeline
- Snapshot Trends And Freshness
- CPU GPU Memory Disk Network
- Battery Power And Thermals
- SMC And Apple Silicon
- Fan Control
- Custom Fan Curves
- Privileged Helper
- XPC Trust Boundary
- Helper Diagnostics
- Touch Bar Architecture
- Touch Bar Customization
- Weather And Location
- Privacy And Permissions
- Onboarding And Help
- Legacy Alerts
- Kernel Panic Weird Mode