The source code, duh.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

73 Zeilen
3.2KB

  1. #line 1 "Tweak.x"
  2. #import <SpringBoard/SpringBoard.h>
  3. #import <Cephei/HBPreferences.h>
  4. static BOOL transparent;
  5. static BOOL hidden;
  6. static double setHeight;
  7. static double customOpacity;
  8. HBPreferences *preferences;
  9. #include <substrate.h>
  10. #if defined(__clang__)
  11. #if __has_feature(objc_arc)
  12. #define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
  13. #define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
  14. #define _LOGOS_SELF_CONST const
  15. #define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
  16. #else
  17. #define _LOGOS_SELF_TYPE_NORMAL
  18. #define _LOGOS_SELF_TYPE_INIT
  19. #define _LOGOS_SELF_CONST
  20. #define _LOGOS_RETURN_RETAINED
  21. #endif
  22. #else
  23. #define _LOGOS_SELF_TYPE_NORMAL
  24. #define _LOGOS_SELF_TYPE_INIT
  25. #define _LOGOS_SELF_CONST
  26. #define _LOGOS_RETURN_RETAINED
  27. #endif
  28. @class SBDockView;
  29. static void (*_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL, double); static double (*_logos_orig$_ungrouped$SBDockView$dockHeight)(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL); static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST, SEL);
  30. #line 11 "Tweak.x"
  31. static void _logos_method$_ungrouped$SBDockView$setBackgroundAlpha$(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, double arg1) {
  32. if (transparent == NO) {
  33. _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, customOpacity);
  34. }else if (transparent) {
  35. _logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$(self, _cmd, 0.0);
  36. } else {
  37. NSLog(@"Dock not Transparent, no custom opacity\n");
  38. }
  39. }
  40. static double _logos_method$_ungrouped$SBDockView$dockHeight(_LOGOS_SELF_TYPE_NORMAL SBDockView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd) {
  41. if (hidden) {
  42. return (-500);
  43. } else {
  44. return (_logos_orig$_ungrouped$SBDockView$dockHeight(self, _cmd)*setHeight);
  45. }
  46. }
  47. static __attribute__((constructor)) void _logosLocalCtor_eb769390(int __unused argc, char __unused **argv, char __unused **envp) {
  48. preferences = [[HBPreferences alloc] initWithIdentifier:@"com.burritoz.dockifyprefs"];
  49. [preferences registerDefaults:@{
  50. @"setHeight": @1,
  51. @"customOpacity": @1,
  52. @"hidden": @NO
  53. }];
  54. [preferences registerBool:&transparent default:YES forKey:@"transparent"];
  55. [preferences registerBool:&hidden default:NO forKey:@"hidden"];
  56. [preferences registerDouble:(double *)&setHeight default:1 forKey:@"setHeight"];
  57. [preferences registerDouble:(double *)&customOpacity default:1 forKey:@"customOpacity"];
  58. }
  59. static __attribute__((constructor)) void _logosLocalInit() {
  60. {Class _logos_class$_ungrouped$SBDockView = objc_getClass("SBDockView"); MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(setBackgroundAlpha:), (IMP)&_logos_method$_ungrouped$SBDockView$setBackgroundAlpha$, (IMP*)&_logos_orig$_ungrouped$SBDockView$setBackgroundAlpha$);MSHookMessageEx(_logos_class$_ungrouped$SBDockView, @selector(dockHeight), (IMP)&_logos_method$_ungrouped$SBDockView$dockHeight, (IMP*)&_logos_orig$_ungrouped$SBDockView$dockHeight);} }
  61. #line 44 "Tweak.x"