├── .gitignore ├── CMakeLists.txt ├── include └── CoreBrightness.framework │ └── headers │ ├── AmbientLightSensorStats.h │ ├── BLControl.h │ ├── BacklightSystemDelegateXpcProtocol-Protocol.h │ ├── BacklightdExportedObj.h │ ├── BacklightdXPCProtocol-Protocol.h │ ├── BrightnessSystem.h │ ├── BrightnessSystemClient.h │ ├── BrightnessSystemClientExportedObj.h │ ├── BrightnessSystemClientInternal.h │ ├── BrightnessSystemInternal.h │ ├── CBABCurve.h │ ├── CBABModuleExternal.h │ ├── CBABModuleMacBuiltIn.h │ ├── CBABRamp.h │ ├── CBALSService.h │ ├── CBAdaptationClient.h │ ├── CBAnalyticsManager.h │ ├── CBBlueLightClient.h │ ├── CBClient.h │ ├── CBColorFilter.h │ ├── CBColorModule.h │ ├── CBColorSample.h │ ├── CBContainer.h │ ├── CBContainerModuleProtocol-Protocol.h │ ├── CBContainerProtocol-Protocol.h │ ├── CBDisplayContainerDFR.h │ ├── CBDisplayContainerMacOS.h │ ├── CBDisplayModule.h │ ├── CBDisplayModuleMacOS.h │ ├── CBDisplayUpdateHandler.h │ ├── CBHIDService.h │ ├── CBHIDServiceProtocol-Protocol.h │ ├── CBKeyboardBacklightContainer.h │ ├── CBKeyboardPreferencesManager.h │ ├── CBModule.h │ ├── CBPreferencesHandler.h │ ├── CBStatusInfoHelper.h │ ├── CBStatusInfoProtocol-Protocol.h │ ├── CBTrueToneClient.h │ ├── CBUserStudyDataCollectionManager.h │ ├── CDStructures.h │ ├── DisplayALSManager.h │ ├── DisplayServicesClient.h │ ├── KeyboardBacklight.h │ ├── KeyboardBacklightHIDCurve.h │ ├── KeyboardBacklightHIDCurveNits.h │ ├── KeyboardBrightnessClient.h │ ├── NSDictionary-CBPropertyKeyExtension.h │ ├── NSObject-Protocol.h │ ├── NSXPCListenerDelegate-Protocol.h │ ├── NightModeControl.h │ ├── NightShiftSupportProtocol-Protocol.h │ └── SunriseSunsetProvider.h ├── main.mm ├── readme.md └── simplebrightness ├── library.h └── library.mm /.gitignore: -------------------------------------------------------------------------------- 1 | # Project exclude paths 2 | /cmake-build-debug/ -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | project(APFInteractionExperiment) 3 | set(CMAKE_CXX_STANDARD 17) 4 | 5 | 6 | add_executable(APFIExperiment 7 | main.mm 8 | ) 9 | 10 | target_include_directories(APFIExperiment PUBLIC 11 | ./include/CoreBrightness.framework 12 | ) 13 | 14 | 15 | add_library(SimpleBrightness SHARED simplebrightness/library.h simplebrightness/library.mm) 16 | 17 | target_include_directories(SimpleBrightness PUBLIC 18 | ./include/CoreBrightness.framework 19 | ) 20 | 21 | target_link_libraries(SimpleBrightness 22 | "-framework Foundation" 23 | "-iframework /System/Library/PrivateFrameworks -framework CoreBrightness" 24 | ) 25 | 26 | target_link_libraries(APFIExperiment 27 | SimpleBrightness 28 | "-framework Foundation" 29 | "-iframework /System/Library/PrivateFrameworks -framework CoreBrightness" 30 | ) 31 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/AmbientLightSensorStats.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import 8 | 9 | //#import NSLock, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface AmbientLightSensorStats : NSObject 13 | { 14 | id _activityFilteredStats; 15 | id _unfilteredStats; 16 | NSObject *_reportTimer; 17 | unsigned long long _alsIdleEventStartTime; 18 | NSObject *_alsIdleTimer; 19 | NSObject *_userBrightnessTimer; 20 | unsigned long long _activityNotification; 21 | unsigned int _clamshellNotification; 22 | struct IONotificationPort *_port; 23 | unsigned int _clamshellStateIterator; 24 | NSLock *_alsEventLock; 25 | _Bool _clamshellOpened; 26 | _Bool _userIsActive; 27 | struct __IOHIDEventSystemClient *_hidEventSystemClient; 28 | } 29 | 30 | - (void)updateALSEnabled:(_Bool)arg1; 31 | - (void)logALSEnabled:(_Bool)arg1 userChanged:(_Bool)arg2; 32 | - (void)logUserBrightnessChanged; 33 | - (void)logALSIdleEvent:(_Bool)arg1; 34 | - (void)cancelALSIdleTimer; 35 | - (void)startALSIdleTimer; 36 | - (void)logALSEventLocked:(float)arg1 forStats:(id *)arg2; 37 | - (void)logALSEvent:(float)arg1; 38 | - (void)reportUnfilteredLux:(int)arg1 range:(int)arg2 changes:(int)arg3 enabled:(int)arg4; 39 | - (void)reportActivityFilteredLux:(int)arg1 range:(int)arg2; 40 | - (unsigned int)floorTo2SigFig:(unsigned int)arg1; 41 | - (void)dealloc; 42 | - (id)init; 43 | 44 | @end 45 | 46 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BLControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class HIDManager, NSMutableArray, NSMutableDictionary, NSObject, NSObject, NSObject, NightModeControl; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface BLControl : NSObject 13 | { 14 | NSObject *_logHandle; 15 | struct __IOHIDEventSystemClient *_hidSystemClient; 16 | NSMutableArray *_alsHIDServiceClients; 17 | NightModeControl *_nightModeControl; 18 | NSObject *_queue; 19 | CDUnknownBlockType _callback; 20 | NSMutableDictionary *_displayContainers; 21 | NSObject *_CDInitTimer; 22 | BOOL _CDReady; 23 | NSMutableDictionary *_colorModules; 24 | unsigned int _pmRootDomainService; 25 | unsigned int _clamshellNotification; 26 | struct IONotificationPort *_clamshellNotifyPort; 27 | _Bool _clamshellOpened; 28 | NSMutableDictionary *_keyboardContainers; 29 | HIDManager *_keyboardBacklightHIDManager; 30 | BOOL _userActive; 31 | BOOL _nsPreset; 32 | } 33 | 34 | - (_Bool)updatePresetConfiguration; 35 | - (void)keyboardBacklightHIDDeviceRemoved:(id)arg1; 36 | - (void)keyboardBacklightHIDDeviceArrived:(id)arg1; 37 | - (_Bool)initKeyboardBacklightHIDManager; 38 | - (void)handleUserIsActiveStateChange:(_Bool)arg1; 39 | - (void)stopClamshellMonitoring; 40 | - (void)startClamshellMonitoring; 41 | - (void)updateClamshellState:(_Bool)arg1; 42 | - (void)handleClamshellStateChange:(_Bool)arg1; 43 | - (id)copyIdentifiers; 44 | - (id)copyStatusInfo; 45 | - (id)copyDisplayInfo; 46 | - (id)copyDisplayList; 47 | - (void)callBlockWithProperty:(id)arg1 value:(id)arg2; 48 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 49 | - (void)dealloc; 50 | - (void)stop; 51 | - (_Bool)start; 52 | - (id)init; 53 | - (void)clearColorModules; 54 | - (void)initialiseColorModules; 55 | - (void)initCoreDisplay; 56 | - (void)handleCoreDisplayInitialisation; 57 | - (_Bool)registerWindowServerNotification; 58 | - (void)registerCoreDisplayNotifications; 59 | - (void)unregisterCoreDisplayNotifications; 60 | - (void)triggerDisplayStateReinitialisation; 61 | - (void)clearDisplaySet; 62 | - (void)updateDisplaySet:(id)arg1; 63 | - (_Bool)userChange:(struct __CFString *)arg1; 64 | - (_Bool)setPropertyWithSimpleKey:(id)arg1 property:(id)arg2 client:(id)arg3; 65 | - (_Bool)setPropertyWithKey:(id)arg1 property:(id)arg2 client:(id)arg3; 66 | - (BOOL)setInternalPropertyWithKey:(id)arg1 property:(id)arg2; 67 | - (id)copyPropertyWithSimpleKey:(id)arg1 client:(id)arg2; 68 | - (id)copyPropertyWithKey:(id)arg1 client:(id)arg2; 69 | - (id)copyPropertyInternalForKey:(id)arg1; 70 | - (void)closeHidEventSystemClient; 71 | - (_Bool)initialiseHidEventSystemClient; 72 | - (struct __CFDictionary *)copyPrimaryKeyDictionary:(unsigned int)arg1 usage:(unsigned int)arg2; 73 | - (struct __CFDictionary *)copyDictWithUsagePairPage:(unsigned int)arg1 usage:(unsigned int)arg2; 74 | - (void)hidServiceRemovalCallback:(struct __IOHIDServiceClient *)arg1; 75 | - (void)removeDFRService:(struct __IOHIDServiceClient *)arg1; 76 | - (void)removeHIDService:(struct __IOHIDServiceClient *)arg1; 77 | - (void)hidServiceArrivalCallback:(struct __IOHIDServiceClient *)arg1; 78 | - (void)addDFRService:(struct __IOHIDServiceClient *)arg1; 79 | - (void)addHIDService:(struct __IOHIDServiceClient *)arg1; 80 | - (void)hidEventCallbackWithEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 81 | 82 | @end 83 | 84 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BacklightSystemDelegateXpcProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @protocol BacklightSystemDelegateXpcProtocol 10 | - (void)notifyChangedProperty:(id)arg1 value:(id)arg2; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BacklightdExportedObj.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | #import "BacklightdXPCProtocol.h" 10 | 11 | @class BrightnessSystemInternal, NSString, NSXPCConnection; 12 | 13 | __attribute__((visibility("hidden"))) 14 | @interface BacklightdExportedObj : NSObject 15 | { 16 | unsigned long long _clientID; 17 | BOOL _clientIDSet; 18 | BrightnessSystemInternal *_server; 19 | NSXPCConnection *_connection; 20 | } 21 | 22 | @property(retain, nonatomic) NSXPCConnection *connection; // @synthesize connection=_connection; 23 | @property(nonatomic) BrightnessSystemInternal *server; // @synthesize server=_server; 24 | - (void)dealloc; 25 | - (void)registerNotificationForProperties:(id)arg1; 26 | - (id)copyClientID; 27 | - (void)reconnect; 28 | - (void)clientCopyPropertyWithKey:(id)arg1 reply:(CDUnknownBlockType)arg2; 29 | - (void)clientSetPropertyWithKey:(id)arg1 property:(id)arg2; 30 | 31 | // Remaining properties 32 | @property(readonly, copy) NSString *debugDescription; 33 | @property(readonly, copy) NSString *description; 34 | @property(readonly) unsigned long long hash; 35 | @property(readonly) Class superclass; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BacklightdXPCProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSArray; 10 | 11 | @protocol BacklightdXPCProtocol 12 | - (void)registerNotificationForProperties:(NSArray *)arg1; 13 | - (void)reconnect; 14 | - (void)clientCopyPropertyWithKey:(id)arg1 reply:(void (^)(NSArray *, NSError *))arg2; 15 | - (void)clientSetPropertyWithKey:(id)arg1 property:(NSArray *)arg2; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BrightnessSystem.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class BrightnessSystemInternal; 10 | 11 | @interface BrightnessSystem : NSObject 12 | { 13 | BrightnessSystemInternal *bsi; 14 | } 15 | 16 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 17 | - (BOOL)isAlsSupported; 18 | - (id)copyPropertyForKey:(id)arg1; 19 | - (BOOL)setProperty:(id)arg1 forKey:(id)arg2; 20 | - (void)dealloc; 21 | - (id)init; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BrightnessSystemClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import "NSObject.h" 8 | 9 | 10 | @class BrightnessSystemClientInternal, NSObject; 11 | 12 | @interface BrightnessSystemClient : NSObject 13 | { 14 | BrightnessSystemClientInternal *bsci; 15 | NSObject *_logHandle; 16 | CDUnknownBlockType _displayNotificationBlock; 17 | CDUnknownBlockType _keyboardNotificationBlock; 18 | CDUnknownBlockType _propertyNotificationBlock; 19 | } 20 | 21 | - (void)unregisterNotificationForKeys:(id)arg1 keyboardID:(unsigned long long)arg2; 22 | - (void)registerNotificationForKeys:(id)arg1 keyboardID:(unsigned long long)arg2; 23 | - (void)unregisterKeyboardNotificationBlock; 24 | - (void)registerKeyboardNotificationCallbackBlock:(CDUnknownBlockType)arg1; 25 | - (id)copyPropertyForKey:(id)arg1 keyboardID:(unsigned long long)arg2; 26 | - (BOOL)setProperty:(id)arg1 withKey:(id)arg2 keyboardID:(unsigned long long)arg3; 27 | - (BOOL)isAlsSupported; 28 | - (void)unregisterNotificationForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 29 | - (void)registerNotificationForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 30 | - (void)unregisterNotificationForKeys:(id)arg1 andDisplay:(unsigned long long)arg2; 31 | - (void)registerNotificationForKeys:(id)arg1 andDisplay:(unsigned long long)arg2; 32 | - (void)unregisterNotificationForKeys:(id)arg1; 33 | - (void)registerNotificationForKeys:(id)arg1; 34 | - (void)unregisterNotificationForKey:(id)arg1; 35 | - (void)registerNotificationForKey:(id)arg1; 36 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1 forProperties:(id)arg2; 37 | - (void)unregisterPropertyNotificationBlock; 38 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 39 | - (void)unregisterDisplayNotificationBlock; 40 | - (void)registerDisplayNotificationCallbackBlock:(CDUnknownBlockType)arg1; 41 | - (id)copyPropertyForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 42 | - (id)copyPropertyForKey:(id)arg1; 43 | - (_Bool)setProperty:(id)arg1 withKey:(id)arg2 andDisplay:(unsigned long long)arg3; 44 | - (BOOL)setProperty:(id)arg1 forKey:(id)arg2; 45 | - (void)dealloc; 46 | - (id)init; 47 | 48 | @end 49 | 50 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BrightnessSystemClientExportedObj.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | #import "BacklightSystemDelegateXpcProtocol.h" 10 | 11 | @class BrightnessSystemClientInternal, NSObject, NSString; 12 | 13 | __attribute__((visibility("hidden"))) 14 | @interface BrightnessSystemClientExportedObj : NSObject 15 | { 16 | CDUnknownBlockType clientBlock; 17 | NSObject *queue; 18 | BrightnessSystemClientInternal *_target; 19 | } 20 | 21 | @property(nonatomic) BrightnessSystemClientInternal *target; // @synthesize target=_target; 22 | - (void)notifyChangedProperty:(id)arg1 value:(id)arg2; 23 | - (void)dealloc; 24 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 25 | - (void)unregisterNotificationBlock; 26 | 27 | // Remaining properties 28 | @property(readonly, copy) NSString *debugDescription; 29 | @property(readonly, copy) NSString *description; 30 | @property(readonly) unsigned long long hash; 31 | @property(readonly) Class superclass; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BrightnessSystemClientInternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class BrightnessSystemClientExportedObj, NSCondition, NSMutableArray, NSObject, NSXPCConnection; 10 | 11 | @interface BrightnessSystemClientInternal : NSObject 12 | { 13 | NSXPCConnection *_connection; 14 | id _remote; 15 | BrightnessSystemClientExportedObj *exportedObj; 16 | NSMutableArray *_clientProperties; 17 | NSCondition *copyPropertyForKeyWaitCondition; 18 | BOOL copyPropertyForKeyCompleted; 19 | NSObject *_logHandle; 20 | } 21 | 22 | - (void)removeKeyFromClientProperties:(id)arg1; 23 | - (void)addKeyToClientProperties:(id)arg1; 24 | - (void)removePropertyFromNotification:(id)arg1; 25 | - (void)addPropertyForNotification:(id)arg1; 26 | - (void)removePropertiesFromNotification:(id)arg1; 27 | - (void)addPropertiesForNotification:(id)arg1; 28 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1 forProperties:(id)arg2; 29 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 30 | - (id)copyPropertyForKey:(id)arg1; 31 | - (BOOL)setProperty:(id)arg1 forKey:(id)arg2; 32 | - (id)init; 33 | - (void)dealloc; 34 | - (void)stopXpcService; 35 | 36 | @end 37 | 38 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/BrightnessSystemInternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | #import "NSXPCListenerDelegate.h" 10 | 11 | @class BLControl, NSMutableDictionary, NSObject, NSString, NSXPCListener; 12 | 13 | __attribute__((visibility("hidden"))) 14 | @interface BrightnessSystemInternal : NSObject 15 | { 16 | BLControl *bl; 17 | CDUnknownBlockType _callback; 18 | float _cachedSlider; 19 | NSXPCListener *_listener; 20 | NSMutableDictionary *_clients; 21 | NSMutableDictionary *_clientsProps; 22 | NSMutableDictionary *_ownedProps; 23 | NSMutableDictionary *_combinableProps; 24 | NSObject *_logHandle; 25 | } 26 | 27 | - (void)undoCombinablePropertiesForClient:(id)arg1; 28 | - (id)newAggregatedPropertyForCombinablePropertiesForKey:(id)arg1; 29 | - (BOOL)setCombinableProperty:(id)arg1 forKey:(id)arg2 client:(id)arg3; 30 | - (BOOL)isACombinableProperty:(id)arg1; 31 | - (void)undoOwnedPropertiesForClient:(id)arg1; 32 | - (void)setOwnedProperty:(id)arg1 forKey:(id)arg2 client:(id)arg3; 33 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 34 | - (BOOL)isAlsSupported; 35 | - (id)copyPropertyForKey:(id)arg1 client:(id)arg2; 36 | - (BOOL)setProperty:(id)arg1 forKey:(id)arg2 client:(id)arg3; 37 | - (void)setNotificationProperties:(id)arg1 forClient:(id)arg2; 38 | - (id)init; 39 | - (void)notifyClientsForProperty:(id)arg1 key:(id)arg2; 40 | - (void)dealloc; 41 | - (void)destroyServer; 42 | - (void)clientDisconnectedWithExpObj:(id)arg1; 43 | - (void)clientConnectedWithExpObj:(id)arg1; 44 | - (BOOL)listener:(id)arg1 shouldAcceptNewConnection:(id)arg2; 45 | 46 | // Remaining properties 47 | @property(readonly, copy) NSString *debugDescription; 48 | @property(readonly, copy) NSString *description; 49 | @property(readonly) unsigned long long hash; 50 | @property(readonly) Class superclass; 51 | 52 | @end 53 | 54 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBABCurve.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBABCurve : NSObject 13 | { 14 | struct { 15 | float minimumBrightness; 16 | float maximumBrightness; 17 | float bl1; 18 | float bl2; 19 | float e1; 20 | float e2; 21 | float eThresh; 22 | } pref; 23 | float currentLux; 24 | float mappedBrightness; 25 | NSObject *_logHandle; 26 | unsigned long long _version; 27 | } 28 | 29 | @property(readonly) unsigned long long version; // @synthesize version=_version; 30 | - (void)setSavedPrefences:(id)arg1; 31 | - (unsigned long long)getVersion; 32 | - (id)copyUserPrefState; 33 | - (void)resetToDefaultState; 34 | - (void)updateALSParametersForDisplayBrightness:(float)arg1; 35 | - (float)getLinearBrightness; 36 | - (_Bool)setLux:(float)arg1; 37 | - (id)description; 38 | - (id)initWithUUID:(id)arg1; 39 | - (id)init; 40 | 41 | @end 42 | 43 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBABModuleExternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerModuleProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class CBABCurve, CBABRamp, CBDisplayModule, NSMutableArray, NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBABModuleExternal : CBModule 16 | { 17 | NSMutableArray *_ALSServices; 18 | NSString *_containerID; 19 | BOOL _enabled; 20 | BOOL _available; 21 | BOOL _presetDisableAB; 22 | CBABCurve *_curve; 23 | CBABRamp *_ramp; 24 | BOOL _updatesFrozen; 25 | BOOL _suspendAutoBrightness; 26 | BOOL _fastRamp; 27 | CBDisplayModule *_displayModule; 28 | } 29 | 30 | @property(readonly) CBDisplayModule *displayModule; // @synthesize displayModule=_displayModule; 31 | - (void)endFastRamp; 32 | - (BOOL)getAggregatedLux:(float *)arg1; 33 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 34 | - (void)sendNotificationForKey:(id)arg1 withValue:(id)arg2; 35 | - (void)storeCurveToPreferences; 36 | - (id)copyPropertyForKey:(id)arg1 withParameter:(id)arg2; 37 | - (void)userBrightnessCommitHandler; 38 | - (void)userBrightnessChangingHandler; 39 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 40 | - (void)updateAvailability; 41 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 42 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 43 | - (_Bool)newALSService:(struct __IOHIDServiceClient *)arg1; 44 | - (void)updateBrightnessForce:(BOOL)arg1 periodOverride:(BOOL)arg2 period:(float)arg3; 45 | - (void)updateBrightness; 46 | - (void)updateAutoBrightnessState:(BOOL)arg1; 47 | - (_Bool)setPropertyInternal:(id)arg1 forKey:(id)arg2; 48 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 49 | - (id)copyPropertyForKey:(id)arg1; 50 | - (void)stop; 51 | - (void)start; 52 | - (void)dealloc; 53 | - (id)initWithDisplayModule:(id)arg1 andQueue:(id)arg2; 54 | 55 | // Remaining properties 56 | @property(readonly, copy) NSString *debugDescription; 57 | @property(readonly, copy) NSString *description; 58 | @property(readonly) unsigned long long hash; 59 | @property(readonly) Class superclass; 60 | 61 | @end 62 | 63 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBABModuleMacBuiltIn.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerModuleProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class CBDisplayModuleMacOS, DisplayALSManager, NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBABModuleMacBuiltIn : CBModule 16 | { 17 | CDUnknownBlockType _notificationBlock; 18 | DisplayALSManager *_displayALSManager; 19 | CBDisplayModuleMacOS *_displayModule; 20 | } 21 | 22 | @property(readonly) CBDisplayModuleMacOS *displayModule; // @synthesize displayModule=_displayModule; 23 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 24 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 25 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 26 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 27 | - (_Bool)newService:(struct __IOHIDServiceClient *)arg1; 28 | - (_Bool)setPropertyInternal:(id)arg1 forKey:(id)arg2; 29 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 30 | - (id)copyPropertyForKey:(id)arg1 withParameter:(id)arg2; 31 | - (id)copyPropertyForKey:(id)arg1; 32 | - (void)unregisterNotificationBlock; 33 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 34 | - (void)stop; 35 | - (void)start; 36 | - (void)dealloc; 37 | - (id)initWithMacDisplayModule:(id)arg1 andQueue:(id)arg2; 38 | 39 | // Remaining properties 40 | @property(readonly, copy) NSString *debugDescription; 41 | @property(readonly, copy) NSString *description; 42 | @property(readonly) unsigned long long hash; 43 | @property(readonly) Class superclass; 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBABRamp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class CBDisplayModule, NSObject, NSObject, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBABRamp : NSObject 13 | { 14 | CBDisplayModule *_displayModule; 15 | NSObject *_queue; 16 | NSObject *_fadeTimer; 17 | NSObject *_logHandle; 18 | float _maxLinearBrightness; 19 | float _minLinearBrightness; 20 | } 21 | 22 | - (float)getVersion; 23 | - (void)setPerceptualBrightnessWithFade:(float)arg1 length:(float)arg2 current:(float)arg3; 24 | - (void)transitionToBrightness:(float)arg1 force:(BOOL)arg2 periodOverride:(BOOL)arg3 period:(float)arg4; 25 | - (void)stopTransition; 26 | - (void)dealloc; 27 | - (id)initWithDisplayModule:(id)arg1 andQueue:(id)arg2; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBALSService.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSString; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBALSService : CBHIDService 13 | { 14 | BOOL _validData; 15 | double _lux; 16 | BOOL _colorSupport; 17 | double _x; 18 | double _y; 19 | double _CCT; 20 | NSString *_desc; 21 | unsigned long long _location; 22 | } 23 | 24 | @property(readonly) unsigned long long location; // @synthesize location=_location; 25 | @property(readonly) double CCT; // @synthesize CCT=_CCT; 26 | @property(readonly) double y; // @synthesize y=_y; 27 | @property(readonly) double x; // @synthesize x=_x; 28 | @property(readonly) BOOL colorSupport; // @synthesize colorSupport=_colorSupport; 29 | @property(readonly) double lux; // @synthesize lux=_lux; 30 | @property(readonly) BOOL validData; // @synthesize validData=_validData; 31 | - (BOOL)updateEventData; 32 | - (id)copyDataInDictionary; 33 | - (id)description; 34 | - (void)setEvent:(struct __IOHIDEvent *)arg1; 35 | - (void)resetEventData; 36 | - (void)dealloc; 37 | - (id)initWithHIDALSServiceClient:(struct __IOHIDServiceClient *)arg1; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBAdaptationClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import "NSObject.h" 8 | 9 | @class BrightnessSystemClient; 10 | 11 | @interface CBAdaptationClient : NSObject 12 | { 13 | BrightnessSystemClient *bsc; 14 | BOOL ownsClient; 15 | int _mode; 16 | BOOL _modeSet; 17 | BOOL _supported; 18 | } 19 | 20 | + (BOOL)supportsAdaptation; 21 | @property BOOL supported; // @synthesize supported=_supported; 22 | - (BOOL)getStrengths:(float *)arg1 nStrengths:(int)arg2; 23 | - (BOOL)overrideStrengths:(float *)arg1 forModes:(int *)arg2 nModes:(int)arg3; 24 | - (BOOL)setAdaptationMode:(int)arg1 withPeriod:(float)arg2; 25 | - (BOOL)animateFromWeakestAdaptationModeInArray:(int *)arg1 withLength:(int)arg2 toWeakestInArray:(int *)arg3 withLength:(int)arg4 withProgress:(float)arg5 andPeriod:(float)arg6; 26 | - (BOOL)setWeakestAdaptationModeFromArray:(int *)arg1 withLength:(int)arg2 andPeriod:(float)arg3; 27 | - (int)getAdaptationMode; 28 | - (BOOL)getEnabled; 29 | - (BOOL)setEnabled:(BOOL)arg1; 30 | - (void)dealloc; 31 | - (id)init; 32 | - (id)initWithClientObj:(id)arg1; 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBAnalyticsManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSMutableDictionary, NSObject, NSObject, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBAnalyticsManager : NSObject 13 | { 14 | NSObject *_logHandle; 15 | NSObject *_queue; 16 | NSObject *_reportTimer; 17 | NSMutableDictionary *_timestamps; 18 | NSMutableDictionary *samples; 19 | } 20 | 21 | + (void)stopReporting:(unsigned long long)arg1; 22 | + (void)sendEventOnceADayLazy:(id)arg1 andDict:(id)arg2; 23 | + (BOOL)handleColorSample:(id)arg1; 24 | + (id)sharedInstance; 25 | - (id)stringForType:(unsigned long long)arg1; 26 | - (BOOL)isSameDay:(id)arg1 asDay:(id)arg2; 27 | - (BOOL)isFirstEventToday:(id)arg1; 28 | - (void)stopReportingInternal:(unsigned long long)arg1; 29 | - (void)startReporting; 30 | - (void)sendEventLazy:(id)arg1 andDict:(id)arg2; 31 | - (void)sendEventOnceADayLazyInternal:(id)arg1 andDict:(id)arg2; 32 | - (void)logColorSample:(id)arg1 withType:(id)arg2; 33 | - (void)logAllColorSamples; 34 | - (_Bool)handleColorSampleInternal:(id)arg1; 35 | - (void)storeTimestamp:(id)arg1 forEventName:(id)arg2; 36 | - (void)dealloc; 37 | - (id)init; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBBlueLightClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | 10 | @class BrightnessSystemClient; 11 | 12 | @interface CBBlueLightClient : NSObject 13 | { 14 | BrightnessSystemClient *bsc; 15 | id clientBlock; 16 | BOOL ownsClient; 17 | BOOL notificationActive; 18 | BOOL rangeSet; 19 | id defaultCctRange; 20 | BOOL rangeOverridden; 21 | id cctRange; 22 | BOOL _supported; 23 | } 24 | 25 | + (BOOL)supportsBlueLightReduction; 26 | @property BOOL supported; // @synthesize supported=_supported; 27 | - (BOOL)getWarningStrength:(float *)arg1; 28 | - (BOOL)getWarningCCT:(float *)arg1; 29 | - (BOOL)setStrength:(float)arg1 withPeriod:(float)arg2 commit:(BOOL)arg3; 30 | - (BOOL)setStrength:(float)arg1 commit:(BOOL)arg2; 31 | - (BOOL)getStrength:(float *)arg1; 32 | - (BOOL)setCCTRange:(id *)arg1; 33 | - (BOOL)getCCTRange:(id *)arg1; 34 | - (BOOL)setCCT:(float)arg1 withPeriod:(float)arg2 commit:(BOOL)arg3; 35 | - (BOOL)setCCT:(float)arg1 commit:(BOOL)arg2; 36 | - (BOOL)getCCT:(float *)arg1; 37 | - (BOOL)getDefaultCCTRange:(id *)arg1; 38 | - (void)suspendNotifications:(BOOL)arg1; 39 | - (void)setStatusNotificationBlock:(id )arg1; 40 | - (void)suspendNotifications:(BOOL)arg1 force:(BOOL)arg2; 41 | - (void)enableNotifications; 42 | - (void)disableNotifications; 43 | - (BOOL)getBlueLightStatus:(id *)arg1; 44 | - (BOOL)parseStatusDictionary:(id)arg1 intoStruct:(id *)arg2; 45 | - (BOOL)setSchedule:(const id *)arg1; 46 | - (BOOL)setMode:(int)arg1; 47 | - (BOOL)setEnabled:(BOOL)arg1; 48 | - (BOOL)setEnabled:(BOOL)arg1 withOption:(int)arg2; 49 | - (BOOL)setActive:(BOOL)arg1; 50 | - (void)dealloc; 51 | - (id)init; 52 | - (id)initWithClientObj:(id)arg1; 53 | 54 | @end 55 | 56 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import "NSObject.h" 8 | 9 | @class BrightnessSystemClient, CBAdaptationClient, CBBlueLightClient; 10 | 11 | @interface CBClient : NSObject 12 | { 13 | BrightnessSystemClient *bsc; 14 | CBBlueLightClient *_blueLightClient; 15 | CBAdaptationClient *_adaptationClient; 16 | } 17 | 18 | + (BOOL)supportsAdaptation; 19 | + (BOOL)supportsBlueLightReduction; 20 | @property(readonly) CBAdaptationClient *adaptationClient; // @synthesize adaptationClient=_adaptationClient; 21 | @property(readonly) CBBlueLightClient *blueLightClient; // @synthesize blueLightClient=_blueLightClient; 22 | - (void)dealloc; 23 | - (id)init; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBColorFilter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBHIDServiceProtocol.h" 10 | 11 | @class CBColorSample, NSMutableArray, NSString; 12 | 13 | __attribute__((visibility("hidden"))) 14 | @interface CBColorFilter : CBModule 15 | { 16 | NSMutableArray *_services; 17 | NSMutableArray *_validServices; 18 | unsigned long long _sensorPolicy; 19 | unsigned long long _mode; 20 | CBColorSample *_sample; 21 | } 22 | 23 | + (CDStruct_6f955ef8)calculateTristimulusForChromaticity:(CDStruct_34734122)arg1 andLux:(double)arg2; 24 | + (double)calculateCCTForTristimulus:(CDStruct_6f955ef8)arg1; 25 | + (double)calculateCCTForChromaticity:(CDStruct_34734122)arg1; 26 | @property(readonly) CBColorSample *sample; // @synthesize sample=_sample; 27 | @property(nonatomic) unsigned long long mode; // @synthesize mode=_mode; 28 | @property(nonatomic) unsigned long long sensorPolicy; // @synthesize sensorPolicy=_sensorPolicy; 29 | - (BOOL)hasExtFrontSensor; 30 | - (BOOL)hasExtRearSensor; 31 | - (BOOL)forceSampleUpdate; 32 | - (void)updateValidServices; 33 | - (BOOL)ALSServiceConformsToPolicy:(id)arg1; 34 | - (void)sendNotificationForKey:(id)arg1 withValue:(id)arg2; 35 | - (void)unregisterNotificationBlock; 36 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 37 | - (void)reportSampleUpdate; 38 | - (void)updateSample; 39 | - (id)newColorSampleConditionWeighted; 40 | - (id)newColorSampleWinnerTakesAll; 41 | - (id)newColorSampleLogWeighted; 42 | - (id)newColorSampleLogWeightedForSamples:(id)arg1; 43 | - (id)newColorSampleLinearWeightedForSamples:(id)arg1; 44 | - (id)newColorSampleLinearWeightedForServices:(id)arg1; 45 | - (unsigned long long)evaluatedFilterMode; 46 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 47 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 48 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 49 | - (void)dealloc; 50 | - (id)initWithQueue:(id)arg1; 51 | 52 | // Remaining properties 53 | @property(readonly, copy) NSString *debugDescription; 54 | @property(readonly, copy) NSString *description; 55 | @property(readonly) unsigned long long hash; 56 | @property(readonly) Class superclass; 57 | 58 | @end 59 | 60 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBColorModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | #import "CBStatusInfoProtocol.h" 12 | #import "NightShiftSupportProtocol.h" 13 | 14 | @class CBColorFilter, NSMutableArray, NSMutableDictionary, NSObject, NSString; 15 | 16 | __attribute__((visibility("hidden"))) 17 | @interface CBColorModule : CBContainer 18 | { 19 | NSMutableArray *_relevantServices; 20 | void *_callbackContext; 21 | CDStruct_ebf15ab2 _colorSample; 22 | double _illuminance; 23 | _Bool _clamshell; 24 | NSObject *_rampTimer; 25 | NSString *_userName; 26 | NSMutableDictionary *_properties; 27 | struct { 28 | struct ColorEffects *cfx; 29 | _Bool blueReductionEnabled; 30 | float blueReductionFactor; 31 | _Bool nightModeSupported; 32 | _Bool fadeInProgress; 33 | _Bool enforceSlowRamps; 34 | float brightnessBoost; 35 | _Bool whitePointEnabled; 36 | double enablementTs; 37 | _Bool forceSnapping; 38 | _Bool harmonyHWSupported; 39 | _Bool harmonyNativeSupported; 40 | _Bool harmonySystemSupported; 41 | _Bool harmonyEnabled; 42 | _Bool harmonyActive; 43 | _Bool harmonyAvailable; 44 | _Bool whitepointAvailable; 45 | float harmonyStrength; 46 | float harmonyFixedStrength; 47 | _Bool presetDisableHarmony; 48 | } _colorStruct; 49 | _Bool _fadeInProgress; 50 | _Bool _endRamp; 51 | struct __IOHIDServiceClient *_dfr; 52 | struct { 53 | unsigned char firstTimerFire; 54 | NSObject *logTimer; 55 | int periodS; 56 | } _reportContext; 57 | BOOL _displayOn; 58 | CBColorFilter *_colorFilter; 59 | NSMutableDictionary *_aggregatedConfig; 60 | unsigned long long _colorFilterModeOverride; 61 | NSMutableDictionary *_currentChromaticitySensitivity; 62 | unsigned long long _moduleType; 63 | } 64 | 65 | @property(readonly) unsigned long long moduleType; // @synthesize moduleType=_moduleType; 66 | - (id)copyIdentifiers; 67 | - (id)newAggregatedConfigFromSerializedConfig:(id)arg1; 68 | - (id)newSerializedConfigFromAggregatedConfig:(id)arg1; 69 | - (void)updateAggregatedConfigWithObject:(id)arg1 forKey:(id)arg2; 70 | - (void)initializeAggregatedConfig; 71 | - (void)notifyAndStoreAggregatedConfig; 72 | - (id)newArrayFromIntegers:(int *)arg1 size:(int)arg2; 73 | - (id)newArrayFromDoubles:(double *)arg1 size:(int)arg2; 74 | - (_Bool)hasExternalALS; 75 | - (BOOL)isDFR; 76 | - (void)reportToAggd:(CDStruct_97eeab40 *)arg1; 77 | - (void)commitPowerLogReport:(CDStruct_97eeab40 *)arg1; 78 | - (void)reportCommitWithStop:(BOOL)arg1; 79 | - (void)reportInitialize; 80 | - (void)reportResetTimerWithStop:(BOOL)arg1; 81 | - (BOOL)startNewTimerWithFreq:(float)arg1; 82 | - (void)timerRoutine:(id)arg1; 83 | - (void)inputAmbientColorSample:(CDStruct_ebf15ab2 *)arg1 force:(BOOL)arg2 trust:(BOOL)arg3; 84 | - (void)activateColorAdaptation; 85 | - (id)newAdaptationModeMappingDictionary:(float *)arg1 strengthNum:(int)arg2; 86 | - (id)newAdaptationModeMappingArray:(float *)arg1 strengthNum:(int)arg2; 87 | - (BOOL)parseAdaptationModeMappingArray:(id)arg1 strengths:(float *)arg2 strengthNum:(int)arg3; 88 | - (BOOL)parseAdaptationModeMappingDictionary:(id)arg1 strengths:(float *)arg2 strengthNum:(int)arg3; 89 | - (void)initColorStruct; 90 | - (void)colorRampRoutine:(const CDStruct_0384f68a *)arg1; 91 | - (void)sendNotificationForKey:(id)arg1 andValue:(id)arg2; 92 | - (void)updateActivity; 93 | - (void)updateAvailability; 94 | - (void)updateClamshellState:(_Bool)arg1; 95 | - (void)updateHarmonySupport; 96 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 97 | - (id)copyPropertyInternalForKey:(id)arg1; 98 | - (id)copyPropertyForKey:(id)arg1; 99 | - (void)switchToUser:(id)arg1; 100 | - (void)setPreference:(id)arg1 forKey:(id)arg2 user:(id)arg3; 101 | - (void)setPreferenceInternal:(id)arg1 forKey:(id)arg2 user:(id)arg3; 102 | - (id)copyPreferenceForKey:(id)arg1 user:(id)arg2; 103 | - (id)copyPreferenceInternalForKey:(id)arg1 user:(id)arg2; 104 | - (void)setNightShiftFactorDictionary:(id)arg1; 105 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 106 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 107 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 108 | - (void)updateSensorPolicy; 109 | - (void)updateColorFilterMode; 110 | - (float)absoluteDifferenceForCurrentColor:(CDStruct_b2fbf00d)arg1 andDeltaError:(CDStruct_b2fbf00d)arg2; 111 | - (BOOL)setColorSensitivity:(float)arg1 forALS:(struct __IOHIDServiceClient *)arg2 withIlluminance:(float)arg3; 112 | - (void)updateSensorSensitivity:(struct __IOHIDServiceClient *)arg1 forValue:(struct __IOHIDEvent *)arg2; 113 | - (void)handleHIDEventInternal:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 114 | - (void)processColorSample:(id)arg1; 115 | - (_Bool)setPropertyInternal:(id)arg1 forKey:(id)arg2; 116 | - (_Bool)displayPresetHarmonyHandler:(id)arg1; 117 | - (BOOL)colorFilterModeHandler:(id)arg1; 118 | - (BOOL)CoreDisplayInitialisedPropertyHandler:(id)arg1; 119 | - (BOOL)CAModeMapping:(id)arg1; 120 | - (BOOL)CAWeakestColorAdaptationModeAnimatedPropertyHandler:(id)arg1; 121 | - (BOOL)CAWeakestColorAdaptationModePropertyHandler:(id)arg1; 122 | - (void)CAStrengthUpdate:(float)arg1 withPeriod:(float)arg2; 123 | - (BOOL)CAStrengthPropertyHandler:(id)arg1; 124 | - (BOOL)CAEnabledPropertyHandler:(id)arg1; 125 | - (BOOL)CALabShiftPropertyHandler:(id)arg1; 126 | - (BOOL)BLRCCTTargetPropertyHandler:(id)arg1; 127 | - (void)BLRFactorUpdate:(float)arg1 withPeriod:(float)arg2; 128 | - (void)BLRFactorUpdate:(float)arg1; 129 | - (BOOL)BLRFactorPropertyHandler:(id)arg1; 130 | - (BOOL)clamshellStatePropertyHandler:(id)arg1; 131 | - (void)displayBrightnessFactorUpdate:(float)arg1; 132 | - (BOOL)displayBrightnessFactorPropertyHandler:(id)arg1; 133 | - (void)dealloc; 134 | - (void)stop; 135 | - (BOOL)start; 136 | - (id)initDFRHarmony; 137 | - (id)initMain; 138 | 139 | // Remaining properties 140 | @property(readonly, copy) NSString *debugDescription; 141 | @property(readonly, copy) NSString *description; 142 | @property(readonly) unsigned long long hash; 143 | @property(readonly) Class superclass; 144 | 145 | @end 146 | 147 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBColorSample.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | __attribute__((visibility("hidden"))) 10 | @interface CBColorSample : NSObject 11 | { 12 | double _lux; 13 | double _CCT; 14 | unsigned long long _mode; 15 | unsigned long long _type; 16 | CDStruct_34734122 _xy; 17 | CDStruct_6f955ef8 _XYZ; 18 | } 19 | 20 | @property(nonatomic) unsigned long long type; // @synthesize type=_type; 21 | @property(nonatomic) unsigned long long mode; // @synthesize mode=_mode; 22 | @property(readonly, nonatomic) double CCT; // @synthesize CCT=_CCT; 23 | @property(readonly, nonatomic) CDStruct_6f955ef8 XYZ; // @synthesize XYZ=_XYZ; 24 | @property(readonly, nonatomic) CDStruct_34734122 xy; // @synthesize xy=_xy; 25 | @property(readonly, nonatomic) double lux; // @synthesize lux=_lux; 26 | - (id)description; 27 | - (id)copyDataInDictionary; 28 | @property(readonly, nonatomic) long long colorBin; 29 | - (double)LuxDifferenceWith:(id)arg1; 30 | - (double)CCTDifferenceWith:(id)arg1; 31 | - (double)colorDeltaEWith:(id)arg1; 32 | @property(readonly, nonatomic) CDStruct_6f955ef8 Lab; 33 | - (void)fillInTristimulus; 34 | - (void)fillInChromaticity; 35 | - (void)setXYZ:(CDStruct_6f955ef8)arg1; 36 | - (void)setXy:(CDStruct_34734122)arg1; 37 | - (id)initWithHIDEvent:(struct __IOHIDEvent *)arg1; 38 | - (id)initWithChromaticity:(CDStruct_34734122)arg1 illuminance:(double)arg2 andTempterature:(double)arg3; 39 | - (id)initWithTristimulus:(CDStruct_6f955ef8)arg1 illuminance:(double)arg2 andTempterature:(double)arg3; 40 | - (id)init; 41 | 42 | @end 43 | 44 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBContainer : NSObject 13 | { 14 | NSObject *_logHandle; 15 | NSObject *_queue; 16 | NSObject *_notificationQueue; 17 | CDUnknownBlockType _notificationBlock; 18 | } 19 | 20 | - (void)dealloc; 21 | - (void)unregisterNotificationBlock; 22 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 23 | - (void)unscheduleWithDispatchQueue:(id)arg1; 24 | - (void)scheduleWithDispatchQueue:(id)arg1; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBContainerModuleProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSString; 10 | 11 | @protocol CBContainerModuleProtocol 12 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 13 | - (void)unregisterNotificationBlock; 14 | - (void)registerNotificationBlock:(void (^)(id, id))arg1; 15 | - (_Bool)setProperty:(id)arg1 forKey:(NSString *)arg2; 16 | - (id)copyPropertyForKey:(NSString *)arg1 withParameter:(id)arg2; 17 | - (id)copyPropertyForKey:(NSString *)arg1; 18 | - (void)stop; 19 | - (void)start; 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBContainerProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject; 10 | 11 | @protocol CBContainerProtocol 12 | - (void)unregisterNotificationBlock; 13 | - (void)registerNotificationBlock:(void (^)(id, id))arg1; 14 | - (void)unscheduleWithDispatchQueue:(NSObject *)arg1; 15 | - (void)scheduleWithDispatchQueue:(NSObject *)arg1; 16 | - (id)copyPropertyForKey:(id)arg1; 17 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 18 | - (void)stop; 19 | - (BOOL)start; 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBDisplayContainerDFR.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBDisplayContainerDFR : CBContainer 16 | { 17 | struct __IOHIDServiceClient *_dfrService; 18 | _Bool _isRunning; 19 | } 20 | 21 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 22 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 23 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 24 | - (void)stop; 25 | - (BOOL)start; 26 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 27 | - (id)copyPropertyForKey:(id)arg1; 28 | - (void)dealloc; 29 | - (id)initWithDFRService:(struct __IOHIDServiceClient *)arg1; 30 | 31 | // Remaining properties 32 | @property(readonly, copy) NSString *debugDescription; 33 | @property(readonly, copy) NSString *description; 34 | @property(readonly) unsigned long long hash; 35 | @property(readonly) Class superclass; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBDisplayContainerMacOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class NSMutableArray, NSMutableArray, NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBDisplayContainerMacOS : CBContainer 16 | { 17 | unsigned long long _deviceID; 18 | unsigned long long _aliasID; 19 | NSMutableArray *_relevantServices; 20 | NSMutableArray *_modules; 21 | _Bool _builtIn; 22 | unsigned long long _vendorID; 23 | unsigned long long _productID; 24 | unsigned long long _serialNumber; 25 | struct IONotificationPort *_hidDisplayServicePublishedNotifyPort; 26 | unsigned int _hidDisplayServiceIterator; 27 | BOOL _brightnessDisabled; 28 | BOOL _autoBrightnessDisabled; 29 | _Bool _running; 30 | } 31 | 32 | @property(readonly) _Bool running; // @synthesize running=_running; 33 | - (_Bool)tearDownInternalModules; 34 | - (_Bool)setupInternalModules; 35 | - (void)sendNotificationForKey:(id)arg1 andValue:(id)arg2; 36 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2 from:(id)arg3; 37 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 38 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 39 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 40 | - (id)copyPropertyForKey:(id)arg1; 41 | - (id)copyContainerPropertyForKey:(id)arg1; 42 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 43 | - (void)stop; 44 | - (BOOL)start; 45 | - (void)dealloc; 46 | - (id)initWithID:(unsigned long long)arg1; 47 | 48 | // Remaining properties 49 | @property(readonly, copy) NSString *debugDescription; 50 | @property(readonly, copy) NSString *description; 51 | @property(readonly) unsigned long long hash; 52 | @property(readonly) Class superclass; 53 | 54 | @end 55 | 56 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBDisplayModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerModuleProtocol.h" 10 | #import "CBStatusInfoProtocol.h" 11 | 12 | @class NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBDisplayModule : CBModule 16 | { 17 | } 18 | 19 | - (id)copyPropertyInternalForKey:(id)arg1; 20 | - (id)copyIdentifiers; 21 | - (void)stop; 22 | - (void)start; 23 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 24 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 25 | - (id)copyPropertyForKey:(id)arg1 withParameter:(id)arg2; 26 | - (id)copyPropertyForKey:(id)arg1; 27 | 28 | // Remaining properties 29 | @property(readonly, copy) NSString *debugDescription; 30 | @property(readonly, copy) NSString *description; 31 | @property(readonly) unsigned long long hash; 32 | @property(readonly) Class superclass; 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBDisplayModuleMacOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSMutableDictionary, NSObject, NSString; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBDisplayModuleMacOS : CBDisplayModule 13 | { 14 | _Bool _running; 15 | struct DSDevice *_device; 16 | NSString *_containerID; 17 | NSObject *_delayedBrightnessCommitTimer; 18 | NSMutableDictionary *_properties; 19 | _Bool _brightnessUpdatesDisabled; 20 | float _magSafeFactor; 21 | BOOL _builtIn; 22 | unsigned long long _displayID; 23 | } 24 | 25 | @property(readonly) BOOL builtIn; // @synthesize builtIn=_builtIn; 26 | @property(readonly) unsigned long long displayID; // @synthesize displayID=_displayID; 27 | - (void)sendDisplayBrightnessStateNotificationWithReason:(id)arg1; 28 | - (id)copyIdentifiers; 29 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 30 | - (id)copyALCState; 31 | - (_Bool)displayGetLinearBrightness:(float *)arg1 forDynamicSlider:(_Bool)arg2; 32 | - (_Bool)displayGetBrightness:(float *)arg1; 33 | - (void)commitUserBrightness:(id)arg1; 34 | - (_Bool)displaySetBrightness:(float)arg1 withType:(int)arg2; 35 | - (_Bool)displaySetBrightnessSmooth:(float)arg1; 36 | - (_Bool)getIntegerValue:(long long *)arg1 forKey:(id)arg2; 37 | - (_Bool)getFloatValue:(float *)arg1 forKey:(id)arg2; 38 | - (_Bool)setIntegerValue:(long long)arg1 forKey:(id)arg2; 39 | - (_Bool)setFloatValue:(float)arg1 forKey:(id)arg2; 40 | - (id)copyPropertyInternalForKey:(id)arg1 withParameter:(id)arg2; 41 | - (id)copyPropertyInternalForKey:(id)arg1; 42 | - (_Bool)setPropertyInternal:(id)arg1 forKey:(id)arg2; 43 | - (void)newKey:(id *)arg1 andDisplayID:(unsigned int *)arg2 fromNotificationName:(id)arg3; 44 | - (id)copyPropertyForKey:(id)arg1 withParameter:(id)arg2; 45 | - (id)copyPropertyForKey:(id)arg1; 46 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 47 | - (void)handlDeviceUpdate:(id)arg1 withData:(id)arg2; 48 | - (void)sendNotificationForKey:(id)arg1 withValue:(id)arg2; 49 | - (void)stop; 50 | - (void)start; 51 | - (void)dealloc; 52 | - (id)initWithDisplayID:(unsigned long long)arg1 andQueue:(id)arg2; 53 | 54 | @end 55 | 56 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBDisplayUpdateHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSArray, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBDisplayUpdateHandler : NSObject 13 | { 14 | NSObject *_logHandle; 15 | NSArray *_onlineDisplays; 16 | NSArray *_onlineDisplayAliases; 17 | } 18 | 19 | + (id)handler; 20 | + (id)allocWithZone:(struct _NSZone *)arg1; 21 | - (unsigned long long)getDeviceIDForID:(unsigned long long)arg1; 22 | - (unsigned long long)getDeviceIDForAlias:(unsigned long long)arg1; 23 | - (unsigned long long)getAliasForDeviceID:(unsigned long long)arg1; 24 | - (void)reinitializeDisplaySet; 25 | - (void)configurationChanged; 26 | - (void)hardwareChanged; 27 | - (void)wipeCache; 28 | - (_Bool)getOnlineDisplaysList:(unsigned int *)arg1 withMaxDisplays:(unsigned int)arg2 andNumberOfDisplays:(unsigned int *)arg3; 29 | - (id)copyOnlineDisplayAliases; 30 | - (id)copyOnlineDisplays; 31 | - (id)autorelease; 32 | - (oneway void)release; 33 | - (unsigned long long)retainCount; 34 | - (id)retain; 35 | - (id)copyWithZone:(struct _NSZone *)arg1; 36 | - (void)dealloc; 37 | - (id)init; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBHIDService.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBHIDService : NSObject 13 | { 14 | NSObject *_logHandle; 15 | struct __IOHIDServiceClient *_service; 16 | unsigned long long _registryID; 17 | struct __IOHIDEvent *_event; 18 | BOOL _builtIn; 19 | } 20 | 21 | @property(readonly) BOOL builtIn; // @synthesize builtIn=_builtIn; 22 | @property(readonly) unsigned long long registryID; // @synthesize registryID=_registryID; 23 | @property(readonly) struct __IOHIDServiceClient *service; // @synthesize service=_service; 24 | - (BOOL)updateEventData; 25 | @property struct __IOHIDEvent *event; // @synthesize event=_event; 26 | - (BOOL)setPropertyForKey:(id)arg1 withValue:(id)arg2; 27 | - (id)copyPropertyForKey:(id)arg1; 28 | - (BOOL)conformsToHIDService:(struct __IOHIDServiceClient *)arg1; 29 | - (BOOL)conformsToUsagePage:(unsigned long long)arg1 andUsage:(unsigned long long)arg2; 30 | - (void)dealloc; 31 | - (id)initWithHIDServiceClient:(struct __IOHIDServiceClient *)arg1 andIdentifier:(id)arg2; 32 | - (id)init; 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBHIDServiceProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @protocol CBHIDServiceProtocol 10 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 11 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 12 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBKeyboardBacklightContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class HIDDevice, KeyboardBacklight, NSMutableDictionary, NSObject, NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface CBKeyboardBacklightContainer : CBContainer 16 | { 17 | NSObject *_logHandle; 18 | KeyboardBacklight *_keyboardBacklight; 19 | BOOL _userActive; 20 | NSMutableDictionary *_properties; 21 | HIDDevice *_device; 22 | } 23 | 24 | @property(readonly) HIDDevice *device; // @synthesize device=_device; 25 | - (_Bool)keyboardUsesNitUnits:(id)arg1; 26 | - (id)newKeyboardBacklightWithQueue:(id)arg1 device:(id)arg2; 27 | - (void)sendNotificationForKey:(id)arg1 andValue:(id)arg2; 28 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 29 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 30 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 31 | - (_Bool)setPropertyInternal:(id)arg1 forKey:(id)arg2; 32 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 33 | - (id)copyPropertyInternalForKey:(id)arg1; 34 | - (id)copyPropertyForKey:(id)arg1; 35 | - (void)stop; 36 | - (BOOL)start; 37 | - (void)dealloc; 38 | - (id)initWithDevice:(id)arg1; 39 | 40 | // Remaining properties 41 | @property(readonly, copy) NSString *debugDescription; 42 | @property(readonly, copy) NSString *description; 43 | @property(readonly) unsigned long long hash; 44 | @property(readonly) Class superclass; 45 | 46 | @end 47 | 48 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBKeyboardPreferencesManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSMutableDictionary, NSObject, NSObject; 10 | 11 | @interface CBKeyboardPreferencesManager : NSObject 12 | { 13 | NSObject *_logHandle; 14 | NSObject *_queue; 15 | NSMutableDictionary *_preferences; 16 | } 17 | 18 | + (id)copyAllPreferences; 19 | + (id)copyPreferenceForKey:(id)arg1 keyboardID:(unsigned long long)arg2; 20 | + (id)copyPreferenceForKey:(id)arg1; 21 | + (_Bool)getBoolPreference:(_Bool *)arg1 forKey:(id)arg2; 22 | + (_Bool)getFloatPreference:(float *)arg1 forKey:(id)arg2; 23 | + (_Bool)getIntPreference:(int *)arg1 forKey:(id)arg2; 24 | + (_Bool)setPreference:(id)arg1 forKey:(id)arg2; 25 | + (_Bool)setBoolPreference:(_Bool)arg1 forKey:(id)arg2; 26 | + (_Bool)setFloatPreference:(float)arg1 forKey:(id)arg2; 27 | + (_Bool)setIntPreference:(int)arg1 forKey:(id)arg2; 28 | + (id)sharedInstance; 29 | - (id)copyAllPrefereneces; 30 | - (id)copyPreferenceForKey:(id)arg1; 31 | - (_Bool)setPreference:(id)arg1 forKey:(id)arg2; 32 | - (void)dealloc; 33 | - (id)init; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSObject, NSObject; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface CBModule : NSObject 13 | { 14 | CDUnknownBlockType _notificationBlock; 15 | NSObject *_logHandle; 16 | NSObject *_queue; 17 | } 18 | 19 | - (void)unregisterNotificationBlock; 20 | - (void)registerNotificationBlock:(CDUnknownBlockType)arg1; 21 | - (void)dealloc; 22 | - (id)initWithQueue:(id)arg1; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBPreferencesHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | __attribute__((visibility("hidden"))) 10 | @interface CBPreferencesHandler : NSObject 11 | { 12 | } 13 | 14 | + (struct __CFDictionary *)copyPreferenceDictionaryForUser:(id)arg1; 15 | + (_Bool)storePreferenceForAllUsersMultiple:(id)arg1; 16 | + (id)copyPreferenceForAllUsersMultiple:(id)arg1; 17 | + (id)copyPreferenceForAllUsersForKey:(id)arg1; 18 | + (id)copyNestedPreferenceForKey1:(id)arg1 key2:(id)arg2 key3:(id)arg3; 19 | + (id)copyPreferenceForUser:(id)arg1 forKey:(id)arg2; 20 | + (_Bool)storePreferenceForAllUsersForKey:(id)arg1 andValue:(id)arg2; 21 | + (_Bool)storeNestedPreferenceForAllUsersWithKey1:(id)arg1 key2:(id)arg2 key3:(id)arg3 andValue:(id)arg4; 22 | + (_Bool)storePreferenceForUser:(id)arg1 withKey:(id)arg2 andValue:(id)arg3; 23 | + (void)consistencyCheckForUser:(id)arg1; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBStatusInfoHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | __attribute__((visibility("hidden"))) 10 | @interface CBStatusInfoHelper : NSObject 11 | { 12 | } 13 | 14 | + (id)copyStatusInfoFor:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBStatusInfoProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSArray; 10 | 11 | @protocol CBStatusInfoProtocol 12 | - (id)copyPropertyInternalForKey:(id)arg1; 13 | - (NSArray *)copyIdentifiers; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBTrueToneClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class BrightnessSystemClientInternal, NSObject, NSObject; 10 | 11 | @interface CBTrueToneClient : NSObject 12 | { 13 | BrightnessSystemClientInternal *_bsci; 14 | CDUnknownBlockType _notificationBlock; 15 | NSObject *_notificationQueue; 16 | NSObject *_logHandle; 17 | } 18 | 19 | - (BOOL)setWeakestAdaptationModeFromArray:(unsigned long long *)arg1 withLength:(unsigned long long)arg2 andPeriod:(float)arg3; 20 | - (BOOL)setMode:(unsigned long long)arg1 withPeriod:(float)arg2; 21 | - (unsigned long long)mode; 22 | - (BOOL)available; 23 | - (BOOL)supportIntegrated; 24 | - (BOOL)supported; 25 | - (BOOL)setEnabled:(BOOL)arg1; 26 | - (BOOL)enabled; 27 | - (void)unregisterNotificationForType:(unsigned long long)arg1; 28 | - (BOOL)registerNotificationForType:(unsigned long long)arg1; 29 | - (void)unregisterNotificationCallbackBlock; 30 | - (BOOL)registerNotificationCallbackBlock:(CDUnknownBlockType)arg1 withQueue:(id)arg2; 31 | - (void)handleBrightnessSystemNotificationForKey:(id)arg1 withValue:(id)arg2; 32 | - (void)deactivate; 33 | - (BOOL)activate; 34 | - (void)dealloc; 35 | - (id)init; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CBUserStudyDataCollectionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | __attribute__((visibility("hidden"))) 10 | @interface CBUserStudyDataCollectionManager : NSObject 11 | { 12 | } 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/CDStructures.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class CBDisplayModuleMacOS, NSObject; 8 | 9 | #pragma mark Blocks 10 | 11 | typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown 12 | 13 | #pragma mark Named Structures 14 | 15 | struct ALSStruct { 16 | float currentValue; 17 | float e1; 18 | float e1Sensor; 19 | float e2; 20 | float e2Sensor; 21 | float eThresh; 22 | float bl1; 23 | float bl2; 24 | _Bool autoEnabled; 25 | }; 26 | 27 | struct BLRAggdInfo { 28 | float manualModeTime; 29 | float sunModeTime; 30 | float scheduleModeTime; 31 | int turnOnForNowCount; 32 | int turnOffForNowCount; 33 | int turnOnUntilTomorrowCount; 34 | int turnOffUntilTomorrowCount; 35 | double _aggdModeChangeTimestamp; 36 | }; 37 | 38 | struct ColorEffects; 39 | 40 | struct DSDevice { 41 | unsigned int _field1; 42 | unsigned long long _field2; 43 | struct __CFString *_field3; 44 | unsigned int _field4; 45 | unsigned int _field5; 46 | struct __CFDictionary *_field6; 47 | int _field7; 48 | _Bool _field8; 49 | _Bool _field9; 50 | float _field10; 51 | void *_field11; 52 | void *_field12; 53 | double _field13; 54 | id _field14; 55 | CDUnknownBlockType _field15; 56 | struct IONotificationPort *_field16; 57 | unsigned int _field17; 58 | id _field18; 59 | id _field19; 60 | _Bool _field20; 61 | }; 62 | 63 | struct DisplayStruct { 64 | CBDisplayModuleMacOS *displayModule; 65 | float displayIncrement; 66 | _Bool needsBrightnessSmoothing; 67 | float minimumLinearBrightness; 68 | float maximumLinearBrightness; 69 | float currentFadeTarget; 70 | NSObject *fadeTimer; 71 | NSObject *alsIdleTimer; 72 | NSObject *forceUpdateTimer; 73 | float magsafeFactor; 74 | struct MagSafeReduction magSafeReduction; 75 | struct DynamicSlider dynamicSlider; 76 | _Bool freezeBrightnessUpdates; 77 | }; 78 | 79 | struct DynamicSlider { 80 | _Bool supported; 81 | NSObject *fadeTimer; 82 | CDStruct_08e969a3 range; 83 | CDStruct_08e969a3 rangeBattery; 84 | struct *currentRange; 85 | float currentTargetFactor; 86 | }; 87 | 88 | struct IONotificationPort; 89 | 90 | struct MagSafeReduction { 91 | _Bool enabled; 92 | float linearBrightnessLimit; 93 | float luxThreshold; 94 | }; 95 | 96 | struct NMFactorState { 97 | double rampStartTime; 98 | float factor; 99 | float target; 100 | float start; 101 | float rampLength; 102 | }; 103 | 104 | struct Ramp { 105 | float start; 106 | float target; 107 | float current; 108 | double startTime; 109 | double duration; 110 | }; 111 | 112 | struct mach_timebase_info { 113 | unsigned int numer; 114 | unsigned int denom; 115 | }; 116 | 117 | #pragma mark Typedef'd Structures 118 | 119 | typedef struct { 120 | unsigned long long alsAccumulatedTimeSinceLastPost; 121 | float averageLux; 122 | _Bool isFirstReport; 123 | unsigned long long reportStatLastTimestamp; 124 | float lastLuxValue; 125 | float minLuxValue; 126 | float maxLuxValue; 127 | int numberOfUserBrightnessChanges; 128 | _Bool alsEnabled; 129 | } CDStruct_93cb412c; 130 | 131 | typedef struct { 132 | double _field1[17]; 133 | int _field2[17]; 134 | int _field3; 135 | unsigned long long _field4; 136 | } CDStruct_c688133d; 137 | 138 | typedef struct { 139 | double X; 140 | double Y; 141 | double Z; 142 | } CDStruct_6f955ef8; 143 | 144 | typedef struct { 145 | double x; 146 | double y; 147 | } CDStruct_34734122; 148 | 149 | typedef struct { 150 | float minCCT; 151 | float maxCCT; 152 | float midCCT; 153 | } CDStruct_6ede4ed5; 154 | 155 | typedef struct { 156 | int hour; 157 | int minute; 158 | } CDStruct_bdf7039f; 159 | 160 | typedef struct { 161 | float XYZ[3]; 162 | struct { 163 | float x; 164 | float y; 165 | } xy; 166 | float CCT1; 167 | } CDStruct_ebf15ab2; 168 | 169 | typedef struct { 170 | float _field1; 171 | float _field2[9]; 172 | unsigned int _field3; 173 | float _field4; 174 | struct { 175 | float _field1; 176 | float _field2; 177 | } _field5; 178 | int _field6; 179 | double _field7; 180 | } CDStruct_0384f68a; 181 | 182 | typedef struct { 183 | CDStruct_c688133d _field1; 184 | CDStruct_c688133d _field2; 185 | struct { 186 | double _field1[46]; 187 | int _field2; 188 | unsigned long long _field3; 189 | } _field3; 190 | struct { 191 | double _field1; 192 | double _field2; 193 | double _field3; 194 | _Bool _field4; 195 | float _field5; 196 | } _field4; 197 | struct { 198 | double _field1[10]; 199 | int _field2; 200 | double _field3; 201 | } _field5; 202 | struct { 203 | double _field1; 204 | double _field2; 205 | double _field3; 206 | double _field4; 207 | float _field5; 208 | float _field6; 209 | } _field6; 210 | int _field7; 211 | } CDStruct_97eeab40; 212 | 213 | typedef struct { 214 | CDStruct_46614362 minPoint; 215 | CDStruct_46614362 maxPoint; 216 | CDStruct_46614362 hysteresisPoint; 217 | } CDStruct_08e969a3; 218 | 219 | typedef struct { 220 | CDStruct_bdf7039f fromTime; 221 | CDStruct_bdf7039f toTime; 222 | } CDStruct_6cee55f3; 223 | 224 | typedef struct { 225 | char active; 226 | char enabled; 227 | char sunSchedulePermitted; 228 | int mode; 229 | CDStruct_6cee55f3 schedule; 230 | unsigned long long disableFlags; 231 | char available; 232 | } CDStruct_d991f265; 233 | 234 | // Ambiguous groups 235 | typedef struct { 236 | float _field1; 237 | float _field2; 238 | } CDStruct_b2fbf00d; 239 | 240 | typedef struct { 241 | float lux; 242 | float factor; 243 | } CDStruct_46614362; 244 | 245 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/DisplayALSManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import "NSObject.h" 8 | //#import 9 | //#import "AmbientLightSensorStats.h" 10 | @class AmbientLightSensorStats, OS_dispatch_queue, OS_os_log; 11 | 12 | __attribute__((visibility("hidden"))) 13 | @interface DisplayALSManager : NSObject 14 | { 15 | NSObject *_queue; 16 | struct ALSStruct; 17 | struct DisplayStruct; 18 | struct __CFString *_IOPMDynamicStoreSettingsKey; 19 | struct __SCDynamicStore *_SCDynamicStore; 20 | struct { 21 | long long _field1; 22 | void *_field2; 23 | id _field3; 24 | id _field4; 25 | id _field5; 26 | } *_SCDynamicStoreContext; 27 | int _currentReducedBrightnessSetting; 28 | AmbientLightSensorStats *_alsStats; 29 | unsigned int _powerNotifierRootIOKitPort; 30 | struct IONotificationPort *_powerNotifierPortRef; 31 | unsigned int _powerNotifierObject; 32 | _Bool _removedMagSafeOnSleep; 33 | id *_logHandle; 34 | } 35 | 36 | - (void)forceUpdate:(unsigned int)arg1; 37 | - (void)setDisplayModuleAlsCurve; 38 | - (void)setDisplayModuleAutoEnabled; 39 | - (void)preferencesChanged:(id)arg1; 40 | - (void)savePreferences; 41 | - (_Bool)loadPreferences; 42 | - (void)startALSIdleTimer; 43 | - (void)setPerceptualBrightnessWithFade:(float)arg1 length:(float)arg2; 44 | - (void)handleALSUpdate:(float)arg1; 45 | - (void)forceUpdateDynamicSlider; 46 | - (BOOL)updateDynamicSlider:(float)arg1; 47 | - (BOOL)updateDynamicSliderWithLux:(float)arg1 force:(BOOL)arg2; 48 | - (BOOL)updateDynamicSliderState:(BOOL)arg1 battery:(BOOL)arg2; 49 | - (void)setDynamicSliderWithFade:(float)arg1 length:(float)arg2; 50 | - (void)updateDynamicSliderConfiguration:(id)arg1; 51 | - (void)setDynamicSliderConfigurationValues:(id)arg1; 52 | - (id)copyDynamicSliderConfiguration; 53 | - (void)updateMagsafeRestrictionConfiguration:(id)arg1; 54 | - (void)setMagsafeRestrictionConfigurationValues:(id)arg1; 55 | - (id)copyMagsafeRestrictionConfiguration; 56 | - (void)stopDynamicSliderFade; 57 | - (float)linearBrightnessForLux:(float)arg1; 58 | - (float)linearBrightness; 59 | - (void)setMagsafeBrightnessLevel:(int)arg1; 60 | - (int)magsafeBrightnessLevel; 61 | - (void)magsafeStateChanged:(id)arg1; 62 | - (void)setInitialMagsafeState; 63 | - (void)unregisterSleepWakeNotifications; 64 | - (void)registerSleepWakeNotifications; 65 | - (void)stopMagsafeMonitoring; 66 | - (void)startMagsafeMonitoring; 67 | - (void)unregisterForSystemNotifications; 68 | - (void)registerForSystemNotifications; 69 | - (void)updateDynamicThreshold; 70 | - (void)updateALSParameters; 71 | - (float)getAdjustedMinLinearBrightness; 72 | - (float)getAdjustedMaxLinearBrightness; 73 | - (int)setAdjustedLinearBrightness:(float)arg1; 74 | - (int)getAdjustedLinearBrightness:(float *)arg1; 75 | - (void)stop; 76 | - (_Bool)start; 77 | - (void)stopFade; 78 | - (void)commitUserBrightnessChange; 79 | - (void)userBrightnessChanged; 80 | - (_Bool)cacheDisplayAlgorithmParameters; 81 | - (void)setQueue:(id)arg1; 82 | - (void)dealloc; 83 | - (id)initWithDisplayModule:(id)arg1; 84 | 85 | @end 86 | 87 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/DisplayServicesClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class BrightnessSystemClientInternal, NSObject; 10 | 11 | @interface DisplayServicesClient : NSObject 12 | { 13 | BrightnessSystemClientInternal *bsci; 14 | NSObject *_logHandle; 15 | CDUnknownBlockType _displayNotificationBlock; 16 | CDUnknownBlockType _propertyNotificationBlock; 17 | } 18 | 19 | - (void)unregisterNotificationForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 20 | - (void)registerNotificationForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 21 | - (void)unregisterNotificationForKeys:(id)arg1 andDisplay:(unsigned long long)arg2; 22 | - (void)registerNotificationForKeys:(id)arg1 andDisplay:(unsigned long long)arg2; 23 | - (void)unregisterNotificationForKeys:(id)arg1; 24 | - (void)registerNotificationForKeys:(id)arg1; 25 | - (void)unregisterNotificationForKey:(id)arg1; 26 | - (void)registerNotificationForKey:(id)arg1; 27 | - (void)unregisterPropertyNotificationBlock; 28 | - (void)registerPropertyNotificationCallbackBlock:(CDUnknownBlockType)arg1; 29 | - (void)unregisterDisplayNotificationBlock; 30 | - (void)registerDisplayNotificationCallbackBlock:(CDUnknownBlockType)arg1; 31 | - (id)copyPropertyForKey:(id)arg1 andDisplay:(unsigned long long)arg2 withParameter:(id)arg3; 32 | - (id)copyPropertyForKey:(id)arg1 andDisplay:(unsigned long long)arg2; 33 | - (id)copyPropertyForKey:(id)arg1; 34 | - (_Bool)setProperty:(id)arg1 withKey:(id)arg2 andDisplay:(unsigned long long)arg3; 35 | - (_Bool)setProperty:(id)arg1 withKey:(id)arg2; 36 | - (void)dealloc; 37 | - (id)init; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/KeyboardBacklight.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | #import "CBContainerModuleProtocol.h" 10 | #import "CBHIDServiceProtocol.h" 11 | 12 | @class HIDDevice, HIDElement, NSLock, NSMutableArray, NSMutableDictionary, NSObject, NSString; 13 | 14 | __attribute__((visibility("hidden"))) 15 | @interface KeyboardBacklight : CBModule 16 | { 17 | _Bool _muted; 18 | _Bool _manualAdjust; 19 | _Bool _saturated; 20 | _Bool _dimmed; 21 | _Bool _suspend; 22 | _Bool _suspendDimming; 23 | _Bool _userActive; 24 | _Bool _displayOn; 25 | float _previousLevelPercentage; 26 | int _numOfBacklightUpdateRetries; 27 | HIDDevice *_device; 28 | HIDElement *_levelElement; 29 | HIDElement *_levelFadeSpeedElement; 30 | HIDElement *_enableElement; 31 | HIDElement *_enableFadeSpeedElement; 32 | NSMutableArray *_elements; 33 | NSMutableArray *_alsServiceClients; 34 | unsigned long long _activityNotificationHandle; 35 | NSMutableDictionary *_properties; 36 | NSObject *_forceLuxUpdateTimer; 37 | NSObject *_backlightUpdateTimer; 38 | _Bool _backlightUpdateInProgress; 39 | NSLock *_backlightUpdateLock; 40 | struct mach_timebase_info _clockInfo; 41 | int _backlightUpdateFrequency; 42 | unsigned long long _lastBacklightUpdate; 43 | unsigned long long _backlightUpdateType; 44 | NSObject *_rampTimer; 45 | struct Ramp _ramp; 46 | _Bool _builtIn; 47 | _Bool _autoAdjust; 48 | int _dimTime; 49 | float _ambientOffset; 50 | float _ambientHighThreshold; 51 | float _ambientLowThreshold; 52 | float _levelPercentage; 53 | float _levelMin; 54 | float _levelMax; 55 | float _levelOff; 56 | unsigned int _levelUnit; 57 | unsigned int _unitExponent; 58 | float _ambientSlope; 59 | float _currentLux; 60 | float _previousLevel; 61 | unsigned long long _keyboardID; 62 | NSMutableDictionary *_keyboardSpecificPreferences; 63 | } 64 | 65 | + (unsigned long long)getHashIDForDevice:(id)arg1; 66 | @property float previousLevel; // @synthesize previousLevel=_previousLevel; 67 | @property(retain) NSMutableDictionary *keyboardSpecificPreferences; // @synthesize keyboardSpecificPreferences=_keyboardSpecificPreferences; 68 | @property float currentLux; // @synthesize currentLux=_currentLux; 69 | @property(readonly) float ambientSlope; // @synthesize ambientSlope=_ambientSlope; 70 | @property unsigned int unitExponent; // @synthesize unitExponent=_unitExponent; 71 | @property unsigned int levelUnit; // @synthesize levelUnit=_levelUnit; 72 | @property float levelOff; // @synthesize levelOff=_levelOff; 73 | @property float levelMax; // @synthesize levelMax=_levelMax; 74 | @property float levelMin; // @synthesize levelMin=_levelMin; 75 | @property float levelPercentage; // @synthesize levelPercentage=_levelPercentage; 76 | @property _Bool autoAdjust; // @synthesize autoAdjust=_autoAdjust; 77 | @property(readonly) float ambientLowThreshold; // @synthesize ambientLowThreshold=_ambientLowThreshold; 78 | @property(readonly) float ambientHighThreshold; // @synthesize ambientHighThreshold=_ambientHighThreshold; 79 | @property float ambientOffset; // @synthesize ambientOffset=_ambientOffset; 80 | @property int dimTime; // @synthesize dimTime=_dimTime; 81 | @property unsigned long long keyboardID; // @synthesize keyboardID=_keyboardID; 82 | @property _Bool builtIn; // @synthesize builtIn=_builtIn; 83 | - (double)timeToNextBacklightUpdate; 84 | - (void)stopRamp; 85 | - (void)timerRoutine:(id)arg1; 86 | - (void)startRamp; 87 | - (void)rampToBrightness:(float)arg1 withDuration:(unsigned int)arg2; 88 | - (void)storeKeyboardBacklightPreferences; 89 | - (void)getKeyboardBacklightPreferences; 90 | - (void)setKBPreferenceBacklightMaxUser; 91 | - (_Bool)removeHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 92 | - (_Bool)handleHIDEvent:(struct __IOHIDEvent *)arg1 from:(struct __IOHIDServiceClient *)arg2; 93 | - (_Bool)addHIDServiceClient:(struct __IOHIDServiceClient *)arg1; 94 | - (void)handleNotificationForKey:(id)arg1 withProperty:(id)arg2; 95 | - (void)sendNotificationForKey:(id)arg1 withValue:(id)arg2; 96 | - (_Bool)KBUserOffsetPropertyHandler:(id)arg1; 97 | - (_Bool)KBUserActivityUpdateHandler:(id)arg1; 98 | - (_Bool)KBSuspendDimmingPropertyHandler:(id)arg1; 99 | - (_Bool)KBIdleDimTimeHandler:(id)arg1; 100 | - (_Bool)KBIdleDimPropertyHandler:(id)arg1; 101 | - (_Bool)KBBrightnessPropertyHandler:(id)arg1; 102 | - (_Bool)KBAutoBrightnessEnablePropertyHandler:(id)arg1; 103 | - (_Bool)KBAutoBrightnessSuspendPropertyHandler:(id)arg1; 104 | - (_Bool)KBDisplayBrightnessFactorPropertyHandler:(id)arg1; 105 | - (_Bool)setProperty:(id)arg1 forKey:(id)arg2; 106 | - (id)copyPropertyForKey:(id)arg1 withParameter:(id)arg2; 107 | - (id)copyPropertyForKey:(id)arg1; 108 | - (void)forceBacklightUpdateRoutine; 109 | - (void)scheduleBacklightUpdate:(int)arg1; 110 | - (void)forceLuxUpdateRoutine; 111 | - (void)forceLuxUpdate; 112 | - (void)endKeyDim; 113 | - (void)handlePMUserActivityStateChanged:(unsigned long long)arg1; 114 | - (void)resetKeyDimTimeout; 115 | - (void)calculateLevelPercentageAtAmbient:(float)arg1; 116 | - (float)currentLuxToAmbient; 117 | - (void)handleLuxUpdate:(float)arg1; 118 | @property(readonly) float maxUserLevel; 119 | - (void)getCurrentLux; 120 | - (float)level; 121 | - (void)updateAmbientOffset; 122 | - (void)setBrightness:(float)arg1 withFadeSpeed:(int)arg2 commit:(BOOL)arg3; 123 | @property float brightness; 124 | @property _Bool saturated; 125 | @property _Bool manualAdjust; 126 | @property _Bool muted; 127 | - (void)toggleMute; 128 | - (void)didUpdateBacklightLevel:(float)arg1 brightness:(float)arg2 result:(_Bool)arg3 error:(id)arg4; 129 | - (void)updateBacklightDeviceWithFadeSpeed:(int)arg1 commit:(_Bool)arg2 reason:(unsigned long long)arg3; 130 | - (void)updateBacklightDeviceWithReason:(unsigned long long)arg1; 131 | - (void)updateBacklightDevice; 132 | - (void)sendSuppressedNotification:(_Bool)arg1; 133 | @property _Bool userActive; 134 | @property _Bool suspend; 135 | @property _Bool dimmed; 136 | @property(readonly) _Bool suppressed; 137 | @property(readonly, copy) NSString *description; 138 | - (_Bool)retrieveKeyboardBacklightElements; 139 | - (void)start; 140 | - (void)stop; 141 | - (void)dealloc; 142 | - (id)initWithQueue:(id)arg1 device:(id)arg2 ambientOffset:(float)arg3; 143 | - (id)initWithQueue:(id)arg1 device:(id)arg2; 144 | - (id)initWithQueue:(id)arg1; 145 | 146 | // Remaining properties 147 | @property(readonly, copy) NSString *debugDescription; 148 | @property(readonly) unsigned long long hash; 149 | @property(readonly) Class superclass; 150 | 151 | @end 152 | 153 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/KeyboardBacklightHIDCurve.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSDictionary; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface KeyboardBacklightHIDCurve : KeyboardBacklight 13 | { 14 | float _chicletCurveCoefficient; 15 | float _chicletCurvePower; 16 | } 17 | 18 | @property(readonly) float chicletCurvePower; // @synthesize chicletCurvePower=_chicletCurvePower; 19 | @property(readonly) float chicletCurveCoefficient; // @synthesize chicletCurveCoefficient=_chicletCurveCoefficient; 20 | - (float)perceptualBrightnessForLevel:(float)arg1; 21 | @property(readonly) float minCapableNits; 22 | @property(readonly) float maxCapableNits; 23 | - (void)calculateLevelPercentageAtAmbient:(float)arg1; 24 | - (void)handleLuxUpdate:(float)arg1; 25 | - (float)currentLuxToAmbient; 26 | - (float)convertPWMPercentageToNits:(float)arg1; 27 | - (float)convertNitsToLevelPercentage:(float)arg1; 28 | - (float)currentLuxToNits; 29 | - (void)setBrightness:(float)arg1 withFadeSpeed:(int)arg2 commit:(BOOL)arg3; 30 | - (void)setBrightness:(float)arg1; 31 | - (float)brightness; 32 | @property(readonly) float level; 33 | - (void)updateLuxToNitsCurve; 34 | - (void)storeKeyboardBacklightCurveToPreferences; 35 | - (void)storeKeyboardBacklightPreferences; 36 | - (void)getKeyboardBacklightPreferences; 37 | - (float)maxUserLevel; 38 | @property(readonly) float maxLevelPercentage; 39 | @property(readonly) float maxCurveNits; 40 | @property(readonly) NSDictionary *brightnessCurve; 41 | - (BOOL)isBrightnessCurveValid:(id)arg1; 42 | - (void)updateBrightnessCurve:(id)arg1; 43 | - (id)description; 44 | - (void)dealloc; 45 | - (id)initWithQueue:(id)arg1 device:(id)arg2; 46 | - (id)initWithQueue:(id)arg1; 47 | 48 | @end 49 | 50 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/KeyboardBacklightHIDCurveNits.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | __attribute__((visibility("hidden"))) 10 | @interface KeyboardBacklightHIDCurveNits : KeyboardBacklightHIDCurve 11 | { 12 | } 13 | 14 | - (float)minCapableNits; 15 | - (float)maxCapableNits; 16 | - (float)brightness; 17 | - (float)maxLevelPercentage; 18 | - (float)convertNitsToLevelPercentage:(float)arg1; 19 | - (void)setBrightness:(float)arg1 withFadeSpeed:(int)arg2 commit:(BOOL)arg3; 20 | - (void)setBrightness:(float)arg1; 21 | @property(readonly) float level; 22 | - (void)dealloc; 23 | - (id)initWithQueue:(id)arg1 device:(id)arg2; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/KeyboardBrightnessClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | //#import "NSObject.h" 8 | 9 | @class BrightnessSystemClient, OS_os_log; 10 | 11 | @interface KeyboardBrightnessClient : NSObject 12 | { 13 | BrightnessSystemClient *bsc; 14 | id *_logHandle; 15 | } 16 | 17 | - (void)registerNotificationForKeys:(id)arg1 keyboardID:(unsigned long long)arg2 block:(id)arg3; 18 | - (void)unregisterKeyboardNotificationBlock; 19 | - (BOOL)isAutoBrightnessEnabledForKeyboard:(unsigned long long)arg1; 20 | - (BOOL)isIdleDimmingSuspendedOnKeyboard:(unsigned long long)arg1; 21 | - (BOOL)suspendIdleDimming:(BOOL)arg1 forKeyboard:(unsigned long long)arg2; 22 | - (BOOL)setIdleDimTime:(double)arg1 forKeyboard:(unsigned long long)arg2; 23 | - (double)idleDimTimeForKeyboard:(unsigned long long)arg1; 24 | - (BOOL)isKeyboardBuiltIn:(unsigned long long)arg1; 25 | - (BOOL)isAmbientFeatureAvailableOnKeyboard:(unsigned long long)arg1; 26 | - (BOOL)enableAutoBrightness:(BOOL)arg1 forKeyboard:(unsigned long long)arg2; 27 | - (BOOL)setBrightness:(float)arg1 fadeSpeed:(int)arg2 commit:(_Bool)arg3 forKeyboard:(unsigned long long)arg4; 28 | - (BOOL)setBrightness:(float)arg1 forKeyboard:(unsigned long long)arg2; 29 | - (float)brightnessForKeyboard:(unsigned long long)arg1; 30 | - (BOOL)isBacklightDimmedOnKeyboard:(unsigned long long)arg1; 31 | - (BOOL)isBacklightSaturatedOnKeyboard:(unsigned long long)arg1; 32 | - (BOOL)isBacklightSuppressedOnKeyboard:(unsigned long long)arg1; 33 | - (id)copyKeyboardBacklightIDs; 34 | - (void)dealloc; 35 | - (id)init; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/NSDictionary-CBPropertyKeyExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSDictionary.h" 8 | 9 | @interface NSDictionary (CBPropertyKeyExtension) 10 | - (id)getKeyKeyboardIDRef; 11 | - (unsigned long long)getKeyKeyboardID; 12 | - (id)initWithPropertyKey:(id)arg1 keyboardID:(unsigned long long)arg2; 13 | - (id)getKeyPropertyParameter; 14 | - (id)getKeyCategoryRef; 15 | - (unsigned long long)getKeyCategory; 16 | - (id)getKeyDisplayIDRef; 17 | - (unsigned long long)getKeyDisplayID; 18 | - (id)getKeyString; 19 | - (id)initWithPropertyKey:(id)arg1 andCategory:(unsigned long long)arg2; 20 | - (id)initWithPropertyKey:(id)arg1; 21 | - (id)initWithPropertyKey:(id)arg1 display:(unsigned long long)arg2 andParameter:(id)arg3; 22 | - (id)initWithPropertyKey:(id)arg1 andDisplay:(unsigned long long)arg2; 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/NSObject-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | @class NSString, Protocol; 8 | 9 | @protocol NSObject 10 | @property(readonly, copy) NSString *description; 11 | @property(readonly) Class superclass; 12 | @property(readonly) unsigned long long hash; 13 | - (struct _NSZone *)zone; 14 | - (unsigned long long)retainCount; 15 | - (id)autorelease; 16 | - (oneway void)release; 17 | - (id)retain; 18 | - (BOOL)respondsToSelector:(SEL)arg1; 19 | - (BOOL)conformsToProtocol:(Protocol *)arg1; 20 | - (BOOL)isMemberOfClass:(Class)arg1; 21 | - (BOOL)isKindOfClass:(Class)arg1; 22 | - (BOOL)isProxy; 23 | - (id)performSelector:(SEL)arg1 withObject:(id)arg2 withObject:(id)arg3; 24 | - (id)performSelector:(SEL)arg1 withObject:(id)arg2; 25 | - (id)performSelector:(SEL)arg1; 26 | - (id)self; 27 | - (Class)class; 28 | - (BOOL)isEqual:(id)arg1; 29 | 30 | @optional 31 | @property(readonly, copy) NSString *debugDescription; 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/NSXPCListenerDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSXPCConnection, NSXPCListener; 10 | 11 | @protocol NSXPCListenerDelegate 12 | 13 | @optional 14 | - (BOOL)listener:(NSXPCListener *)arg1 shouldAcceptNewConnection:(NSXPCConnection *)arg2; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/NightModeControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSDictionary, NSMutableArray, NSMutableDictionary, NSObject, NSObject, NSString, SunriseSunsetProvider; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface NightModeControl : NSObject 13 | { 14 | NSMutableDictionary *_properties; 15 | SunriseSunsetProvider *_sunriseSunsetProvider; 16 | int _sunriseSunsetInfoQueryTimeout; 17 | NSDictionary *_sunriseSunsetInfo; 18 | NSMutableArray *_supportObjs; 19 | NSObject *_queue; 20 | NSObject *_nextTransitionTimer; 21 | NSObject *_transitionTimer; 22 | NSObject *_aggdUpdateTimer; 23 | struct BLRAggdInfo _aggdKeysInfo; 24 | int _algoState; 25 | float _transitionLength; 26 | float _transitionLengthActual; 27 | float _transitionsTimesCoeff; 28 | float _transitionRate; 29 | float _minFactor; 30 | float _maxFactor; 31 | struct NMFactorState _factorState; 32 | struct __CFTimeZone *_currentTimeZone; 33 | double _sunsetAbsolute; 34 | double _sunsetPreviousAbsolute; 35 | double _sunriseAbsolute; 36 | double _sunrisePreviousAbsolute; 37 | double _offTransitionTimeAbsoluteUnrestricted; 38 | double _offTransitionTimeAbsoluteUnrestrictedPrev; 39 | BOOL _transitionTimesValid; 40 | BOOL _isDaylight; 41 | int _currentScheduledTransitionType; 42 | double _displayOffTimestamp; 43 | double _untilNexTransitionTimestamp; 44 | float _inactivityTimeout; 45 | BOOL _checkInactivity; 46 | BOOL _displayOff; 47 | int _logLevel; 48 | CDUnknownBlockType _callbackBlock; 49 | CDStruct_d991f265 _status; 50 | CDStruct_6cee55f3 _backupSchedule; 51 | BOOL _statusUpdated; 52 | NSString *_currentSunriseKey; 53 | NSString *_currentSunsetKey; 54 | NSString *_previousSunriseKey; 55 | NSString *_previousSunsetKey; 56 | NSString *_nextSunriseKey; 57 | NSString *_nextSunsetKey; 58 | NSString *_isDaylightKey; 59 | int _notifyUserAboutScheduleCounter; 60 | struct __CFUserNotification *_enableNotification; 61 | BOOL _notificationInProgress; 62 | BOOL _revertToSunriseSunset; 63 | struct __CFString *_userName; 64 | } 65 | 66 | - (void)setPreference:(id)arg1 forKey:(id)arg2 user:(id)arg3; 67 | - (id)copyPreferenceForKey:(id)arg1 user:(id)arg2; 68 | - (void)setNightShiftFactorDictionary:(id)arg1; 69 | - (void)displayAlertInteractive:(BOOL)arg1; 70 | - (id)copyTimeStringWithHour:(int)arg1 minute:(int)arg2 second:(int)arg3; 71 | - (void)cancelTransition; 72 | - (void)cancelSchedule; 73 | - (void)cancelAggdPeriodicUpdate; 74 | - (void)tearDownAllTimers; 75 | - (void)clockChanged; 76 | - (void)timeZoneChanged; 77 | - (void)setAlgoState:(int)arg1; 78 | - (void)updateOptionTimestamp:(double)arg1; 79 | - (BOOL)updateTransitionTimesFromSunriseSunset:(double)arg1; 80 | - (void)retrieveSunriseSunsetTimesFromBackup:(double)arg1; 81 | - (void)updateSunriseSunsetInfo:(id)arg1; 82 | - (void)updateSunriseSunsetBackup; 83 | - (void)setSunPermitted:(BOOL)arg1; 84 | - (void)reevaluateCurrentStateWithFactorFadeOption:(float)arg1; 85 | - (void)reevaluateCurrentState; 86 | - (void)initiateFullMinTransition; 87 | - (void)initiateFullMaxTransition; 88 | - (void)initiateRestrictedMaxTransition; 89 | - (void)updateTransitionTimes:(double)arg1; 90 | - (BOOL)updateTransitionTimesFromSchedule:(double)arg1; 91 | - (void)transitionTimerHandler; 92 | - (void)setNightModeFactor:(float)arg1 withFadePeriod:(float)arg2; 93 | - (void)setNightModeFactor:(float)arg1; 94 | - (void)scheduleAggdKeysUpdate; 95 | - (void)aggdKeysUpdate; 96 | - (void)scheduleNextTransition:(double)arg1 withType:(int)arg2; 97 | - (void)initiateTransitionTo:(float)arg1 andRampLength:(float)arg2; 98 | - (void)enableBlueLightReduction:(BOOL)arg1 withOption:(int)arg2; 99 | - (void)setSchedule:(id)arg1; 100 | - (void)setMode:(int)arg1; 101 | - (BOOL)setProperty:(id)arg1 forKey:(id)arg2; 102 | - (id)getPropertyForKey:(id)arg1; 103 | - (void)dealloc; 104 | - (void)switchToUser:(struct __CFString *)arg1; 105 | - (void)removeSupportObject:(id)arg1; 106 | - (void)addSupportObject:(id)arg1; 107 | - (id)initWithSupportObject:(id)arg1 queue:(id)arg2 callback:(CDUnknownBlockType)arg3; 108 | - (id)copyLowPowerModeState; 109 | - (void)updateLowPowerModeState:(id)arg1; 110 | - (void)updateStatusDictionaryWithValue:(id)arg1 forKey:(id)arg2; 111 | - (id)copyStatusDictionaryFromPrefs; 112 | - (void)saveStatusToPrefs:(id)arg1; 113 | - (id)copyDictionaryFromStatus:(CDStruct_d991f265 *)arg1; 114 | - (BOOL)parseStatusDictionary:(id)arg1 intoStruct:(CDStruct_d991f265 *)arg2 shouldUpdatePrefs:(char *)arg3; 115 | 116 | @end 117 | 118 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/NightShiftSupportProtocol-Protocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSDictionary, NSString; 10 | 11 | @protocol NightShiftSupportProtocol 12 | - (void)setPreference:(id)arg1 forKey:(NSString *)arg2 user:(NSString *)arg3; 13 | - (id)copyPreferenceForKey:(NSString *)arg1 user:(NSString *)arg2; 14 | - (void)setNightShiftFactorDictionary:(NSDictionary *)arg1; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /include/CoreBrightness.framework/headers/SunriseSunsetProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | #import "NSObject.h" 8 | 9 | @class NSDictionary, NSObject, _CDClientContext, _CDContextualChangeRegistration, _CDContextualKeyPath, _CDContextualPredicate; 10 | 11 | __attribute__((visibility("hidden"))) 12 | @interface SunriseSunsetProvider : NSObject 13 | { 14 | _CDClientContext *_duetContextStore; 15 | _CDContextualKeyPath *_duetKeyPath; 16 | _CDContextualChangeRegistration *_duetRegistration; 17 | NSDictionary *_duetInfo; 18 | NSObject *_duetDispatchSemaphore; 19 | BOOL _sunriseSunsetNotificationEnabled; 20 | CDUnknownBlockType _callbackBlock; 21 | CDUnknownBlockType _duetCallback; 22 | _CDContextualPredicate *_predicate; 23 | int _logLevel; 24 | } 25 | 26 | @property int logLevel; // @synthesize logLevel=_logLevel; 27 | - (void)updateSunriseSunsetInfo; 28 | - (id)copySunriseSunsetInfo:(int)arg1; 29 | - (void)dealloc; 30 | - (void)cancel; 31 | - (void)unregisterNotification; 32 | - (void)unregisterBlock; 33 | - (void)registerBlock:(CDUnknownBlockType)arg1; 34 | - (id)initWithCallback:(CDUnknownBlockType)arg1; 35 | - (id)copySunsetSunriseInfoFromContext; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /main.mm: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "simplebrightness/library.h" 5 | 6 | // Private frameworks... 7 | #include 8 | #include 9 | #include 10 | 11 | using namespace std; 12 | 13 | bool nightshift_set(CBClient *client, BOOL enable){ 14 | CBBlueLightClient *blc = [client blueLightClient]; 15 | bool success = [blc setEnabled:enable]; 16 | return success; 17 | } 18 | 19 | bool truetone_set(CBClient *client, BOOL enable){ 20 | CBAdaptationClient *adc = [client adaptationClient]; 21 | bool success = [adc setEnabled:enable]; 22 | return success; 23 | } 24 | 25 | void print(const string& msg){ 26 | cout << msg << endl; 27 | } 28 | 29 | 30 | int main() { 31 | cout << "CoreBrightness Test -- By: Angelo DeLuca" << endl << "--" << endl; 32 | 33 | // Check whether system supports blue light reduction and adaptation... 34 | bool blr_support = [CBClient supportsBlueLightReduction]; 35 | bool tt_support = [CBClient supportsAdaptation]; 36 | 37 | // Initialize CoreBrightness client. 38 | CBClient *client = [[CBClient alloc] init]; 39 | 40 | if(blr_support){ 41 | print("Your system supports blue light reduction."); 42 | print("Enabling Night Shift in five seconds..."); 43 | 44 | sleep(5); 45 | 46 | bool ns_success = nightshift_set(client, true); 47 | if(ns_success){ 48 | print("Night Shift enabled successfully."); 49 | }else{ 50 | print("Night Shift enable failed."); 51 | } 52 | 53 | sleep(5); 54 | 55 | ns_success = nightshift_set(client, false); 56 | if(ns_success){ 57 | print("Night Shift disabled successfully."); 58 | }else{ 59 | print("Night Shift disable failed."); 60 | } 61 | 62 | }else{ 63 | print("Your system does not support blue light reduction and the test cannot be completed."); 64 | } 65 | 66 | if(tt_support){ 67 | print("Your system supports adaptation (which may refer to TrueTone)."); 68 | 69 | print("Enabling TrueTone in five seconds..."); 70 | 71 | sleep(5); 72 | 73 | bool tt_success = truetone_set(client, true); 74 | if(tt_success){ 75 | print("TrueTone enabled successfully."); 76 | }else{ 77 | print("TrueTone enable failed."); 78 | } 79 | 80 | sleep(5); 81 | 82 | tt_success = truetone_set(client, false); 83 | if(tt_success){ 84 | print("TrueTone disabled successfully."); 85 | }else{ 86 | print("TrueTone disable failed."); 87 | } 88 | 89 | } 90 | 91 | sleep(4); 92 | 93 | print("I will now flash the keyboard five times to test the backlight."); 94 | 95 | simplebrightness::setKeyboardBrightness(0); 96 | sleep(1); 97 | simplebrightness::setKeyboardBrightness(1); 98 | sleep(1); 99 | simplebrightness::setKeyboardBrightness(0); 100 | sleep(1); 101 | simplebrightness::setKeyboardBrightness(1); 102 | sleep(1); 103 | simplebrightness::setKeyboardBrightness(0); 104 | sleep(1); 105 | simplebrightness::setKeyboardBrightness(1); 106 | sleep(1); 107 | simplebrightness::setKeyboardBrightness(0); 108 | sleep(1); 109 | simplebrightness::setKeyboardBrightness(1); 110 | sleep(1); 111 | simplebrightness::setKeyboardBrightness(0); 112 | sleep(1); 113 | simplebrightness::setKeyboardBrightness(1); 114 | 115 | print("Test complete!"); 116 | 117 | sleep(3); 118 | 119 | print("Resetting to 25% keyboard brightness..."); 120 | 121 | simplebrightness::setKeyboardBrightness(0.25); 122 | 123 | sleep(2); 124 | 125 | return 0; 126 | } 127 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Notes 2 | 3 | 1. Determine the PrivateFramework to interact with to achieve the end goal. 4 | 5 | 2. get the runtime headers for the framework you chose from github and place them in the "include" folder in the project directory. 6 | 7 | 8 | ### including the headers in cmake... 9 | 10 | - Add the folders `.framework/headers` in the project include directory. 11 | - drag+drop all of the headers from github into the `.framework/headers` folder. 12 | - In `CMakeLists.txt`, add `./include/.framework` to `target_include_directories`. 13 | 14 | ### targeting the private framework... 15 | 16 | Your `target_link_libraries` call in `CMakeLists.txt` should look something like this... 17 | 18 | ```cmake 19 | target_link_libraries(APFIExperiment 20 | "-framework Foundation" 21 | "-iframework /System/Library/PrivateFrameworks -framework CoreBrightness" 22 | ) 23 | ``` 24 | 25 | Where `CoreBrightness` gets replaced with the name of the name of the framework you chose. 26 | 27 | The `-iframework` flag simply gives CMake context as to where the private framework is located. 28 | 29 | ### clang troubleshooting 30 | * If clang has a problem with `#import "NSObject.h"`, it seems you can just comment it out in the header and you'll be fine. 31 | * Replacing all the unknown types/structs with the type `id` seems to satisfy the compiler. 32 | I don't exactly know what to do in the circumstance where they are required to achieve the task at hand though–because they usually aren't defined anywhere in the header dump. 33 | -------------------------------------------------------------------------------- /simplebrightness/library.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Angelo DeLuca on 10/10/21. 3 | // 4 | 5 | #ifndef APFINTERACTIONEXPERIMENT_LIBRARY_H 6 | #define APFINTERACTIONEXPERIMENT_LIBRARY_H 7 | //#include <> 8 | namespace simplebrightness{ 9 | bool setTrueTone(bool enabled); 10 | 11 | bool setNightShift(bool enabled); 12 | 13 | bool setKeyboardBrightness(float value); 14 | // bool setScreenBrightness(float value); 15 | } 16 | 17 | 18 | #endif //APFINTERACTIONEXPERIMENT_LIBRARY_H 19 | -------------------------------------------------------------------------------- /simplebrightness/library.mm: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Angelo DeLuca on 10/10/21. 3 | // 4 | 5 | #include "library.h" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | //#include 13 | 14 | static CBClient *client = [[CBClient alloc] init]; 15 | 16 | bool simplebrightness::setNightShift(bool enabled) { 17 | CBBlueLightClient *blc = [client blueLightClient]; 18 | return [blc setEnabled:enabled]; 19 | } 20 | 21 | bool simplebrightness::setTrueTone(bool enabled) { 22 | CBAdaptationClient *adc = [client adaptationClient]; 23 | return [adc setEnabled:enabled]; 24 | } 25 | 26 | bool simplebrightness::setKeyboardBrightness(float value) { 27 | KeyboardBrightnessClient *kcli = [[KeyboardBrightnessClient alloc] init]; 28 | 29 | return [kcli setBrightness:value forKeyboard:1]; 30 | } 31 | 32 | // headers for screen brightness (DisplayALSManager) are probably outdated and thus won't link properly. 33 | //bool simplebrightness::setScreenBrightness(float value) { 34 | // DisplayALSManager *man = [[DisplayALSManager alloc] init]; 35 | // return [man updateDynamicSlider:value]; 36 | //} 37 | 38 | //bool simplebrightness::setKeyboardBrightness(float value){ 39 | // 40 | //} --------------------------------------------------------------------------------