nic 1
name "iphone/notification_center_widget"
dir Resources
file 35 Resources/Info.plist
CFBundleName
@@PROJECTNAME@@
CFBundleIdentifier
@@PACKAGENAME@@
CFBundleInfoDictionaryVersion
6.0
CFBundleVersion
1
CFBundleDisplayName
@@PROJECTNAME@@
MinimumOSVersion
5.0
CFBundleSupportedPlatforms
iPhoneOS
CFBundlePackageType
BNDL
CFBundleSignature
????
AppBundleID
@@PACKAGENAME@@
UIDeviceFamily
1
2
CFBundleShortVersionString
1.0
file 1 Resources/InfoPlist.strings
"@@PROJECTNAME@@" = "@@FULLPROJECTNAME@@";
file 20 BBWeeAppController-Protocol.h
@protocol BBWeeAppController
@required
- (id)view;
@optional
- (void)loadPlaceholderView;
- (void)loadFullView;
- (void)loadView;
- (void)unloadView;
- (void)clearShapshotImage;
- (id)launchURL;
- (id)launchURLForTapLocation:(CGPoint)tapLocation;
- (float)viewHeight;
- (void)viewWillAppear;
- (void)viewDidAppear;
- (void)viewWillDisappear;
- (void)viewDidDisappear;
- (void)willAnimateRotationToInterfaceOrientation:(int)interfaceOrientation;
- (void)willRotateToInterfaceOrientation:(int)interfaceOrientation;
- (void)didRotateFromInterfaceOrientation:(int)interfaceOrientation;
@end
file 11 Makefile
include theos/makefiles/common.mk
BUNDLE_NAME = @@PROJECTNAME@@
@@PROJECTNAME@@_FILES = @@PROJECTNAME@@Controller.m
@@PROJECTNAME@@_INSTALL_PATH = /Library/WeeLoader/Plugins/
@@PROJECTNAME@@_FRAMEWORKS = UIKit CoreGraphics
include $(THEOS_MAKE_PATH)/bundle.mk
after-install::
install.exec "killall -9 SpringBoard"
file 9 control
Package: @@PACKAGENAME@@
Name: @@FULLPROJECTNAME@@
Depends: firmware (>= 5.0), com.saurik.substrate.safemode, com.chpwn.weeloader
Version: 0.0.1
Architecture: iphoneos-arm
Description: An awesome widget for the notification center!
Maintainer: @@USER@@
Author: @@USER@@
Section: Addons (NotificationCenter)
file 63 @@PROJECTNAME@@Controller.m
#import "BBWeeAppController-Protocol.h"
static NSBundle *_@@PROJECTNAME@@WeeAppBundle = nil;
@interface @@PROJECTNAME@@Controller: NSObject {
UIView *_view;
UIImageView *_backgroundView;
}
@property (nonatomic, retain) UIView *view;
@end
@implementation @@PROJECTNAME@@Controller
@synthesize view = _view;
+ (void)initialize {
_@@PROJECTNAME@@WeeAppBundle = [[NSBundle bundleForClass:[self class]] retain];
}
- (id)init {
if((self = [super init]) != nil) {
} return self;
}
- (void)dealloc {
[_view release];
[_backgroundView release];
[super dealloc];
}
- (void)loadFullView {
// Add subviews to _backgroundView (or _view) here.
}
- (void)loadPlaceholderView {
// This should only be a placeholder - it should not connect to any servers or perform any intense
// data loading operations.
//
// All widgets are 316 points wide. Image size calculations match those of the Stocks widget.
_view = [[UIView alloc] initWithFrame:(CGRect){CGPointZero, {316.f, [self viewHeight]}}];
_view.autoresizingMask = UIViewAutoresizingFlexibleWidth;
UIImage *bgImg = [UIImage imageWithContentsOfFile:@"/System/Library/WeeAppPlugins/StocksWeeApp.bundle/WeeAppBackground.png"];
UIImage *stretchableBgImg = [bgImg stretchableImageWithLeftCapWidth:floorf(bgImg.size.width / 2.f) topCapHeight:floorf(bgImg.size.height / 2.f)];
_backgroundView = [[UIImageView alloc] initWithImage:stretchableBgImg];
_backgroundView.frame = CGRectInset(_view.bounds, 2.f, 0.f);
_backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[_view addSubview:_backgroundView];
}
- (void)unloadView {
[_view release];
_view = nil;
[_backgroundView release];
_backgroundView = nil;
// Destroy any additional subviews you added here. Don't waste memory :(.
}
- (float)viewHeight {
return 71.f;
}
@end