candle 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.md +4 -0
- data/VERSION +1 -0
- data/bin/candle +21 -0
- data/lib/candle.rb +68 -0
- data/lib/candle/command.rb +27 -0
- data/lib/candle/generators/actions.rb +183 -0
- data/lib/candle/generators/blank.rb +127 -0
- data/lib/candle/generators/cli.rb +55 -0
- data/lib/candle/generators/help.rb +47 -0
- data/lib/candle/generators/jam.rb +80 -0
- data/lib/candle/generators/lua/scripts/AppDelegate.lua +36 -0
- data/lib/candle/generators/lua/scripts/tests/init.lua +6 -0
- data/lib/candle/generators/lua/scripts/tests/someTest.lua +12 -0
- data/lib/candle/generators/lua/wax/ProtocolLoader.h +12 -0
- data/lib/candle/generators/lua/wax/bin/hammer +157 -0
- data/lib/candle/generators/lua/wax/bin/update-xibs +131 -0
- data/lib/candle/generators/lua/wax/bin/waxsim +0 -0
- data/lib/candle/generators/lua/wax/lib/build-scripts/compile-stdlib.sh +14 -0
- data/lib/candle/generators/lua/wax/lib/build-scripts/copy-scripts.sh +58 -0
- data/lib/candle/generators/lua/wax/lib/build-scripts/luac.lua +80 -0
- data/lib/candle/generators/lua/wax/lib/extensions/CGAffine/wax_CGTransform.h +12 -0
- data/lib/candle/generators/lua/wax/lib/extensions/CGAffine/wax_CGTransform.m +85 -0
- data/lib/candle/generators/lua/wax/lib/extensions/CGContext/wax_CGContext.h +12 -0
- data/lib/candle/generators/lua/wax/lib/extensions/CGContext/wax_CGContext.m +251 -0
- data/lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http.h +14 -0
- data/lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http.m +240 -0
- data/lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.h +54 -0
- data/lib/candle/generators/lua/wax/lib/extensions/HTTP/wax_http_connection.m +304 -0
- data/lib/candle/generators/lua/wax/lib/extensions/filesystem/wax_filesystem.h +9 -0
- data/lib/candle/generators/lua/wax/lib/extensions/filesystem/wax_filesystem.m +273 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/Rakefile +10 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/wax_json.c +304 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/wax_json.h +11 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl-1.0.9.tar.gz +0 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/api/yajl_common.h +85 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/api/yajl_gen.h +159 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/api/yajl_parse.h +193 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl.c +159 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_alloc.c +65 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_alloc.h +50 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_buf.c +119 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_buf.h +73 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_bytestack.h +85 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_common.h +85 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_encode.c +188 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_encode.h +50 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_gen.c +322 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_gen.h +159 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_lex.c +737 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_lex.h +133 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_parse.h +193 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_parser.c +448 -0
- data/lib/candle/generators/lua/wax/lib/extensions/json/yajl/yajl_parser.h +82 -0
- data/lib/candle/generators/lua/wax/lib/lua/lapi.c +1087 -0
- data/lib/candle/generators/lua/wax/lib/lua/lapi.h +16 -0
- data/lib/candle/generators/lua/wax/lib/lua/lauxlib.c +652 -0
- data/lib/candle/generators/lua/wax/lib/lua/lauxlib.h +174 -0
- data/lib/candle/generators/lua/wax/lib/lua/lbaselib.c +653 -0
- data/lib/candle/generators/lua/wax/lib/lua/lcode.c +839 -0
- data/lib/candle/generators/lua/wax/lib/lua/lcode.h +76 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldblib.c +397 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldebug.c +638 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldebug.h +33 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldo.c +518 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldo.h +57 -0
- data/lib/candle/generators/lua/wax/lib/lua/ldump.c +164 -0
- data/lib/candle/generators/lua/wax/lib/lua/lfunc.c +174 -0
- data/lib/candle/generators/lua/wax/lib/lua/lfunc.h +34 -0
- data/lib/candle/generators/lua/wax/lib/lua/lgc.c +711 -0
- data/lib/candle/generators/lua/wax/lib/lua/lgc.h +110 -0
- data/lib/candle/generators/lua/wax/lib/lua/linit.c +38 -0
- data/lib/candle/generators/lua/wax/lib/lua/liolib.c +553 -0
- data/lib/candle/generators/lua/wax/lib/lua/llex.c +461 -0
- data/lib/candle/generators/lua/wax/lib/lua/llex.h +81 -0
- data/lib/candle/generators/lua/wax/lib/lua/llimits.h +128 -0
- data/lib/candle/generators/lua/wax/lib/lua/lmathlib.c +263 -0
- data/lib/candle/generators/lua/wax/lib/lua/lmem.c +86 -0
- data/lib/candle/generators/lua/wax/lib/lua/lmem.h +49 -0
- data/lib/candle/generators/lua/wax/lib/lua/loadlib.c +666 -0
- data/lib/candle/generators/lua/wax/lib/lua/lobject.c +214 -0
- data/lib/candle/generators/lua/wax/lib/lua/lobject.h +381 -0
- data/lib/candle/generators/lua/wax/lib/lua/lopcodes.c +102 -0
- data/lib/candle/generators/lua/wax/lib/lua/lopcodes.h +268 -0
- data/lib/candle/generators/lua/wax/lib/lua/loslib.c +243 -0
- data/lib/candle/generators/lua/wax/lib/lua/lparser.c +1339 -0
- data/lib/candle/generators/lua/wax/lib/lua/lparser.h +82 -0
- data/lib/candle/generators/lua/wax/lib/lua/lstate.c +214 -0
- data/lib/candle/generators/lua/wax/lib/lua/lstate.h +169 -0
- data/lib/candle/generators/lua/wax/lib/lua/lstring.c +111 -0
- data/lib/candle/generators/lua/wax/lib/lua/lstring.h +31 -0
- data/lib/candle/generators/lua/wax/lib/lua/lstrlib.c +869 -0
- data/lib/candle/generators/lua/wax/lib/lua/ltable.c +588 -0
- data/lib/candle/generators/lua/wax/lib/lua/ltable.h +40 -0
- data/lib/candle/generators/lua/wax/lib/lua/ltablib.c +287 -0
- data/lib/candle/generators/lua/wax/lib/lua/ltm.c +75 -0
- data/lib/candle/generators/lua/wax/lib/lua/ltm.h +54 -0
- data/lib/candle/generators/lua/wax/lib/lua/lua.h +388 -0
- data/lib/candle/generators/lua/wax/lib/lua/luaconf.h +753 -0
- data/lib/candle/generators/lua/wax/lib/lua/lualib.h +53 -0
- data/lib/candle/generators/lua/wax/lib/lua/lundump.c +227 -0
- data/lib/candle/generators/lua/wax/lib/lua/lundump.h +36 -0
- data/lib/candle/generators/lua/wax/lib/lua/lvm.c +763 -0
- data/lib/candle/generators/lua/wax/lib/lua/lvm.h +36 -0
- data/lib/candle/generators/lua/wax/lib/lua/lzio.c +82 -0
- data/lib/candle/generators/lua/wax/lib/lua/lzio.h +67 -0
- data/lib/candle/generators/lua/wax/lib/lua/print.c +227 -0
- data/lib/candle/generators/lua/wax/lib/project.rake +159 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/enums.lua +396 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/ext/http.lua +43 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/ext/init.lua +4 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/ext/number.lua +21 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/ext/string.lua +97 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/ext/table.lua +165 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/WaxServer.lua +49 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/autoload.lua +10 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/base64.lua +64 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/bit.lua +274 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/cache.lua +73 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/callback.lua +22 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/frame.lua +76 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/init.lua +78 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/pickView.lua +54 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/helpers/time.lua +102 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/init.lua +18 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/luaspec/init.lua +2 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/luaspec/luamock.lua +84 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/luaspec/luaspec.lua +377 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/repl.lua +9 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/structs.lua +11 -0
- data/lib/candle/generators/lua/wax/lib/stdlib/waxClass.lua +42 -0
- data/lib/candle/generators/lua/wax/lib/wax.h +16 -0
- data/lib/candle/generators/lua/wax/lib/wax.m +260 -0
- data/lib/candle/generators/lua/wax/lib/wax_class.h +18 -0
- data/lib/candle/generators/lua/wax/lib/wax_class.m +190 -0
- data/lib/candle/generators/lua/wax/lib/wax_gc.h +20 -0
- data/lib/candle/generators/lua/wax/lib/wax_gc.m +56 -0
- data/lib/candle/generators/lua/wax/lib/wax_helpers.h +102 -0
- data/lib/candle/generators/lua/wax/lib/wax_helpers.m +870 -0
- data/lib/candle/generators/lua/wax/lib/wax_instance.h +34 -0
- data/lib/candle/generators/lua/wax/lib/wax_instance.m +810 -0
- data/lib/candle/generators/lua/wax/lib/wax_server.h +47 -0
- data/lib/candle/generators/lua/wax/lib/wax_server.m +252 -0
- data/lib/candle/generators/lua/wax/lib/wax_stdlib.h +3 -0
- data/lib/candle/generators/lua/wax/lib/wax_struct.h +26 -0
- data/lib/candle/generators/lua/wax/lib/wax_struct.m +335 -0
- data/lib/candle/generators/templates/blank/WaxApplication.xcodeproj/project.pbxproj +836 -0
- data/lib/candle/generators/templates/blank/WaxApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/lib/candle/generators/templates/blank/WaxApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/lib/candle/generators/templates/blank/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/WaxApplication.xcscheme +86 -0
- data/lib/candle/generators/templates/blank/WaxApplication.xcodeproj/xcuserdata/eiffel.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
- data/lib/candle/generators/templates/blank/WaxApplication/Default-568h@2x.png +0 -0
- data/lib/candle/generators/templates/blank/WaxApplication/Default.png +0 -0
- data/lib/candle/generators/templates/blank/WaxApplication/Default@2x.png +0 -0
- data/lib/candle/generators/templates/blank/WaxApplication/ProtocolLoader.h +12 -0
- data/lib/candle/generators/templates/blank/WaxApplication/WaxApplication-Info.plist.tt +38 -0
- data/lib/candle/generators/templates/blank/WaxApplication/WaxApplication-Prefix.pch.tt +14 -0
- data/lib/candle/generators/templates/blank/WaxApplication/en.lproj/InfoPlist.strings +2 -0
- data/lib/candle/generators/templates/blank/WaxApplication/main.m.tt +20 -0
- data/lib/candle/tasks.rb +22 -0
- data/lib/candle/utility.rb +30 -0
- data/lib/candle/version.rb +9 -0
- data/lib/candle/view.rb +48 -0
- metadata +582 -0
@@ -0,0 +1,396 @@
|
|
1
|
+
-- UIViewContentMode
|
2
|
+
UIViewContentModeScaleToFill = 0
|
3
|
+
UIViewContentModeScaleAspectFit = 1
|
4
|
+
UIViewContentModeScaleAspectFill = 2
|
5
|
+
UIViewContentModeRedraw = 3
|
6
|
+
UIViewContentModeCenter = 4
|
7
|
+
UIViewContentModeTop = 5
|
8
|
+
UIViewContentModeBottom = 6
|
9
|
+
UIViewContentModeLeft = 7
|
10
|
+
UIViewContentModeRight = 8
|
11
|
+
UIViewContentModeTopLeft = 9
|
12
|
+
UIViewContentModeTopRight = 10
|
13
|
+
UIViewContentModeBottomLeft = 11
|
14
|
+
UIViewContentModeBottomRight = 12
|
15
|
+
|
16
|
+
-- UIBarButtonItemStyle
|
17
|
+
UIBarButtonItemStylePlain = 0
|
18
|
+
UIBarButtonItemStyleBordered = 1
|
19
|
+
UIBarButtonItemStyleDone = 2
|
20
|
+
|
21
|
+
-- UIButtonType
|
22
|
+
UIButtonTypeCustom = 0
|
23
|
+
UIButtonTypeRoundedRect = 1
|
24
|
+
UIButtonTypeDetailDisclosure = 2
|
25
|
+
UIButtonTypeInfoLight = 3
|
26
|
+
UIButtonTypeInfoDark = 4
|
27
|
+
UIButtonTypeContactAdd = 5
|
28
|
+
|
29
|
+
UILineBreakModeWordWrap = 0
|
30
|
+
UILineBreakModeCharacterWrap = 1
|
31
|
+
UILineBreakModeClip = 2
|
32
|
+
UILineBreakModeHeadTruncation = 3
|
33
|
+
UILineBreakModeTailTruncation = 4
|
34
|
+
UILineBreakModeMiddleTruncation = 5
|
35
|
+
|
36
|
+
-- UITableViewCellSelectionStyle
|
37
|
+
UITableViewCellSelectionStyleNone = 0
|
38
|
+
UITableViewCellSelectionStyleBlue = 1
|
39
|
+
UITableViewCellSelectionStyleGray = 2
|
40
|
+
|
41
|
+
-- UITableViewCellStyle
|
42
|
+
UITableViewCellStyleDefault = 0
|
43
|
+
UITableViewCellStyleValue1 = 1
|
44
|
+
UITableViewCellStyleValue2 = 2
|
45
|
+
UITableViewCellStyleSubtitle = 3
|
46
|
+
|
47
|
+
-- UITableViewCellAccessoryType
|
48
|
+
UITableViewCellAccessoryNone = 0
|
49
|
+
UITableViewCellAccessoryDisclosureIndicator = 1
|
50
|
+
UITableViewCellAccessoryDetailDisclosureButton = 2
|
51
|
+
UITableViewCellAccessoryCheckmark = 3
|
52
|
+
|
53
|
+
-- UIActivityIndicatorViewStyle
|
54
|
+
UIActivityIndicatorViewStyleWhiteLarge = 0
|
55
|
+
UIActivityIndicatorViewStyleWhite = 1
|
56
|
+
UIActivityIndicatorViewStyleGray = 2
|
57
|
+
|
58
|
+
-- UITableViewStyle
|
59
|
+
UITableViewStylePlain = 0
|
60
|
+
UITableViewStyleGrouped = 1
|
61
|
+
|
62
|
+
-- UIControlStateNormal
|
63
|
+
UIControlStateNormal = 0
|
64
|
+
UIControlStateHighlighted = 1
|
65
|
+
UIControlStateDisabled = 2
|
66
|
+
UIControlStateSelected = 4
|
67
|
+
UIControlStateApplication = 0x00FF0000
|
68
|
+
UIControlStateReserved = 0xFF000000
|
69
|
+
|
70
|
+
-- String Encoding
|
71
|
+
NSASCIIStringEncoding = 1
|
72
|
+
NSNEXTSTEPStringEncoding = 2
|
73
|
+
NSJapaneseEUCStringEncoding = 3
|
74
|
+
NSUTF8StringEncoding = 4
|
75
|
+
NSISOLatin1StringEncoding = 5
|
76
|
+
NSSymbolStringEncoding = 6
|
77
|
+
NSNonLossyASCIIStringEncoding = 7
|
78
|
+
NSShiftJISStringEncoding = 8
|
79
|
+
NSISOLatin2StringEncoding = 9
|
80
|
+
NSUnicodeStringEncoding = 10
|
81
|
+
NSWindowsCP1251StringEncoding = 11
|
82
|
+
NSWindowsCP1252StringEncoding = 12
|
83
|
+
NSWindowsCP1253StringEncoding = 13
|
84
|
+
NSWindowsCP1254StringEncoding = 14
|
85
|
+
NSWindowsCP1250StringEncoding = 15
|
86
|
+
NSISO2022JPStringEncoding = 21
|
87
|
+
NSMacOSRomanStringEncoding = 30
|
88
|
+
NSUTF16BigEndianStringEncoding = 0x90000100
|
89
|
+
NSUTF16LittleEndianStringEncoding = 0x94000100
|
90
|
+
NSUTF32StringEncoding = 0x8c000100
|
91
|
+
NSUTF32BigEndianStringEncoding = 0x98000100
|
92
|
+
NSUTF32LittleEndianStringEncoding = 0x9c000100
|
93
|
+
NSProprietaryStringEncoding = 65536
|
94
|
+
|
95
|
+
-- UITextAlignment
|
96
|
+
UITextAlignmentLeft = 0
|
97
|
+
UITextAlignmentCenter = 1
|
98
|
+
UITextAlignmentRight = 2
|
99
|
+
|
100
|
+
-- UILineBreakMode
|
101
|
+
UILineBreakModeWordWrap = 0
|
102
|
+
UILineBreakModeCharacterWrap = 1
|
103
|
+
UILineBreakModeClip = 2
|
104
|
+
UILineBreakModeHeadTruncation = 3
|
105
|
+
UILineBreakModeTailTruncation = 4
|
106
|
+
UILineBreakModeMiddleTruncation = 5
|
107
|
+
|
108
|
+
-- UIModalTransitionStyle
|
109
|
+
UIModalTransitionStyleCoverVertical = 0
|
110
|
+
UIModalTransitionStyleFlipHorizontal = 1
|
111
|
+
UIModalTransitionStyleCrossDissolve = 2
|
112
|
+
|
113
|
+
-- UIKeyboardType
|
114
|
+
UIKeyboardTypeDefault = 0
|
115
|
+
UIKeyboardTypeASCIICapable = 1
|
116
|
+
UIKeyboardTypeNumbersAndPunctuation = 2
|
117
|
+
UIKeyboardTypeURL = 3
|
118
|
+
UIKeyboardTypeNumberPad = 4
|
119
|
+
UIKeyboardTypePhonePad = 5
|
120
|
+
UIKeyboardTypeNamePhonePad = 6
|
121
|
+
UIKeyboardTypeEmailAddress = 7
|
122
|
+
UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable
|
123
|
+
|
124
|
+
-- UIReturnKeyType
|
125
|
+
UIReturnKeyDefault = 0
|
126
|
+
UIReturnKeyGo = 1
|
127
|
+
UIReturnKeyGoogle = 2
|
128
|
+
UIReturnKeyJoin = 3
|
129
|
+
UIReturnKeyNext = 4
|
130
|
+
UIReturnKeyRoute = 5
|
131
|
+
UIReturnKeySearch = 6
|
132
|
+
UIReturnKeySend = 7
|
133
|
+
UIReturnKeyYahoo = 8
|
134
|
+
UIReturnKeyDone = 9
|
135
|
+
UIReturnKeyEmergencyCall = 10
|
136
|
+
|
137
|
+
-- UIControlEvents
|
138
|
+
UIControlEventTouchDown = math.pow(2, 0)
|
139
|
+
UIControlEventTouchDownRepeat = math.pow(2, 1)
|
140
|
+
UIControlEventTouchDragInside = math.pow(2, 2)
|
141
|
+
UIControlEventTouchDragOutside = math.pow(2, 3)
|
142
|
+
UIControlEventTouchDragEnter = math.pow(2, 4)
|
143
|
+
UIControlEventTouchDragExit = math.pow(2, 5)
|
144
|
+
UIControlEventTouchUpInside = math.pow(2, 6)
|
145
|
+
UIControlEventTouchUpOutside = math.pow(2, 7)
|
146
|
+
UIControlEventTouchCancel = math.pow(2, 8)
|
147
|
+
UIControlEventValueChanged = math.pow(2, 12)
|
148
|
+
UIControlEventEditingDidBegin = math.pow(2, 16)
|
149
|
+
UIControlEventEditingChanged = math.pow(2, 17)
|
150
|
+
UIControlEventEditingDidEnd = math.pow(2, 18)
|
151
|
+
UIControlEventEditingDidEndOnExit = math.pow(2, 19)
|
152
|
+
UIControlEventAllTouchEvents = 0x00000FFF
|
153
|
+
UIControlEventAllEditingEvents = 0x000F0000
|
154
|
+
UIControlEventApplicationReserved = 0x0F000000
|
155
|
+
UIControlEventSystemReserved = 0xF0000000
|
156
|
+
UIControlEventAllEvents = 0xFFFFFFFF
|
157
|
+
|
158
|
+
-- UITableViewCellEditingStyle;
|
159
|
+
UITableViewCellEditingStyleNone = 0
|
160
|
+
UITableViewCellEditingStyleDelete = 1
|
161
|
+
UITableViewCellEditingStyleInsert = 2
|
162
|
+
|
163
|
+
-- MFMailComposeResult
|
164
|
+
MFMailComposeResultCancelled = 0
|
165
|
+
MFMailComposeResultSaved = 1
|
166
|
+
MFMailComposeResultSent = 2
|
167
|
+
MFMailComposeResultFailed = 3
|
168
|
+
|
169
|
+
-- UIBarButtonSystemItem
|
170
|
+
UIBarButtonSystemItemDone = 0
|
171
|
+
UIBarButtonSystemItemCancel = 1
|
172
|
+
UIBarButtonSystemItemEdit = 2
|
173
|
+
UIBarButtonSystemItemSave = 3
|
174
|
+
UIBarButtonSystemItemAdd = 4
|
175
|
+
UIBarButtonSystemItemFlexibleSpace = 5
|
176
|
+
UIBarButtonSystemItemFixedSpace = 6
|
177
|
+
UIBarButtonSystemItemCompose = 7
|
178
|
+
UIBarButtonSystemItemReply = 8
|
179
|
+
UIBarButtonSystemItemAction = 9
|
180
|
+
UIBarButtonSystemItemOrganize = 10
|
181
|
+
UIBarButtonSystemItemBookmarks = 11
|
182
|
+
UIBarButtonSystemItemSearch = 12
|
183
|
+
UIBarButtonSystemItemRefresh = 13
|
184
|
+
UIBarButtonSystemItemStop = 14
|
185
|
+
UIBarButtonSystemItemCamera = 15
|
186
|
+
UIBarButtonSystemItemTrash = 16
|
187
|
+
UIBarButtonSystemItemPlay = 17
|
188
|
+
UIBarButtonSystemItemPause = 18
|
189
|
+
UIBarButtonSystemItemRewind = 19
|
190
|
+
UIBarButtonSystemItemFastForward = 20
|
191
|
+
UIBarButtonSystemItemUndo = 21
|
192
|
+
UIBarButtonSystemItemRedo = 22
|
193
|
+
|
194
|
+
-- UITextBorderStyle
|
195
|
+
UITextBorderStyleNone = 0
|
196
|
+
UITextBorderStyleLine = 1
|
197
|
+
UITextBorderStyleBezel = 2
|
198
|
+
UITextBorderStyleRoundedRect = 3
|
199
|
+
|
200
|
+
|
201
|
+
-- UITableViewScrollPosition
|
202
|
+
UITableViewScrollPositionNone = 0
|
203
|
+
UITableViewScrollPositionTop = 1
|
204
|
+
UITableViewScrollPositionMiddle = 2
|
205
|
+
UITableViewScrollPositionBottom = 3
|
206
|
+
|
207
|
+
-- UIKeyboardAppearance
|
208
|
+
UIKeyboardAppearanceDefault = 0
|
209
|
+
UIKeyboardAppearanceAlert = 1
|
210
|
+
|
211
|
+
-- UITextFieldViewMode
|
212
|
+
UITextFieldViewModeNever = 0
|
213
|
+
UITextFieldViewModeWhileEditing = 1
|
214
|
+
UITextFieldViewModeUnlessEditing = 2
|
215
|
+
UITextFieldViewModeAlways = 3
|
216
|
+
|
217
|
+
-- UITextAutocorrectionType
|
218
|
+
UITextAutocorrectionTypeDefault = 0
|
219
|
+
UITextAutocorrectionTypeNo = 1
|
220
|
+
UITextAutocorrectionTypeYes = 2
|
221
|
+
|
222
|
+
-- UIBarStyle
|
223
|
+
UIBarStyleDefault = 0
|
224
|
+
UIBarStyleBlack = 1
|
225
|
+
UIBarStyleBlackOpaque = 1 -- Deprecated. Use UIBarStyleBlack
|
226
|
+
UIBarStyleBlackTranslucent = 2 -- Deprecated. Use UIBarStyleBlack and set the translucent property to YES
|
227
|
+
|
228
|
+
|
229
|
+
-- NSURLRequestCachePolicy
|
230
|
+
NSURLRequestUseProtocolCachePolicy = 0
|
231
|
+
NSURLRequestReloadIgnoringLocalCacheData = 1
|
232
|
+
NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4 -- Unimplemented
|
233
|
+
NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData
|
234
|
+
NSURLRequestReturnCacheDataElseLoad = 2
|
235
|
+
NSURLRequestReturnCacheDataDontLoad = 3
|
236
|
+
NSURLRequestReloadRevalidatingCacheData = 5 -- Unimplemented
|
237
|
+
|
238
|
+
-- UISegmentedControlStyle
|
239
|
+
UISegmentedControlStylePlain = 0
|
240
|
+
UISegmentedControlStyleBordered = 1
|
241
|
+
UISegmentedControlStyleBar = 2
|
242
|
+
|
243
|
+
-- UIRemoteNotificationType
|
244
|
+
UIRemoteNotificationTypeNone = 0
|
245
|
+
UIRemoteNotificationTypeBadge = math.pow(2, 0)
|
246
|
+
UIRemoteNotificationTypeSound = math.pow(2, 1)
|
247
|
+
UIRemoteNotificationTypeAlert = math.pow(2, 2)
|
248
|
+
|
249
|
+
-- NSURLCredentialPersistence;
|
250
|
+
NSURLCredentialPersistenceNone = 0
|
251
|
+
NSURLCredentialPersistenceForSession = 1
|
252
|
+
NSURLCredentialPersistencePermanent = 2
|
253
|
+
|
254
|
+
-- UIDeviceOrientation
|
255
|
+
UIDeviceOrientationUnknown = 0
|
256
|
+
UIDeviceOrientationPortrait = 1
|
257
|
+
UIDeviceOrientationPortraitUpsideDown = 2
|
258
|
+
UIDeviceOrientationLandscapeLeft = 3
|
259
|
+
UIDeviceOrientationLandscapeRight = 4
|
260
|
+
UIDeviceOrientationFaceUp = 5
|
261
|
+
UIDeviceOrientationFaceDown = 6
|
262
|
+
|
263
|
+
-- UIInterfaceOrientation
|
264
|
+
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait
|
265
|
+
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown
|
266
|
+
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight
|
267
|
+
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
|
268
|
+
|
269
|
+
-- UIViewAnimationCurve
|
270
|
+
UIViewAnimationCurveEaseInOut = 0
|
271
|
+
UIViewAnimationCurveEaseIn = 1
|
272
|
+
UIViewAnimationCurveEaseOut = 2
|
273
|
+
UIViewAnimationCurveLinear = 3
|
274
|
+
|
275
|
+
-- UITableViewRowAnimation
|
276
|
+
UITableViewRowAnimationFade = 0
|
277
|
+
UITableViewRowAnimationRight = 1 -- slide in from right (or out to right)
|
278
|
+
UITableViewRowAnimationLeft = 2
|
279
|
+
UITableViewRowAnimationTop = 3
|
280
|
+
UITableViewRowAnimationBottom = 4
|
281
|
+
UITableViewRowAnimationNone = 5 -- available in iPhone 3.0
|
282
|
+
UITableViewRowAnimationMiddle = 6
|
283
|
+
|
284
|
+
-- UIViewAnimationTransition
|
285
|
+
UIViewAnimationTransitionNone = 0
|
286
|
+
UIViewAnimationTransitionFlipFromLeft = 1
|
287
|
+
UIViewAnimationTransitionFlipFromRight = 2
|
288
|
+
UIViewAnimationTransitionCurlUp = 3
|
289
|
+
UIViewAnimationTransitionCurlDown = 4
|
290
|
+
|
291
|
+
-- UIViewAutoresizing
|
292
|
+
UIViewAutoresizingNone = 0
|
293
|
+
UIViewAutoresizingFlexibleLeftMargin = math.pow(2, 0)
|
294
|
+
UIViewAutoresizingFlexibleWidth = math.pow(2, 1)
|
295
|
+
UIViewAutoresizingFlexibleRightMargin = math.pow(2, 2)
|
296
|
+
UIViewAutoresizingFlexibleTopMargin = math.pow(2, 3)
|
297
|
+
UIViewAutoresizingFlexibleHeight = math.pow(2, 4)
|
298
|
+
UIViewAutoresizingFlexibleBottomMargin = math.pow(2, 5)
|
299
|
+
|
300
|
+
-- UIWebViewNavigationType
|
301
|
+
UIWebViewNavigationTypeLinkClicked = 0
|
302
|
+
UIWebViewNavigationTypeFormSubmitted = 1
|
303
|
+
UIWebViewNavigationTypeBackForward = 2
|
304
|
+
UIWebViewNavigationTypeReload = 3
|
305
|
+
UIWebViewNavigationTypeFormResubmitted = 4
|
306
|
+
UIWebViewNavigationTypeOther = 5
|
307
|
+
|
308
|
+
-- NSHTTPCookieAcceptPolicy
|
309
|
+
NSHTTPCookieAcceptPolicyAlways = 0
|
310
|
+
NSHTTPCookieAcceptPolicyNever = 1
|
311
|
+
NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2
|
312
|
+
|
313
|
+
|
314
|
+
-- SKPaymentTransactionState
|
315
|
+
SKPaymentTransactionStatePurchasing = 0
|
316
|
+
SKPaymentTransactionStatePurchased = 1
|
317
|
+
SKPaymentTransactionStateFailed = 2
|
318
|
+
SKPaymentTransactionStateRestored = 3
|
319
|
+
|
320
|
+
-- SKError
|
321
|
+
SKErrorUnknown = 0
|
322
|
+
SKErrorClientInvalid = 1
|
323
|
+
SKErrorPaymentCancelled = 2
|
324
|
+
SKErrorPaymentInvalid = 3
|
325
|
+
SKErrorPaymentNotAllowed = 4
|
326
|
+
|
327
|
+
-- UIStatusBarStyle
|
328
|
+
UIStatusBarStyleDefault = 0
|
329
|
+
UIStatusBarStyleBlackTranslucent = 1
|
330
|
+
UIStatusBarStyleBlackOpaque = 2
|
331
|
+
|
332
|
+
-- UIControlContentHorizontalAlignment
|
333
|
+
UIControlContentHorizontalAlignmentCenter = 0
|
334
|
+
UIControlContentHorizontalAlignmentLeft = 1
|
335
|
+
UIControlContentHorizontalAlignmentRight = 2
|
336
|
+
UIControlContentHorizontalAlignmentFill = 3
|
337
|
+
|
338
|
+
-- GKPeerConnectionState
|
339
|
+
GKPeerStateAvailable = 0
|
340
|
+
GKPeerStateUnavailable = 1
|
341
|
+
GKPeerStateConnected = 2
|
342
|
+
GKPeerStateDisconnected = 3
|
343
|
+
GKPeerStateConnecting = 4
|
344
|
+
|
345
|
+
-- GKSessionMode
|
346
|
+
GKSessionModeServer = 0
|
347
|
+
GKSessionModeClient = 1
|
348
|
+
GKSessionModePeer = 2
|
349
|
+
|
350
|
+
-- GKSendDataMode
|
351
|
+
GKSendDataReliable = 0 -- a.s.a.p. but requires fragmentation and reassembly for large messages, may stall if network congestion occurs
|
352
|
+
GKSendDataUnreliable = 1 -- best effort and immediate, but no guarantees of delivery or order; will not stall.
|
353
|
+
|
354
|
+
-- UIImagePickerControllerSourceType
|
355
|
+
UIImagePickerControllerSourceTypePhotoLibrary = 0
|
356
|
+
UIImagePickerControllerSourceTypeCamera = 1
|
357
|
+
UIImagePickerControllerSourceTypeSavedPhotosAlbum = 2
|
358
|
+
|
359
|
+
-- NSComparisonResult
|
360
|
+
NSOrderedAscending = -1
|
361
|
+
NSOrderedSame = 0
|
362
|
+
NSOrderedDescending = 1
|
363
|
+
|
364
|
+
-- UITableViewCellSeparatorStyle
|
365
|
+
UITableViewCellSeparatorStyleNone = 0
|
366
|
+
UITableViewCellSeparatorStyleSingleLine = 1
|
367
|
+
UITableViewCellSeparatorStyleSingleLineEtched = 2
|
368
|
+
|
369
|
+
-- CLAuthorizationStatus
|
370
|
+
kCLAuthorizationStatusNotDetermined = 0
|
371
|
+
kCLAuthorizationStatusRestricted = 1
|
372
|
+
kCLAuthorizationStatusDenied = 2
|
373
|
+
kCLAuthorizationStatusAuthorized = 3
|
374
|
+
|
375
|
+
-- UISwipeGestureRecognizerDirection;
|
376
|
+
UISwipeGestureRecognizerDirectionRight = math.pow(2, 0)
|
377
|
+
UISwipeGestureRecognizerDirectionLeft = math.pow(2, 1)
|
378
|
+
UISwipeGestureRecognizerDirectionUp = math.pow(2, 2)
|
379
|
+
UISwipeGestureRecognizerDirectionDown = math.pow(2, 3)
|
380
|
+
|
381
|
+
-- UIControlContentHorizontalAlignment
|
382
|
+
UIControlContentHorizontalAlignmentCenter = 0
|
383
|
+
UIControlContentHorizontalAlignmentLeft = 1
|
384
|
+
UIControlContentHorizontalAlignmentRight = 2
|
385
|
+
UIControlContentHorizontalAlignmentFill = 3
|
386
|
+
|
387
|
+
-- UIControlContentVerticalAlignment
|
388
|
+
UIControlContentVerticalAlignmentCenter = 0
|
389
|
+
UIControlContentVerticalAlignmentTop = 1
|
390
|
+
UIControlContentVerticalAlignmentBottom = 2
|
391
|
+
UIControlContentVerticalAlignmentFill = 3
|
392
|
+
|
393
|
+
-- UIEventType
|
394
|
+
UIEventTypeTouches = 0
|
395
|
+
UIEventTypeMotion = 1
|
396
|
+
UIEventTypeRemoteControl = 2
|
@@ -0,0 +1,43 @@
|
|
1
|
+
if not wax.http then return end -- Only load if the wax.http extension has been loaded
|
2
|
+
|
3
|
+
function wax.http.post(options)
|
4
|
+
options["method"] = "POST"
|
5
|
+
return wax.http.request(options)
|
6
|
+
end
|
7
|
+
|
8
|
+
function wax.http.get(options)
|
9
|
+
options["method"] = "GET"
|
10
|
+
return wax.http.request(options)
|
11
|
+
end
|
12
|
+
|
13
|
+
function wax.http.delete(options)
|
14
|
+
options["method"] = "DELETE"
|
15
|
+
return wax.http.request(options)
|
16
|
+
end
|
17
|
+
|
18
|
+
function wax.http.put(options)
|
19
|
+
options["method"] = "PUT"
|
20
|
+
return wax.http.request(options)
|
21
|
+
end
|
22
|
+
|
23
|
+
function wax.http.escapeParams(params, prefix)
|
24
|
+
if not params then return nil end
|
25
|
+
if type(params) == "string" then return params end
|
26
|
+
|
27
|
+
local params = table.map(params, function(value, key)
|
28
|
+
if type(value) == "table" then
|
29
|
+
return wax.http.escapeParams(value, key)
|
30
|
+
else value = string.escape(tostring(value))
|
31
|
+
if prefix then
|
32
|
+
if type(key) == "number" then
|
33
|
+
key = ("%s[]"):format(prefix) -- If it is a number, treat it as an array
|
34
|
+
else
|
35
|
+
key = ("%s[%s]"):format(prefix, key)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
return key .. "=" .. value
|
39
|
+
end
|
40
|
+
end)
|
41
|
+
|
42
|
+
return table.concat(params, "&")
|
43
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
number = {}
|
2
|
+
|
3
|
+
local numberToMonth = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }
|
4
|
+
function number.toMonth(n)
|
5
|
+
n = tonumber(n)
|
6
|
+
return numberToMonth[n]
|
7
|
+
end
|
8
|
+
|
9
|
+
function number.tocurrency(n)
|
10
|
+
return "$" .. number.commaSeperate(n)
|
11
|
+
end
|
12
|
+
|
13
|
+
function number.commaSeperate(n)
|
14
|
+
local formatted = tostring(n)
|
15
|
+
while true do
|
16
|
+
formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
|
17
|
+
if k ==0 then break end
|
18
|
+
end
|
19
|
+
|
20
|
+
return formatted
|
21
|
+
end
|