#import <SpringBoard/SBIcon.h>
#import <SpringBoard/SBIconModel.h>
-MSHookClass(SBButtonBar)
-MSHookClass(SBIcon)
-MSHookClass(SBIconModel)
+MSClassHook(SBButtonBar)
+MSClassHook(SBIcon)
+MSClassHook(SBIconModel)
-MSHookMetaClass(SBIconModel)
+MSMetaClassHook(SBIconModel)
-MSMessageHook1(float, SBButtonBar, leftMarginForIconRowArray, NSArray *, row) {
+MSInstanceMessageHook1(float, SBButtonBar, leftMarginForIconRowArray, NSArray *, row) {
return [row indexOfObject:[NSNull null]] == NSNotFound ? 4 : MSOldCall(row);
}
-MSMessageHook0(int, SBButtonBar, maxIconColumns) {
+MSInstanceMessageHook0(int, SBButtonBar, maxIconColumns) {
return 10;
}
static unsigned $SBButtonBar$count(SBButtonBar *self) {
- MSIvar(NSArray *, _iconMatrix);
+ MSIvarHook(NSArray *, _iconMatrix);
NSArray *row([_iconMatrix objectAtIndex:0]);
unsigned count(0);
for (id icon in row)
return count;
}
-MSMessageHook0(float, SBButtonBar, topIconPadding) {
+MSInstanceMessageHook0(float, SBButtonBar, topIconPadding) {
return 313370 + $SBButtonBar$count(self);
}
-MSMessageHook1(void, SBIcon, setOrigin, CGPoint, origin) {
+MSInstanceMessageHook1(void, SBIcon, setOrigin, CGPoint, origin) {
unsigned count(origin.y);
if (count < 313370)
goto set;
MSOldCall(origin);
}
-MSMessageHook2(CGPoint, SBButtonBar, originForIconAtX,Y, int, x, int, y) {
+MSInstanceMessageHook2(CGPoint, SBButtonBar, originForIconAtX,Y, int, x, int, y) {
CGPoint origin;//(MSOldCall(x, y, ));
//NSLog(@"f:%u,%u=(%f,%f)", x, y, origin.x, origin.y);
origin.y = 11;
return origin;
}
-MSMetaMessageHook0(int, SBIconModel, maxIconListCount) {
+MSClassMessageHook0(int, SBIconModel, maxIconListCount) {
return 16;
}