lua_Joystick.cpp 147 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_Joystick.h"
  4. #include "Animation.h"
  5. #include "AnimationTarget.h"
  6. #include "Base.h"
  7. #include "Control.h"
  8. #include "Game.h"
  9. #include "Joystick.h"
  10. #include "Node.h"
  11. #include "Ref.h"
  12. #include "ScriptListener.h"
  13. #include "lua_ControlAlignment.h"
  14. #include "lua_ControlListenerEventType.h"
  15. #include "lua_ControlState.h"
  16. #include "lua_CurveInterpolationType.h"
  17. #include "lua_FontJustify.h"
  18. namespace gameplay
  19. {
  20. void luaRegister_Joystick()
  21. {
  22. const luaL_Reg lua_members[] =
  23. {
  24. {"addListener", lua_Joystick_addListener},
  25. {"addRef", lua_Joystick_addRef},
  26. {"createAnimation", lua_Joystick_createAnimation},
  27. {"createAnimationFromBy", lua_Joystick_createAnimationFromBy},
  28. {"createAnimationFromTo", lua_Joystick_createAnimationFromTo},
  29. {"destroyAnimation", lua_Joystick_destroyAnimation},
  30. {"disable", lua_Joystick_disable},
  31. {"enable", lua_Joystick_enable},
  32. {"getAlignment", lua_Joystick_getAlignment},
  33. {"getAnimation", lua_Joystick_getAnimation},
  34. {"getAnimationPropertyComponentCount", lua_Joystick_getAnimationPropertyComponentCount},
  35. {"getAnimationPropertyValue", lua_Joystick_getAnimationPropertyValue},
  36. {"getAutoHeight", lua_Joystick_getAutoHeight},
  37. {"getAutoWidth", lua_Joystick_getAutoWidth},
  38. {"getBorder", lua_Joystick_getBorder},
  39. {"getBounds", lua_Joystick_getBounds},
  40. {"getClip", lua_Joystick_getClip},
  41. {"getClipBounds", lua_Joystick_getClipBounds},
  42. {"getConsumeInputEvents", lua_Joystick_getConsumeInputEvents},
  43. {"getCursorColor", lua_Joystick_getCursorColor},
  44. {"getCursorRegion", lua_Joystick_getCursorRegion},
  45. {"getCursorUVs", lua_Joystick_getCursorUVs},
  46. {"getFocusIndex", lua_Joystick_getFocusIndex},
  47. {"getFont", lua_Joystick_getFont},
  48. {"getFontSize", lua_Joystick_getFontSize},
  49. {"getHeight", lua_Joystick_getHeight},
  50. {"getId", lua_Joystick_getId},
  51. {"getImageColor", lua_Joystick_getImageColor},
  52. {"getImageRegion", lua_Joystick_getImageRegion},
  53. {"getImageUVs", lua_Joystick_getImageUVs},
  54. {"getMargin", lua_Joystick_getMargin},
  55. {"getOpacity", lua_Joystick_getOpacity},
  56. {"getPadding", lua_Joystick_getPadding},
  57. {"getRefCount", lua_Joystick_getRefCount},
  58. {"getRegion", lua_Joystick_getRegion},
  59. {"getSkinColor", lua_Joystick_getSkinColor},
  60. {"getSkinRegion", lua_Joystick_getSkinRegion},
  61. {"getState", lua_Joystick_getState},
  62. {"getStyle", lua_Joystick_getStyle},
  63. {"getTextAlignment", lua_Joystick_getTextAlignment},
  64. {"getTextColor", lua_Joystick_getTextColor},
  65. {"getTextRightToLeft", lua_Joystick_getTextRightToLeft},
  66. {"getType", lua_Joystick_getType},
  67. {"getValue", lua_Joystick_getValue},
  68. {"getWidth", lua_Joystick_getWidth},
  69. {"getX", lua_Joystick_getX},
  70. {"getY", lua_Joystick_getY},
  71. {"getZIndex", lua_Joystick_getZIndex},
  72. {"isAbsolute", lua_Joystick_isAbsolute},
  73. {"isContainer", lua_Joystick_isContainer},
  74. {"isEnabled", lua_Joystick_isEnabled},
  75. {"release", lua_Joystick_release},
  76. {"setAbsolute", lua_Joystick_setAbsolute},
  77. {"setAlignment", lua_Joystick_setAlignment},
  78. {"setAnimationPropertyValue", lua_Joystick_setAnimationPropertyValue},
  79. {"setAutoHeight", lua_Joystick_setAutoHeight},
  80. {"setAutoWidth", lua_Joystick_setAutoWidth},
  81. {"setBorder", lua_Joystick_setBorder},
  82. {"setBounds", lua_Joystick_setBounds},
  83. {"setConsumeInputEvents", lua_Joystick_setConsumeInputEvents},
  84. {"setCursorColor", lua_Joystick_setCursorColor},
  85. {"setCursorRegion", lua_Joystick_setCursorRegion},
  86. {"setFocusIndex", lua_Joystick_setFocusIndex},
  87. {"setFont", lua_Joystick_setFont},
  88. {"setFontSize", lua_Joystick_setFontSize},
  89. {"setImageColor", lua_Joystick_setImageColor},
  90. {"setImageRegion", lua_Joystick_setImageRegion},
  91. {"setMargin", lua_Joystick_setMargin},
  92. {"setOpacity", lua_Joystick_setOpacity},
  93. {"setPadding", lua_Joystick_setPadding},
  94. {"setPosition", lua_Joystick_setPosition},
  95. {"setRegion", lua_Joystick_setRegion},
  96. {"setSize", lua_Joystick_setSize},
  97. {"setSkinColor", lua_Joystick_setSkinColor},
  98. {"setSkinRegion", lua_Joystick_setSkinRegion},
  99. {"setState", lua_Joystick_setState},
  100. {"setStyle", lua_Joystick_setStyle},
  101. {"setTextAlignment", lua_Joystick_setTextAlignment},
  102. {"setTextColor", lua_Joystick_setTextColor},
  103. {"setTextRightToLeft", lua_Joystick_setTextRightToLeft},
  104. {"setZIndex", lua_Joystick_setZIndex},
  105. {NULL, NULL}
  106. };
  107. const luaL_Reg lua_statics[] =
  108. {
  109. {"ANIMATE_OPACITY", lua_Joystick_static_ANIMATE_OPACITY},
  110. {"ANIMATE_POSITION", lua_Joystick_static_ANIMATE_POSITION},
  111. {"ANIMATE_POSITION_X", lua_Joystick_static_ANIMATE_POSITION_X},
  112. {"ANIMATE_POSITION_Y", lua_Joystick_static_ANIMATE_POSITION_Y},
  113. {"ANIMATE_SIZE", lua_Joystick_static_ANIMATE_SIZE},
  114. {"ANIMATE_SIZE_HEIGHT", lua_Joystick_static_ANIMATE_SIZE_HEIGHT},
  115. {"ANIMATE_SIZE_WIDTH", lua_Joystick_static_ANIMATE_SIZE_WIDTH},
  116. {"create", lua_Joystick_static_create},
  117. {NULL, NULL}
  118. };
  119. std::vector<std::string> scopePath;
  120. ScriptUtil::registerClass("Joystick", lua_members, NULL, lua_Joystick__gc, lua_statics, scopePath);
  121. }
  122. static Joystick* getInstance(lua_State* state)
  123. {
  124. void* userdata = luaL_checkudata(state, 1, "Joystick");
  125. luaL_argcheck(state, userdata != NULL, 1, "'Joystick' expected.");
  126. return (Joystick*)((ScriptUtil::LuaObject*)userdata)->instance;
  127. }
  128. int lua_Joystick__gc(lua_State* state)
  129. {
  130. // Get the number of parameters.
  131. int paramCount = lua_gettop(state);
  132. // Attempt to match the parameters to a valid binding.
  133. switch (paramCount)
  134. {
  135. case 1:
  136. {
  137. if ((lua_type(state, 1) == LUA_TUSERDATA))
  138. {
  139. void* userdata = luaL_checkudata(state, 1, "Joystick");
  140. luaL_argcheck(state, userdata != NULL, 1, "'Joystick' expected.");
  141. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
  142. if (object->owns)
  143. {
  144. Joystick* instance = (Joystick*)object->instance;
  145. SAFE_RELEASE(instance);
  146. }
  147. return 0;
  148. }
  149. else
  150. {
  151. lua_pushstring(state, "lua_Joystick__gc - Failed to match the given parameters to a valid function signature.");
  152. lua_error(state);
  153. }
  154. break;
  155. }
  156. default:
  157. {
  158. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  159. lua_error(state);
  160. break;
  161. }
  162. }
  163. return 0;
  164. }
  165. int lua_Joystick_addListener(lua_State* state)
  166. {
  167. // Get the number of parameters.
  168. int paramCount = lua_gettop(state);
  169. // Attempt to match the parameters to a valid binding.
  170. switch (paramCount)
  171. {
  172. case 3:
  173. {
  174. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  175. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  176. lua_type(state, 3) == LUA_TNUMBER)
  177. {
  178. // Get parameter 1 off the stack.
  179. Control::Listener* param1 = ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false);
  180. // Get parameter 2 off the stack.
  181. int param2 = (int)luaL_checkint(state, 3);
  182. Joystick* instance = getInstance(state);
  183. instance->addListener(param1, param2);
  184. return 0;
  185. }
  186. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  187. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  188. lua_type(state, 3) == LUA_TNUMBER)
  189. {
  190. // Get parameter 1 off the stack.
  191. const char* param1 = ScriptUtil::getString(2, false);
  192. // Get parameter 2 off the stack.
  193. int param2 = (int)luaL_checkint(state, 3);
  194. Joystick* instance = getInstance(state);
  195. instance->Control::addListener(param1, param2);
  196. return 0;
  197. }
  198. else
  199. {
  200. lua_pushstring(state, "lua_Joystick_addListener - Failed to match the given parameters to a valid function signature.");
  201. lua_error(state);
  202. }
  203. break;
  204. }
  205. default:
  206. {
  207. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  208. lua_error(state);
  209. break;
  210. }
  211. }
  212. return 0;
  213. }
  214. int lua_Joystick_addRef(lua_State* state)
  215. {
  216. // Get the number of parameters.
  217. int paramCount = lua_gettop(state);
  218. // Attempt to match the parameters to a valid binding.
  219. switch (paramCount)
  220. {
  221. case 1:
  222. {
  223. if ((lua_type(state, 1) == LUA_TUSERDATA))
  224. {
  225. Joystick* instance = getInstance(state);
  226. instance->addRef();
  227. return 0;
  228. }
  229. else
  230. {
  231. lua_pushstring(state, "lua_Joystick_addRef - Failed to match the given parameters to a valid function signature.");
  232. lua_error(state);
  233. }
  234. break;
  235. }
  236. default:
  237. {
  238. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  239. lua_error(state);
  240. break;
  241. }
  242. }
  243. return 0;
  244. }
  245. int lua_Joystick_createAnimation(lua_State* state)
  246. {
  247. // Get the number of parameters.
  248. int paramCount = lua_gettop(state);
  249. // Attempt to match the parameters to a valid binding.
  250. switch (paramCount)
  251. {
  252. case 3:
  253. {
  254. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  255. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  256. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  257. {
  258. // Get parameter 1 off the stack.
  259. const char* param1 = ScriptUtil::getString(2, false);
  260. // Get parameter 2 off the stack.
  261. const char* param2 = ScriptUtil::getString(3, false);
  262. Joystick* instance = getInstance(state);
  263. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  264. if (returnPtr)
  265. {
  266. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  267. object->instance = returnPtr;
  268. object->owns = false;
  269. luaL_getmetatable(state, "Animation");
  270. lua_setmetatable(state, -2);
  271. }
  272. else
  273. {
  274. lua_pushnil(state);
  275. }
  276. return 1;
  277. }
  278. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  279. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  280. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  281. {
  282. // Get parameter 1 off the stack.
  283. const char* param1 = ScriptUtil::getString(2, false);
  284. // Get parameter 2 off the stack.
  285. Properties* param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
  286. Joystick* instance = getInstance(state);
  287. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  288. if (returnPtr)
  289. {
  290. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  291. object->instance = returnPtr;
  292. object->owns = false;
  293. luaL_getmetatable(state, "Animation");
  294. lua_setmetatable(state, -2);
  295. }
  296. else
  297. {
  298. lua_pushnil(state);
  299. }
  300. return 1;
  301. }
  302. else
  303. {
  304. lua_pushstring(state, "lua_Joystick_createAnimation - Failed to match the given parameters to a valid function signature.");
  305. lua_error(state);
  306. }
  307. break;
  308. }
  309. case 7:
  310. {
  311. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  312. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  313. lua_type(state, 3) == LUA_TNUMBER &&
  314. lua_type(state, 4) == LUA_TNUMBER &&
  315. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  316. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  317. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  318. {
  319. // Get parameter 1 off the stack.
  320. const char* param1 = ScriptUtil::getString(2, false);
  321. // Get parameter 2 off the stack.
  322. int param2 = (int)luaL_checkint(state, 3);
  323. // Get parameter 3 off the stack.
  324. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  325. // Get parameter 4 off the stack.
  326. unsigned long* param4 = ScriptUtil::getUnsignedLongPointer(5);
  327. // Get parameter 5 off the stack.
  328. float* param5 = ScriptUtil::getFloatPointer(6);
  329. // Get parameter 6 off the stack.
  330. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  331. Joystick* instance = getInstance(state);
  332. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  333. if (returnPtr)
  334. {
  335. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  336. object->instance = returnPtr;
  337. object->owns = false;
  338. luaL_getmetatable(state, "Animation");
  339. lua_setmetatable(state, -2);
  340. }
  341. else
  342. {
  343. lua_pushnil(state);
  344. }
  345. return 1;
  346. }
  347. else
  348. {
  349. lua_pushstring(state, "lua_Joystick_createAnimation - Failed to match the given parameters to a valid function signature.");
  350. lua_error(state);
  351. }
  352. break;
  353. }
  354. case 9:
  355. {
  356. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  357. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  358. lua_type(state, 3) == LUA_TNUMBER &&
  359. lua_type(state, 4) == LUA_TNUMBER &&
  360. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  361. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  362. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  363. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  364. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  365. {
  366. // Get parameter 1 off the stack.
  367. const char* param1 = ScriptUtil::getString(2, false);
  368. // Get parameter 2 off the stack.
  369. int param2 = (int)luaL_checkint(state, 3);
  370. // Get parameter 3 off the stack.
  371. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  372. // Get parameter 4 off the stack.
  373. unsigned long* param4 = ScriptUtil::getUnsignedLongPointer(5);
  374. // Get parameter 5 off the stack.
  375. float* param5 = ScriptUtil::getFloatPointer(6);
  376. // Get parameter 6 off the stack.
  377. float* param6 = ScriptUtil::getFloatPointer(7);
  378. // Get parameter 7 off the stack.
  379. float* param7 = ScriptUtil::getFloatPointer(8);
  380. // Get parameter 8 off the stack.
  381. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  382. Joystick* instance = getInstance(state);
  383. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  384. if (returnPtr)
  385. {
  386. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  387. object->instance = returnPtr;
  388. object->owns = false;
  389. luaL_getmetatable(state, "Animation");
  390. lua_setmetatable(state, -2);
  391. }
  392. else
  393. {
  394. lua_pushnil(state);
  395. }
  396. return 1;
  397. }
  398. else
  399. {
  400. lua_pushstring(state, "lua_Joystick_createAnimation - Failed to match the given parameters to a valid function signature.");
  401. lua_error(state);
  402. }
  403. break;
  404. }
  405. default:
  406. {
  407. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  408. lua_error(state);
  409. break;
  410. }
  411. }
  412. return 0;
  413. }
  414. int lua_Joystick_createAnimationFromBy(lua_State* state)
  415. {
  416. // Get the number of parameters.
  417. int paramCount = lua_gettop(state);
  418. // Attempt to match the parameters to a valid binding.
  419. switch (paramCount)
  420. {
  421. case 7:
  422. {
  423. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  424. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  425. lua_type(state, 3) == LUA_TNUMBER &&
  426. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  427. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  428. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  429. lua_type(state, 7) == LUA_TNUMBER)
  430. {
  431. // Get parameter 1 off the stack.
  432. const char* param1 = ScriptUtil::getString(2, false);
  433. // Get parameter 2 off the stack.
  434. int param2 = (int)luaL_checkint(state, 3);
  435. // Get parameter 3 off the stack.
  436. float* param3 = ScriptUtil::getFloatPointer(4);
  437. // Get parameter 4 off the stack.
  438. float* param4 = ScriptUtil::getFloatPointer(5);
  439. // Get parameter 5 off the stack.
  440. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  441. // Get parameter 6 off the stack.
  442. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  443. Joystick* instance = getInstance(state);
  444. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  445. if (returnPtr)
  446. {
  447. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  448. object->instance = returnPtr;
  449. object->owns = false;
  450. luaL_getmetatable(state, "Animation");
  451. lua_setmetatable(state, -2);
  452. }
  453. else
  454. {
  455. lua_pushnil(state);
  456. }
  457. return 1;
  458. }
  459. else
  460. {
  461. lua_pushstring(state, "lua_Joystick_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  462. lua_error(state);
  463. }
  464. break;
  465. }
  466. default:
  467. {
  468. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  469. lua_error(state);
  470. break;
  471. }
  472. }
  473. return 0;
  474. }
  475. int lua_Joystick_createAnimationFromTo(lua_State* state)
  476. {
  477. // Get the number of parameters.
  478. int paramCount = lua_gettop(state);
  479. // Attempt to match the parameters to a valid binding.
  480. switch (paramCount)
  481. {
  482. case 7:
  483. {
  484. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  485. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  486. lua_type(state, 3) == LUA_TNUMBER &&
  487. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  488. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  489. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  490. lua_type(state, 7) == LUA_TNUMBER)
  491. {
  492. // Get parameter 1 off the stack.
  493. const char* param1 = ScriptUtil::getString(2, false);
  494. // Get parameter 2 off the stack.
  495. int param2 = (int)luaL_checkint(state, 3);
  496. // Get parameter 3 off the stack.
  497. float* param3 = ScriptUtil::getFloatPointer(4);
  498. // Get parameter 4 off the stack.
  499. float* param4 = ScriptUtil::getFloatPointer(5);
  500. // Get parameter 5 off the stack.
  501. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  502. // Get parameter 6 off the stack.
  503. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  504. Joystick* instance = getInstance(state);
  505. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  506. if (returnPtr)
  507. {
  508. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  509. object->instance = returnPtr;
  510. object->owns = false;
  511. luaL_getmetatable(state, "Animation");
  512. lua_setmetatable(state, -2);
  513. }
  514. else
  515. {
  516. lua_pushnil(state);
  517. }
  518. return 1;
  519. }
  520. else
  521. {
  522. lua_pushstring(state, "lua_Joystick_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  523. lua_error(state);
  524. }
  525. break;
  526. }
  527. default:
  528. {
  529. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  530. lua_error(state);
  531. break;
  532. }
  533. }
  534. return 0;
  535. }
  536. int lua_Joystick_destroyAnimation(lua_State* state)
  537. {
  538. // Get the number of parameters.
  539. int paramCount = lua_gettop(state);
  540. // Attempt to match the parameters to a valid binding.
  541. switch (paramCount)
  542. {
  543. case 1:
  544. {
  545. if ((lua_type(state, 1) == LUA_TUSERDATA))
  546. {
  547. Joystick* instance = getInstance(state);
  548. instance->destroyAnimation();
  549. return 0;
  550. }
  551. else
  552. {
  553. lua_pushstring(state, "lua_Joystick_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  554. lua_error(state);
  555. }
  556. break;
  557. }
  558. case 2:
  559. {
  560. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  561. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  562. {
  563. // Get parameter 1 off the stack.
  564. const char* param1 = ScriptUtil::getString(2, false);
  565. Joystick* instance = getInstance(state);
  566. instance->destroyAnimation(param1);
  567. return 0;
  568. }
  569. else
  570. {
  571. lua_pushstring(state, "lua_Joystick_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  572. lua_error(state);
  573. }
  574. break;
  575. }
  576. default:
  577. {
  578. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  579. lua_error(state);
  580. break;
  581. }
  582. }
  583. return 0;
  584. }
  585. int lua_Joystick_disable(lua_State* state)
  586. {
  587. // Get the number of parameters.
  588. int paramCount = lua_gettop(state);
  589. // Attempt to match the parameters to a valid binding.
  590. switch (paramCount)
  591. {
  592. case 1:
  593. {
  594. if ((lua_type(state, 1) == LUA_TUSERDATA))
  595. {
  596. Joystick* instance = getInstance(state);
  597. instance->disable();
  598. return 0;
  599. }
  600. else
  601. {
  602. lua_pushstring(state, "lua_Joystick_disable - Failed to match the given parameters to a valid function signature.");
  603. lua_error(state);
  604. }
  605. break;
  606. }
  607. default:
  608. {
  609. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  610. lua_error(state);
  611. break;
  612. }
  613. }
  614. return 0;
  615. }
  616. int lua_Joystick_enable(lua_State* state)
  617. {
  618. // Get the number of parameters.
  619. int paramCount = lua_gettop(state);
  620. // Attempt to match the parameters to a valid binding.
  621. switch (paramCount)
  622. {
  623. case 1:
  624. {
  625. if ((lua_type(state, 1) == LUA_TUSERDATA))
  626. {
  627. Joystick* instance = getInstance(state);
  628. instance->enable();
  629. return 0;
  630. }
  631. else
  632. {
  633. lua_pushstring(state, "lua_Joystick_enable - Failed to match the given parameters to a valid function signature.");
  634. lua_error(state);
  635. }
  636. break;
  637. }
  638. default:
  639. {
  640. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  641. lua_error(state);
  642. break;
  643. }
  644. }
  645. return 0;
  646. }
  647. int lua_Joystick_getAlignment(lua_State* state)
  648. {
  649. // Get the number of parameters.
  650. int paramCount = lua_gettop(state);
  651. // Attempt to match the parameters to a valid binding.
  652. switch (paramCount)
  653. {
  654. case 1:
  655. {
  656. if ((lua_type(state, 1) == LUA_TUSERDATA))
  657. {
  658. Joystick* instance = getInstance(state);
  659. Control::Alignment result = instance->getAlignment();
  660. // Push the return value onto the stack.
  661. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result));
  662. return 1;
  663. }
  664. else
  665. {
  666. lua_pushstring(state, "lua_Joystick_getAlignment - Failed to match the given parameters to a valid function signature.");
  667. lua_error(state);
  668. }
  669. break;
  670. }
  671. default:
  672. {
  673. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  674. lua_error(state);
  675. break;
  676. }
  677. }
  678. return 0;
  679. }
  680. int lua_Joystick_getAnimation(lua_State* state)
  681. {
  682. // Get the number of parameters.
  683. int paramCount = lua_gettop(state);
  684. // Attempt to match the parameters to a valid binding.
  685. switch (paramCount)
  686. {
  687. case 1:
  688. {
  689. if ((lua_type(state, 1) == LUA_TUSERDATA))
  690. {
  691. Joystick* instance = getInstance(state);
  692. void* returnPtr = (void*)instance->getAnimation();
  693. if (returnPtr)
  694. {
  695. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  696. object->instance = returnPtr;
  697. object->owns = false;
  698. luaL_getmetatable(state, "Animation");
  699. lua_setmetatable(state, -2);
  700. }
  701. else
  702. {
  703. lua_pushnil(state);
  704. }
  705. return 1;
  706. }
  707. else
  708. {
  709. lua_pushstring(state, "lua_Joystick_getAnimation - Failed to match the given parameters to a valid function signature.");
  710. lua_error(state);
  711. }
  712. break;
  713. }
  714. case 2:
  715. {
  716. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  717. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  718. {
  719. // Get parameter 1 off the stack.
  720. const char* param1 = ScriptUtil::getString(2, false);
  721. Joystick* instance = getInstance(state);
  722. void* returnPtr = (void*)instance->getAnimation(param1);
  723. if (returnPtr)
  724. {
  725. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  726. object->instance = returnPtr;
  727. object->owns = false;
  728. luaL_getmetatable(state, "Animation");
  729. lua_setmetatable(state, -2);
  730. }
  731. else
  732. {
  733. lua_pushnil(state);
  734. }
  735. return 1;
  736. }
  737. else
  738. {
  739. lua_pushstring(state, "lua_Joystick_getAnimation - Failed to match the given parameters to a valid function signature.");
  740. lua_error(state);
  741. }
  742. break;
  743. }
  744. default:
  745. {
  746. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  747. lua_error(state);
  748. break;
  749. }
  750. }
  751. return 0;
  752. }
  753. int lua_Joystick_getAnimationPropertyComponentCount(lua_State* state)
  754. {
  755. // Get the number of parameters.
  756. int paramCount = lua_gettop(state);
  757. // Attempt to match the parameters to a valid binding.
  758. switch (paramCount)
  759. {
  760. case 2:
  761. {
  762. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  763. lua_type(state, 2) == LUA_TNUMBER)
  764. {
  765. // Get parameter 1 off the stack.
  766. int param1 = (int)luaL_checkint(state, 2);
  767. Joystick* instance = getInstance(state);
  768. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  769. // Push the return value onto the stack.
  770. lua_pushunsigned(state, result);
  771. return 1;
  772. }
  773. else
  774. {
  775. lua_pushstring(state, "lua_Joystick_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  776. lua_error(state);
  777. }
  778. break;
  779. }
  780. default:
  781. {
  782. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  783. lua_error(state);
  784. break;
  785. }
  786. }
  787. return 0;
  788. }
  789. int lua_Joystick_getAnimationPropertyValue(lua_State* state)
  790. {
  791. // Get the number of parameters.
  792. int paramCount = lua_gettop(state);
  793. // Attempt to match the parameters to a valid binding.
  794. switch (paramCount)
  795. {
  796. case 3:
  797. {
  798. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  799. lua_type(state, 2) == LUA_TNUMBER &&
  800. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  801. {
  802. // Get parameter 1 off the stack.
  803. int param1 = (int)luaL_checkint(state, 2);
  804. // Get parameter 2 off the stack.
  805. AnimationValue* param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  806. Joystick* instance = getInstance(state);
  807. instance->getAnimationPropertyValue(param1, param2);
  808. return 0;
  809. }
  810. else
  811. {
  812. lua_pushstring(state, "lua_Joystick_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  813. lua_error(state);
  814. }
  815. break;
  816. }
  817. default:
  818. {
  819. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  820. lua_error(state);
  821. break;
  822. }
  823. }
  824. return 0;
  825. }
  826. int lua_Joystick_getAutoHeight(lua_State* state)
  827. {
  828. // Get the number of parameters.
  829. int paramCount = lua_gettop(state);
  830. // Attempt to match the parameters to a valid binding.
  831. switch (paramCount)
  832. {
  833. case 1:
  834. {
  835. if ((lua_type(state, 1) == LUA_TUSERDATA))
  836. {
  837. Joystick* instance = getInstance(state);
  838. bool result = instance->getAutoHeight();
  839. // Push the return value onto the stack.
  840. lua_pushboolean(state, result);
  841. return 1;
  842. }
  843. else
  844. {
  845. lua_pushstring(state, "lua_Joystick_getAutoHeight - Failed to match the given parameters to a valid function signature.");
  846. lua_error(state);
  847. }
  848. break;
  849. }
  850. default:
  851. {
  852. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  853. lua_error(state);
  854. break;
  855. }
  856. }
  857. return 0;
  858. }
  859. int lua_Joystick_getAutoWidth(lua_State* state)
  860. {
  861. // Get the number of parameters.
  862. int paramCount = lua_gettop(state);
  863. // Attempt to match the parameters to a valid binding.
  864. switch (paramCount)
  865. {
  866. case 1:
  867. {
  868. if ((lua_type(state, 1) == LUA_TUSERDATA))
  869. {
  870. Joystick* instance = getInstance(state);
  871. bool result = instance->getAutoWidth();
  872. // Push the return value onto the stack.
  873. lua_pushboolean(state, result);
  874. return 1;
  875. }
  876. else
  877. {
  878. lua_pushstring(state, "lua_Joystick_getAutoWidth - Failed to match the given parameters to a valid function signature.");
  879. lua_error(state);
  880. }
  881. break;
  882. }
  883. default:
  884. {
  885. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  886. lua_error(state);
  887. break;
  888. }
  889. }
  890. return 0;
  891. }
  892. int lua_Joystick_getBorder(lua_State* state)
  893. {
  894. // Get the number of parameters.
  895. int paramCount = lua_gettop(state);
  896. // Attempt to match the parameters to a valid binding.
  897. switch (paramCount)
  898. {
  899. case 1:
  900. {
  901. if ((lua_type(state, 1) == LUA_TUSERDATA))
  902. {
  903. Joystick* instance = getInstance(state);
  904. void* returnPtr = (void*)&(instance->getBorder());
  905. if (returnPtr)
  906. {
  907. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  908. object->instance = returnPtr;
  909. object->owns = false;
  910. luaL_getmetatable(state, "ThemeSideRegions");
  911. lua_setmetatable(state, -2);
  912. }
  913. else
  914. {
  915. lua_pushnil(state);
  916. }
  917. return 1;
  918. }
  919. else
  920. {
  921. lua_pushstring(state, "lua_Joystick_getBorder - Failed to match the given parameters to a valid function signature.");
  922. lua_error(state);
  923. }
  924. break;
  925. }
  926. case 2:
  927. {
  928. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  929. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  930. {
  931. // Get parameter 1 off the stack.
  932. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  933. Joystick* instance = getInstance(state);
  934. void* returnPtr = (void*)&(instance->getBorder(param1));
  935. if (returnPtr)
  936. {
  937. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  938. object->instance = returnPtr;
  939. object->owns = false;
  940. luaL_getmetatable(state, "ThemeSideRegions");
  941. lua_setmetatable(state, -2);
  942. }
  943. else
  944. {
  945. lua_pushnil(state);
  946. }
  947. return 1;
  948. }
  949. else
  950. {
  951. lua_pushstring(state, "lua_Joystick_getBorder - Failed to match the given parameters to a valid function signature.");
  952. lua_error(state);
  953. }
  954. break;
  955. }
  956. default:
  957. {
  958. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  959. lua_error(state);
  960. break;
  961. }
  962. }
  963. return 0;
  964. }
  965. int lua_Joystick_getBounds(lua_State* state)
  966. {
  967. // Get the number of parameters.
  968. int paramCount = lua_gettop(state);
  969. // Attempt to match the parameters to a valid binding.
  970. switch (paramCount)
  971. {
  972. case 1:
  973. {
  974. if ((lua_type(state, 1) == LUA_TUSERDATA))
  975. {
  976. Joystick* instance = getInstance(state);
  977. void* returnPtr = (void*)&(instance->getBounds());
  978. if (returnPtr)
  979. {
  980. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  981. object->instance = returnPtr;
  982. object->owns = false;
  983. luaL_getmetatable(state, "Rectangle");
  984. lua_setmetatable(state, -2);
  985. }
  986. else
  987. {
  988. lua_pushnil(state);
  989. }
  990. return 1;
  991. }
  992. else
  993. {
  994. lua_pushstring(state, "lua_Joystick_getBounds - Failed to match the given parameters to a valid function signature.");
  995. lua_error(state);
  996. }
  997. break;
  998. }
  999. default:
  1000. {
  1001. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1002. lua_error(state);
  1003. break;
  1004. }
  1005. }
  1006. return 0;
  1007. }
  1008. int lua_Joystick_getClip(lua_State* state)
  1009. {
  1010. // Get the number of parameters.
  1011. int paramCount = lua_gettop(state);
  1012. // Attempt to match the parameters to a valid binding.
  1013. switch (paramCount)
  1014. {
  1015. case 1:
  1016. {
  1017. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1018. {
  1019. Joystick* instance = getInstance(state);
  1020. void* returnPtr = (void*)&(instance->getClip());
  1021. if (returnPtr)
  1022. {
  1023. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1024. object->instance = returnPtr;
  1025. object->owns = false;
  1026. luaL_getmetatable(state, "Rectangle");
  1027. lua_setmetatable(state, -2);
  1028. }
  1029. else
  1030. {
  1031. lua_pushnil(state);
  1032. }
  1033. return 1;
  1034. }
  1035. else
  1036. {
  1037. lua_pushstring(state, "lua_Joystick_getClip - Failed to match the given parameters to a valid function signature.");
  1038. lua_error(state);
  1039. }
  1040. break;
  1041. }
  1042. default:
  1043. {
  1044. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1045. lua_error(state);
  1046. break;
  1047. }
  1048. }
  1049. return 0;
  1050. }
  1051. int lua_Joystick_getClipBounds(lua_State* state)
  1052. {
  1053. // Get the number of parameters.
  1054. int paramCount = lua_gettop(state);
  1055. // Attempt to match the parameters to a valid binding.
  1056. switch (paramCount)
  1057. {
  1058. case 1:
  1059. {
  1060. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1061. {
  1062. Joystick* instance = getInstance(state);
  1063. void* returnPtr = (void*)&(instance->getClipBounds());
  1064. if (returnPtr)
  1065. {
  1066. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1067. object->instance = returnPtr;
  1068. object->owns = false;
  1069. luaL_getmetatable(state, "Rectangle");
  1070. lua_setmetatable(state, -2);
  1071. }
  1072. else
  1073. {
  1074. lua_pushnil(state);
  1075. }
  1076. return 1;
  1077. }
  1078. else
  1079. {
  1080. lua_pushstring(state, "lua_Joystick_getClipBounds - Failed to match the given parameters to a valid function signature.");
  1081. lua_error(state);
  1082. }
  1083. break;
  1084. }
  1085. default:
  1086. {
  1087. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1088. lua_error(state);
  1089. break;
  1090. }
  1091. }
  1092. return 0;
  1093. }
  1094. int lua_Joystick_getConsumeInputEvents(lua_State* state)
  1095. {
  1096. // Get the number of parameters.
  1097. int paramCount = lua_gettop(state);
  1098. // Attempt to match the parameters to a valid binding.
  1099. switch (paramCount)
  1100. {
  1101. case 1:
  1102. {
  1103. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1104. {
  1105. Joystick* instance = getInstance(state);
  1106. bool result = instance->getConsumeInputEvents();
  1107. // Push the return value onto the stack.
  1108. lua_pushboolean(state, result);
  1109. return 1;
  1110. }
  1111. else
  1112. {
  1113. lua_pushstring(state, "lua_Joystick_getConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  1114. lua_error(state);
  1115. }
  1116. break;
  1117. }
  1118. default:
  1119. {
  1120. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1121. lua_error(state);
  1122. break;
  1123. }
  1124. }
  1125. return 0;
  1126. }
  1127. int lua_Joystick_getCursorColor(lua_State* state)
  1128. {
  1129. // Get the number of parameters.
  1130. int paramCount = lua_gettop(state);
  1131. // Attempt to match the parameters to a valid binding.
  1132. switch (paramCount)
  1133. {
  1134. case 2:
  1135. {
  1136. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1137. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1138. {
  1139. // Get parameter 1 off the stack.
  1140. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1141. Joystick* instance = getInstance(state);
  1142. void* returnPtr = (void*)&(instance->getCursorColor(param1));
  1143. if (returnPtr)
  1144. {
  1145. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1146. object->instance = returnPtr;
  1147. object->owns = false;
  1148. luaL_getmetatable(state, "Vector4");
  1149. lua_setmetatable(state, -2);
  1150. }
  1151. else
  1152. {
  1153. lua_pushnil(state);
  1154. }
  1155. return 1;
  1156. }
  1157. else
  1158. {
  1159. lua_pushstring(state, "lua_Joystick_getCursorColor - Failed to match the given parameters to a valid function signature.");
  1160. lua_error(state);
  1161. }
  1162. break;
  1163. }
  1164. default:
  1165. {
  1166. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1167. lua_error(state);
  1168. break;
  1169. }
  1170. }
  1171. return 0;
  1172. }
  1173. int lua_Joystick_getCursorRegion(lua_State* state)
  1174. {
  1175. // Get the number of parameters.
  1176. int paramCount = lua_gettop(state);
  1177. // Attempt to match the parameters to a valid binding.
  1178. switch (paramCount)
  1179. {
  1180. case 2:
  1181. {
  1182. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1183. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1184. {
  1185. // Get parameter 1 off the stack.
  1186. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1187. Joystick* instance = getInstance(state);
  1188. void* returnPtr = (void*)&(instance->getCursorRegion(param1));
  1189. if (returnPtr)
  1190. {
  1191. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1192. object->instance = returnPtr;
  1193. object->owns = false;
  1194. luaL_getmetatable(state, "Rectangle");
  1195. lua_setmetatable(state, -2);
  1196. }
  1197. else
  1198. {
  1199. lua_pushnil(state);
  1200. }
  1201. return 1;
  1202. }
  1203. else
  1204. {
  1205. lua_pushstring(state, "lua_Joystick_getCursorRegion - Failed to match the given parameters to a valid function signature.");
  1206. lua_error(state);
  1207. }
  1208. break;
  1209. }
  1210. default:
  1211. {
  1212. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1213. lua_error(state);
  1214. break;
  1215. }
  1216. }
  1217. return 0;
  1218. }
  1219. int lua_Joystick_getCursorUVs(lua_State* state)
  1220. {
  1221. // Get the number of parameters.
  1222. int paramCount = lua_gettop(state);
  1223. // Attempt to match the parameters to a valid binding.
  1224. switch (paramCount)
  1225. {
  1226. case 2:
  1227. {
  1228. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1229. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1230. {
  1231. // Get parameter 1 off the stack.
  1232. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1233. Joystick* instance = getInstance(state);
  1234. void* returnPtr = (void*)&(instance->getCursorUVs(param1));
  1235. if (returnPtr)
  1236. {
  1237. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1238. object->instance = returnPtr;
  1239. object->owns = false;
  1240. luaL_getmetatable(state, "ThemeUVs");
  1241. lua_setmetatable(state, -2);
  1242. }
  1243. else
  1244. {
  1245. lua_pushnil(state);
  1246. }
  1247. return 1;
  1248. }
  1249. else
  1250. {
  1251. lua_pushstring(state, "lua_Joystick_getCursorUVs - Failed to match the given parameters to a valid function signature.");
  1252. lua_error(state);
  1253. }
  1254. break;
  1255. }
  1256. default:
  1257. {
  1258. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1259. lua_error(state);
  1260. break;
  1261. }
  1262. }
  1263. return 0;
  1264. }
  1265. int lua_Joystick_getFocusIndex(lua_State* state)
  1266. {
  1267. // Get the number of parameters.
  1268. int paramCount = lua_gettop(state);
  1269. // Attempt to match the parameters to a valid binding.
  1270. switch (paramCount)
  1271. {
  1272. case 1:
  1273. {
  1274. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1275. {
  1276. Joystick* instance = getInstance(state);
  1277. int result = instance->getFocusIndex();
  1278. // Push the return value onto the stack.
  1279. lua_pushinteger(state, result);
  1280. return 1;
  1281. }
  1282. else
  1283. {
  1284. lua_pushstring(state, "lua_Joystick_getFocusIndex - Failed to match the given parameters to a valid function signature.");
  1285. lua_error(state);
  1286. }
  1287. break;
  1288. }
  1289. default:
  1290. {
  1291. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1292. lua_error(state);
  1293. break;
  1294. }
  1295. }
  1296. return 0;
  1297. }
  1298. int lua_Joystick_getFont(lua_State* state)
  1299. {
  1300. // Get the number of parameters.
  1301. int paramCount = lua_gettop(state);
  1302. // Attempt to match the parameters to a valid binding.
  1303. switch (paramCount)
  1304. {
  1305. case 1:
  1306. {
  1307. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1308. {
  1309. Joystick* instance = getInstance(state);
  1310. void* returnPtr = (void*)instance->getFont();
  1311. if (returnPtr)
  1312. {
  1313. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1314. object->instance = returnPtr;
  1315. object->owns = false;
  1316. luaL_getmetatable(state, "Font");
  1317. lua_setmetatable(state, -2);
  1318. }
  1319. else
  1320. {
  1321. lua_pushnil(state);
  1322. }
  1323. return 1;
  1324. }
  1325. else
  1326. {
  1327. lua_pushstring(state, "lua_Joystick_getFont - Failed to match the given parameters to a valid function signature.");
  1328. lua_error(state);
  1329. }
  1330. break;
  1331. }
  1332. case 2:
  1333. {
  1334. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1335. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1336. {
  1337. // Get parameter 1 off the stack.
  1338. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1339. Joystick* instance = getInstance(state);
  1340. void* returnPtr = (void*)instance->getFont(param1);
  1341. if (returnPtr)
  1342. {
  1343. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1344. object->instance = returnPtr;
  1345. object->owns = false;
  1346. luaL_getmetatable(state, "Font");
  1347. lua_setmetatable(state, -2);
  1348. }
  1349. else
  1350. {
  1351. lua_pushnil(state);
  1352. }
  1353. return 1;
  1354. }
  1355. else
  1356. {
  1357. lua_pushstring(state, "lua_Joystick_getFont - Failed to match the given parameters to a valid function signature.");
  1358. lua_error(state);
  1359. }
  1360. break;
  1361. }
  1362. default:
  1363. {
  1364. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1365. lua_error(state);
  1366. break;
  1367. }
  1368. }
  1369. return 0;
  1370. }
  1371. int lua_Joystick_getFontSize(lua_State* state)
  1372. {
  1373. // Get the number of parameters.
  1374. int paramCount = lua_gettop(state);
  1375. // Attempt to match the parameters to a valid binding.
  1376. switch (paramCount)
  1377. {
  1378. case 1:
  1379. {
  1380. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1381. {
  1382. Joystick* instance = getInstance(state);
  1383. unsigned int result = instance->getFontSize();
  1384. // Push the return value onto the stack.
  1385. lua_pushunsigned(state, result);
  1386. return 1;
  1387. }
  1388. else
  1389. {
  1390. lua_pushstring(state, "lua_Joystick_getFontSize - Failed to match the given parameters to a valid function signature.");
  1391. lua_error(state);
  1392. }
  1393. break;
  1394. }
  1395. case 2:
  1396. {
  1397. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1398. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1399. {
  1400. // Get parameter 1 off the stack.
  1401. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1402. Joystick* instance = getInstance(state);
  1403. unsigned int result = instance->getFontSize(param1);
  1404. // Push the return value onto the stack.
  1405. lua_pushunsigned(state, result);
  1406. return 1;
  1407. }
  1408. else
  1409. {
  1410. lua_pushstring(state, "lua_Joystick_getFontSize - Failed to match the given parameters to a valid function signature.");
  1411. lua_error(state);
  1412. }
  1413. break;
  1414. }
  1415. default:
  1416. {
  1417. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1418. lua_error(state);
  1419. break;
  1420. }
  1421. }
  1422. return 0;
  1423. }
  1424. int lua_Joystick_getHeight(lua_State* state)
  1425. {
  1426. // Get the number of parameters.
  1427. int paramCount = lua_gettop(state);
  1428. // Attempt to match the parameters to a valid binding.
  1429. switch (paramCount)
  1430. {
  1431. case 1:
  1432. {
  1433. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1434. {
  1435. Joystick* instance = getInstance(state);
  1436. float result = instance->getHeight();
  1437. // Push the return value onto the stack.
  1438. lua_pushnumber(state, result);
  1439. return 1;
  1440. }
  1441. else
  1442. {
  1443. lua_pushstring(state, "lua_Joystick_getHeight - Failed to match the given parameters to a valid function signature.");
  1444. lua_error(state);
  1445. }
  1446. break;
  1447. }
  1448. default:
  1449. {
  1450. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1451. lua_error(state);
  1452. break;
  1453. }
  1454. }
  1455. return 0;
  1456. }
  1457. int lua_Joystick_getId(lua_State* state)
  1458. {
  1459. // Get the number of parameters.
  1460. int paramCount = lua_gettop(state);
  1461. // Attempt to match the parameters to a valid binding.
  1462. switch (paramCount)
  1463. {
  1464. case 1:
  1465. {
  1466. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1467. {
  1468. Joystick* instance = getInstance(state);
  1469. const char* result = instance->getId();
  1470. // Push the return value onto the stack.
  1471. lua_pushstring(state, result);
  1472. return 1;
  1473. }
  1474. else
  1475. {
  1476. lua_pushstring(state, "lua_Joystick_getId - Failed to match the given parameters to a valid function signature.");
  1477. lua_error(state);
  1478. }
  1479. break;
  1480. }
  1481. default:
  1482. {
  1483. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1484. lua_error(state);
  1485. break;
  1486. }
  1487. }
  1488. return 0;
  1489. }
  1490. int lua_Joystick_getImageColor(lua_State* state)
  1491. {
  1492. // Get the number of parameters.
  1493. int paramCount = lua_gettop(state);
  1494. // Attempt to match the parameters to a valid binding.
  1495. switch (paramCount)
  1496. {
  1497. case 3:
  1498. {
  1499. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1500. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1501. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1502. {
  1503. // Get parameter 1 off the stack.
  1504. const char* param1 = ScriptUtil::getString(2, false);
  1505. // Get parameter 2 off the stack.
  1506. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1507. Joystick* instance = getInstance(state);
  1508. void* returnPtr = (void*)&(instance->getImageColor(param1, param2));
  1509. if (returnPtr)
  1510. {
  1511. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1512. object->instance = returnPtr;
  1513. object->owns = false;
  1514. luaL_getmetatable(state, "Vector4");
  1515. lua_setmetatable(state, -2);
  1516. }
  1517. else
  1518. {
  1519. lua_pushnil(state);
  1520. }
  1521. return 1;
  1522. }
  1523. else
  1524. {
  1525. lua_pushstring(state, "lua_Joystick_getImageColor - Failed to match the given parameters to a valid function signature.");
  1526. lua_error(state);
  1527. }
  1528. break;
  1529. }
  1530. default:
  1531. {
  1532. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1533. lua_error(state);
  1534. break;
  1535. }
  1536. }
  1537. return 0;
  1538. }
  1539. int lua_Joystick_getImageRegion(lua_State* state)
  1540. {
  1541. // Get the number of parameters.
  1542. int paramCount = lua_gettop(state);
  1543. // Attempt to match the parameters to a valid binding.
  1544. switch (paramCount)
  1545. {
  1546. case 3:
  1547. {
  1548. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1549. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1550. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1551. {
  1552. // Get parameter 1 off the stack.
  1553. const char* param1 = ScriptUtil::getString(2, false);
  1554. // Get parameter 2 off the stack.
  1555. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1556. Joystick* instance = getInstance(state);
  1557. void* returnPtr = (void*)&(instance->getImageRegion(param1, param2));
  1558. if (returnPtr)
  1559. {
  1560. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1561. object->instance = returnPtr;
  1562. object->owns = false;
  1563. luaL_getmetatable(state, "Rectangle");
  1564. lua_setmetatable(state, -2);
  1565. }
  1566. else
  1567. {
  1568. lua_pushnil(state);
  1569. }
  1570. return 1;
  1571. }
  1572. else
  1573. {
  1574. lua_pushstring(state, "lua_Joystick_getImageRegion - Failed to match the given parameters to a valid function signature.");
  1575. lua_error(state);
  1576. }
  1577. break;
  1578. }
  1579. default:
  1580. {
  1581. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1582. lua_error(state);
  1583. break;
  1584. }
  1585. }
  1586. return 0;
  1587. }
  1588. int lua_Joystick_getImageUVs(lua_State* state)
  1589. {
  1590. // Get the number of parameters.
  1591. int paramCount = lua_gettop(state);
  1592. // Attempt to match the parameters to a valid binding.
  1593. switch (paramCount)
  1594. {
  1595. case 3:
  1596. {
  1597. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1598. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1599. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1600. {
  1601. // Get parameter 1 off the stack.
  1602. const char* param1 = ScriptUtil::getString(2, false);
  1603. // Get parameter 2 off the stack.
  1604. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3));
  1605. Joystick* instance = getInstance(state);
  1606. void* returnPtr = (void*)&(instance->getImageUVs(param1, param2));
  1607. if (returnPtr)
  1608. {
  1609. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1610. object->instance = returnPtr;
  1611. object->owns = false;
  1612. luaL_getmetatable(state, "ThemeUVs");
  1613. lua_setmetatable(state, -2);
  1614. }
  1615. else
  1616. {
  1617. lua_pushnil(state);
  1618. }
  1619. return 1;
  1620. }
  1621. else
  1622. {
  1623. lua_pushstring(state, "lua_Joystick_getImageUVs - Failed to match the given parameters to a valid function signature.");
  1624. lua_error(state);
  1625. }
  1626. break;
  1627. }
  1628. default:
  1629. {
  1630. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1631. lua_error(state);
  1632. break;
  1633. }
  1634. }
  1635. return 0;
  1636. }
  1637. int lua_Joystick_getMargin(lua_State* state)
  1638. {
  1639. // Get the number of parameters.
  1640. int paramCount = lua_gettop(state);
  1641. // Attempt to match the parameters to a valid binding.
  1642. switch (paramCount)
  1643. {
  1644. case 1:
  1645. {
  1646. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1647. {
  1648. Joystick* instance = getInstance(state);
  1649. void* returnPtr = (void*)&(instance->getMargin());
  1650. if (returnPtr)
  1651. {
  1652. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1653. object->instance = returnPtr;
  1654. object->owns = false;
  1655. luaL_getmetatable(state, "ThemeSideRegions");
  1656. lua_setmetatable(state, -2);
  1657. }
  1658. else
  1659. {
  1660. lua_pushnil(state);
  1661. }
  1662. return 1;
  1663. }
  1664. else
  1665. {
  1666. lua_pushstring(state, "lua_Joystick_getMargin - Failed to match the given parameters to a valid function signature.");
  1667. lua_error(state);
  1668. }
  1669. break;
  1670. }
  1671. default:
  1672. {
  1673. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1674. lua_error(state);
  1675. break;
  1676. }
  1677. }
  1678. return 0;
  1679. }
  1680. int lua_Joystick_getOpacity(lua_State* state)
  1681. {
  1682. // Get the number of parameters.
  1683. int paramCount = lua_gettop(state);
  1684. // Attempt to match the parameters to a valid binding.
  1685. switch (paramCount)
  1686. {
  1687. case 1:
  1688. {
  1689. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1690. {
  1691. Joystick* instance = getInstance(state);
  1692. float result = instance->getOpacity();
  1693. // Push the return value onto the stack.
  1694. lua_pushnumber(state, result);
  1695. return 1;
  1696. }
  1697. else
  1698. {
  1699. lua_pushstring(state, "lua_Joystick_getOpacity - Failed to match the given parameters to a valid function signature.");
  1700. lua_error(state);
  1701. }
  1702. break;
  1703. }
  1704. case 2:
  1705. {
  1706. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1707. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1708. {
  1709. // Get parameter 1 off the stack.
  1710. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1711. Joystick* instance = getInstance(state);
  1712. float result = instance->getOpacity(param1);
  1713. // Push the return value onto the stack.
  1714. lua_pushnumber(state, result);
  1715. return 1;
  1716. }
  1717. else
  1718. {
  1719. lua_pushstring(state, "lua_Joystick_getOpacity - Failed to match the given parameters to a valid function signature.");
  1720. lua_error(state);
  1721. }
  1722. break;
  1723. }
  1724. default:
  1725. {
  1726. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1727. lua_error(state);
  1728. break;
  1729. }
  1730. }
  1731. return 0;
  1732. }
  1733. int lua_Joystick_getPadding(lua_State* state)
  1734. {
  1735. // Get the number of parameters.
  1736. int paramCount = lua_gettop(state);
  1737. // Attempt to match the parameters to a valid binding.
  1738. switch (paramCount)
  1739. {
  1740. case 1:
  1741. {
  1742. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1743. {
  1744. Joystick* instance = getInstance(state);
  1745. void* returnPtr = (void*)&(instance->getPadding());
  1746. if (returnPtr)
  1747. {
  1748. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1749. object->instance = returnPtr;
  1750. object->owns = false;
  1751. luaL_getmetatable(state, "ThemeSideRegions");
  1752. lua_setmetatable(state, -2);
  1753. }
  1754. else
  1755. {
  1756. lua_pushnil(state);
  1757. }
  1758. return 1;
  1759. }
  1760. else
  1761. {
  1762. lua_pushstring(state, "lua_Joystick_getPadding - Failed to match the given parameters to a valid function signature.");
  1763. lua_error(state);
  1764. }
  1765. break;
  1766. }
  1767. default:
  1768. {
  1769. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1770. lua_error(state);
  1771. break;
  1772. }
  1773. }
  1774. return 0;
  1775. }
  1776. int lua_Joystick_getRefCount(lua_State* state)
  1777. {
  1778. // Get the number of parameters.
  1779. int paramCount = lua_gettop(state);
  1780. // Attempt to match the parameters to a valid binding.
  1781. switch (paramCount)
  1782. {
  1783. case 1:
  1784. {
  1785. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1786. {
  1787. Joystick* instance = getInstance(state);
  1788. unsigned int result = instance->getRefCount();
  1789. // Push the return value onto the stack.
  1790. lua_pushunsigned(state, result);
  1791. return 1;
  1792. }
  1793. else
  1794. {
  1795. lua_pushstring(state, "lua_Joystick_getRefCount - Failed to match the given parameters to a valid function signature.");
  1796. lua_error(state);
  1797. }
  1798. break;
  1799. }
  1800. default:
  1801. {
  1802. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1803. lua_error(state);
  1804. break;
  1805. }
  1806. }
  1807. return 0;
  1808. }
  1809. int lua_Joystick_getRegion(lua_State* state)
  1810. {
  1811. // Get the number of parameters.
  1812. int paramCount = lua_gettop(state);
  1813. // Attempt to match the parameters to a valid binding.
  1814. switch (paramCount)
  1815. {
  1816. case 1:
  1817. {
  1818. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1819. {
  1820. Joystick* instance = getInstance(state);
  1821. void* returnPtr = (void*)&(instance->getRegion());
  1822. if (returnPtr)
  1823. {
  1824. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1825. object->instance = returnPtr;
  1826. object->owns = false;
  1827. luaL_getmetatable(state, "Rectangle");
  1828. lua_setmetatable(state, -2);
  1829. }
  1830. else
  1831. {
  1832. lua_pushnil(state);
  1833. }
  1834. return 1;
  1835. }
  1836. else
  1837. {
  1838. lua_pushstring(state, "lua_Joystick_getRegion - Failed to match the given parameters to a valid function signature.");
  1839. lua_error(state);
  1840. }
  1841. break;
  1842. }
  1843. default:
  1844. {
  1845. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1846. lua_error(state);
  1847. break;
  1848. }
  1849. }
  1850. return 0;
  1851. }
  1852. int lua_Joystick_getSkinColor(lua_State* state)
  1853. {
  1854. // Get the number of parameters.
  1855. int paramCount = lua_gettop(state);
  1856. // Attempt to match the parameters to a valid binding.
  1857. switch (paramCount)
  1858. {
  1859. case 1:
  1860. {
  1861. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1862. {
  1863. Joystick* instance = getInstance(state);
  1864. void* returnPtr = (void*)&(instance->getSkinColor());
  1865. if (returnPtr)
  1866. {
  1867. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1868. object->instance = returnPtr;
  1869. object->owns = false;
  1870. luaL_getmetatable(state, "Vector4");
  1871. lua_setmetatable(state, -2);
  1872. }
  1873. else
  1874. {
  1875. lua_pushnil(state);
  1876. }
  1877. return 1;
  1878. }
  1879. else
  1880. {
  1881. lua_pushstring(state, "lua_Joystick_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1882. lua_error(state);
  1883. }
  1884. break;
  1885. }
  1886. case 2:
  1887. {
  1888. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1889. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1890. {
  1891. // Get parameter 1 off the stack.
  1892. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1893. Joystick* instance = getInstance(state);
  1894. void* returnPtr = (void*)&(instance->getSkinColor(param1));
  1895. if (returnPtr)
  1896. {
  1897. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1898. object->instance = returnPtr;
  1899. object->owns = false;
  1900. luaL_getmetatable(state, "Vector4");
  1901. lua_setmetatable(state, -2);
  1902. }
  1903. else
  1904. {
  1905. lua_pushnil(state);
  1906. }
  1907. return 1;
  1908. }
  1909. else
  1910. {
  1911. lua_pushstring(state, "lua_Joystick_getSkinColor - Failed to match the given parameters to a valid function signature.");
  1912. lua_error(state);
  1913. }
  1914. break;
  1915. }
  1916. default:
  1917. {
  1918. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1919. lua_error(state);
  1920. break;
  1921. }
  1922. }
  1923. return 0;
  1924. }
  1925. int lua_Joystick_getSkinRegion(lua_State* state)
  1926. {
  1927. // Get the number of parameters.
  1928. int paramCount = lua_gettop(state);
  1929. // Attempt to match the parameters to a valid binding.
  1930. switch (paramCount)
  1931. {
  1932. case 1:
  1933. {
  1934. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1935. {
  1936. Joystick* instance = getInstance(state);
  1937. void* returnPtr = (void*)&(instance->getSkinRegion());
  1938. if (returnPtr)
  1939. {
  1940. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1941. object->instance = returnPtr;
  1942. object->owns = false;
  1943. luaL_getmetatable(state, "Rectangle");
  1944. lua_setmetatable(state, -2);
  1945. }
  1946. else
  1947. {
  1948. lua_pushnil(state);
  1949. }
  1950. return 1;
  1951. }
  1952. else
  1953. {
  1954. lua_pushstring(state, "lua_Joystick_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  1955. lua_error(state);
  1956. }
  1957. break;
  1958. }
  1959. case 2:
  1960. {
  1961. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1962. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1963. {
  1964. // Get parameter 1 off the stack.
  1965. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  1966. Joystick* instance = getInstance(state);
  1967. void* returnPtr = (void*)&(instance->getSkinRegion(param1));
  1968. if (returnPtr)
  1969. {
  1970. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1971. object->instance = returnPtr;
  1972. object->owns = false;
  1973. luaL_getmetatable(state, "Rectangle");
  1974. lua_setmetatable(state, -2);
  1975. }
  1976. else
  1977. {
  1978. lua_pushnil(state);
  1979. }
  1980. return 1;
  1981. }
  1982. else
  1983. {
  1984. lua_pushstring(state, "lua_Joystick_getSkinRegion - Failed to match the given parameters to a valid function signature.");
  1985. lua_error(state);
  1986. }
  1987. break;
  1988. }
  1989. default:
  1990. {
  1991. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1992. lua_error(state);
  1993. break;
  1994. }
  1995. }
  1996. return 0;
  1997. }
  1998. int lua_Joystick_getState(lua_State* state)
  1999. {
  2000. // Get the number of parameters.
  2001. int paramCount = lua_gettop(state);
  2002. // Attempt to match the parameters to a valid binding.
  2003. switch (paramCount)
  2004. {
  2005. case 1:
  2006. {
  2007. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2008. {
  2009. Joystick* instance = getInstance(state);
  2010. Control::State result = instance->getState();
  2011. // Push the return value onto the stack.
  2012. lua_pushstring(state, lua_stringFromEnum_ControlState(result));
  2013. return 1;
  2014. }
  2015. else
  2016. {
  2017. lua_pushstring(state, "lua_Joystick_getState - Failed to match the given parameters to a valid function signature.");
  2018. lua_error(state);
  2019. }
  2020. break;
  2021. }
  2022. default:
  2023. {
  2024. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2025. lua_error(state);
  2026. break;
  2027. }
  2028. }
  2029. return 0;
  2030. }
  2031. int lua_Joystick_getStyle(lua_State* state)
  2032. {
  2033. // Get the number of parameters.
  2034. int paramCount = lua_gettop(state);
  2035. // Attempt to match the parameters to a valid binding.
  2036. switch (paramCount)
  2037. {
  2038. case 1:
  2039. {
  2040. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2041. {
  2042. Joystick* instance = getInstance(state);
  2043. void* returnPtr = (void*)instance->getStyle();
  2044. if (returnPtr)
  2045. {
  2046. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2047. object->instance = returnPtr;
  2048. object->owns = false;
  2049. luaL_getmetatable(state, "ThemeStyle");
  2050. lua_setmetatable(state, -2);
  2051. }
  2052. else
  2053. {
  2054. lua_pushnil(state);
  2055. }
  2056. return 1;
  2057. }
  2058. else
  2059. {
  2060. lua_pushstring(state, "lua_Joystick_getStyle - Failed to match the given parameters to a valid function signature.");
  2061. lua_error(state);
  2062. }
  2063. break;
  2064. }
  2065. default:
  2066. {
  2067. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2068. lua_error(state);
  2069. break;
  2070. }
  2071. }
  2072. return 0;
  2073. }
  2074. int lua_Joystick_getTextAlignment(lua_State* state)
  2075. {
  2076. // Get the number of parameters.
  2077. int paramCount = lua_gettop(state);
  2078. // Attempt to match the parameters to a valid binding.
  2079. switch (paramCount)
  2080. {
  2081. case 1:
  2082. {
  2083. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2084. {
  2085. Joystick* instance = getInstance(state);
  2086. Font::Justify result = instance->getTextAlignment();
  2087. // Push the return value onto the stack.
  2088. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2089. return 1;
  2090. }
  2091. else
  2092. {
  2093. lua_pushstring(state, "lua_Joystick_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2094. lua_error(state);
  2095. }
  2096. break;
  2097. }
  2098. case 2:
  2099. {
  2100. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2101. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2102. {
  2103. // Get parameter 1 off the stack.
  2104. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2105. Joystick* instance = getInstance(state);
  2106. Font::Justify result = instance->getTextAlignment(param1);
  2107. // Push the return value onto the stack.
  2108. lua_pushstring(state, lua_stringFromEnum_FontJustify(result));
  2109. return 1;
  2110. }
  2111. else
  2112. {
  2113. lua_pushstring(state, "lua_Joystick_getTextAlignment - Failed to match the given parameters to a valid function signature.");
  2114. lua_error(state);
  2115. }
  2116. break;
  2117. }
  2118. default:
  2119. {
  2120. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2121. lua_error(state);
  2122. break;
  2123. }
  2124. }
  2125. return 0;
  2126. }
  2127. int lua_Joystick_getTextColor(lua_State* state)
  2128. {
  2129. // Get the number of parameters.
  2130. int paramCount = lua_gettop(state);
  2131. // Attempt to match the parameters to a valid binding.
  2132. switch (paramCount)
  2133. {
  2134. case 1:
  2135. {
  2136. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2137. {
  2138. Joystick* instance = getInstance(state);
  2139. void* returnPtr = (void*)&(instance->getTextColor());
  2140. if (returnPtr)
  2141. {
  2142. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2143. object->instance = returnPtr;
  2144. object->owns = false;
  2145. luaL_getmetatable(state, "Vector4");
  2146. lua_setmetatable(state, -2);
  2147. }
  2148. else
  2149. {
  2150. lua_pushnil(state);
  2151. }
  2152. return 1;
  2153. }
  2154. else
  2155. {
  2156. lua_pushstring(state, "lua_Joystick_getTextColor - Failed to match the given parameters to a valid function signature.");
  2157. lua_error(state);
  2158. }
  2159. break;
  2160. }
  2161. case 2:
  2162. {
  2163. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2164. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2165. {
  2166. // Get parameter 1 off the stack.
  2167. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2168. Joystick* instance = getInstance(state);
  2169. void* returnPtr = (void*)&(instance->getTextColor(param1));
  2170. if (returnPtr)
  2171. {
  2172. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2173. object->instance = returnPtr;
  2174. object->owns = false;
  2175. luaL_getmetatable(state, "Vector4");
  2176. lua_setmetatable(state, -2);
  2177. }
  2178. else
  2179. {
  2180. lua_pushnil(state);
  2181. }
  2182. return 1;
  2183. }
  2184. else
  2185. {
  2186. lua_pushstring(state, "lua_Joystick_getTextColor - Failed to match the given parameters to a valid function signature.");
  2187. lua_error(state);
  2188. }
  2189. break;
  2190. }
  2191. default:
  2192. {
  2193. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2194. lua_error(state);
  2195. break;
  2196. }
  2197. }
  2198. return 0;
  2199. }
  2200. int lua_Joystick_getTextRightToLeft(lua_State* state)
  2201. {
  2202. // Get the number of parameters.
  2203. int paramCount = lua_gettop(state);
  2204. // Attempt to match the parameters to a valid binding.
  2205. switch (paramCount)
  2206. {
  2207. case 1:
  2208. {
  2209. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2210. {
  2211. Joystick* instance = getInstance(state);
  2212. bool result = instance->getTextRightToLeft();
  2213. // Push the return value onto the stack.
  2214. lua_pushboolean(state, result);
  2215. return 1;
  2216. }
  2217. else
  2218. {
  2219. lua_pushstring(state, "lua_Joystick_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2220. lua_error(state);
  2221. }
  2222. break;
  2223. }
  2224. case 2:
  2225. {
  2226. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2227. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2228. {
  2229. // Get parameter 1 off the stack.
  2230. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  2231. Joystick* instance = getInstance(state);
  2232. bool result = instance->getTextRightToLeft(param1);
  2233. // Push the return value onto the stack.
  2234. lua_pushboolean(state, result);
  2235. return 1;
  2236. }
  2237. else
  2238. {
  2239. lua_pushstring(state, "lua_Joystick_getTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  2240. lua_error(state);
  2241. }
  2242. break;
  2243. }
  2244. default:
  2245. {
  2246. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2247. lua_error(state);
  2248. break;
  2249. }
  2250. }
  2251. return 0;
  2252. }
  2253. int lua_Joystick_getType(lua_State* state)
  2254. {
  2255. // Get the number of parameters.
  2256. int paramCount = lua_gettop(state);
  2257. // Attempt to match the parameters to a valid binding.
  2258. switch (paramCount)
  2259. {
  2260. case 1:
  2261. {
  2262. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2263. {
  2264. Joystick* instance = getInstance(state);
  2265. const char* result = instance->getType();
  2266. // Push the return value onto the stack.
  2267. lua_pushstring(state, result);
  2268. return 1;
  2269. }
  2270. else
  2271. {
  2272. lua_pushstring(state, "lua_Joystick_getType - Failed to match the given parameters to a valid function signature.");
  2273. lua_error(state);
  2274. }
  2275. break;
  2276. }
  2277. default:
  2278. {
  2279. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2280. lua_error(state);
  2281. break;
  2282. }
  2283. }
  2284. return 0;
  2285. }
  2286. int lua_Joystick_getValue(lua_State* state)
  2287. {
  2288. // Get the number of parameters.
  2289. int paramCount = lua_gettop(state);
  2290. // Attempt to match the parameters to a valid binding.
  2291. switch (paramCount)
  2292. {
  2293. case 1:
  2294. {
  2295. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2296. {
  2297. Joystick* instance = getInstance(state);
  2298. void* returnPtr = (void*)&(instance->getValue());
  2299. if (returnPtr)
  2300. {
  2301. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2302. object->instance = returnPtr;
  2303. object->owns = false;
  2304. luaL_getmetatable(state, "Vector2");
  2305. lua_setmetatable(state, -2);
  2306. }
  2307. else
  2308. {
  2309. lua_pushnil(state);
  2310. }
  2311. return 1;
  2312. }
  2313. else
  2314. {
  2315. lua_pushstring(state, "lua_Joystick_getValue - Failed to match the given parameters to a valid function signature.");
  2316. lua_error(state);
  2317. }
  2318. break;
  2319. }
  2320. default:
  2321. {
  2322. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2323. lua_error(state);
  2324. break;
  2325. }
  2326. }
  2327. return 0;
  2328. }
  2329. int lua_Joystick_getWidth(lua_State* state)
  2330. {
  2331. // Get the number of parameters.
  2332. int paramCount = lua_gettop(state);
  2333. // Attempt to match the parameters to a valid binding.
  2334. switch (paramCount)
  2335. {
  2336. case 1:
  2337. {
  2338. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2339. {
  2340. Joystick* instance = getInstance(state);
  2341. float result = instance->getWidth();
  2342. // Push the return value onto the stack.
  2343. lua_pushnumber(state, result);
  2344. return 1;
  2345. }
  2346. else
  2347. {
  2348. lua_pushstring(state, "lua_Joystick_getWidth - Failed to match the given parameters to a valid function signature.");
  2349. lua_error(state);
  2350. }
  2351. break;
  2352. }
  2353. default:
  2354. {
  2355. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2356. lua_error(state);
  2357. break;
  2358. }
  2359. }
  2360. return 0;
  2361. }
  2362. int lua_Joystick_getX(lua_State* state)
  2363. {
  2364. // Get the number of parameters.
  2365. int paramCount = lua_gettop(state);
  2366. // Attempt to match the parameters to a valid binding.
  2367. switch (paramCount)
  2368. {
  2369. case 1:
  2370. {
  2371. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2372. {
  2373. Joystick* instance = getInstance(state);
  2374. float result = instance->getX();
  2375. // Push the return value onto the stack.
  2376. lua_pushnumber(state, result);
  2377. return 1;
  2378. }
  2379. else
  2380. {
  2381. lua_pushstring(state, "lua_Joystick_getX - Failed to match the given parameters to a valid function signature.");
  2382. lua_error(state);
  2383. }
  2384. break;
  2385. }
  2386. default:
  2387. {
  2388. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2389. lua_error(state);
  2390. break;
  2391. }
  2392. }
  2393. return 0;
  2394. }
  2395. int lua_Joystick_getY(lua_State* state)
  2396. {
  2397. // Get the number of parameters.
  2398. int paramCount = lua_gettop(state);
  2399. // Attempt to match the parameters to a valid binding.
  2400. switch (paramCount)
  2401. {
  2402. case 1:
  2403. {
  2404. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2405. {
  2406. Joystick* instance = getInstance(state);
  2407. float result = instance->getY();
  2408. // Push the return value onto the stack.
  2409. lua_pushnumber(state, result);
  2410. return 1;
  2411. }
  2412. else
  2413. {
  2414. lua_pushstring(state, "lua_Joystick_getY - Failed to match the given parameters to a valid function signature.");
  2415. lua_error(state);
  2416. }
  2417. break;
  2418. }
  2419. default:
  2420. {
  2421. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2422. lua_error(state);
  2423. break;
  2424. }
  2425. }
  2426. return 0;
  2427. }
  2428. int lua_Joystick_getZIndex(lua_State* state)
  2429. {
  2430. // Get the number of parameters.
  2431. int paramCount = lua_gettop(state);
  2432. // Attempt to match the parameters to a valid binding.
  2433. switch (paramCount)
  2434. {
  2435. case 1:
  2436. {
  2437. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2438. {
  2439. Joystick* instance = getInstance(state);
  2440. int result = instance->getZIndex();
  2441. // Push the return value onto the stack.
  2442. lua_pushinteger(state, result);
  2443. return 1;
  2444. }
  2445. else
  2446. {
  2447. lua_pushstring(state, "lua_Joystick_getZIndex - Failed to match the given parameters to a valid function signature.");
  2448. lua_error(state);
  2449. }
  2450. break;
  2451. }
  2452. default:
  2453. {
  2454. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2455. lua_error(state);
  2456. break;
  2457. }
  2458. }
  2459. return 0;
  2460. }
  2461. int lua_Joystick_isAbsolute(lua_State* state)
  2462. {
  2463. // Get the number of parameters.
  2464. int paramCount = lua_gettop(state);
  2465. // Attempt to match the parameters to a valid binding.
  2466. switch (paramCount)
  2467. {
  2468. case 1:
  2469. {
  2470. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2471. {
  2472. Joystick* instance = getInstance(state);
  2473. bool result = instance->isAbsolute();
  2474. // Push the return value onto the stack.
  2475. lua_pushboolean(state, result);
  2476. return 1;
  2477. }
  2478. else
  2479. {
  2480. lua_pushstring(state, "lua_Joystick_isAbsolute - Failed to match the given parameters to a valid function signature.");
  2481. lua_error(state);
  2482. }
  2483. break;
  2484. }
  2485. default:
  2486. {
  2487. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2488. lua_error(state);
  2489. break;
  2490. }
  2491. }
  2492. return 0;
  2493. }
  2494. int lua_Joystick_isContainer(lua_State* state)
  2495. {
  2496. // Get the number of parameters.
  2497. int paramCount = lua_gettop(state);
  2498. // Attempt to match the parameters to a valid binding.
  2499. switch (paramCount)
  2500. {
  2501. case 1:
  2502. {
  2503. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2504. {
  2505. Joystick* instance = getInstance(state);
  2506. bool result = instance->isContainer();
  2507. // Push the return value onto the stack.
  2508. lua_pushboolean(state, result);
  2509. return 1;
  2510. }
  2511. else
  2512. {
  2513. lua_pushstring(state, "lua_Joystick_isContainer - Failed to match the given parameters to a valid function signature.");
  2514. lua_error(state);
  2515. }
  2516. break;
  2517. }
  2518. default:
  2519. {
  2520. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2521. lua_error(state);
  2522. break;
  2523. }
  2524. }
  2525. return 0;
  2526. }
  2527. int lua_Joystick_isEnabled(lua_State* state)
  2528. {
  2529. // Get the number of parameters.
  2530. int paramCount = lua_gettop(state);
  2531. // Attempt to match the parameters to a valid binding.
  2532. switch (paramCount)
  2533. {
  2534. case 1:
  2535. {
  2536. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2537. {
  2538. Joystick* instance = getInstance(state);
  2539. bool result = instance->isEnabled();
  2540. // Push the return value onto the stack.
  2541. lua_pushboolean(state, result);
  2542. return 1;
  2543. }
  2544. else
  2545. {
  2546. lua_pushstring(state, "lua_Joystick_isEnabled - Failed to match the given parameters to a valid function signature.");
  2547. lua_error(state);
  2548. }
  2549. break;
  2550. }
  2551. default:
  2552. {
  2553. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2554. lua_error(state);
  2555. break;
  2556. }
  2557. }
  2558. return 0;
  2559. }
  2560. int lua_Joystick_release(lua_State* state)
  2561. {
  2562. // Get the number of parameters.
  2563. int paramCount = lua_gettop(state);
  2564. // Attempt to match the parameters to a valid binding.
  2565. switch (paramCount)
  2566. {
  2567. case 1:
  2568. {
  2569. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2570. {
  2571. Joystick* instance = getInstance(state);
  2572. instance->release();
  2573. return 0;
  2574. }
  2575. else
  2576. {
  2577. lua_pushstring(state, "lua_Joystick_release - Failed to match the given parameters to a valid function signature.");
  2578. lua_error(state);
  2579. }
  2580. break;
  2581. }
  2582. default:
  2583. {
  2584. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2585. lua_error(state);
  2586. break;
  2587. }
  2588. }
  2589. return 0;
  2590. }
  2591. int lua_Joystick_setAbsolute(lua_State* state)
  2592. {
  2593. // Get the number of parameters.
  2594. int paramCount = lua_gettop(state);
  2595. // Attempt to match the parameters to a valid binding.
  2596. switch (paramCount)
  2597. {
  2598. case 2:
  2599. {
  2600. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2601. lua_type(state, 2) == LUA_TBOOLEAN)
  2602. {
  2603. // Get parameter 1 off the stack.
  2604. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2605. Joystick* instance = getInstance(state);
  2606. instance->setAbsolute(param1);
  2607. return 0;
  2608. }
  2609. else
  2610. {
  2611. lua_pushstring(state, "lua_Joystick_setAbsolute - Failed to match the given parameters to a valid function signature.");
  2612. lua_error(state);
  2613. }
  2614. break;
  2615. }
  2616. default:
  2617. {
  2618. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2619. lua_error(state);
  2620. break;
  2621. }
  2622. }
  2623. return 0;
  2624. }
  2625. int lua_Joystick_setAlignment(lua_State* state)
  2626. {
  2627. // Get the number of parameters.
  2628. int paramCount = lua_gettop(state);
  2629. // Attempt to match the parameters to a valid binding.
  2630. switch (paramCount)
  2631. {
  2632. case 2:
  2633. {
  2634. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2635. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2636. {
  2637. // Get parameter 1 off the stack.
  2638. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2));
  2639. Joystick* instance = getInstance(state);
  2640. instance->setAlignment(param1);
  2641. return 0;
  2642. }
  2643. else
  2644. {
  2645. lua_pushstring(state, "lua_Joystick_setAlignment - Failed to match the given parameters to a valid function signature.");
  2646. lua_error(state);
  2647. }
  2648. break;
  2649. }
  2650. default:
  2651. {
  2652. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2653. lua_error(state);
  2654. break;
  2655. }
  2656. }
  2657. return 0;
  2658. }
  2659. int lua_Joystick_setAnimationPropertyValue(lua_State* state)
  2660. {
  2661. // Get the number of parameters.
  2662. int paramCount = lua_gettop(state);
  2663. // Attempt to match the parameters to a valid binding.
  2664. switch (paramCount)
  2665. {
  2666. case 3:
  2667. {
  2668. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2669. lua_type(state, 2) == LUA_TNUMBER &&
  2670. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2671. {
  2672. // Get parameter 1 off the stack.
  2673. int param1 = (int)luaL_checkint(state, 2);
  2674. // Get parameter 2 off the stack.
  2675. AnimationValue* param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2676. Joystick* instance = getInstance(state);
  2677. instance->setAnimationPropertyValue(param1, param2);
  2678. return 0;
  2679. }
  2680. else
  2681. {
  2682. lua_pushstring(state, "lua_Joystick_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2683. lua_error(state);
  2684. }
  2685. break;
  2686. }
  2687. case 4:
  2688. {
  2689. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2690. lua_type(state, 2) == LUA_TNUMBER &&
  2691. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  2692. lua_type(state, 4) == LUA_TNUMBER)
  2693. {
  2694. // Get parameter 1 off the stack.
  2695. int param1 = (int)luaL_checkint(state, 2);
  2696. // Get parameter 2 off the stack.
  2697. AnimationValue* param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2698. // Get parameter 3 off the stack.
  2699. float param3 = (float)luaL_checknumber(state, 4);
  2700. Joystick* instance = getInstance(state);
  2701. instance->setAnimationPropertyValue(param1, param2, param3);
  2702. return 0;
  2703. }
  2704. else
  2705. {
  2706. lua_pushstring(state, "lua_Joystick_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2707. lua_error(state);
  2708. }
  2709. break;
  2710. }
  2711. default:
  2712. {
  2713. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  2714. lua_error(state);
  2715. break;
  2716. }
  2717. }
  2718. return 0;
  2719. }
  2720. int lua_Joystick_setAutoHeight(lua_State* state)
  2721. {
  2722. // Get the number of parameters.
  2723. int paramCount = lua_gettop(state);
  2724. // Attempt to match the parameters to a valid binding.
  2725. switch (paramCount)
  2726. {
  2727. case 2:
  2728. {
  2729. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2730. lua_type(state, 2) == LUA_TBOOLEAN)
  2731. {
  2732. // Get parameter 1 off the stack.
  2733. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2734. Joystick* instance = getInstance(state);
  2735. instance->setAutoHeight(param1);
  2736. return 0;
  2737. }
  2738. else
  2739. {
  2740. lua_pushstring(state, "lua_Joystick_setAutoHeight - Failed to match the given parameters to a valid function signature.");
  2741. lua_error(state);
  2742. }
  2743. break;
  2744. }
  2745. default:
  2746. {
  2747. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2748. lua_error(state);
  2749. break;
  2750. }
  2751. }
  2752. return 0;
  2753. }
  2754. int lua_Joystick_setAutoWidth(lua_State* state)
  2755. {
  2756. // Get the number of parameters.
  2757. int paramCount = lua_gettop(state);
  2758. // Attempt to match the parameters to a valid binding.
  2759. switch (paramCount)
  2760. {
  2761. case 2:
  2762. {
  2763. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2764. lua_type(state, 2) == LUA_TBOOLEAN)
  2765. {
  2766. // Get parameter 1 off the stack.
  2767. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2768. Joystick* instance = getInstance(state);
  2769. instance->setAutoWidth(param1);
  2770. return 0;
  2771. }
  2772. else
  2773. {
  2774. lua_pushstring(state, "lua_Joystick_setAutoWidth - Failed to match the given parameters to a valid function signature.");
  2775. lua_error(state);
  2776. }
  2777. break;
  2778. }
  2779. default:
  2780. {
  2781. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2782. lua_error(state);
  2783. break;
  2784. }
  2785. }
  2786. return 0;
  2787. }
  2788. int lua_Joystick_setBorder(lua_State* state)
  2789. {
  2790. // Get the number of parameters.
  2791. int paramCount = lua_gettop(state);
  2792. // Attempt to match the parameters to a valid binding.
  2793. switch (paramCount)
  2794. {
  2795. case 5:
  2796. {
  2797. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2798. lua_type(state, 2) == LUA_TNUMBER &&
  2799. lua_type(state, 3) == LUA_TNUMBER &&
  2800. lua_type(state, 4) == LUA_TNUMBER &&
  2801. lua_type(state, 5) == LUA_TNUMBER)
  2802. {
  2803. // Get parameter 1 off the stack.
  2804. float param1 = (float)luaL_checknumber(state, 2);
  2805. // Get parameter 2 off the stack.
  2806. float param2 = (float)luaL_checknumber(state, 3);
  2807. // Get parameter 3 off the stack.
  2808. float param3 = (float)luaL_checknumber(state, 4);
  2809. // Get parameter 4 off the stack.
  2810. float param4 = (float)luaL_checknumber(state, 5);
  2811. Joystick* instance = getInstance(state);
  2812. instance->setBorder(param1, param2, param3, param4);
  2813. return 0;
  2814. }
  2815. else
  2816. {
  2817. lua_pushstring(state, "lua_Joystick_setBorder - Failed to match the given parameters to a valid function signature.");
  2818. lua_error(state);
  2819. }
  2820. break;
  2821. }
  2822. case 6:
  2823. {
  2824. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2825. lua_type(state, 2) == LUA_TNUMBER &&
  2826. lua_type(state, 3) == LUA_TNUMBER &&
  2827. lua_type(state, 4) == LUA_TNUMBER &&
  2828. lua_type(state, 5) == LUA_TNUMBER &&
  2829. lua_type(state, 6) == LUA_TNUMBER)
  2830. {
  2831. // Get parameter 1 off the stack.
  2832. float param1 = (float)luaL_checknumber(state, 2);
  2833. // Get parameter 2 off the stack.
  2834. float param2 = (float)luaL_checknumber(state, 3);
  2835. // Get parameter 3 off the stack.
  2836. float param3 = (float)luaL_checknumber(state, 4);
  2837. // Get parameter 4 off the stack.
  2838. float param4 = (float)luaL_checknumber(state, 5);
  2839. // Get parameter 5 off the stack.
  2840. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6);
  2841. Joystick* instance = getInstance(state);
  2842. instance->setBorder(param1, param2, param3, param4, param5);
  2843. return 0;
  2844. }
  2845. else
  2846. {
  2847. lua_pushstring(state, "lua_Joystick_setBorder - Failed to match the given parameters to a valid function signature.");
  2848. lua_error(state);
  2849. }
  2850. break;
  2851. }
  2852. default:
  2853. {
  2854. lua_pushstring(state, "Invalid number of parameters (expected 5 or 6).");
  2855. lua_error(state);
  2856. break;
  2857. }
  2858. }
  2859. return 0;
  2860. }
  2861. int lua_Joystick_setBounds(lua_State* state)
  2862. {
  2863. // Get the number of parameters.
  2864. int paramCount = lua_gettop(state);
  2865. // Attempt to match the parameters to a valid binding.
  2866. switch (paramCount)
  2867. {
  2868. case 2:
  2869. {
  2870. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2871. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2872. {
  2873. // Get parameter 1 off the stack.
  2874. Rectangle* param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  2875. Joystick* instance = getInstance(state);
  2876. instance->setBounds(*param1);
  2877. return 0;
  2878. }
  2879. else
  2880. {
  2881. lua_pushstring(state, "lua_Joystick_setBounds - Failed to match the given parameters to a valid function signature.");
  2882. lua_error(state);
  2883. }
  2884. break;
  2885. }
  2886. default:
  2887. {
  2888. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2889. lua_error(state);
  2890. break;
  2891. }
  2892. }
  2893. return 0;
  2894. }
  2895. int lua_Joystick_setConsumeInputEvents(lua_State* state)
  2896. {
  2897. // Get the number of parameters.
  2898. int paramCount = lua_gettop(state);
  2899. // Attempt to match the parameters to a valid binding.
  2900. switch (paramCount)
  2901. {
  2902. case 2:
  2903. {
  2904. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2905. lua_type(state, 2) == LUA_TBOOLEAN)
  2906. {
  2907. // Get parameter 1 off the stack.
  2908. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  2909. Joystick* instance = getInstance(state);
  2910. instance->setConsumeInputEvents(param1);
  2911. return 0;
  2912. }
  2913. else
  2914. {
  2915. lua_pushstring(state, "lua_Joystick_setConsumeInputEvents - Failed to match the given parameters to a valid function signature.");
  2916. lua_error(state);
  2917. }
  2918. break;
  2919. }
  2920. default:
  2921. {
  2922. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2923. lua_error(state);
  2924. break;
  2925. }
  2926. }
  2927. return 0;
  2928. }
  2929. int lua_Joystick_setCursorColor(lua_State* state)
  2930. {
  2931. // Get the number of parameters.
  2932. int paramCount = lua_gettop(state);
  2933. // Attempt to match the parameters to a valid binding.
  2934. switch (paramCount)
  2935. {
  2936. case 3:
  2937. {
  2938. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2939. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2940. lua_type(state, 3) == LUA_TNUMBER)
  2941. {
  2942. // Get parameter 1 off the stack.
  2943. Vector4* param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  2944. // Get parameter 2 off the stack.
  2945. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  2946. Joystick* instance = getInstance(state);
  2947. instance->setCursorColor(*param1, param2);
  2948. return 0;
  2949. }
  2950. else
  2951. {
  2952. lua_pushstring(state, "lua_Joystick_setCursorColor - Failed to match the given parameters to a valid function signature.");
  2953. lua_error(state);
  2954. }
  2955. break;
  2956. }
  2957. default:
  2958. {
  2959. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2960. lua_error(state);
  2961. break;
  2962. }
  2963. }
  2964. return 0;
  2965. }
  2966. int lua_Joystick_setCursorRegion(lua_State* state)
  2967. {
  2968. // Get the number of parameters.
  2969. int paramCount = lua_gettop(state);
  2970. // Attempt to match the parameters to a valid binding.
  2971. switch (paramCount)
  2972. {
  2973. case 3:
  2974. {
  2975. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2976. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2977. lua_type(state, 3) == LUA_TNUMBER)
  2978. {
  2979. // Get parameter 1 off the stack.
  2980. Rectangle* param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  2981. // Get parameter 2 off the stack.
  2982. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  2983. Joystick* instance = getInstance(state);
  2984. instance->setCursorRegion(*param1, param2);
  2985. return 0;
  2986. }
  2987. else
  2988. {
  2989. lua_pushstring(state, "lua_Joystick_setCursorRegion - Failed to match the given parameters to a valid function signature.");
  2990. lua_error(state);
  2991. }
  2992. break;
  2993. }
  2994. default:
  2995. {
  2996. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  2997. lua_error(state);
  2998. break;
  2999. }
  3000. }
  3001. return 0;
  3002. }
  3003. int lua_Joystick_setFocusIndex(lua_State* state)
  3004. {
  3005. // Get the number of parameters.
  3006. int paramCount = lua_gettop(state);
  3007. // Attempt to match the parameters to a valid binding.
  3008. switch (paramCount)
  3009. {
  3010. case 2:
  3011. {
  3012. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3013. lua_type(state, 2) == LUA_TNUMBER)
  3014. {
  3015. // Get parameter 1 off the stack.
  3016. int param1 = (int)luaL_checkint(state, 2);
  3017. Joystick* instance = getInstance(state);
  3018. instance->setFocusIndex(param1);
  3019. return 0;
  3020. }
  3021. else
  3022. {
  3023. lua_pushstring(state, "lua_Joystick_setFocusIndex - Failed to match the given parameters to a valid function signature.");
  3024. lua_error(state);
  3025. }
  3026. break;
  3027. }
  3028. default:
  3029. {
  3030. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3031. lua_error(state);
  3032. break;
  3033. }
  3034. }
  3035. return 0;
  3036. }
  3037. int lua_Joystick_setFont(lua_State* state)
  3038. {
  3039. // Get the number of parameters.
  3040. int paramCount = lua_gettop(state);
  3041. // Attempt to match the parameters to a valid binding.
  3042. switch (paramCount)
  3043. {
  3044. case 2:
  3045. {
  3046. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3047. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3048. {
  3049. // Get parameter 1 off the stack.
  3050. Font* param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3051. Joystick* instance = getInstance(state);
  3052. instance->setFont(param1);
  3053. return 0;
  3054. }
  3055. else
  3056. {
  3057. lua_pushstring(state, "lua_Joystick_setFont - Failed to match the given parameters to a valid function signature.");
  3058. lua_error(state);
  3059. }
  3060. break;
  3061. }
  3062. case 3:
  3063. {
  3064. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3065. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  3066. lua_type(state, 3) == LUA_TNUMBER)
  3067. {
  3068. // Get parameter 1 off the stack.
  3069. Font* param1 = ScriptUtil::getObjectPointer<Font>(2, "Font", false);
  3070. // Get parameter 2 off the stack.
  3071. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3072. Joystick* instance = getInstance(state);
  3073. instance->setFont(param1, param2);
  3074. return 0;
  3075. }
  3076. else
  3077. {
  3078. lua_pushstring(state, "lua_Joystick_setFont - Failed to match the given parameters to a valid function signature.");
  3079. lua_error(state);
  3080. }
  3081. break;
  3082. }
  3083. default:
  3084. {
  3085. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3086. lua_error(state);
  3087. break;
  3088. }
  3089. }
  3090. return 0;
  3091. }
  3092. int lua_Joystick_setFontSize(lua_State* state)
  3093. {
  3094. // Get the number of parameters.
  3095. int paramCount = lua_gettop(state);
  3096. // Attempt to match the parameters to a valid binding.
  3097. switch (paramCount)
  3098. {
  3099. case 2:
  3100. {
  3101. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3102. lua_type(state, 2) == LUA_TNUMBER)
  3103. {
  3104. // Get parameter 1 off the stack.
  3105. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3106. Joystick* instance = getInstance(state);
  3107. instance->setFontSize(param1);
  3108. return 0;
  3109. }
  3110. else
  3111. {
  3112. lua_pushstring(state, "lua_Joystick_setFontSize - Failed to match the given parameters to a valid function signature.");
  3113. lua_error(state);
  3114. }
  3115. break;
  3116. }
  3117. case 3:
  3118. {
  3119. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3120. lua_type(state, 2) == LUA_TNUMBER &&
  3121. lua_type(state, 3) == LUA_TNUMBER)
  3122. {
  3123. // Get parameter 1 off the stack.
  3124. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  3125. // Get parameter 2 off the stack.
  3126. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3127. Joystick* instance = getInstance(state);
  3128. instance->setFontSize(param1, param2);
  3129. return 0;
  3130. }
  3131. else
  3132. {
  3133. lua_pushstring(state, "lua_Joystick_setFontSize - Failed to match the given parameters to a valid function signature.");
  3134. lua_error(state);
  3135. }
  3136. break;
  3137. }
  3138. default:
  3139. {
  3140. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3141. lua_error(state);
  3142. break;
  3143. }
  3144. }
  3145. return 0;
  3146. }
  3147. int lua_Joystick_setImageColor(lua_State* state)
  3148. {
  3149. // Get the number of parameters.
  3150. int paramCount = lua_gettop(state);
  3151. // Attempt to match the parameters to a valid binding.
  3152. switch (paramCount)
  3153. {
  3154. case 3:
  3155. {
  3156. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3157. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3158. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3159. {
  3160. // Get parameter 1 off the stack.
  3161. const char* param1 = ScriptUtil::getString(2, false);
  3162. // Get parameter 2 off the stack.
  3163. Vector4* param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3164. Joystick* instance = getInstance(state);
  3165. instance->setImageColor(param1, *param2);
  3166. return 0;
  3167. }
  3168. else
  3169. {
  3170. lua_pushstring(state, "lua_Joystick_setImageColor - Failed to match the given parameters to a valid function signature.");
  3171. lua_error(state);
  3172. }
  3173. break;
  3174. }
  3175. case 4:
  3176. {
  3177. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3178. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3179. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3180. lua_type(state, 4) == LUA_TNUMBER)
  3181. {
  3182. // Get parameter 1 off the stack.
  3183. const char* param1 = ScriptUtil::getString(2, false);
  3184. // Get parameter 2 off the stack.
  3185. Vector4* param2 = ScriptUtil::getObjectPointer<Vector4>(3, "Vector4", true);
  3186. // Get parameter 3 off the stack.
  3187. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3188. Joystick* instance = getInstance(state);
  3189. instance->setImageColor(param1, *param2, param3);
  3190. return 0;
  3191. }
  3192. else
  3193. {
  3194. lua_pushstring(state, "lua_Joystick_setImageColor - Failed to match the given parameters to a valid function signature.");
  3195. lua_error(state);
  3196. }
  3197. break;
  3198. }
  3199. default:
  3200. {
  3201. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3202. lua_error(state);
  3203. break;
  3204. }
  3205. }
  3206. return 0;
  3207. }
  3208. int lua_Joystick_setImageRegion(lua_State* state)
  3209. {
  3210. // Get the number of parameters.
  3211. int paramCount = lua_gettop(state);
  3212. // Attempt to match the parameters to a valid binding.
  3213. switch (paramCount)
  3214. {
  3215. case 3:
  3216. {
  3217. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3218. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3219. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  3220. {
  3221. // Get parameter 1 off the stack.
  3222. const char* param1 = ScriptUtil::getString(2, false);
  3223. // Get parameter 2 off the stack.
  3224. Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3225. Joystick* instance = getInstance(state);
  3226. instance->setImageRegion(param1, *param2);
  3227. return 0;
  3228. }
  3229. else
  3230. {
  3231. lua_pushstring(state, "lua_Joystick_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3232. lua_error(state);
  3233. }
  3234. break;
  3235. }
  3236. case 4:
  3237. {
  3238. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3239. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3240. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  3241. lua_type(state, 4) == LUA_TNUMBER)
  3242. {
  3243. // Get parameter 1 off the stack.
  3244. const char* param1 = ScriptUtil::getString(2, false);
  3245. // Get parameter 2 off the stack.
  3246. Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
  3247. // Get parameter 3 off the stack.
  3248. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4);
  3249. Joystick* instance = getInstance(state);
  3250. instance->setImageRegion(param1, *param2, param3);
  3251. return 0;
  3252. }
  3253. else
  3254. {
  3255. lua_pushstring(state, "lua_Joystick_setImageRegion - Failed to match the given parameters to a valid function signature.");
  3256. lua_error(state);
  3257. }
  3258. break;
  3259. }
  3260. default:
  3261. {
  3262. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  3263. lua_error(state);
  3264. break;
  3265. }
  3266. }
  3267. return 0;
  3268. }
  3269. int lua_Joystick_setMargin(lua_State* state)
  3270. {
  3271. // Get the number of parameters.
  3272. int paramCount = lua_gettop(state);
  3273. // Attempt to match the parameters to a valid binding.
  3274. switch (paramCount)
  3275. {
  3276. case 5:
  3277. {
  3278. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3279. lua_type(state, 2) == LUA_TNUMBER &&
  3280. lua_type(state, 3) == LUA_TNUMBER &&
  3281. lua_type(state, 4) == LUA_TNUMBER &&
  3282. lua_type(state, 5) == LUA_TNUMBER)
  3283. {
  3284. // Get parameter 1 off the stack.
  3285. float param1 = (float)luaL_checknumber(state, 2);
  3286. // Get parameter 2 off the stack.
  3287. float param2 = (float)luaL_checknumber(state, 3);
  3288. // Get parameter 3 off the stack.
  3289. float param3 = (float)luaL_checknumber(state, 4);
  3290. // Get parameter 4 off the stack.
  3291. float param4 = (float)luaL_checknumber(state, 5);
  3292. Joystick* instance = getInstance(state);
  3293. instance->setMargin(param1, param2, param3, param4);
  3294. return 0;
  3295. }
  3296. else
  3297. {
  3298. lua_pushstring(state, "lua_Joystick_setMargin - Failed to match the given parameters to a valid function signature.");
  3299. lua_error(state);
  3300. }
  3301. break;
  3302. }
  3303. default:
  3304. {
  3305. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3306. lua_error(state);
  3307. break;
  3308. }
  3309. }
  3310. return 0;
  3311. }
  3312. int lua_Joystick_setOpacity(lua_State* state)
  3313. {
  3314. // Get the number of parameters.
  3315. int paramCount = lua_gettop(state);
  3316. // Attempt to match the parameters to a valid binding.
  3317. switch (paramCount)
  3318. {
  3319. case 2:
  3320. {
  3321. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3322. lua_type(state, 2) == LUA_TNUMBER)
  3323. {
  3324. // Get parameter 1 off the stack.
  3325. float param1 = (float)luaL_checknumber(state, 2);
  3326. Joystick* instance = getInstance(state);
  3327. instance->setOpacity(param1);
  3328. return 0;
  3329. }
  3330. else
  3331. {
  3332. lua_pushstring(state, "lua_Joystick_setOpacity - Failed to match the given parameters to a valid function signature.");
  3333. lua_error(state);
  3334. }
  3335. break;
  3336. }
  3337. case 3:
  3338. {
  3339. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3340. lua_type(state, 2) == LUA_TNUMBER &&
  3341. lua_type(state, 3) == LUA_TNUMBER)
  3342. {
  3343. // Get parameter 1 off the stack.
  3344. float param1 = (float)luaL_checknumber(state, 2);
  3345. // Get parameter 2 off the stack.
  3346. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3347. Joystick* instance = getInstance(state);
  3348. instance->setOpacity(param1, param2);
  3349. return 0;
  3350. }
  3351. else
  3352. {
  3353. lua_pushstring(state, "lua_Joystick_setOpacity - Failed to match the given parameters to a valid function signature.");
  3354. lua_error(state);
  3355. }
  3356. break;
  3357. }
  3358. default:
  3359. {
  3360. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3361. lua_error(state);
  3362. break;
  3363. }
  3364. }
  3365. return 0;
  3366. }
  3367. int lua_Joystick_setPadding(lua_State* state)
  3368. {
  3369. // Get the number of parameters.
  3370. int paramCount = lua_gettop(state);
  3371. // Attempt to match the parameters to a valid binding.
  3372. switch (paramCount)
  3373. {
  3374. case 5:
  3375. {
  3376. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3377. lua_type(state, 2) == LUA_TNUMBER &&
  3378. lua_type(state, 3) == LUA_TNUMBER &&
  3379. lua_type(state, 4) == LUA_TNUMBER &&
  3380. lua_type(state, 5) == LUA_TNUMBER)
  3381. {
  3382. // Get parameter 1 off the stack.
  3383. float param1 = (float)luaL_checknumber(state, 2);
  3384. // Get parameter 2 off the stack.
  3385. float param2 = (float)luaL_checknumber(state, 3);
  3386. // Get parameter 3 off the stack.
  3387. float param3 = (float)luaL_checknumber(state, 4);
  3388. // Get parameter 4 off the stack.
  3389. float param4 = (float)luaL_checknumber(state, 5);
  3390. Joystick* instance = getInstance(state);
  3391. instance->setPadding(param1, param2, param3, param4);
  3392. return 0;
  3393. }
  3394. else
  3395. {
  3396. lua_pushstring(state, "lua_Joystick_setPadding - Failed to match the given parameters to a valid function signature.");
  3397. lua_error(state);
  3398. }
  3399. break;
  3400. }
  3401. default:
  3402. {
  3403. lua_pushstring(state, "Invalid number of parameters (expected 5).");
  3404. lua_error(state);
  3405. break;
  3406. }
  3407. }
  3408. return 0;
  3409. }
  3410. int lua_Joystick_setPosition(lua_State* state)
  3411. {
  3412. // Get the number of parameters.
  3413. int paramCount = lua_gettop(state);
  3414. // Attempt to match the parameters to a valid binding.
  3415. switch (paramCount)
  3416. {
  3417. case 3:
  3418. {
  3419. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3420. lua_type(state, 2) == LUA_TNUMBER &&
  3421. lua_type(state, 3) == LUA_TNUMBER)
  3422. {
  3423. // Get parameter 1 off the stack.
  3424. float param1 = (float)luaL_checknumber(state, 2);
  3425. // Get parameter 2 off the stack.
  3426. float param2 = (float)luaL_checknumber(state, 3);
  3427. Joystick* instance = getInstance(state);
  3428. instance->setPosition(param1, param2);
  3429. return 0;
  3430. }
  3431. else
  3432. {
  3433. lua_pushstring(state, "lua_Joystick_setPosition - Failed to match the given parameters to a valid function signature.");
  3434. lua_error(state);
  3435. }
  3436. break;
  3437. }
  3438. default:
  3439. {
  3440. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3441. lua_error(state);
  3442. break;
  3443. }
  3444. }
  3445. return 0;
  3446. }
  3447. int lua_Joystick_setRegion(lua_State* state)
  3448. {
  3449. // Get the number of parameters.
  3450. int paramCount = lua_gettop(state);
  3451. // Attempt to match the parameters to a valid binding.
  3452. switch (paramCount)
  3453. {
  3454. case 2:
  3455. {
  3456. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3457. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3458. {
  3459. // Get parameter 1 off the stack.
  3460. Rectangle* param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3461. Joystick* instance = getInstance(state);
  3462. instance->setRegion(*param1);
  3463. return 0;
  3464. }
  3465. else
  3466. {
  3467. lua_pushstring(state, "lua_Joystick_setRegion - Failed to match the given parameters to a valid function signature.");
  3468. lua_error(state);
  3469. }
  3470. break;
  3471. }
  3472. default:
  3473. {
  3474. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3475. lua_error(state);
  3476. break;
  3477. }
  3478. }
  3479. return 0;
  3480. }
  3481. int lua_Joystick_setSize(lua_State* state)
  3482. {
  3483. // Get the number of parameters.
  3484. int paramCount = lua_gettop(state);
  3485. // Attempt to match the parameters to a valid binding.
  3486. switch (paramCount)
  3487. {
  3488. case 3:
  3489. {
  3490. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3491. lua_type(state, 2) == LUA_TNUMBER &&
  3492. lua_type(state, 3) == LUA_TNUMBER)
  3493. {
  3494. // Get parameter 1 off the stack.
  3495. float param1 = (float)luaL_checknumber(state, 2);
  3496. // Get parameter 2 off the stack.
  3497. float param2 = (float)luaL_checknumber(state, 3);
  3498. Joystick* instance = getInstance(state);
  3499. instance->setSize(param1, param2);
  3500. return 0;
  3501. }
  3502. else
  3503. {
  3504. lua_pushstring(state, "lua_Joystick_setSize - Failed to match the given parameters to a valid function signature.");
  3505. lua_error(state);
  3506. }
  3507. break;
  3508. }
  3509. default:
  3510. {
  3511. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3512. lua_error(state);
  3513. break;
  3514. }
  3515. }
  3516. return 0;
  3517. }
  3518. int lua_Joystick_setSkinColor(lua_State* state)
  3519. {
  3520. // Get the number of parameters.
  3521. int paramCount = lua_gettop(state);
  3522. // Attempt to match the parameters to a valid binding.
  3523. switch (paramCount)
  3524. {
  3525. case 2:
  3526. {
  3527. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3528. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3529. {
  3530. // Get parameter 1 off the stack.
  3531. Vector4* param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3532. Joystick* instance = getInstance(state);
  3533. instance->setSkinColor(*param1);
  3534. return 0;
  3535. }
  3536. else
  3537. {
  3538. lua_pushstring(state, "lua_Joystick_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3539. lua_error(state);
  3540. }
  3541. break;
  3542. }
  3543. case 3:
  3544. {
  3545. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3546. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3547. lua_type(state, 3) == LUA_TNUMBER)
  3548. {
  3549. // Get parameter 1 off the stack.
  3550. Vector4* param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3551. // Get parameter 2 off the stack.
  3552. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3553. Joystick* instance = getInstance(state);
  3554. instance->setSkinColor(*param1, param2);
  3555. return 0;
  3556. }
  3557. else
  3558. {
  3559. lua_pushstring(state, "lua_Joystick_setSkinColor - Failed to match the given parameters to a valid function signature.");
  3560. lua_error(state);
  3561. }
  3562. break;
  3563. }
  3564. default:
  3565. {
  3566. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3567. lua_error(state);
  3568. break;
  3569. }
  3570. }
  3571. return 0;
  3572. }
  3573. int lua_Joystick_setSkinRegion(lua_State* state)
  3574. {
  3575. // Get the number of parameters.
  3576. int paramCount = lua_gettop(state);
  3577. // Attempt to match the parameters to a valid binding.
  3578. switch (paramCount)
  3579. {
  3580. case 2:
  3581. {
  3582. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3583. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3584. {
  3585. // Get parameter 1 off the stack.
  3586. Rectangle* param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3587. Joystick* instance = getInstance(state);
  3588. instance->setSkinRegion(*param1);
  3589. return 0;
  3590. }
  3591. else
  3592. {
  3593. lua_pushstring(state, "lua_Joystick_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3594. lua_error(state);
  3595. }
  3596. break;
  3597. }
  3598. case 3:
  3599. {
  3600. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3601. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3602. lua_type(state, 3) == LUA_TNUMBER)
  3603. {
  3604. // Get parameter 1 off the stack.
  3605. Rectangle* param1 = ScriptUtil::getObjectPointer<Rectangle>(2, "Rectangle", true);
  3606. // Get parameter 2 off the stack.
  3607. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3608. Joystick* instance = getInstance(state);
  3609. instance->setSkinRegion(*param1, param2);
  3610. return 0;
  3611. }
  3612. else
  3613. {
  3614. lua_pushstring(state, "lua_Joystick_setSkinRegion - Failed to match the given parameters to a valid function signature.");
  3615. lua_error(state);
  3616. }
  3617. break;
  3618. }
  3619. default:
  3620. {
  3621. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3622. lua_error(state);
  3623. break;
  3624. }
  3625. }
  3626. return 0;
  3627. }
  3628. int lua_Joystick_setState(lua_State* state)
  3629. {
  3630. // Get the number of parameters.
  3631. int paramCount = lua_gettop(state);
  3632. // Attempt to match the parameters to a valid binding.
  3633. switch (paramCount)
  3634. {
  3635. case 2:
  3636. {
  3637. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3638. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3639. {
  3640. // Get parameter 1 off the stack.
  3641. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2));
  3642. Joystick* instance = getInstance(state);
  3643. instance->setState(param1);
  3644. return 0;
  3645. }
  3646. else
  3647. {
  3648. lua_pushstring(state, "lua_Joystick_setState - Failed to match the given parameters to a valid function signature.");
  3649. lua_error(state);
  3650. }
  3651. break;
  3652. }
  3653. default:
  3654. {
  3655. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3656. lua_error(state);
  3657. break;
  3658. }
  3659. }
  3660. return 0;
  3661. }
  3662. int lua_Joystick_setStyle(lua_State* state)
  3663. {
  3664. // Get the number of parameters.
  3665. int paramCount = lua_gettop(state);
  3666. // Attempt to match the parameters to a valid binding.
  3667. switch (paramCount)
  3668. {
  3669. case 2:
  3670. {
  3671. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3672. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3673. {
  3674. // Get parameter 1 off the stack.
  3675. Theme::Style* param1 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  3676. Joystick* instance = getInstance(state);
  3677. instance->setStyle(param1);
  3678. return 0;
  3679. }
  3680. else
  3681. {
  3682. lua_pushstring(state, "lua_Joystick_setStyle - Failed to match the given parameters to a valid function signature.");
  3683. lua_error(state);
  3684. }
  3685. break;
  3686. }
  3687. default:
  3688. {
  3689. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3690. lua_error(state);
  3691. break;
  3692. }
  3693. }
  3694. return 0;
  3695. }
  3696. int lua_Joystick_setTextAlignment(lua_State* state)
  3697. {
  3698. // Get the number of parameters.
  3699. int paramCount = lua_gettop(state);
  3700. // Attempt to match the parameters to a valid binding.
  3701. switch (paramCount)
  3702. {
  3703. case 2:
  3704. {
  3705. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3706. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3707. {
  3708. // Get parameter 1 off the stack.
  3709. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3710. Joystick* instance = getInstance(state);
  3711. instance->setTextAlignment(param1);
  3712. return 0;
  3713. }
  3714. else
  3715. {
  3716. lua_pushstring(state, "lua_Joystick_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3717. lua_error(state);
  3718. }
  3719. break;
  3720. }
  3721. case 3:
  3722. {
  3723. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3724. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3725. lua_type(state, 3) == LUA_TNUMBER)
  3726. {
  3727. // Get parameter 1 off the stack.
  3728. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2));
  3729. // Get parameter 2 off the stack.
  3730. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3731. Joystick* instance = getInstance(state);
  3732. instance->setTextAlignment(param1, param2);
  3733. return 0;
  3734. }
  3735. else
  3736. {
  3737. lua_pushstring(state, "lua_Joystick_setTextAlignment - Failed to match the given parameters to a valid function signature.");
  3738. lua_error(state);
  3739. }
  3740. break;
  3741. }
  3742. default:
  3743. {
  3744. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3745. lua_error(state);
  3746. break;
  3747. }
  3748. }
  3749. return 0;
  3750. }
  3751. int lua_Joystick_setTextColor(lua_State* state)
  3752. {
  3753. // Get the number of parameters.
  3754. int paramCount = lua_gettop(state);
  3755. // Attempt to match the parameters to a valid binding.
  3756. switch (paramCount)
  3757. {
  3758. case 2:
  3759. {
  3760. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3761. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3762. {
  3763. // Get parameter 1 off the stack.
  3764. Vector4* param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3765. Joystick* instance = getInstance(state);
  3766. instance->setTextColor(*param1);
  3767. return 0;
  3768. }
  3769. else
  3770. {
  3771. lua_pushstring(state, "lua_Joystick_setTextColor - Failed to match the given parameters to a valid function signature.");
  3772. lua_error(state);
  3773. }
  3774. break;
  3775. }
  3776. case 3:
  3777. {
  3778. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3779. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3780. lua_type(state, 3) == LUA_TNUMBER)
  3781. {
  3782. // Get parameter 1 off the stack.
  3783. Vector4* param1 = ScriptUtil::getObjectPointer<Vector4>(2, "Vector4", true);
  3784. // Get parameter 2 off the stack.
  3785. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3786. Joystick* instance = getInstance(state);
  3787. instance->setTextColor(*param1, param2);
  3788. return 0;
  3789. }
  3790. else
  3791. {
  3792. lua_pushstring(state, "lua_Joystick_setTextColor - Failed to match the given parameters to a valid function signature.");
  3793. lua_error(state);
  3794. }
  3795. break;
  3796. }
  3797. default:
  3798. {
  3799. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3800. lua_error(state);
  3801. break;
  3802. }
  3803. }
  3804. return 0;
  3805. }
  3806. int lua_Joystick_setTextRightToLeft(lua_State* state)
  3807. {
  3808. // Get the number of parameters.
  3809. int paramCount = lua_gettop(state);
  3810. // Attempt to match the parameters to a valid binding.
  3811. switch (paramCount)
  3812. {
  3813. case 2:
  3814. {
  3815. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3816. lua_type(state, 2) == LUA_TBOOLEAN)
  3817. {
  3818. // Get parameter 1 off the stack.
  3819. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3820. Joystick* instance = getInstance(state);
  3821. instance->setTextRightToLeft(param1);
  3822. return 0;
  3823. }
  3824. else
  3825. {
  3826. lua_pushstring(state, "lua_Joystick_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3827. lua_error(state);
  3828. }
  3829. break;
  3830. }
  3831. case 3:
  3832. {
  3833. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3834. lua_type(state, 2) == LUA_TBOOLEAN &&
  3835. lua_type(state, 3) == LUA_TNUMBER)
  3836. {
  3837. // Get parameter 1 off the stack.
  3838. bool param1 = ScriptUtil::luaCheckBool(state, 2);
  3839. // Get parameter 2 off the stack.
  3840. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3);
  3841. Joystick* instance = getInstance(state);
  3842. instance->setTextRightToLeft(param1, param2);
  3843. return 0;
  3844. }
  3845. else
  3846. {
  3847. lua_pushstring(state, "lua_Joystick_setTextRightToLeft - Failed to match the given parameters to a valid function signature.");
  3848. lua_error(state);
  3849. }
  3850. break;
  3851. }
  3852. default:
  3853. {
  3854. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  3855. lua_error(state);
  3856. break;
  3857. }
  3858. }
  3859. return 0;
  3860. }
  3861. int lua_Joystick_setZIndex(lua_State* state)
  3862. {
  3863. // Get the number of parameters.
  3864. int paramCount = lua_gettop(state);
  3865. // Attempt to match the parameters to a valid binding.
  3866. switch (paramCount)
  3867. {
  3868. case 2:
  3869. {
  3870. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3871. lua_type(state, 2) == LUA_TNUMBER)
  3872. {
  3873. // Get parameter 1 off the stack.
  3874. int param1 = (int)luaL_checkint(state, 2);
  3875. Joystick* instance = getInstance(state);
  3876. instance->setZIndex(param1);
  3877. return 0;
  3878. }
  3879. else
  3880. {
  3881. lua_pushstring(state, "lua_Joystick_setZIndex - Failed to match the given parameters to a valid function signature.");
  3882. lua_error(state);
  3883. }
  3884. break;
  3885. }
  3886. default:
  3887. {
  3888. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3889. lua_error(state);
  3890. break;
  3891. }
  3892. }
  3893. return 0;
  3894. }
  3895. int lua_Joystick_static_ANIMATE_OPACITY(lua_State* state)
  3896. {
  3897. // Validate the number of parameters.
  3898. if (lua_gettop(state) > 0)
  3899. {
  3900. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3901. lua_error(state);
  3902. }
  3903. int result = Joystick::ANIMATE_OPACITY;
  3904. // Push the return value onto the stack.
  3905. lua_pushinteger(state, result);
  3906. return 1;
  3907. }
  3908. int lua_Joystick_static_ANIMATE_POSITION(lua_State* state)
  3909. {
  3910. // Validate the number of parameters.
  3911. if (lua_gettop(state) > 0)
  3912. {
  3913. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3914. lua_error(state);
  3915. }
  3916. int result = Joystick::ANIMATE_POSITION;
  3917. // Push the return value onto the stack.
  3918. lua_pushinteger(state, result);
  3919. return 1;
  3920. }
  3921. int lua_Joystick_static_ANIMATE_POSITION_X(lua_State* state)
  3922. {
  3923. // Validate the number of parameters.
  3924. if (lua_gettop(state) > 0)
  3925. {
  3926. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3927. lua_error(state);
  3928. }
  3929. int result = Joystick::ANIMATE_POSITION_X;
  3930. // Push the return value onto the stack.
  3931. lua_pushinteger(state, result);
  3932. return 1;
  3933. }
  3934. int lua_Joystick_static_ANIMATE_POSITION_Y(lua_State* state)
  3935. {
  3936. // Validate the number of parameters.
  3937. if (lua_gettop(state) > 0)
  3938. {
  3939. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3940. lua_error(state);
  3941. }
  3942. int result = Joystick::ANIMATE_POSITION_Y;
  3943. // Push the return value onto the stack.
  3944. lua_pushinteger(state, result);
  3945. return 1;
  3946. }
  3947. int lua_Joystick_static_ANIMATE_SIZE(lua_State* state)
  3948. {
  3949. // Validate the number of parameters.
  3950. if (lua_gettop(state) > 0)
  3951. {
  3952. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3953. lua_error(state);
  3954. }
  3955. int result = Joystick::ANIMATE_SIZE;
  3956. // Push the return value onto the stack.
  3957. lua_pushinteger(state, result);
  3958. return 1;
  3959. }
  3960. int lua_Joystick_static_ANIMATE_SIZE_HEIGHT(lua_State* state)
  3961. {
  3962. // Validate the number of parameters.
  3963. if (lua_gettop(state) > 0)
  3964. {
  3965. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3966. lua_error(state);
  3967. }
  3968. int result = Joystick::ANIMATE_SIZE_HEIGHT;
  3969. // Push the return value onto the stack.
  3970. lua_pushinteger(state, result);
  3971. return 1;
  3972. }
  3973. int lua_Joystick_static_ANIMATE_SIZE_WIDTH(lua_State* state)
  3974. {
  3975. // Validate the number of parameters.
  3976. if (lua_gettop(state) > 0)
  3977. {
  3978. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  3979. lua_error(state);
  3980. }
  3981. int result = Joystick::ANIMATE_SIZE_WIDTH;
  3982. // Push the return value onto the stack.
  3983. lua_pushinteger(state, result);
  3984. return 1;
  3985. }
  3986. int lua_Joystick_static_create(lua_State* state)
  3987. {
  3988. // Get the number of parameters.
  3989. int paramCount = lua_gettop(state);
  3990. // Attempt to match the parameters to a valid binding.
  3991. switch (paramCount)
  3992. {
  3993. case 2:
  3994. {
  3995. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL) &&
  3996. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3997. {
  3998. // Get parameter 1 off the stack.
  3999. const char* param1 = ScriptUtil::getString(1, false);
  4000. // Get parameter 2 off the stack.
  4001. Theme::Style* param2 = ScriptUtil::getObjectPointer<Theme::Style>(2, "ThemeStyle", false);
  4002. void* returnPtr = (void*)Joystick::create(param1, param2);
  4003. if (returnPtr)
  4004. {
  4005. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4006. object->instance = returnPtr;
  4007. object->owns = false;
  4008. luaL_getmetatable(state, "Joystick");
  4009. lua_setmetatable(state, -2);
  4010. }
  4011. else
  4012. {
  4013. lua_pushnil(state);
  4014. }
  4015. return 1;
  4016. }
  4017. else
  4018. {
  4019. lua_pushstring(state, "lua_Joystick_static_create - Failed to match the given parameters to a valid function signature.");
  4020. lua_error(state);
  4021. }
  4022. break;
  4023. }
  4024. default:
  4025. {
  4026. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4027. lua_error(state);
  4028. break;
  4029. }
  4030. }
  4031. return 0;
  4032. }
  4033. }