From: Jay Freeman (saurik) Date: Sat, 2 Feb 2013 12:48:28 +0000 (+0000) Subject: Use SpringBoardAccess for statusbar in backboardd. X-Git-Tag: v0.9.3380~4 X-Git-Url: https://git.saurik.com/veency.git/commitdiff_plain/451e908a59d37ccaaa145283b0147b933ad679a6?ds=inline Use SpringBoardAccess for statusbar in backboardd. --- diff --git a/Tweak.mm b/Tweak.mm index 62654ad..5e5eddd 100644 --- a/Tweak.mm +++ b/Tweak.mm @@ -49,6 +49,8 @@ #import #import +#include "SpringBoardAccess.h" + extern "C" void CoreSurfaceBufferFlushProcessorCaches(CoreSurfaceBufferRef buffer); static size_t width_; @@ -163,10 +165,12 @@ static void VNCEnabled(); + (void) removeStatusBarItem { AshikaseSetEnabled(false, false); - if ($SBStatusBarController != nil) + if (SBA_available()) + SBA_removeStatusBarImage(const_cast("Veency")); + else if ($SBStatusBarController != nil) [[$SBStatusBarController sharedStatusBarController] removeStatusBarItem:@"Veency"]; - else - [[UIApplication sharedApplication] removeStatusBarImageNamed:@"Veency"]; + else if (UIApplication *app = [UIApplication sharedApplication]) + [app removeStatusBarImageNamed:@"Veency"]; } + (void) registerClient { @@ -182,10 +186,12 @@ static void VNCEnabled(); ++clients_; AshikaseSetEnabled(true, false); - if ($SBStatusBarController != nil) + if (SBA_available()) + SBA_addStatusBarImage(const_cast("Veency")); + else if ($SBStatusBarController != nil) [[$SBStatusBarController sharedStatusBarController] addStatusBarItem:@"Veency"]; - else - [[UIApplication sharedApplication] addStatusBarImageNamed:@"Veency"]; + else if (UIApplication *app = [UIApplication sharedApplication]) + [app addStatusBarImageNamed:@"Veency"]; } + (void) performSetup:(NSThread *)thread { diff --git a/control b/control index c972104..6ec0a58 100644 --- a/control +++ b/control @@ -8,7 +8,7 @@ Architecture: iphoneos-arm Version: 0.9.3379 Description: a VNC /server/ for the iPhone Name: Veency -Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0), libstatusbar | firmware (<< 4.0) +Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0), libstatusbar | firmware (<< 4.0), firmware (<< 6.0) | ch.ringwald.springboardaccess Author: Jay Freeman (saurik) Depiction: http://cydia.saurik.com/info/veency/ Tag: purpose::daemon, role::enduser diff --git a/makefile b/makefile index 2c3d88b..d9368ec 100644 --- a/makefile +++ b/makefile @@ -2,6 +2,7 @@ name := Veency id := vncs flags := -lvncserver -framework IOMobileFramebuffer -framework CoreSurface -framework IOKit -framework GraphicsServices -I/apl/inc/iPhoneOS-2.0 -framework QuartzCore -weak_reference_mismatches weak -framework UIKit -framework GraphicsServices flags += -fvisibility=hidden +flags += SpringBoardAccess.c base := ../tweaks include ../tweaks/tweak.mk