Difference between revisions of "SBSettings"

From iPhone Development Wiki
Jump to: navigation, search
(Created page with '{{Infobox Package |icon=Sbsettingsicon.png |screenshot=Sbsfreemem2.png |developer=BigBoss |version=3.0.2 |package=sbsettings }} SBSettings is a MobileSubstrate extension…')
 
(+ plural, other fix)
 
(5 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
|screenshot=Sbsfreemem2.png
 
|screenshot=Sbsfreemem2.png
 
|developer=BigBoss
 
|developer=BigBoss
|version=3.0.2
+
|version=5.2.1
 
|package=sbsettings
 
|package=sbsettings
 
}}
 
}}
Line 17: Line 17:
 
The <tt>Toggle.dylib</tt> contains code to react with users. It must implement and export the following C functions:
 
The <tt>Toggle.dylib</tt> contains code to react with users. It must implement and export the following C functions:
 
<source lang="c">
 
<source lang="c">
Boolean isCapable();            // returns whether this toggle should be shown.
+
bool isCapable();            // returns whether this toggle should be shown.
Boolean isEnabled();            // returns the ON/OFF state of the toggle.
+
bool isEnabled();            // returns the ON/OFF state of the toggle.
void setState(Boolean Enabled); // assign the ON/OFF state.
+
void setState(bool enabled); // assign the ON/OFF state.
 
float getDelayTime();          // returns the expected time (in seconds) to handle a state change.
 
float getDelayTime();          // returns the expected time (in seconds) to handle a state change.
 
</source>
 
</source>
 
and these are optional:
 
and these are optional:
 
<source lang="c">
 
<source lang="c">
Boolean getStateFast();        // "approximate" the ON/OFF state.
+
bool getStateFast();        // "approximate" the ON/OFF state.
Boolean allowInCall();          // returns whether this toggle can be used in call. Default to true.
+
bool allowInCall();          // returns whether this toggle can be used in call. Default to true.
 
void invokeHoldAction();        // responds to the user long-holding the toggle.
 
void invokeHoldAction();        // responds to the user long-holding the toggle.
 
</source>
 
</source>
 +
 +
SBSettings will set the current working directory to the path of the active toggle before calling any functions exported by <tt>Toggle.dylib</tt>
  
 
Details can be found in BigBoss's [http://thebigboss.org/guides/sbsettings-toggle-spec/ SBSettings Toggle Spec].
 
Details can be found in BigBoss's [http://thebigboss.org/guides/sbsettings-toggle-spec/ SBSettings Toggle Spec].
  
 
== Themes ==
 
== Themes ==
SBSettings is themeable. See [http://thebigboss.org/guides/sbsettings-theme-creation/ this page] for detail.
+
SBSettings is also themeable. See [http://thebigboss.org/guides/sbsettings-theme-creation/ this page] for more details.
  
 
== References ==
 
== References ==

Latest revision as of 06:11, 21 January 2014

Sbsettingsicon.png
SBSettings
Sbsfreemem2.png
Cydia Package
Developer BigBoss
Package ID sbsettings
Latest Version 5.2.1


SBSettings is a MobileSubstrate extension for SpringBoard which provides a quick way to view and change various settings. SBSettings are launched by swiping the finger across the status bar.

Toggles

The toggles are the basic building blocks of SBSettings. Each toggle should create a directory in /var/mobile/Library/SBSettings/Toggles with the following structure:

  • ~/Library/SBSettings/Toggles/
    • «Name of your toggle»/
      • Toggle.dylib

The Toggle.dylib contains code to react with users. It must implement and export the following C functions:

bool isCapable();            // returns whether this toggle should be shown.
bool isEnabled();            // returns the ON/OFF state of the toggle.
void setState(bool enabled); // assign the ON/OFF state.
float getDelayTime();           // returns the expected time (in seconds) to handle a state change.

and these are optional:

bool getStateFast();         // "approximate" the ON/OFF state.
bool allowInCall();          // returns whether this toggle can be used in call. Default to true.
void invokeHoldAction();        // responds to the user long-holding the toggle.

SBSettings will set the current working directory to the path of the active toggle before calling any functions exported by Toggle.dylib

Details can be found in BigBoss's SBSettings Toggle Spec.

Themes

SBSettings is also themeable. See this page for more details.

References