mirror of
https://github.com/thewesker/osx-patcher.git
synced 2025-12-22 13:21:12 -05:00
Full 10.11 support, fix NoSleep on 10.8
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Versions/Current/Headers
|
||||
@@ -0,0 +1 @@
|
||||
Versions/Current/NoSleep
|
||||
@@ -0,0 +1 @@
|
||||
Versions/Current/Resources
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// GlobalConstants.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/8/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#define _STR(x) #x
|
||||
#define STR(x) _STR(x)
|
||||
|
||||
// Extension part
|
||||
#define NoSleepExtension com_protech_nosleepextension
|
||||
#define NoSleepClientClass com_protech_nosleepclientclass
|
||||
#define kNoSleepCommandDisabled iokit_vendor_specific_msg(0)
|
||||
#define kNoSleepCommandEnabled iokit_vendor_specific_msg(1)
|
||||
#define kNoSleepCommandLockScreenRequest iokit_vendor_specific_msg(2)
|
||||
// AppleNVRAM Variable name
|
||||
#define IORegistrySleepSuppressionMode "IORegistryCurrentSleepMode"
|
||||
|
||||
// Interface
|
||||
#define kNoSleepDriverClassName STR(NoSleepExtension)
|
||||
|
||||
// GUI
|
||||
#define SHOW_UI_ALERT_KEXT_NOT_LOADED() NSRunAlertPanel(@"Oops!", @"NoSleep Kernel Extension is not loaded.", @"OK", nil, nil)
|
||||
|
||||
#define NOSLEEP_ID "com.protech.NoSleep"
|
||||
|
||||
#define NOSLEEP_HELPER_PATH "/Applications/Utilities/NoSleep.app"
|
||||
#define NOSLEEP_PREFPANE_PATH "/Library/PreferencePanes/NoSleep.prefPane"
|
||||
|
||||
#define kNoSleepModeCurrent 0
|
||||
#define kNoSleepModeAC 1
|
||||
#define kNoSleepModeBattery 2
|
||||
|
||||
//Settings
|
||||
#define NOSLEEP_SETTINGS_UPDATE_EVENTNAME "UpdateSettings"
|
||||
|
||||
#define NOSLEEP_SETTINGS_isBWIconEnabledID "IsBWIconEnabled"
|
||||
#define NOSLEEP_SETTINGS_toLockScreenID "LockScreen"
|
||||
#define NOSLEEP_SETTINGS_useDoubleClick "UseDoubleClick"
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// NoSleepInterface.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/3/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#include <IOKit/IOKitLib.h>
|
||||
|
||||
//io_connect_t m_connect;
|
||||
typedef io_service_t NoSleepInterfaceService;
|
||||
typedef io_connect_t NoSleepInterfaceConnect;
|
||||
typedef io_object_t NoSleepInterestNotification;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern bool NoSleepVerbose;
|
||||
|
||||
NoSleepInterestNotification NoSleep_ReceiveStateChanged(NoSleepInterfaceConnect m_connect, IOServiceInterestCallback callback, void *refCon);
|
||||
void NoSleep_ReleaseStateChanged(NoSleepInterestNotification notifyObj);
|
||||
|
||||
bool NoSleep_InterfaceCreate(NoSleepInterfaceService *service, NoSleepInterfaceConnect *connect);
|
||||
bool NoSleep_InterfaceDestroy(NoSleepInterfaceConnect connect);
|
||||
bool NoSleep_GetSleepSuppressionMode(NoSleepInterfaceConnect connect, int mode);
|
||||
bool NoSleep_SetSleepSuppressionMode(NoSleepInterfaceConnect connect, bool state, int mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// NoSleepInterfaceWrapper.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <NoSleep/NoSleepInterface.h>
|
||||
#import <NoSleep/NoSleepNotificationDelegate.h>
|
||||
|
||||
@interface NoSleepInterfaceWrapper : NSObject {
|
||||
@private
|
||||
NoSleepInterfaceConnect _noSleepInterface;
|
||||
NoSleepInterestNotification _noSleepNotification;
|
||||
|
||||
id<NoSleepNotificationDelegate> notificationDelegate;
|
||||
}
|
||||
|
||||
@property (retain) id<NoSleepNotificationDelegate> notificationDelegate;
|
||||
|
||||
-(BOOL) stateForMode:(int)mode;
|
||||
-(void) setState:(BOOL)state forMode:(int)mode;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// NoSleepNotificationDelegate.h
|
||||
// nosleep
|
||||
//
|
||||
// Created by Pavel Prokofiev on 4/8/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol NoSleepNotificationDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
-(void) notificationReceived:(uint32_t)messageType :(void *)messageArgument;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Utilities.h
|
||||
// NoSleepFramework
|
||||
//
|
||||
// Created by Pavel Prokofiev on 2/24/12.
|
||||
// Copyright 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef NoSleepFramework_Utilities_h
|
||||
#define NoSleepFramework_Utilities_h
|
||||
|
||||
typedef enum {
|
||||
kLICheck = 0,
|
||||
kLIRegister,
|
||||
kLIUnregister,
|
||||
} LoginItemAction;
|
||||
|
||||
BOOL registerLoginItem(LoginItemAction action);
|
||||
|
||||
BOOL GetLockScreen();
|
||||
void SetLockScreen(BOOL value);
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>12D78</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>NoSleep</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.protech.NoSleepFramework</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>NoSleep</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.3.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.3.3</string>
|
||||
<key>DTCompiler</key>
|
||||
<string></string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>4H512</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>12D75</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.8</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0461</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>4H512</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012-2013 Pavel Prokofiev. All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1 @@
|
||||
A
|
||||
Reference in New Issue
Block a user