-Tagline = "a lame example Cydget that renders Camera photos";
-Plugin = "WebCycriptLockScreen";
+CYTagline = "a lame example Cydget that renders Camera photos";
+CYPlugin = "WebCycriptLockScreen";
-Configuration = {
+CYConfiguration = {
Homepage = "file:///System/Library/LockCydgets/PhotoExample.cydget/index.html";
CycriptURLs = "^file:///System/Library/LockCydgets/PhotoExample\\.cydget/index\\.html$";
Scrollable = "NO";
#include <UIKit/UIKit.h>
#import <SpringBoard/SBAwayController.h>
+#import <SpringBoard/SBAwayView.h>
#import <SpringBoard/SBAwayWindow.h>
#import <SpringBoard/SpringBoard.h>
@implementation CydgetController
+ (NSDictionary *) currentConfiguration {
- return [[cydgets_ objectAtIndex:active_] objectForKey:@"Configuration"];
+ NSDictionary *cydget([cydgets_ objectAtIndex:active_]);
+ return [cydget objectForKey:@"CYConfiguration"] ?: [cydget objectForKey:@"Configuration"];
}
@end
@implementation NSDictionary (Cydgets)
- (void) enableCydget:(SBAwayController *)away {
- if (NSString *plugin = [self objectForKey:@"Plugin"]) {
+ if (NSString *plugin = [self objectForKey:@"CYPlugin"] ?: [self objectForKey:@"Plugin"]) {
[away enableLockScreenBundleWithName:plugin];
++online_;
}
}
- (void) disableCydget:(SBAwayController *)away {
- if (NSString *plugin = [self objectForKey:@"Plugin"]) {
+ if (NSString *plugin = [self objectForKey:@"CYPlugin"] ?: [self objectForKey:@"Plugin"]) {
[away disableLockScreenBundleWithName:plugin];
--online_;
}
Deactivate_(self);
MSOldCall(status);
}
+
+MSInstanceMessageHook0(void, SBAwayView, updateInterface) {
+ MSOldCall();
+
+ NSDictionary *cydget([cydgets_ objectAtIndex:active_]);
+
+ NSString *background([cydget objectForKey:@"CYBackground"]);
+ if ([background isEqualToString:@"Wallpaper"]) {
+ MSIvarHook(UIView *, _backgroundView);
+ [_backgroundView setAlpha:1.0f];
+ }
+
+ if ([[cydget objectForKey:@"CYShowDateTime"] boolValue])
+ [self addDateView];
+}
-Tagline = "a warm welcome to the new cydget experience";
-Plugin = "WebCycriptLockScreen";
+CYTagline = "a warm welcome to the new cydget experience";
+CYPlugin = "WebCycriptLockScreen";
-Configuration = {
+CYConfiguration = {
Homepage = "file:///System/Library/LockCydgets/Welcome.cydget/Welcome.html";
CycriptURLs = "^file:///System/Library/LockCydgets/Welcome\\.cydget/Welcome\\.html$";
Scrollable = "NO";
Section: Development
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 0.9.3086-1
+Version: 0.9.3090-1
Description: framework for managing lock screen plugins
Name: Cydget
Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib, pcre