forked from DHowett/theos-nic-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbsettingstoggle.nic
52 lines (42 loc) · 1012 Bytes
/
sbsettingstoggle.nic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
nic 1
name "iphone/sbsettingstoggle"
file 28 Toggle.mm
// Required
extern "C" BOOL isCapable() {
return YES;
}
// Required
extern "C" BOOL isEnabled() {
return YES;
}
// Optional
// Faster isEnabled. Remove this if it's not necessary. Keep it if isEnabled() is expensive and you can make it faster here.
extern "C" BOOL getStateFast() {
return YES;
}
// Required
extern "C" void setState(BOOL enabled) {
// Set State!
}
// Required
// How long the toggle takes to toggle, in seconds.
extern "C" float getDelayTime() {
return 0.1f;
}
// vim:ft=objc
file 7 Makefile
include theos/makefiles/common.mk
LIBRARY_NAME = Toggle
Toggle_FILES = Toggle.mm
Toggle_INSTALL_PATH = /var/mobile/Library/SBSettings/Toggles/@@PROJECTNAME@@
include $(THEOS_MAKE_PATH)/library.mk
file 9 control
Package: @@PACKAGENAME@@
Name: @@FULLPROJECTNAME@@
Depends: sbsettings
Version: 0.0.1
Architecture: iphoneos-arm
Description: An awesome SBSetting toggle!
Maintainer: @@USER@@
Author: @@USER@@
Section: Addons (SBSettings)