std.mi 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778
  1. //----------------------------------------------------------------------------------------------------------------
  2. // std.mi
  3. //
  4. // standard definitions for internal objects
  5. //----------------------------------------------------------------------------------------------------------------
  6. #ifndef __STD_MI
  7. #define __STD_MI
  8. #define MC_TARGET "Winamp 5.66 (skin version 1.36)"
  9. #define VCPU_VERSION 2
  10. #define deprecated //
  11. // GUIDS
  12. extern class @{51654971-0D87-4a51-91E3-A6B53235F3E7}@ @{00000000-0000-0000-0000-000000000000}@ Object;
  13. extern class @{D6F50F64-93FA-49b7-93F1-BA66EFAE3E98}@ Object _predecl System;
  14. extern class @{E90DC47B-840D-4ae7-B02C-040BD275F7FC}@ Object Container;
  15. deprecated extern class @{00C074A0-FEA2-49a0-BE8D-FABBDB161640}@ Object Wac;
  16. extern class @{B2023AB5-434D-4ba1-BEAE-59637503F3C6}@ Object &List;
  17. extern class @{87C65778-E743-49fe-85F9-09CC532AFD56}@ Object &BitList;
  18. extern class @{38603665-461B-42a7-AA75-D83F6667BF73}@ Object ⤅
  19. extern class @{F4787AF4-B2BB-4ef7-9CFB-E74BA9BEA88D}@ Object &PopupMenu;
  20. extern class @{3A370C02-3CBF-439f-84F1-86885BCF1E36}@ Object &Region;
  21. extern class @{5D0C5BB6-7DE1-4b1f-A70F-8D1659941941}@ Object &Timer;
  22. deprecated extern class @{A5376FA1-4E94-411a-83F6-05EC5EEA5F0A}@ Object &FeedWatcher;
  23. extern class @{4EE3E199-C636-4bec-97CD-78BC9C8628B0}@ Object &GuiObject;
  24. extern class @{45BE95E5-2072-4191-935C-BB5FF9F117FD}@ GuiObject &Group;
  25. extern class @{60906D4E-537E-482e-B004-CC9461885672}@ Group &Layout;
  26. extern class @{403ABCC0-6F22-4bd6-8BA4-10C829932547}@ GuiObject &WindowHolder;
  27. extern class @{97AA3E4D-F4D0-4fa8-817B-0AF22A454983}@ GuiObject &ComponentBucket;
  28. extern class @{64E4BBFA-81F4-49d9-B0C0-A85B2EC3BCFD}@ GuiObject &Edit;
  29. extern class @{62B65E3F-375E-408d-8DEA-76814AB91B77}@ GuiObject &Slider;
  30. extern class @{CE4F97BE-77B0-4e19-9956-D49833C96C27}@ GuiObject &Vis;
  31. extern class @{A8C2200D-51EB-4b2a-BA7F-5D4BC65D4C71}@ GuiObject &Browser;
  32. extern class @{8D1EBA38-489E-483e-B960-8D1F43C5C405}@ GuiObject &EqVis;
  33. extern class @{0F08C940-AF39-4b23-80F3-B8C48F7EBB59}@ GuiObject &Status;
  34. extern class @{EFAA8672-310E-41fa-B7DC-85A9525BCB4B}@ GuiObject &Text;
  35. extern class @{7DFD3244-3751-4e7c-BF40-82AE5F3ADC33}@ GuiObject &Title;
  36. extern class @{5AB9FA15-9A7D-4557-ABC8-6557A6C67CA9}@ GuiObject &Layer;
  37. extern class @{698EDDCD-8F1E-4fec-9B12-F944F909FF45}@ GuiObject &Button;
  38. extern class @{6B64CD27-5A26-4c4b-8C59-E6A70CF6493A}@ Layer &AnimatedLayer;
  39. extern class @{6DCB05E4-8AC4-48c2-B193-49F0910EF54A}@ Layer &AlbumArtLayer;
  40. extern class @{B4DCCFFF-81FE-4bcc-961B-720FD5BE0FFF}@ Button &ToggleButton;
  41. extern class @{01E28CE1-B059-11d5-979F-E4DE6F51760A}@ GuiObject &GroupList;
  42. extern class @{80F0F8BD-1BA5-42a6-A093-3236A00C8D4A}@ Group &CfgGroup;
  43. deprecated extern class @{CDCB785D-81F2-4253-8F05-61B872283CFA}@ GuiObject &QueryList;
  44. extern class @{9B2E341B-6C98-40fa-8B85-0C1B6EE89405}@ GuiObject &MouseRedir;
  45. extern class @{36D59B71-03FD-4af8-9795-0502B7DB267A}@ GuiObject &DropDownList;
  46. extern class @{7FD5F210-ACC4-48df-A6A0-5451576CDC76}@ GuiObject &LayoutStatus;
  47. extern class @{B5BAA535-05B3-4dcb-ADC1-E618D28F6896}@ GuiObject &TabSheet;
  48. extern class @{6129FEC1-DAB7-4d51-9165-01CA0C1B70DB}@ GuiObject &GuiList;
  49. extern class @{D59514F7-ED36-45e8-980F-3F4EA0522CD9}@ GuiObject &GuiTree;
  50. extern class @{9B3B4B82-667A-420e-8FFC-794115809C02}@ Object &TreeItem;
  51. deprecated extern class @{1D8631C8-80D0-4792-9F98-BD5D36B49136}@ GuiObject &MenuButton;
  52. extern class @{C7ED3199-5319-4798-9863-60B15A298CAA}@ GuiObject &CheckBox;
  53. deprecated extern class @{2D2D1376-BE0A-4CB9-BC0C-57E6E4C999F5}@ GuiObject &Form;
  54. extern class @{E2BBC14D-84F6-4173-BDB3-B2EB2F665550}@ GuiObject &Frame; // Winamp 5.5
  55. extern class @{73C00594-961F-401B-9B1B-672427AC4165}@ GuiObject &Menu; // Winamp 5.52
  56. deprecated define Component WindowHolder
  57. #ifndef true
  58. #define true 1
  59. #endif
  60. #ifndef TRUE
  61. #define TRUE 1
  62. #endif
  63. #ifndef false
  64. #define false 0
  65. #endif
  66. #ifndef FALSE
  67. #define FALSE 0
  68. #endif
  69. // class tree member functions & events
  70. //*****************************************************************************
  71. // Object CLASS
  72. //*****************************************************************************
  73. /**
  74. Object Class.
  75. @short This is the base class from which all other classes inherit.
  76. @author Nullsoft Inc.
  77. @ver 1.0
  78. */
  79. /**
  80. getClassName()
  81. Returns the class name for the object.
  82. @ret The class name.
  83. */
  84. extern String Object.getClassName();
  85. /**
  86. getId()
  87. */
  88. extern String Object.getId();
  89. /**
  90. onNotify()
  91. @ret
  92. @param command
  93. @param param
  94. @param a
  95. @param b
  96. */
  97. extern Int Object.onNotify(String command, String param, int a, int b);
  98. //*****************************************************************************
  99. // System CLASS
  100. //*****************************************************************************
  101. /**
  102. System Class.
  103. @short The system class are basic system functions accessible to all.
  104. @author Nullsoft Inc.
  105. @ver 1.0
  106. */
  107. /**
  108. onScriptLoaded()
  109. Hookable. Event happens when script has just finished being loaded.
  110. No params.
  111. */
  112. extern System.onScriptLoaded();
  113. /**
  114. onScriptUnloading()
  115. Hookable. Event happens when script is going to be unloaded.
  116. No params.
  117. */
  118. extern System.onScriptUnloading();
  119. /**
  120. onQuit()
  121. Hookable. Event happens when the user quits the application.
  122. No params.
  123. */
  124. extern System.onQuit();
  125. /**
  126. onSetXuiParam(String param, String value)
  127. Hookable. Event happens when the script is in a group implementing
  128. an xuiobject and a parameter has not been recognized by the group or
  129. the embedded object.
  130. No params.
  131. */
  132. extern System.onSetXuiParam(String param, String value);
  133. /**
  134. onKeyDown()
  135. Hookable. Event happens when the user presses a key on the keyboard.
  136. @param key The key that was pressed.
  137. */
  138. extern System.onKeyDown(String key);
  139. /**
  140. onAccelerator()
  141. Hookable. Event happens when the user presses an accelerator key.
  142. @param action The action to perform (from locales)
  143. @param section The locales section for the accelerator.
  144. @param key The key, ie: "tab", "ctrl+a".
  145. */
  146. extern System.onAccelerator(String action, String section, String key);
  147. /**
  148. onCreateLayout()
  149. Hookable. Event happens when a layout is created.
  150. @param _layout The layout that was just created.
  151. */
  152. extern System.onCreateLayout(Layout _layout);
  153. /**
  154. onShowLayout()
  155. Hookable. Event happens when a layout is about to be shown.
  156. This even only happens if the layout was previously hidden.
  157. @param _layout The layout that's about to be shown.
  158. */
  159. extern System.onShowLayout(Layout _layout);
  160. /**
  161. onHideLayout()
  162. Hookable.
  163. @param _layout The layout that's about to be hidden.
  164. */
  165. extern System.onHideLayout(Layout _layout);
  166. /**
  167. onViewPortChanged()
  168. Hookable. Event happens when the Windows viewport has changed.
  169. Note: The monitor Winamp is currently on may not be related to
  170. the Windows message which led to generating this event.
  171. @param width The new viewport width or -1 if not given by the OS.
  172. @param height The new viewport height or -1 if not given by the OS.
  173. */
  174. extern System.onViewPortChanged(int width, int height);
  175. /**
  176. onStop()
  177. Hookable. Event happens when Winamp3 stops playing a file.
  178. No params.
  179. */
  180. extern System.onStop();
  181. /**
  182. onPlay()
  183. Hookable. Event happens when Winamp3 starts playing a file.
  184. No params.
  185. */
  186. extern System.onPlay();
  187. /**
  188. onPause()
  189. Hookable. Event happens when Winamp3 pauses playback.
  190. No params.
  191. */
  192. extern System.onPause();
  193. /**
  194. onResume()
  195. Hookable. Event happens when Winamp3 resumes playback.
  196. Event only happens when the song was previously set in a paused state.
  197. No params.
  198. */
  199. extern System.onResume();
  200. /**
  201. onTitleChange()
  202. Hookable. Event happens when the song title changes.
  203. */
  204. extern System.onTitleChange(String newtitle);
  205. extern System.onTitle2Change(String newtitle2);
  206. extern System.onUrlChange(String url);
  207. extern System.onInfoChange(String info);
  208. extern System.onStatusMsg(String msg);
  209. /**
  210. onEqBandChanged()
  211. Hookable. Event happens when an equalizer band changes values.
  212. The bands are numbered from 0 to 9 (0 being 60Hz and 9 being 16kHz)
  213. and their values range from -127 to +127.
  214. @param band The frequency band that has changed.
  215. @param newvalue The new value of the frequency band.
  216. */
  217. extern System.onEqBandChanged(int band, int newvalue);
  218. /**
  219. onEqPreampChanged()
  220. Hookable. Event happens when the equalizer pre-amp has changed
  221. values. Range of the value is from -127 to +127.
  222. @param newvalue The new pre-amp value.
  223. */
  224. extern System.onEqPreampChanged(int newvalue);
  225. /**
  226. onEqChanged()
  227. Hookable. Event happens when the EQ is switched on or off.
  228. 0 means the EQ was turned off. 1 means it was turned on.
  229. You might want to use true and false to verify this, it's a bit
  230. more elegant. :)
  231. @param newstatus The new status of the EQ.
  232. */
  233. extern System.onEqChanged(int newstatus);
  234. extern System.onEqFreqChanged(int isiso); //Requires 5.51
  235. /**
  236. onVolumeChanged()
  237. Hookable. Event happens when the volume was changed.
  238. The range of the volume is from 0 to 255.
  239. @param newvol The new volume value.
  240. */
  241. extern System.onVolumeChanged(int newvol);
  242. /**
  243. onSeek()
  244. Hookable. Event happens when the user seeks
  245. to a position in the track.
  246. @param newpos The seekers new position.
  247. */
  248. extern System.onSeek(int newpos);
  249. /**
  250. getContainer()
  251. @ret The requested container.
  252. @param container_id The containers identifier string.
  253. */
  254. extern Container System.getContainer(String container_id);
  255. /**
  256. newDynamicContainer()
  257. @ret The new container.
  258. @param container_id The identifier for the container you want to create.
  259. */
  260. extern Container System.newDynamicContainer(String container_id);
  261. /**
  262. newGroup()
  263. @ret The new group.
  264. @param group_id The identifier for the group you want to create.
  265. */
  266. extern Group System.newGroup(String group_id);
  267. extern Layout System.newGroupAsLayout(String group_id);
  268. /**
  269. getNumContainers()
  270. Get the number of containers currently created.
  271. @ret The number of containers.
  272. */
  273. extern Int System.getNumContainers();
  274. /**
  275. enumContainer()
  276. Returns the name of the container associated with it's number.
  277. Use getNumContainers() to fetch the number of containers present.
  278. The containers are numbered from 0 to the value returned by getNumContainers().
  279. @ret The name of the specified container.
  280. @param num The container's number for which you want to know the name.
  281. */
  282. extern Container System.enumContainer(Int num);
  283. extern String system.enumEmbedGUID(int num); //TODO
  284. /**
  285. getWac()
  286. Gets the reference to the wac identified by the guid sent.
  287. @ret The requested WAC.
  288. @param wac_guid The WAC's GUID.
  289. */
  290. deprecated extern Wac System.getWac(String wac_guid);
  291. /**
  292. messageBox()
  293. Creates a message box.
  294. The flag paramater lets you set the style of the message box.
  295. Just use the OR bitwise operator to set the style you want.
  296. Here's a list of the flags you can use:
  297. MSGBOX_OK Adds an OK button. (1)
  298. MSGBOX_CANCEL Adds a CANCEL button. (2)
  299. MSGBOX_YES Adds a YES button. (4)
  300. MSGBOX_NO Adds a NO button. (8)
  301. MSGBOX_ALL Adds ALL buttons. (16)
  302. MSGBOX_NEXT Adds a NEXT button. (32)
  303. MSGBOX_PREVIOUS Adds a PREVIOUS button. (64)
  304. Note that the notanymore_id parameter stores the users answer in the
  305. configuration file with the entry name specified by it's value.
  306. @ret The value of the button that was pressed (example: if OK is pressed, 1 is returned).
  307. @param message The message you want to display.
  308. @param msgtitle The title of the message box.
  309. @param flag The message box style you want.
  310. @param notanymore_id Configuration item name in which to store the users answer.
  311. */
  312. extern Int System.messageBox(String message, String msgtitle, Int flag, String notanymore_id);
  313. /**
  314. getPlayItemString()
  315. @ret The name of what is playing.
  316. */
  317. extern String System.getPlayItemString();
  318. /**
  319. getPlayItemLength()
  320. Get the length of the track currently playing, in milliseconds.
  321. @ret Length of the track, in seconds.
  322. */
  323. extern Int System.getPlayItemLength();
  324. /**
  325. getPlayItemMetaDataString()
  326. Get metadata for the track currently playing. The metadata field names that
  327. are available are the following:
  328. title
  329. album
  330. artist
  331. albumartist
  332. comment
  333. year
  334. composer
  335. bitrate
  336. srate
  337. stereo
  338. vbr
  339. replaygain_track_gain
  340. replaygain_album_gain
  341. replaygain_track_peak
  342. replaygain_album_peak
  343. gain
  344. genre
  345. track
  346. length
  347. disc
  348. bpm
  349. conductor
  350. key
  351. mood
  352. subtitle
  353. lyricist
  354. ISRC
  355. media
  356. remixer
  357. encoder
  358. publisher
  359. tool
  360. pregap
  361. postgap
  362. numsamples
  363. @ret The requested metadata.
  364. @param metadataname The name of the metadata field you want to read.
  365. */
  366. extern String System.getPlayItemMetaDataString(String metadataname);
  367. extern String System.getMetaDataString(String filename, String metadataname); // Requires 5.53
  368. extern String System.getPlayItemDisplayTitle();
  369. extern Int System.getCurrentTrackRating(); //Requires 5.5
  370. extern System.onCurrentTrackRated(int rating); //Requires 5.5
  371. extern System.setCurrentTrackRating(int rating); //Requires 5.5
  372. /**
  373. getExtFamily()
  374. This one still return the same as getDecoderName()
  375. //Gets registered family for given extension (i.e. mp3 -> "Audio")
  376. @ret The registered family for given extension.
  377. @param ext The extension in question.
  378. */
  379. extern String System.getExtFamily(String ext);
  380. extern String system.getDecoderName(string playitem);
  381. /**
  382. playFile()
  383. Play the requested file. Path and filename are required
  384. with proper extension (example: playFile("c:\music\mp3\file.mp3"); ).
  385. It also works with URL's (example: playFile("http://myshoutcast.com:8000"); ).
  386. @param playitem The path and filename to play.
  387. */
  388. extern System.playFile(String playitem);
  389. extern Int System.getAlbumArt(String playitem); //Requires 5.5 // Will return 1 if an album art has been downloaded, otherwise 0
  390. /**
  391. downloadMedia()
  392. Hookable. Downloads a file from url and saves it as destination_filename.
  393. If destinationPath is "" it will be saved in CD Ripping dir (=getDownloadPath()).
  394. @param url the file to be downloaded
  395. @param destinationPath the path you want to store the file
  396. @param wantAddToML set true if you wnt to add the file to ML database
  397. @param notifyDownloadsList set true in order to list the download in <DownloadsLis/> Object
  398. */
  399. extern System.downloadMedia(String url, String destinationPath, boolean wantAddToML, boolean notifyDownloadsList); // Requires 5.54
  400. deprecated extern System.downloadURL(String url, String destination_filename, String progress_dialog_title); //Requires 5.5 // destination_filename is just a dummy parameter as well as progress_dialog_title - use download() instead
  401. extern System.onDownloadFinished(String url, boolean success, String filename); // Requires 5.53
  402. extern String System.getDownloadPath(); // Requires 5.53 // returns the CD Ripping Directory
  403. extern System.setDownloadPath(String new_path); // Requires 5.53 // Sets the CD Ripping Directory
  404. /**
  405. enqueueFile()
  406. Enqueque the requested file. Path and filename are required
  407. with proper extension (example: playFile("c:\music\mp3\file.mp3"); ).
  408. It also works with URL's (example: playFile("http://myshoutcast.com:8000"); ).
  409. @param playitem The path and filename to play.
  410. */
  411. extern System.enqueueFile(String playitem); //Requires 5.5
  412. /**
  413. getLeftVuMeter()
  414. Get the value of the left vu meter.
  415. Range is from 0 to 255. Linear.
  416. @ret The value of the left vu meter.
  417. */
  418. extern Int System.getLeftVuMeter();
  419. /**
  420. getRightVuMeter()
  421. Get the value of the right vu meter.
  422. Range is from 0 to 255. Linear.
  423. @ret The value of the left vu meter.
  424. */
  425. extern Int System.getRightVuMeter();
  426. /**
  427. getVolume()
  428. Get the current volume. Range is from 0 to 255.
  429. @ret The current volume.
  430. */
  431. extern Int System.getVolume();
  432. /**
  433. setVolume()
  434. Set the volume to the desired value.
  435. Range is from 0 to 255.
  436. @param vol The desired volume value.
  437. */
  438. extern System.setVolume(Int vol);
  439. /**
  440. play()
  441. Trigger the play event.
  442. */
  443. extern System.play();
  444. /**
  445. stop()
  446. Trigger the stop event.
  447. */
  448. extern System.stop();
  449. /**
  450. pause()
  451. Trigger the pause event.
  452. */
  453. extern System.pause();
  454. /**
  455. next()
  456. Trigger the next event.
  457. */
  458. extern System.next();
  459. /**
  460. previous()
  461. Trigger the previous event.
  462. */
  463. extern System.previous();
  464. /**
  465. eject()
  466. Trigger the eject event.
  467. */
  468. extern System.eject();
  469. /**
  470. seekTo()
  471. Seek to the desired position in the track. Range is from
  472. 0 to SONG LENGTH (in milliseconds).
  473. */
  474. extern System.seekTo(Int pos);
  475. /**
  476. getPosition()
  477. Get the current position in the track currently playing,
  478. in milliseconds.
  479. @ret The current position in the track.
  480. */
  481. extern Int System.getPosition();
  482. /**
  483. setEqBand()
  484. Sets the requested equalizer band to the specified value.
  485. The bands are numbered from 0 (60Hz) to 9 (16kHz) and
  486. each range from -127 to +127.
  487. @param band The EQ band to set.
  488. @param value The desired value for the specified band.
  489. */
  490. extern System.setEqBand(int band, Int value);
  491. /**
  492. setEqPreamp()
  493. Set the equalizer pre-amp to the desired value.
  494. Range is from -127 to +127 (0 means no preamp).
  495. @param value The desired value for the pre-amp.
  496. */
  497. extern System.setEqPreamp(Int value);
  498. /**
  499. Set the equalizer to the desired state. On or off.
  500. 0 is off, 1 is on.
  501. @param onoff The desired state for the eq.
  502. */
  503. extern System.setEq(Int onoff);
  504. /**
  505. getEqBand()
  506. Get the value of an equalizer band. The bands
  507. are numbered from 0 (60Hz) to 9 (16kHz). The return
  508. value range is from -127 to +127.
  509. @ret The value of the band.
  510. @param band The eq band number you want to get.
  511. */
  512. extern Int System.getEqBand(int band);
  513. /**
  514. getEqPreamp()
  515. Get the equalizer preamp value. The value range is
  516. from -127 to +127 (0 means no preamp).
  517. @ret The preamp's current value.
  518. */
  519. extern int System.getEqPreamp();
  520. /**
  521. getEq()
  522. Get the equalizer state. 0 for off, 1 for on.
  523. Remember to compare return value to true and false.
  524. @ret The EQ's state.
  525. */
  526. extern int System.getEq();
  527. /**
  528. getMousePosX()
  529. This returns the X position of the mouse in the screen,
  530. using the screen coordinate system.
  531. @ret The mouse's current X pos.
  532. */
  533. extern int System.getMousePosX();
  534. /**
  535. getMousePosY()
  536. This returns the Y position of the mouse in the screen,
  537. using the screen coordinate system.
  538. @ret The mouse's current Y pos.
  539. */
  540. extern int System.getMousePosY();
  541. /**
  542. integerToString()
  543. Get the string representation of an integer.
  544. @ret The string equivalent of the integer.
  545. @param value The integer to change into a string.
  546. */
  547. extern String System.integerToString(Int value);
  548. /**
  549. StringToInteger()
  550. Get the integer representation of a string.
  551. @ret The integer equivalent of the string.
  552. @param str The string to change into an integer.
  553. */
  554. extern Int System.StringToInteger(String str);
  555. /**
  556. floatToString()
  557. Get the string representation of a floating point number.
  558. @ret The string representation of the float number.
  559. @param value The float to convert.
  560. @param ndigits Number of digits after the decimal point you want.
  561. */
  562. extern String System.floatToString(float value, int ndigits);
  563. /**
  564. stringToFloat()
  565. Get the floating point representation of a string.
  566. @ret The float representation of the string.
  567. @param str The string to convert.
  568. */
  569. extern Float System.stringToFloat(String str);
  570. /**
  571. integerToLongTime()
  572. Convert a time in seconds to a HH:MM:SS value.
  573. @ret The string representation of the time (HH:MM:SS).
  574. @param value Timestamp to use.
  575. */
  576. extern String System.integerToLongTime(Int value);
  577. /**
  578. integerToTime()
  579. Convert a time in seconds to a MM:SS value.
  580. @ret The string representation of the time (MM:SS).
  581. @param value Timestamp to use.
  582. */
  583. extern String System.integerToTime(Int value);
  584. extern String System.dateToTime(Int datetime); // prints the time from a date with the same format as integerToTime
  585. extern String System.dateToLongTime(Int datetime); // prints the time from a date with the same format as integerToLongTime
  586. extern String System.formatDate(Int datetime); // formats the date according to the locales - short date format
  587. extern String System.formatLongDate(Int datetime); // formats the date according to the locales - long date format
  588. extern Int System.getDateYear(Int datetime); // returns the datetime's year since 1900
  589. extern Int System.getDateMonth(Int datetime); // returns the datetime's month (0-11)
  590. extern Int System.getDateDay(Int datetime); // returns the datetime's day of the month (1-31)
  591. extern Int System.getDateDow(Int datetime); // returns the datetime's day of the week (0-6)
  592. extern Int System.getDateDoy(Int datetime); // returns the datetime's day of the year (0-365)
  593. extern Int System.getDateHour(Int datetime); // returns the datetime's hour (0-23)
  594. extern Int System.getDateMin(Int datetime); // returns the datetime's minutes (0-59)
  595. extern Int System.getDateSec(Int datetime); // returns the datetime's seconds (0-59)
  596. extern Int System.getDateDst(Int datetime); // returns the datetime's daylight savings flag
  597. extern Int System.getDate(); // returns the datetime, use with the above functions
  598. /**
  599. strmid()
  600. Get a substring from a string.
  601. @ret The substring.
  602. @param str The string.
  603. @param start The start position.
  604. @param len The length of the string to extract, from start position.
  605. */
  606. extern String System.strmid(String str, Int start, Int len);
  607. /**
  608. strleft()
  609. Get a substring from a string, starting from the left.
  610. @ret The substring.
  611. @param str The string.
  612. @param nchars The length of the string to extract, from the left.
  613. */
  614. extern String System.strleft(string str, int nchars);
  615. /**
  616. strright()
  617. Get a substring from a string, starting from the right. Since
  618. the start point is the right of the string (or the end). It will
  619. extract the string starting from the END going towards the BEGINNING.
  620. @ret The substring.
  621. @param str The string.
  622. @param nchars The length of the string to extract, from the right.
  623. */
  624. extern string System.strright(string str, int nchars);
  625. /**
  626. strsearch()
  627. Search a string for any occurance of substring. If the substring was
  628. found in the string, it will return the position of the substring in
  629. the string searched. If the substring is not found, the return value
  630. is -1.
  631. @ret Position at which the substring was found.
  632. @param str The string to search in.
  633. @param substr The substring to find.
  634. */
  635. extern int System.strsearch(string str, string substr);
  636. /**
  637. strlen()
  638. Returns the length of the string.
  639. @ret The length of the string.
  640. @param str The string.
  641. */
  642. extern int System.strlen(string str);
  643. /**
  644. strupper()
  645. Convert a string to all uppercase.
  646. @ret The uppercase string.
  647. @param str The string to uppercase.
  648. */
  649. extern string System.strupper(string str);
  650. /**
  651. strlower()
  652. Convert a string to all lowercase.
  653. @ret The lowercase string.
  654. @param str The string to lowercase.
  655. */
  656. extern string System.strlower(string str);
  657. /**
  658. urlEncode()
  659. URL Encode a string. Characters that are NOT encoded
  660. are: All letters, All digits, underscore (_), dash (-) and
  661. period (.).
  662. @ret The URL encoded string.
  663. @param url The string to URL encode.
  664. */
  665. extern string System.urlEncode(string url);
  666. extern string System.urlDecode(string url); // Requires 5.54
  667. /**
  668. parseATF()
  669. Pass a string through the ATF parser
  670. @ret The ATF encoded string.
  671. @param topass The string to ATF encode.
  672. */
  673. //extern string System.parseATF(string topass); // To be done
  674. /**
  675. removePath()
  676. Remove the path from a full filename. (example:
  677. c:\music\mp3\test.mp3 -> test.mp3)
  678. Also works on URLs.
  679. @ret The filename with the path removed.
  680. @param str The fullpath of a file.
  681. */
  682. extern string System.removePath(string str);
  683. /**
  684. getPath()
  685. Gets the path from a full filename. (example:
  686. c:\music\mp3\test.mp3 -> c:\music\mp3)
  687. Also works on URLs.
  688. @ret The path with the filename removed.
  689. @param str The fullpath of a file.
  690. */
  691. extern string System.getPath(string str);
  692. /**
  693. getExtension()
  694. Gets the extension from a filename. (example:
  695. c:\music\mp3\test.mp3 -> mp3)
  696. Also works on URLs.
  697. @ret The extension of the filename.
  698. @param str The fullpath of a file.
  699. */
  700. extern string System.getExtension(string str);
  701. /**
  702. getToken()
  703. Retreive a token from a list of tokens seperated by separator.
  704. The index starts at 0, not 1, so be careful.
  705. Here's a short example:
  706. getToken("1,2,3,4,5", ",", 3);
  707. Would return, 3. If the token you ask for doesn't exist, an
  708. empty string is returned.
  709. @ret The token requested.
  710. @param str The tokenenized string.
  711. @param separator The separator to use.
  712. @param tokennum The token to retreive.
  713. */
  714. extern string System.getToken(string str, string separator, int tokennum);
  715. /**
  716. sin()
  717. Takes an angle in radians and returns the ratio of two sides of a right triangle.
  718. The ratio is the length of the side opposite the angle divided by the length
  719. of the hypotenuse. The result range is from -1 to 1.
  720. Converting from degrees to radians can be done by multiplying degrees by PI/180.
  721. @ret The sine value of the angle.
  722. @param value The angle for which you want to know the sine value.
  723. */
  724. extern double System.sin(double value);
  725. /**
  726. cos()
  727. Takes an angle in radians and returns the ratio of the two sides of a right triangle.
  728. The ratio is the length of the side adjacent to the angle divided by the length of the
  729. hypotenuse. The result is range is from -1 to 1.
  730. @ret The cosine value of the angle.
  731. @param value The angle for which you want to know the cosine value.
  732. */
  733. extern double System.cos(double value);
  734. /**
  735. tan()
  736. Takes an angle in radians and returns the ratio between two sides of a right triangle.
  737. The ratio is sin(x) divided by cos(x).
  738. @ret The tangent value of the angle.
  739. @param value The angle for which you want to know the tangent value.
  740. */
  741. extern double System.tan(double value);
  742. /**
  743. asin()
  744. Takes a sine value ranging from -1 to 1 and returns the angle in radians.
  745. The return value ranges from -PI/2 to +PI/2.
  746. @ret The angle in radians.
  747. @param value The sine value for which you want to know the angle.
  748. */
  749. extern double System.asin(double value);
  750. /**
  751. acos()
  752. Takes a cosine value ranging from -1 to 1 and returns the angle in radians.
  753. The return value ranges from -PI/2 to +PI/2.
  754. @ret The angle in radians.
  755. @param value The cosine value for which you want to know the angle.
  756. */
  757. extern double System.acos(double value);
  758. /**
  759. atan()
  760. Takes an angle in radians and returns the ration between two sides of a right triangle.
  761. The ratio is cos(x) divided by sin(x).
  762. @ret The arc tangent value of the angle.
  763. */
  764. extern double System.atan(double value);
  765. /**
  766. atan2()
  767. @ret The arctangent of y/x.
  768. */
  769. extern double System.atan2(double y, double x);
  770. /**
  771. pow()
  772. Elevate a number to the N'th power.
  773. @ret The number
  774. @param value The number you want to elevate to the N power.
  775. @param pvalue The power to which you want to elevate the number.
  776. */
  777. extern double System.pow(double value, double pvalue);
  778. /**
  779. sqr()
  780. Get the square of a number.
  781. @ret The number, squared.
  782. @param value The number for which you want the square value.
  783. */
  784. extern double System.sqr(double value);
  785. extern double System.log10(double value);
  786. extern double System.ln(double value);
  787. /**
  788. sqrt()
  789. Get the square root of a number.
  790. @ret The square root of the number.
  791. @param value The number for which you want the square root value.
  792. */
  793. extern double System.sqrt(double value);
  794. /**
  795. random()
  796. Get a randomely generated number. The random number will not
  797. be bigger than the max value indicated. Smallest value is 0.
  798. @ret The random number.
  799. @param max The maximum value of the random number to return.
  800. */
  801. extern int System.random(int max);
  802. /**
  803. setPrivateString()
  804. Create a private config entry for your script, of String type.
  805. @param section The section for the entry.
  806. @param item The item name for the entry.
  807. @param value The value of the entry.
  808. */
  809. extern System.setPrivateString(string section, string item, string value);
  810. /**
  811. setPrivateInt()
  812. Create a private config entry for your script, of Int type.
  813. @param section The section for the entry.
  814. @param item The item name for the entry.
  815. @param value The value of the entry.
  816. */
  817. extern System.setPrivateInt(string section, string item, int value);
  818. /**
  819. getPrivateString()
  820. Read a private config entry of String type. Returns
  821. the specified default value if the section and item isn't
  822. found.
  823. @ret The value of the config entry.
  824. @param section The section from which to read the entry.
  825. @param item The name of the item to read.
  826. @param defvalue The default value to return if no item is found.
  827. */
  828. extern String System.getPrivateString(String section, String item, String defvalue);
  829. /**
  830. getPrivateInt()
  831. Read a private config entry of Integer type. Returns
  832. the specified default value if the section and item isn't
  833. found.
  834. @ret The value of the config entry.
  835. @param section The section from which to read the entry.
  836. @param item The name of the item to read.
  837. @param defvalue The defautl value to return if no item is found.
  838. */
  839. extern Int System.getPrivateInt(String section, String item, Int defvalue);
  840. /**
  841. setPublicString()
  842. Create a public config entry for your script, of String type.
  843. @param item The item name for the entry.
  844. @param value The value of the entry.
  845. */
  846. extern System.setPublicString(String item, String value);
  847. /**
  848. setPublicInt()
  849. Create a public config entry for your script, of Int type.
  850. @param item The item name of the entry.
  851. @param value The value of the entry.
  852. */
  853. extern System.setPublicInt(String item, Int value);
  854. /**
  855. getPublicString()
  856. Read a public config entry of String type. Returns
  857. the specified default value if the item isn't found.
  858. @ret The value of the config entry.
  859. @param item The item name to read.
  860. @param defvalue The default value to return if no item is found.
  861. */
  862. extern String System.getPublicString(String item, String defvalue);
  863. /**
  864. getPublicInt()
  865. Read a public config entry of Integer type. Returns
  866. the specified default value if the item isn't found.
  867. @ret The value of the config entry.
  868. @param item The item name to read.
  869. @param defvalue The default value to return if no item is found.
  870. */
  871. extern Int System.getPublicInt(String item, Int defvalue);
  872. /**
  873. getParam()
  874. Get the parameters with which the script is called.
  875. This is the 'param="..."' attribute in the <script ...>
  876. skin XML tag.
  877. @ret The parameter for the script.
  878. */
  879. extern String System.getParam();
  880. /**
  881. getScriptGroup()
  882. Get the group in which the script is instantiated. Returns
  883. Null if it's not instantiated in a group.
  884. @ret
  885. */
  886. extern Group System.getScriptGroup();
  887. /**
  888. getViewPortWidth()
  889. Get the user's screen width in pixels.
  890. @ret The width of the user's screen.
  891. */
  892. extern Int System.getViewportWidth();
  893. extern Int System.getViewportWidthFromGuiObject(GuiObject g); //Requires 5.5
  894. extern Int System.getViewportWidthFromPoint(int x, int y);
  895. extern Int System.getMonitorWidth(); //Requires 5.5
  896. extern Int System.getMonitorWidthFromPoint(int x, int y); //Requires 5.5
  897. extern Int System.getMonitorWidthFromGuiObject(GuiObject g); //Requires 5.631
  898. //todo/ extern System.onMouseMove(int x, int y);
  899. /**
  900. getViewPortHeight()
  901. Get the user's screen height in pixels.
  902. @ret The height of the user's screen.
  903. */
  904. extern Int System.getViewportHeight();
  905. extern Int System.getViewportHeightFromGuiObject(GuiObject g); //Requires 5.5
  906. extern Int System.getViewportHeightFromPoint(int x, int y);
  907. extern Int System.getMonitorHeight(); //Requires 5.5
  908. extern Int System.getMonitorHeightFromPoint(int x, int y); //Requires 5.5
  909. extern Int System.getMonitorHeightFromGuiObject(GuiObject g); //Requires 5.631
  910. extern Int System.getMonitorLeft(); //Requires 5.631
  911. extern Int System.getMonitorLeftFromGuiObject(GuiObject g); //Requires 5.5
  912. extern Int System.getMonitorLeftFromPoint(int x, int y); //Requires 5.5
  913. extern Int System.getMonitorTop(); //Requires 5.631
  914. extern Int System.getMonitorTopFromGuiObject(GuiObject g); //Requires 5.631
  915. extern Int System.getMonitorTopFromPoint(int x, int y); //Requires 5.631
  916. extern Int System.getViewportLeft();
  917. extern Int System.getViewportLeftFromGuiObject(GuiObject g); //Requires 5.5
  918. extern Int System.getViewportLeftFromPoint(int x, int y);
  919. extern Int System.getViewportTop();
  920. extern Int System.getViewportTopFromGuiObject(GuiObject g); //Requires 5.5
  921. extern Int System.getViewportTopFromPoint(int x, int y);
  922. /**
  923. debugString()
  924. Send a debug message to the Wasabi Console.
  925. The severity ranges from 0 (not serious) to 9 (very serious).
  926. @param str The debug message.
  927. @param severity The severity of the error.
  928. */
  929. extern System.debugString(String str, Int severity);
  930. /**
  931. ddeSend()
  932. Send a DDE message to an application. The minimum
  933. interval between messages is specified in milliseconds.
  934. Here's an example:
  935. ddeSend("mIRC", "/msg #channel I'm using Winamp3", 300);
  936. @param application The DDE server name of the application.
  937. @param command The command to send.
  938. @param mininterval The minimum interval to respect between messages (in ms).
  939. */
  940. extern System.ddeSend(String application, String command, Int mininterval);
  941. /**
  942. onLookForComponent()
  943. Hookable. Event happens when the component with the
  944. specified GUID is going to be shown. Don't forget
  945. to return the component when you're done doing what
  946. you want to do (example: animate something).
  947. @ret The component requested.
  948. @param guid The requested components GUID.
  949. */
  950. extern WindowHolder System.onLookForComponent(String guid);
  951. /**
  952. getCurAppLeft()
  953. Get the applications current left coordinate in the screen,
  954. using the screen coordinate system.
  955. @ret The left coordinate of the application.
  956. */
  957. extern Int System.getCurAppLeft();
  958. /**
  959. getCurAppTop()
  960. Get the applications current top coordinate in the screen,
  961. using the screen coordinate system.
  962. @ret The top coordinate of the application.
  963. */
  964. extern Int System.getCurAppTop();
  965. /**
  966. getCurAppWidth()
  967. Get the applications current window width, in pixels.
  968. @ret The width of the application window.
  969. */
  970. extern Int System.getCurAppWidth();
  971. /**
  972. getCurAppHeight()
  973. Get the applications current window height, in pixels.
  974. @ret The height of the application window.
  975. */
  976. extern Int System.getCurAppHeight();
  977. /**
  978. isAppActive()
  979. Get the current status of the application. If it's active,
  980. it means the application has focus. True is active, false is
  981. inactive.
  982. @ret The application's status.
  983. */
  984. extern Boolean System.isAppActive();
  985. /**
  986. getSkinName()
  987. Get the skin name for the loaded skin.
  988. @ret The skin's name.
  989. */
  990. extern String System.getSkinName();
  991. extern System.switchSkin(String skinname);
  992. extern Int System.isLoadingSkin(); // 1 if loading, -1 if UNloading, 0 otherwise
  993. extern System.lockUI();
  994. extern System.unlockUI();
  995. /**
  996. getMainBrowser()
  997. Get a reference to the main browser object.
  998. This is the browser object that's defined with
  999. mainmb="1" in the skin XML.
  1000. @ret A reference to the main browser object.
  1001. */
  1002. extern Browser System.getMainBrowser();
  1003. extern System.popMainBrowser();
  1004. extern System.navigateUrl(String url);
  1005. extern System.navigateUrlBrowser(String url); //Requires 5.53 // will call an onOpenUrl requuest and then navigate to an extern browser, can also be used to open nowplaying
  1006. extern Boolean System.onOpenURL(string url); //Requires 5.5 // called everytime winamp wants to open a website in an extern browser, return 1 to cancel this opening and open in your browser
  1007. /**
  1008. isObjectValid()
  1009. Verifies if an object is valid. You can also verify
  1010. this using the Null object. True means the object is valid,
  1011. false means it isn't.
  1012. @ret The validity of the object.
  1013. @param o The object you want to verify.
  1014. */
  1015. extern Boolean System.isObjectValid(Object o);
  1016. /**
  1017. integer()
  1018. Takes a Double and returns the closest integer representation.
  1019. @ret The integer representation of the double.
  1020. @param d The double for which you want an integer representation.
  1021. */
  1022. extern Int System.integer(Double d);
  1023. extern Double System.frac(Double d);
  1024. /**
  1025. getTimeOfDay()
  1026. Read the current time of the day. Returns a number that's
  1027. the number of milliseconds since the start of the day (0:00).
  1028. @ret The number of milliseconds since midnight.
  1029. */
  1030. extern Int System.getTimeOfDay();
  1031. /**
  1032. setMenuTransparency()
  1033. Set the menu's transparency value (alpha blending). Ranges
  1034. from 0 to 255. 0 being totally transparent and 255 being
  1035. totally opaque.
  1036. @param alphavalue The transparency value to set.
  1037. */
  1038. extern System.setMenuTransparency(int alphavalue);
  1039. extern Boolean System.onGetCancelComponent(String guid, boolean goingvisible);
  1040. #define STATUS_PAUSED -1
  1041. #define STATUS_STOPPED 0
  1042. #define STATUS_PLAYING 1
  1043. /**
  1044. getStatus()
  1045. returns the status of the main player core.
  1046. @ret STATUS_PAUSED (-1) if paused, STATUS_STOPPED (0) if stopped, STATUS_PLAYING (1) if playing.
  1047. */
  1048. extern Int System.getStatus();
  1049. #define VK_SHIFT 16
  1050. #define VK_CONTROL 17
  1051. #define VK_ALT 18
  1052. /**
  1053. Int isKeyDown(int vk_code)
  1054. Checks if a virtual key (like VK_CONTROL, VK_SHIFT, VK_ALT) is pressed.
  1055. @ret 1 if key is pressed, 0 if not.
  1056. */
  1057. extern Int System.isKeyDown(int vk_code);
  1058. /**
  1059. setClipboardText(String text)
  1060. Sets the given text to the clipboard.
  1061. */
  1062. extern System.setClipboardText(String _text);
  1063. /**
  1064. String Chr(Int charnum)
  1065. Returns a string the ascii char.
  1066. */
  1067. extern String System.Chr(Int charnum);
  1068. /**
  1069. translate
  1070. Takes a passed string and attempts to find a matching translation
  1071. of the skin as specified in wasabi.xml (if this is present).
  1072. @ret The translated string or the passed string if no translation present.
  1073. @param str The string to be compared for translation.
  1074. e.g. int wasabi.xml we have <translation from="Volume:" to="Volume: Happy" />
  1075. so on calling translate("Volume:") would give us "Volume: Happy"
  1076. */
  1077. extern String System.translate(String str); // Requires 5.54
  1078. /**
  1079. getString
  1080. Returns a String from wasabi StringTable
  1081. @ret The translated string or "" if no translation present.
  1082. @param table The StringTable identifier, eg "nullsoft.bento"
  1083. @param id The id of the String (starting with 0)
  1084. */
  1085. extern String System.getString(String table, int id); // Requires 5.54
  1086. /**
  1087. getLanguageId
  1088. Returns the Language Identifier (en-us or de-de).
  1089. @ret Language Identifier.
  1090. */
  1091. extern String System.getLanguageId(); // Requires 5.54
  1092. // extlist should be like "jpeg files|*.jpg|all files|*.*||"
  1093. // note the extra | on the end
  1094. deprecated extern String System.selectFile(String extlist, String id, String prev_filename);
  1095. extern String System.selectFolder(String wnd_title, String wnd_info, String default_path); // Requires 5.53 // use wnd_title="" in order to display default system caption
  1096. extern System.systemMenu();
  1097. extern System.windowMenu();
  1098. extern System.triggerAction(GuiObject context, String actionname, String actionparam);
  1099. extern GuiObject System.showWindow(String guidorgroupid, String preferedcontainer, Boolean transient); // "" = default container, returns the hosted window
  1100. extern System.hideWindow(GuiObject hw); // hw = hosted window, returned by showWindow
  1101. extern System.hideNamedWindow(String guidorgroup); // hides the last created wnd with this guid/groupname
  1102. extern Boolean System.isNamedWindowVisible(String guidorgroup);
  1103. //extern System.setAtom(String atomname, Object object);
  1104. //extern Object System.getAtom(String atomname);
  1105. extern System.invokeDebugger();
  1106. extern int System.hasVideoSupport(); // requires 5.666 - returns 1 if video support is enabled in Winamp
  1107. extern Int System.isVideo();
  1108. extern Int System.isVideoFullscreen();
  1109. extern System.setVideoFullscreen(Boolean fullscreen); // requires 5.8
  1110. extern Int System.getIdealVideoWidth(); // -1 if video has never been open this session, otherwise the ideal width of the currently (or last) video played
  1111. extern Int System.getIdealVideoHeight(); // -1 if video has never been open this session, otherwise the ideal height of the currently (or last) video played
  1112. extern Int System.isMinimized();
  1113. extern System.minimizeApplication();
  1114. extern System.restoreApplication();
  1115. extern System.activateApplication();
  1116. extern Int System.getPlaylistLength(); // number of items in the playlist
  1117. extern Int System.getPlaylistIndex(); // currently playing item in the playlist (or next to play if stopped)
  1118. extern System.clearPlaylist(); //Requires 5.5
  1119. extern Boolean System.isDesktopAlphaAvailable();
  1120. extern Boolean System.isTransparencyAvailable();
  1121. extern Int System.onShowNotification(); // return 1 if you implement it
  1122. extern String System.getSongInfoText(); // same as what gets in a text object with display="SONGINFO"
  1123. extern String System.getSongInfoTextTranslated(); // same as what gets in a text object with display="SONGINFO_LOCALISE"
  1124. extern Int System.getVisBand(int channel, int band); // 0,1 / 0..75
  1125. extern Double System.getRuntimeVersion(); // returns the maki runtime version, up to 5.01 = 0.0, 5.02+ = 1.0
  1126. //extern Int System.isWa2ComponentVisible(String guid);
  1127. //extern System.hideWa2Component(String guid);
  1128. extern boolean system.isProVersion(); //Requires 5.5
  1129. extern String System.getWinampVersion(); //Requires 5.51
  1130. extern Int System.getBuildNumber(); //Requires 5.51
  1131. extern int System.getFileSize(String fullfilename); //Requires 5.51
  1132. //*****************************************************************************
  1133. // Container CLASS
  1134. //*****************************************************************************
  1135. /**
  1136. Container Class.
  1137. @short The container class enables you to control current containers and also create them.
  1138. @author Nullsoft Inc.
  1139. @ver 1.0
  1140. */
  1141. /**
  1142. onSwitchToLayout()
  1143. Hookable. Event happens when a container is going to switch
  1144. from the currently active layout to another layout (newlayout).
  1145. @param newlayout The new layout that will be used.
  1146. */
  1147. extern Container.onSwitchToLayout(Layout newlayout);
  1148. extern Container.onBeforeSwitchToLayout(Layout oldlayout, Layout newlayout);
  1149. extern Container.setXmlParam(String param, String value);
  1150. /**
  1151. onHideLayout()
  1152. Hookable. Event happens when a container is about to hide
  1153. the currently active layout (_layout).
  1154. @param _layout The layout that's going to be hidden.
  1155. */
  1156. extern Container.onHideLayout(Layout _layout);
  1157. /**
  1158. onShowLayout()
  1159. Hookable. Event happens when a container is about to
  1160. show a layout (_layout).
  1161. @param _layout The layout about to be shown
  1162. */
  1163. extern Container.onShowLayout(Layout _layout);
  1164. /**
  1165. getLayout()
  1166. Get the layout associated with the an id.
  1167. This corresponds to the "id=..." attribute in
  1168. the XML tag <layout .. />.
  1169. @ret The layout associated with the id.
  1170. @param layout_id The id of the layout you wish to retrieve.
  1171. */
  1172. extern Layout Container.getLayout(String layout_id);
  1173. /**
  1174. getNumLayouts()
  1175. Get the number of layouts contained in the
  1176. container.
  1177. @ret The number of layouts.
  1178. */
  1179. extern Int Container.getNumLayouts();
  1180. /**
  1181. enumLayout()
  1182. Get the layout by it's index number.
  1183. Range is from 0 to the value returned
  1184. by getNumLayouts() - 1.
  1185. @ret The layout.
  1186. @param num The index number of the layout you want.
  1187. */
  1188. extern Layout Container.enumLayout(Int num);
  1189. /**
  1190. switchToLayout()
  1191. Switch to a perticular layout by using the
  1192. desired layout's id. This corresponds to the
  1193. "id=..." attribute in the XML tag <layout .. />.
  1194. @param layout_id The id of the layout to which you want to switch.
  1195. */
  1196. extern Container.switchToLayout(String layout_id);
  1197. /**
  1198. show()
  1199. Trigger the show event.
  1200. */
  1201. extern Container.show();
  1202. /**
  1203. hide()
  1204. Trigger the hide event.
  1205. */
  1206. extern Container.hide();
  1207. // this one destroys it if the container is dynamic, or hides otherwise
  1208. extern Container.close();
  1209. /**
  1210. toggle()
  1211. Toggle the containers state between Shown / Hidden.
  1212. */
  1213. extern Container.toggle();
  1214. /**
  1215. isDynamic()
  1216. Tells you if the current container is a dynamic
  1217. container or not. Values are true (1) for dynamic
  1218. false (0) for static.
  1219. @ret The container type (dynamic or static).
  1220. */
  1221. extern Int Container.isDynamic();
  1222. extern Container.setName(String name);
  1223. extern String Container.getName(); //requires Winamp 5.53
  1224. extern String Container.getGuid(); //requires Winamp 5.53
  1225. extern Layout Container.getCurLayout();
  1226. extern Container.onAddContent(GuiObject wnd, String id, String guid); //requires Winamp 5.51
  1227. //*****************************************************************************
  1228. // WAC CLASS
  1229. //*****************************************************************************
  1230. /**
  1231. WAC Class.
  1232. Not used in Winamp5.
  1233. @short .
  1234. @author Nullsoft Inc.
  1235. @ver 1.0
  1236. */
  1237. /**
  1238. getGuid()
  1239. Get the GUID of the WAC.
  1240. @ret The GUID of the WAC.
  1241. */
  1242. deprecated extern String Wac.getGuid();
  1243. /**
  1244. getName()
  1245. Get the name of the WAC.
  1246. @ret The name of the WAC.
  1247. */
  1248. deprecated extern String Wac.getName();
  1249. /**
  1250. sendCommand()
  1251. */
  1252. deprecated extern Int Wac.sendCommand(String cmd, Int param1, Int param2, String param3);
  1253. /**
  1254. show()
  1255. Trigger the show event.
  1256. */
  1257. deprecated extern Wac.show();
  1258. /**
  1259. hide()
  1260. Trigger the hide event.
  1261. */
  1262. deprecated extern Wac.hide();
  1263. /**
  1264. isVisible()
  1265. */
  1266. deprecated extern Boolean Wac.isVisible();
  1267. /**
  1268. onNotify()
  1269. */
  1270. deprecated extern Wac.onNotify(String notifstr, Int a, Int b);
  1271. /**
  1272. onShow()
  1273. Hookable. The event happens when the WAC is about
  1274. to be shown.
  1275. */
  1276. deprecated extern Wac.onShow();
  1277. /**
  1278. onHide()
  1279. Hookable. The event happens when the WAC is about
  1280. to be hidden.
  1281. */
  1282. deprecated extern Wac.onHide();
  1283. /**
  1284. setStatusBar()
  1285. Set the status bars visibility.
  1286. Sending true will make the status bar
  1287. visible while sending false will hide
  1288. it.
  1289. @param onoff The status bars visibility.
  1290. */
  1291. deprecated extern Wac.setStatusBar(Boolean onoff);
  1292. /**
  1293. getStatusBar()
  1294. Get the status bars visibility. True means
  1295. it's visible, false means it's hidden.
  1296. @ret The status bars visibility.
  1297. */
  1298. deprecated extern Boolean Wac.getStatusBar();
  1299. //*****************************************************************************
  1300. // GUIOBJECT CLASS
  1301. //*****************************************************************************
  1302. /**
  1303. GuiObject Class.
  1304. @short .
  1305. @author Nullsoft Inc.
  1306. @ver 1.0
  1307. */
  1308. /**
  1309. show()
  1310. Trigger the show event.
  1311. */
  1312. extern GuiObject.show();
  1313. /**
  1314. hide()
  1315. Trigger the hide event.
  1316. */
  1317. extern GuiObject.hide();
  1318. /**
  1319. isVisible()
  1320. Get the visibility status of the object.
  1321. False means it's hidden, true means it's
  1322. visible.
  1323. @ret The visibility status of the object.
  1324. */
  1325. extern int GuiObject.isVisible();
  1326. /**
  1327. onSetVisible()
  1328. Hookable. Event happens when the visibility
  1329. status of the object is changed from visible to
  1330. hidden or vice-versa.
  1331. @param onoff The objects visibility status.
  1332. */
  1333. extern GuiObject.onSetVisible(Boolean onoff);
  1334. /**
  1335. setAlpha()
  1336. Set the alphablending value of the object.
  1337. Value ranges from 0 (fully transparent) to
  1338. 255 (fully opaque).
  1339. @param alpha The alpha value.
  1340. */
  1341. extern GuiObject.setAlpha(int alpha);
  1342. /**
  1343. getAlpha()
  1344. Get the current alphablending value of
  1345. the object. Value ranges from 0 (fully
  1346. transparent) to 255 (fully opaque).
  1347. @ret The alpha value.
  1348. */
  1349. extern int GuiObject.getAlpha();
  1350. /**
  1351. onLeftButtonUp()
  1352. Hookable. Event happens when the left mouse
  1353. button was previously down and is now up.
  1354. @param x The X position in the screen where the cursor was when the event was triggered.
  1355. @param y The Y position in the screen where the cursor was when the event was triggered.
  1356. */
  1357. extern GuiObject.onLeftButtonUp(int x, int y);
  1358. /**
  1359. onLeftButtonDown()
  1360. Hookable. Event happens when the left mouse button
  1361. is pressed.
  1362. @param x The X position in the screen where the cursor was when the event was triggered.
  1363. @param y The Y position in the screen where the cursor was when the event was triggered.
  1364. */
  1365. extern GuiObject.onLeftButtonDown(int x, int y);
  1366. /**
  1367. onRightButtonUp()
  1368. Hookable. Event happens when the right mouse button
  1369. was previously down and is now up.
  1370. @param x The X position in the screen where the cursor was when the event was triggered.
  1371. @param y The Y position in the screen where the cursor was when the event was triggered.
  1372. */
  1373. extern GuiObject.onRightButtonUp(int x, int y);
  1374. /**
  1375. onRightButtonDown()
  1376. Hookable. Event happens when the right mouse button
  1377. is pressed.
  1378. @param x The X position in the screen where the cursor was when the event was triggered.
  1379. @param y The Y position in the screen where the cursor was when the event was triggered.
  1380. */
  1381. extern GuiObject.onRightButtonDown(int x, int y);
  1382. /**
  1383. onRightButtonDlbClk()
  1384. Hookable. Event happens when the right mouse button
  1385. is double clicked.
  1386. @param x The X position in the screen where the cursor was when the event was triggered.
  1387. @param y The Y position in the screen where the cursor was when the event was triggered.
  1388. */
  1389. extern GuiObject.onRightButtonDblClk(int x, int y);
  1390. /**
  1391. onLeftButtonDlbClk()
  1392. Hookable. Event happens when the left mouse button
  1393. is double clicked.
  1394. @param x The X position in the screen where the cursor was when the event was triggered.
  1395. @param y The Y position in the screen where the cursor was when the event was triggered.
  1396. */
  1397. extern GuiObject.onLeftButtonDblClk(int x, int y);
  1398. extern int GuiObject.onMouseWheelUp(int clicked , int lines); // Requires 5.54 - return 1 if you don't want to send the handle to winamp
  1399. extern int GuiObject.onMouseWheelDown(int clicked , int lines); // Requires 5.54 - return 1 if you don't want to send the handle to winamp
  1400. /**
  1401. onMouseMove()
  1402. Hookable. Event happens when the mouse is moved.
  1403. @param x The new X screen position of the mouse.
  1404. @param y The new Y screen position of the mouse.
  1405. */
  1406. extern GuiObject.onMouseMove(int x, int y);
  1407. /**
  1408. onEnterArea()
  1409. Hookable. Event happens when the mouse
  1410. enters the objects area.
  1411. */
  1412. extern GuiObject.onEnterArea();
  1413. /**
  1414. onLeaveArea()
  1415. Hookable. Event happens when the mouse
  1416. leaves the objects area.
  1417. */
  1418. extern GuiObject.onLeaveArea();
  1419. /**
  1420. setEnabled()
  1421. */
  1422. extern GuiObject.setEnabled(boolean onoff);
  1423. /**
  1424. getEnabled()
  1425. */
  1426. extern boolean GuiObject.getEnabled();
  1427. /**
  1428. onEnabled()
  1429. */
  1430. extern GuiObject.onEnable(boolean onoff);
  1431. /**
  1432. resize()
  1433. Resize the object to the desired size and position.
  1434. @param x The X position where to anchor the object before resize.
  1435. @param y The Y position where to anchor the object before resize.
  1436. @param w The width you wish the object to have.
  1437. @param h The height you wish the object to have.
  1438. */
  1439. extern GuiObject.resize(int x, int y, int w, int h);
  1440. /**
  1441. onResize()
  1442. Hookable. Event happens when the object is about
  1443. to be resized.
  1444. @param x The X position where the object will be anchored.
  1445. @param y The Y position where the object will be anchored.
  1446. @param w The width the object will have.
  1447. @param h The height the object will have.
  1448. */
  1449. extern GuiObject.onResize(int x, int y, int w, int h);
  1450. /**
  1451. isMouseOver()
  1452. */
  1453. extern boolean GuiObject.isMouseOver(int x, int y);
  1454. /**
  1455. getLeft()
  1456. Get the X position, in the screen, of the
  1457. left edge of the object.
  1458. @ret The left edge's position (in screen coordinates).
  1459. */
  1460. extern int GuiObject.getLeft();
  1461. /**
  1462. getTop()
  1463. Get the Y position, in the screen, of the
  1464. top edge of the object.
  1465. @ret The top edge's position (in screen coordinates).
  1466. */
  1467. extern int GuiObject.getTop();
  1468. /**
  1469. getWidth()
  1470. Get the width of the object, in pixels.
  1471. @ret The width of the object.
  1472. */
  1473. extern int GuiObject.getWidth();
  1474. /**
  1475. getHeight()
  1476. Get the height of the object, in pixels.
  1477. @ret The height of the object.
  1478. */
  1479. extern int GuiObject.getHeight();
  1480. /**
  1481. setTargetX()
  1482. Set a target X position, in the screen, for
  1483. the object.
  1484. @param x The target X position of the object.
  1485. */
  1486. extern GuiObject.setTargetX(int x);
  1487. /**
  1488. setTargetY()
  1489. Set a target Y position, in the screen, for
  1490. the object.
  1491. @param y The target Y position of the object.
  1492. */
  1493. extern GuiObject.setTargetY(int y);
  1494. /**
  1495. setTargetW()
  1496. Set a target width, in pixels, for the object.
  1497. @param w The target width of the object.
  1498. */
  1499. extern GuiObject.setTargetW(int w);
  1500. /**
  1501. setTargetH()
  1502. Set a target height, in pixels, for the object.
  1503. @param h The target height of the object.
  1504. */
  1505. extern GuiObject.setTargetH(int r);
  1506. /**
  1507. setTargetA()
  1508. Set a target alphablending value for the object.
  1509. The value range is from 0 (totally transparent)
  1510. to 255 (totally opaque).
  1511. @param alpha The target alpha value.
  1512. */
  1513. extern GuiObject.setTargetA(int alpha);
  1514. /**
  1515. setTargetSpeed()
  1516. The amount of time in which you wish to arrive at
  1517. the target(s) previously set, in seconds.
  1518. @param insecond The number of seconds in which to reach the target.
  1519. */
  1520. extern GuiObject.setTargetSpeed(float insecond);
  1521. /**
  1522. gotoTarget()
  1523. Begin transition to previously set target.
  1524. */
  1525. extern GuiObject.gotoTarget();
  1526. /**
  1527. onTargetReached()
  1528. Hookable. Event happens when the object has reached
  1529. it's previously set target.
  1530. */
  1531. extern GuiObject.onTargetReached();
  1532. extern GuiObject.cancelTarget();
  1533. /**
  1534. isGoingToTarget()
  1535. */
  1536. extern GuiObject.reverseTarget(int reverse); // modifies the x/y targets so that they compensate for gained width/height. useful to make drawers that open up without jittering
  1537. extern GuiObject.onStartup();
  1538. extern boolean GuiObject.isGoingToTarget();
  1539. extern GuiObject.setXmlParam(String param, String value);
  1540. extern String GuiObject.getXmlParam(String param);
  1541. extern GuiObject.init(Group parent);
  1542. extern GuiObject.bringToFront();
  1543. extern GuiObject.bringToBack();
  1544. extern GuiObject.bringAbove(GuiObject guiobj);
  1545. extern GuiObject.bringBelow(GuiObject guiobj);
  1546. extern Int GuiObject.getGuiX();
  1547. extern Int GuiObject.getGuiY();
  1548. extern Int GuiObject.getGuiW();
  1549. extern Int GuiObject.getGuiH();
  1550. extern Int GuiObject.getGuiRelatX();
  1551. extern Int GuiObject.getGuiRelatY();
  1552. extern Int GuiObject.getGuiRelatW();
  1553. extern Int GuiObject.getGuiRelatH();
  1554. extern Boolean GuiObject.isActive();
  1555. extern GuiObject GuiObject.getParent();
  1556. extern Layout GuiObject.getParentLayout();
  1557. extern GuiObject GuiObject.getTopParent();
  1558. extern int GuiObject.runModal();
  1559. extern GuiObject.endModal(int retcode);
  1560. extern GuiObject GuiObject.findObject(String id);
  1561. extern GuiObject GuiObject.findObjectXY(int x, int y);
  1562. extern String GuiObject.getName();
  1563. extern int GuiObject.clientToScreenX(int x);
  1564. extern int GuiObject.clientToScreenY(int y);
  1565. extern int GuiObject.clientToScreenW(int w);
  1566. extern int GuiObject.clientToScreenH(int h);
  1567. extern int GuiObject.screenToClientX(int x);
  1568. extern int GuiObject.screenToClientY(int y);
  1569. extern int GuiObject.screenToClientW(int w);
  1570. extern int GuiObject.screenToClientH(int h);
  1571. extern int GuiObject.getAutoWidth();
  1572. extern int GuiObject.getAutoHeight();
  1573. extern GuiObject.setFocus();
  1574. extern GuiObject.onChar(String c);
  1575. extern GuiObject.onAccelerator(String accel);
  1576. extern Boolean GuiObject.isMouseOverRect();
  1577. extern Object GuiObject.getInterface(String interface_guid);
  1578. extern GuiObject.onDragEnter();
  1579. extern GuiObject.onDragOver(int x, int y);
  1580. extern GuiObject.onDragLeave();
  1581. #define VK_PRIOR 33
  1582. #define VK_NEXT 34
  1583. #define VK_END 35
  1584. #define VK_HOME 36
  1585. #define VK_LEFT 37
  1586. #define VK_UP 38
  1587. #define VK_RIGHT 39
  1588. #define VK_DOWN 40
  1589. extern GuiObject.onKeyDown(int vk_code);
  1590. extern GuiObject.onKeyUp(int vk_code);
  1591. extern GuiObject.onGetFocus();
  1592. extern GuiObject.onKillFocus();
  1593. extern Int GuiObject.sendAction(String action, String param, Int x, int y, int p1, int p2);
  1594. extern Int GuiObject.onAction(String action, String param, Int x, int y, int p1, int p2, GuiObject source);
  1595. // Group
  1596. extern GuiObject Group.getObject(String object_id);
  1597. extern Int Group.getNumObjects();
  1598. extern GuiObject Group.enumObject(Int num);
  1599. extern Group.onCreateObject(GuiObject newobj);
  1600. extern Int Group.getMousePosX();
  1601. extern Int Group.getMousePosY();
  1602. extern Boolean Group.isLayout();
  1603. // Layout
  1604. extern Layout.onDock(int side);
  1605. extern Layout.onUndock();
  1606. extern Layout.onScale(Double newscalevalue);
  1607. extern Double Layout.getScale();
  1608. extern Layout.setScale(Double scalevalue);
  1609. extern Layout.setDesktopAlpha(Boolean onoff);
  1610. extern Boolean Layout.getDesktopAlpha();
  1611. extern Container Layout.getContainer();
  1612. extern Layout.center();
  1613. extern Layout.onMove();
  1614. extern Layout.onEndMove();
  1615. extern Layout.onUserResize(int x, int y, int w, int h);
  1616. extern Layout.snapAdjust(int left, int top, int right, int bottom);
  1617. extern Int Layout.getSnapAdjustTop();
  1618. extern Int Layout.getSnapAdjustRight();
  1619. extern Int Layout.getSnapAdjustLeft();
  1620. extern Int Layout.getSnapAdjustBottom();
  1621. extern Layout.setRedrawOnResize(int wantredrawonresize);
  1622. extern Layout.beforeRedock();
  1623. extern Layout.redock();
  1624. extern Boolean Layout.isTransparencySafe();
  1625. extern Boolean Layout.isLayoutAnimationSafe();
  1626. extern Layout.onMouseEnterLayout();
  1627. extern Layout.onMouseLeaveLayout();
  1628. extern Layout.onSnapAdjustChanged();
  1629. // List
  1630. extern List.addItem(Any _object);
  1631. extern List.removeItem(int pos);
  1632. extern Any List.enumItem(int pos);
  1633. extern Int List.findItem(Any _object);
  1634. extern Int List.findItem2(Any _object, int startItem);
  1635. extern int List.getNumItems();
  1636. extern List.removeAll();
  1637. // BitList
  1638. extern boolean BitList.getItem(int n);
  1639. extern BitList.setItem(int n, boolean val);
  1640. extern BitList.setSize(int s);
  1641. extern int BitList.getSize();
  1642. // Map
  1643. extern Int Map.getValue(int x, int y);
  1644. extern Int Map.getARGBValue(int x, int y, int channel); // requires wa 5.51 // channel: 0=Blue, 1=Green, 2=Red, 3=Alpha. if your img has a alpha channal the returned rgb value might not be exact
  1645. extern Boolean Map.inRegion(int x, int y);
  1646. extern Map.loadMap(String bitmapid);
  1647. extern Int Map.getWidth();
  1648. extern Int Map.getHeight();
  1649. extern Region Map.getRegion();
  1650. // PopupMenu
  1651. extern PopupMenu.addSubMenu(PopupMenu submenu, String submenutext);
  1652. extern PopupMenu.addCommand(String cmdtxt, Int cmd_id, Boolean checked, Boolean disabled);
  1653. extern PopupMenu.addSeparator();
  1654. extern Int PopupMenu.popAtXY(int x, int y);
  1655. extern Int PopupMenu.popAtMouse();
  1656. extern Int PopupMenu.getNumCommands();
  1657. extern PopupMenu.checkCommand(int cmd_id, boolean check);
  1658. extern PopupMenu.disableCommand(int cmd_id, boolean disable);
  1659. // Region
  1660. extern Region.add(Region reg);
  1661. extern Region.sub(Region reg);
  1662. extern Region.offset(int x, int y);
  1663. extern Region.stretch(double r);
  1664. extern Region.copy(Region reg);
  1665. extern Region.loadFromMap(Map regionmap, Int threshold, Boolean reversed);
  1666. extern Region.loadFromBitmap(String bitmapid);
  1667. extern Int Region.getBoundingBoxX();
  1668. extern Int Region.getBoundingBoxY();
  1669. extern Int Region.getBoundingBoxW();
  1670. extern Int Region.getBoundingBoxH();
  1671. // Timer
  1672. extern Timer.onTimer();
  1673. extern Timer.setDelay(int millisec);
  1674. extern Int Timer.getDelay();
  1675. extern Timer.start();
  1676. extern Timer.stop();
  1677. extern Timer.isRunning();
  1678. extern Int Timer.getSkipped();
  1679. // FeedWatcher
  1680. deprecated extern Int FeedWatcher.setFeed(String feed_id);
  1681. deprecated extern FeedWatcher.releaseFeed();
  1682. deprecated extern FeedWatcher.onFeedChange(String new_feeddata);
  1683. // WindowHolder
  1684. extern WindowHolder.setRegionFromMap(Map regionmap, Int threshold, Boolean reverse);
  1685. extern WindowHolder.setRegion(Region reg);
  1686. extern GuiObject WindowHolder.getContent();
  1687. extern String WindowHolder.getGuid(); // Fixed in Winamp 5.53 - returns the guid of the current window. If the WindowHolder is not visible the zero-guid is displayed
  1688. extern String WindowHolder.getComponentName(); // Requires 5.54
  1689. deprecated extern WindowHolder.onGetWac(Wac wacobj);
  1690. deprecated extern WindowHolder.onGiveUpWac(Wac wacobj);
  1691. deprecated extern Wac WindowHolder.getWac();
  1692. deprecated extern WindowHolder.setAcceptWac(Boolean onoff);
  1693. // Edit
  1694. extern Edit.onEnter();
  1695. extern Edit.onAbort();
  1696. extern Edit.onIdleEditUpdate();
  1697. extern Edit.onEditUpdate();
  1698. extern Edit.setText(String txt);
  1699. extern Edit.setAutoEnter(boolean onoff);
  1700. extern Int Edit.getAutoEnter();
  1701. extern String Edit.getText();
  1702. extern Edit.selectAll();
  1703. extern Edit.enter();
  1704. extern Edit.setIdleEnabled(boolean onoff);
  1705. extern Int Edit.getIdleEnabled();
  1706. // Slider
  1707. extern Slider.onSetPosition(int newpos);
  1708. extern Slider.onPostedPosition(int newpos);
  1709. extern Slider.onSetFinalPosition(int pos);
  1710. extern Slider.setPosition(int pos);
  1711. extern Int Slider.getPosition();
  1712. extern Slider.lock(); // locks descendant core collbacks
  1713. extern Slider.unlock(); // unloads them
  1714. // Vis
  1715. extern Vis.onFrame();
  1716. extern Vis.setRealtime(Boolean onoff);
  1717. extern Boolean Vis.getRealtime();
  1718. extern Int Vis.getMode();
  1719. extern Vis.setMode(Int mode);
  1720. extern Vis.nextMode();
  1721. // Browser
  1722. extern Browser.navigateUrl(String url);
  1723. extern Browser.back();
  1724. extern Browser.forward();
  1725. extern Browser.stop();
  1726. extern Browser.refresh();
  1727. extern Browser.home();
  1728. extern Browser.setTargetName(String targetname);
  1729. extern Boolean Browser.onBeforeNavigate(String url, Int flags, String targetframename); // return TRUE to cancel navigation
  1730. extern Browser.onDocumentComplete(String url); // Will be called for main site and inlineFrames
  1731. extern Browser.onDocumentReady(String url); // Requires 5.53 // Will be called after all inlineFrames & site is loaded
  1732. extern String Browser.getDocumentTitle();
  1733. extern Browser.onNavigateError(String url, int code); // Requires 5.53
  1734. extern Browser.setCancelIEErrorPage(boolean cancel); // Requires 5.53
  1735. /**
  1736. scrape()
  1737. Starts to search the current document of browser for strings linking to playable madia.
  1738. Call best after onDocumenteComplete();
  1739. No params.
  1740. */
  1741. extern browser.scrape(); //Requires 5.5
  1742. /**
  1743. onMediaLink()
  1744. Called everytime the SiteScraper has found a media link
  1745. in the current document.
  1746. @param url A string that contains the URL link to this file.
  1747. */
  1748. extern string browser.onMediaLink(string url); //Requires 5.5
  1749. // Text
  1750. extern Text.setText(String txt); // changes the display/text="something" param
  1751. extern Text.setAlternateText(String txt); // overrides the display/text parameter with a custom string, set "" to cancel
  1752. extern String Text.getText();
  1753. extern int Text.getTextWidth();
  1754. extern Text.onTextChanged(String newtxt);
  1755. // Layer
  1756. extern Layer.onBeginResize(int x, int y, int w, int h);
  1757. extern Layer.onEndResize(int x, int y, int w, int h);
  1758. extern Layer.fx_onInit();
  1759. extern Layer.fx_onFrame();
  1760. extern Double Layer.fx_onGetPixelR(double r, double d, double x, double y);
  1761. extern Double Layer.fx_onGetPixelD(double r, double d, double x, double y);
  1762. extern Double Layer.fx_onGetPixelX(double r, double d, double x, double y);
  1763. extern Double Layer.fx_onGetPixelY(double r, double d, double x, double y);
  1764. extern Double Layer.fx_onGetPixelA(double r, double d, double x, double y);
  1765. extern Layer.setRegionFromMap(Map regionmap, int threshold, boolean reverse);
  1766. extern Layer.setRegion(Region reg);
  1767. extern Layer.fx_setEnabled(boolean onoff);
  1768. extern Boolean Layer.fx_getEnabled();
  1769. extern Layer.fx_setWrap(Boolean onoff);
  1770. extern Boolean Layer.fx_getWrap();
  1771. extern Layer.fx_setRect(Boolean onoff);
  1772. extern Boolean Layer.fx_getRect();
  1773. extern Layer.fx_setBgFx(Boolean onoff);
  1774. extern Boolean Layer.fx_getBgFx();
  1775. extern Layer.fx_setClear(Boolean onoff);
  1776. extern Boolean Layer.fx_getClear();
  1777. extern Layer.fx_setSpeed(Int msperframe);
  1778. extern Int Layer.fx_getSpeed();
  1779. extern Layer.fx_setRealtime(Boolean onoff);
  1780. extern Boolean Layer.fx_getRealtime();
  1781. extern Layer.fx_setLocalized(Boolean onoff);
  1782. extern Boolean Layer.fx_getLocalized();
  1783. extern Layer.fx_setBilinear(Boolean onoff);
  1784. extern Boolean Layer.fx_getBilinear();
  1785. extern Layer.fx_setAlphaMode(Boolean onoff);
  1786. extern Boolean Layer.fx_getAlphaMode();
  1787. extern Layer.fx_setGridSize(Int x, Int y);
  1788. extern Layer.fx_update();
  1789. extern Layer.fx_restart();
  1790. extern Boolean Layer.isInvalid(); // Returns 1 if image load failed
  1791. // Button
  1792. extern Button.onActivate(int activated);
  1793. extern Button.onLeftClick();
  1794. extern Button.onRightClick();
  1795. extern Button.setActivated(Boolean onoff);
  1796. extern Button.setActivatedNoCallback(Boolean onoff);
  1797. extern Boolean Button.getActivated();
  1798. extern Button.leftClick();
  1799. extern Button.rightClick();
  1800. // AnimatedLayer
  1801. extern AnimatedLayer.onPlay();
  1802. extern AnimatedLayer.onPause();
  1803. extern AnimatedLayer.onResume();
  1804. extern AnimatedLayer.onStop();
  1805. extern AnimatedLayer.onFrame(Int framenum);
  1806. extern AnimatedLayer.setSpeed(Int msperframe);
  1807. extern AnimatedLayer.gotoFrame(int framenum);
  1808. extern AnimatedLayer.setStartFrame(Int framenum);
  1809. extern AnimatedLayer.setEndFrame(int framenum);
  1810. extern AnimatedLayer.setAutoReplay(Boolean onoff);
  1811. extern AnimatedLayer.play();
  1812. extern AnimatedLayer.stop();
  1813. extern AnimatedLayer.pause();
  1814. extern Boolean AnimatedLayer.isPlaying();
  1815. extern Boolean AnimatedLayer.isPaused();
  1816. extern Boolean AnimatedLayer.isStopped();
  1817. extern Int AnimatedLayer.getStartFrame();
  1818. extern Int AnimatedLayer.getEndFrame();
  1819. extern Int AnimatedLayer.getLength();
  1820. extern Int AnimatedLayer.getDirection();
  1821. extern Boolean AnimatedLayer.getAutoReplay();
  1822. extern Int AnimatedLayer.getCurFrame();
  1823. extern AnimatedLayer.setRealtime(Boolean onoff);
  1824. // AlbumArt
  1825. extern AlbumArtLayer.refresh();
  1826. extern AlbumArtLayer.isLoading();
  1827. extern AlbumArtLayer.onAlbumArtLoaded(boolean success);
  1828. // ToggleButton
  1829. extern ToggleButton.onToggle(Boolean onoff);
  1830. extern int TOggleButton.getCurCfgVal();
  1831. // GroupList
  1832. extern Group GroupList.instantiate(String group_id, int num_groups);
  1833. extern Int GroupList.getNumItems();
  1834. extern Group GroupList.enumItem(int num);
  1835. extern GroupList.removeAll();
  1836. extern GroupList.scrollToPercent(Int percent);
  1837. extern GroupList.setRedraw(int redraw);
  1838. // CfgGroup
  1839. extern Int CfgGroup.cfgGetInt();
  1840. extern CfgGroup.cfgSetInt(Int intvalue);
  1841. extern String CfgGroup.cfgGetString();
  1842. extern Float CfgGroup.cfgGetFloat();
  1843. extern CfgGroup.cfgSetFloat(Float floatvalue);
  1844. extern CfgGroup.cfgSetString(String strvalue);
  1845. extern CfgGroup.onCfgChanged();
  1846. extern String CfgGroup.cfgGetGuid();
  1847. extern String CfgGroup.cfgGetName();
  1848. // QueryList
  1849. deprecated extern QueryList.onResetQuery();
  1850. // MouseRedir
  1851. extern MouseRedir.setRedirection(GuiObject o);
  1852. extern GuiObject MouseRedir.getRedirection();
  1853. extern MouseRedir.setRegionFromMap(Map regionmap, Int threshold, Boolean reverse);
  1854. extern MouseRedir.setRegion(Region reg);
  1855. // DropDownList
  1856. extern String DropDownList.getItemSelected();
  1857. extern DropDownList.onSelect(Int id, Int hover);
  1858. extern DropDownList.setListHeight(Int h);
  1859. extern DropDownList.openList();
  1860. extern DropDownList.closeList();
  1861. extern DropDownList.setItems(String lotsofitems);
  1862. extern Int DropDownList.addItem(String _text);
  1863. extern DropDownList.delItem(Int id);
  1864. extern Int DropDownList.findItem(String _text);
  1865. extern Int DropDownList.getNumItems();
  1866. extern DropDownList.selectItem(Int id, Int hover);
  1867. extern String DropDownList.getItemText(Int id);
  1868. extern Int DropDownList.getSelected();
  1869. extern String DropDownList.getSelectedText();
  1870. extern String DropDownList.getCustomText();
  1871. extern DropDownList.deleteAllItems();
  1872. extern DropDownList.setNoItemText(String txt);
  1873. // LayoutStatus
  1874. extern LayoutStatus.callme(String str);
  1875. // TabSheet
  1876. extern Int TabSheet.getCurPage();
  1877. extern TabSheet.setCurPage(Int a);
  1878. // GuiList
  1879. // Columns
  1880. extern Int GuiList.addColumn(String name, Int width, Int numeric);
  1881. extern Int GuiList.getNumColumns();
  1882. extern Int GuiList.getColumnWidth(Int column);
  1883. extern GuiList.setColumnWidth(Int column, Int newwidth);
  1884. extern String GuiList.getColumnLabel(Int column);
  1885. extern GuiList.setColumnLabel(Int column, String newlabel);
  1886. extern Int GuiList.getColumnNumeric(Int column);
  1887. extern GuiList.setColumnDynamic(Int column, Int isdynamic);
  1888. extern Int GuiList.isColumnDynamic(Int column);
  1889. extern GuiList.invalidateColumns();
  1890. // Items
  1891. extern Int GuiList.getNumItems();
  1892. extern Int GuiList.getItemCount();
  1893. extern Int GuiList.addItem(String label);
  1894. extern Int GuiList.insertItem(Int pos, String label);
  1895. extern Int GuiList.getLastAddedItemPos();
  1896. extern GuiList.setSubItem(Int pos, Int subpos, String txt);
  1897. extern GuiList.deleteAllItems();
  1898. extern Int GuiList.deleteByPos(Int pos);
  1899. extern String GuiList.getItemLabel(Int pos, Int subpos);
  1900. extern String GuiList.getSubitemText(Int pos, Int subpos);
  1901. extern GuiList.setItemLabel(Int pos, String _text);
  1902. extern Int GuiList.invalidateItem(Int pos);
  1903. extern Int GuiList.getFirstItemVisible();
  1904. extern Int GuiList.getLastItemVisible();
  1905. extern GuiList.setItemIcon(Int pos, String bitmapId); // Requires 5.54
  1906. extern String GuiList.getItemIcon(Int pos); // Requires 5.54
  1907. // Attributes
  1908. extern GuiList.setMinimumSize(Int size);
  1909. extern Int GuiList.getWantAutoDeselect();
  1910. extern GuiList.setWantAutoDeselect(Int want);
  1911. extern GuiList.onSetVisible(Int show);
  1912. extern GuiList.setAutoSort(Int dosort);
  1913. extern Int GuiList.setFontSize(Int size);
  1914. extern Int GuiList.getFontSize();
  1915. extern Int GuiList.getHeaderHeight();
  1916. extern Int GuiList.getPreventMultipleSelection();
  1917. extern Int GuiList.setPreventMultipleSelection(Int val);
  1918. extern GuiList.setShowIcons(int showThem); // Requires 5.54
  1919. extern Int GuiList.getShowIcons(); // Requires 5.54
  1920. extern Int GuiList.setIconWidth(int width); // Requires 5.54
  1921. extern Int GuiList.setIconHeight(int width); // Requires 5.54
  1922. extern GuiList.getIconWidth(); // Requires 5.54
  1923. extern GuiList.getIconHeight(); // Requires 5.54
  1924. // Navigation
  1925. extern GuiList.next();
  1926. extern GuiList.previous();
  1927. extern GuiList.pagedown();
  1928. extern GuiList.pageup();
  1929. extern GuiList.home();
  1930. extern GuiList.end();
  1931. extern GuiList.reset();
  1932. extern GuiList.ensureItemVisible(Int pos);
  1933. extern Int GuiList.scrollAbsolute(Int x);
  1934. extern Int GuiList.scrollRelative(Int x);
  1935. extern GuiList.scrollLeft(Int lines);
  1936. extern GuiList.scrollRight(Int lines);
  1937. extern GuiList.scrollUp(Int lines);
  1938. extern GuiList.scrollDown(Int lines);
  1939. extern GuiList.jumpToNext(Int c);
  1940. extern GuiList.scrollToItem(Int pos);
  1941. // Selecting
  1942. extern GuiList.selectCurrent();
  1943. extern GuiList.selectFirstEntry();
  1944. extern Int GuiList.getItemSelected(Int pos);
  1945. extern Int GuiList.isItemFocused(Int pos);
  1946. extern Int GuiList.getItemFocused();
  1947. extern GuiList.setItemFocused(Int pos);
  1948. extern Int GuiList.getFirstItemSelected();
  1949. extern Int GuiList.getNextItemSelected(Int lastpos);
  1950. extern Int GuiList.selectAll();
  1951. extern Int GuiList.deselectAll();
  1952. extern Int GuiList.invertSelection();
  1953. extern GuiList.setSelectionStart(Int pos);
  1954. extern GuiList.setSelectionEnd(Int pos);
  1955. extern GuiList.setSelected(Int pos, Int selected);
  1956. extern GuiList.toggleSelection(Int pos, Int setfocus);
  1957. // Actions, Moving
  1958. extern GuiList.resort();
  1959. extern Int GuiList.getSortDirection();
  1960. extern Int GuiList.getSortColumn();
  1961. extern GuiList.setSortColumn(Int col);
  1962. extern GuiList.setSortDirection(Int dir);
  1963. extern GuiList.moveItem(Int from, Int to);
  1964. // Callbacks
  1965. extern GuiList.onSelectAll();
  1966. extern GuiList.onDelete();
  1967. extern GuiList.onDoubleClick(Int itemnum);
  1968. extern GuiList.onLeftClick(Int itemnum);
  1969. extern GuiList.onSecondLeftClick(Int itemnum);
  1970. extern Int GuiList.onRightClick(Int itemnum);
  1971. extern Int GuiList.onColumnDblClick(Int col, Int x, Int y);
  1972. extern Int GuiList.onColumnLabelClick(Int col, Int x, Int y);
  1973. extern GuiList.onItemSelection(Int itemnum, Int selected);
  1974. extern Int GuiList.onIconLeftClick(int itemnum, int x, int y); // Return 1 to prevent other actions to be called (eg onLeftClick()) // Requires 5.54
  1975. // GuiTree
  1976. extern Int GuiTree.onWantAutoContextMenu();
  1977. extern Int GuiTree.onMouseWheelUp(Int clicked, Int lines);
  1978. extern Int GuiTree.onMouseWheelDown(Int clicked, Int lines);
  1979. extern Int GuiTree.onContextMenu(Int x, Int y);
  1980. extern Int GuiTree.onChar(Int c);
  1981. extern GuiTree.onItemRecvDrop(TreeItem item);
  1982. extern GuiTree.onLabelChange(TreeItem item);
  1983. extern GuiTree.onItemSelected(TreeItem item);
  1984. extern GuiTree.onItemDeselected(TreeItem item);
  1985. extern Int GuiTree.getNumRootItems();
  1986. extern TreeItem GuiTree.enumRootItem(Int which);
  1987. extern GuiTree.jumpToNext(Int c);
  1988. extern GuiTree.ensureItemVisible(TreeItem item);
  1989. extern Int GuiTree.getContentsWidth();
  1990. extern Int GuiTree.getContentsHeight();
  1991. extern TreeItem GuiTree.addTreeItem(TreeItem item, TreeItem par, Int sorted, Int haschildtab);
  1992. extern Int GuiTree.removeTreeItem(TreeItem item);
  1993. extern GuiTree.moveTreeItem(TreeItem item, TreeItem newparent);
  1994. extern GuiTree.deleteAllItems();
  1995. extern Int GuiTree.expandItem(TreeItem item);
  1996. extern GuiTree.expandItemDeferred(TreeItem item);
  1997. extern Int GuiTree.collapseItem(TreeItem item);
  1998. extern GuiTree.collapseItemDeferred(TreeItem item);
  1999. extern GuiTree.selectItem(TreeItem item);
  2000. extern GuiTree.selectItemDeferred(TreeItem item);
  2001. extern GuiTree.delItemDeferred(TreeItem item);
  2002. extern GuiTree.hiliteItem(TreeItem item);
  2003. extern GuiTree.unhiliteItem(TreeItem item);
  2004. extern TreeItem GuiTree.getCurItem();
  2005. extern TreeItem GuiTree.hitTest(Int x, Int y);
  2006. extern GuiTree.editItemLabel(TreeItem item);
  2007. extern GuiTree.cancelEditLabel(Int destroyit);
  2008. extern GuiTree.setAutoEdit(Int ae);
  2009. extern Int GuiTree.getAutoEdit();
  2010. extern TreeItem GuiTree.getByLabel(TreeItem item, String name);
  2011. extern GuiTree.setSorted(Int dosort);
  2012. extern Int GuiTree.getSorted();
  2013. extern GuiTree.sortTreeItems();
  2014. extern TreeItem GuiTree.getSibling(TreeItem item);
  2015. extern GuiTree.setAutoCollapse(Int doautocollapse);
  2016. extern Int GuiTree.setFontSize(Int newsize);
  2017. extern Int GuiTree.getFontSize();
  2018. extern Int GuiTree.getNumVisibleChildItems(TreeItem c);
  2019. extern Int GuiTree.getNumVisibleItems();
  2020. extern TreeItem GuiTree.enumVisibleItems(Int n);
  2021. extern TreeItem GuiTree.enumVisibleChildItems(TreeItem c, Int n);
  2022. extern TreeItem GuiTree.enumAllItems(Int n);
  2023. extern Int GuiTree.getItemRectX(TreeItem item);
  2024. extern Int GuiTree.getItemRectY(TreeItem item);
  2025. extern Int GuiTree.getItemRectW(TreeItem item);
  2026. extern Int GuiTree.getItemRectH(TreeItem item);
  2027. // extern TreeItem GuiTree.getItemFromPoint(Int x, Int y);
  2028. // TreeItem
  2029. extern Int TreeItem.getNumChildren();
  2030. extern TreeItem.setLabel(String label);
  2031. extern String TreeItem.getLabel();
  2032. extern TreeItem.ensureVisible();
  2033. extern TreeItem TreeItem.getNthChild(Int nth);
  2034. extern TreeItem TreeItem.getChild();
  2035. extern TreeItem TreeItem.getChildSibling(TreeItem _item);
  2036. extern TreeItem TreeItem.getSibling();
  2037. extern TreeItem TreeItem.getParent();
  2038. extern TreeItem.editLabel();
  2039. extern Int TreeItem.hasSubItems();
  2040. extern TreeItem.setSorted(Int issorted);
  2041. extern TreeItem.setChildTab(Int haschildtab);
  2042. extern Int TreeItem.isSorted();
  2043. extern Int TreeItem.isCollapsed();
  2044. extern Int TreeItem.isExpanded();
  2045. extern TreeItem.invalidate();
  2046. extern Int TreeItem.isSelected();
  2047. extern Int TreeItem.isHilited();
  2048. extern TreeItem.setHilited(Int ishilited);
  2049. extern Int TreeItem.collapse();
  2050. extern Int TreeItem.expand();
  2051. extern GuiTree TreeItem.getTree();
  2052. // return 1 to override default behaviour of stuff.
  2053. extern TreeItem.onTreeAdd();
  2054. extern TreeItem.onTreeRemove();
  2055. extern TreeItem.onSelect();
  2056. extern TreeItem.onDeselect();
  2057. extern Int TreeItem.onLeftDoubleClick();
  2058. extern Int TreeItem.onRightDoubleClick();
  2059. extern Int TreeItem.onChar(Int key);
  2060. extern TreeItem.onExpand();
  2061. extern TreeItem.onCollapse();
  2062. extern Int TreeItem.onBeginLabelEdit();
  2063. extern Int TreeItem.onEndLabelEdit(String newlabel);
  2064. extern Int TreeItem.onContextMenu(Int x, Int y);
  2065. // MenuButton
  2066. deprecated extern MenuButton.onOpenMenu();
  2067. deprecated extern MenuButton.onCloseMenu();
  2068. deprecated extern MenuButton.onSelectItem(String item);
  2069. deprecated extern MenuButton.openMenu();
  2070. deprecated extern MenuButton.closeMenu();
  2071. // CheckBox
  2072. extern CheckBox.onToggle(int newstate);
  2073. extern CheckBox.setChecked(int checked);
  2074. extern Int CheckBox.isChecked();
  2075. extern CheckBox.setText(String txt);
  2076. extern String CheckBox.getText();
  2077. // Form
  2078. deprecated extern Int Form.getContentsHeight();
  2079. deprecated extern Form.newCell(String groupname);
  2080. deprecated extern Form.nextRow();
  2081. deprecated extern Form.deleteAll();
  2082. // ComponentBucket
  2083. extern Int ComponentBucket.getMaxHeight(); // for vertical compbucks
  2084. extern Int ComponentBucket.getMaxWidth(); // for horizontal compbucks
  2085. extern Int ComponentBucket.setScroll(int x);
  2086. extern Int ComponentBucket.getScroll();
  2087. extern Int ComponentBucket.getNumChildren();
  2088. extern GuiObject ComponentBucket.enumChildren(int n);
  2089. // Frame (Requires 5.5)
  2090. extern Int Frame.getPosition();
  2091. extern Frame.setPosition(Int position);
  2092. extern Frame.onSetPosition(Int position);
  2093. // Menu (Requires 5.52)
  2094. extern Menu.setMenuGroup(String groupId);
  2095. extern String Menu.getMenuGroup();
  2096. extern Menu.setMenu(String menuId);
  2097. extern String Menu.getMenu();
  2098. extern Menu.spawnMenu(int monitor); // monitor can be 1 or 0 - default 1. 0 doesn't trigger some keyboard timers...
  2099. extern Menu.cancelMenu();
  2100. extern Menu.setNormalId(String id);
  2101. extern Menu.setDownId(String id);
  2102. extern Menu.setHoverId(String id);
  2103. extern Menu.onOpenMenu();
  2104. extern Menu.onCloseMenu();
  2105. extern Menu.nextMenu();
  2106. extern Menu.previousMenu();
  2107. // predecl system symbols
  2108. .CODE
  2109. // This function is called by System.onScriptLoaded() as the first thing it does. Subsequent events check
  2110. // __deprecated_runtime before continuing. If you have no System.onScriptLoaded(), you will have no version check.
  2111. // This is to ensure that runtimes that do not have stack protection (that is wa3, wa5 and wa5.01) do
  2112. // not crash when trying to unexisting functions (with parameters, since parameterless functions would
  2113. // not crash), that is, functions that are meant for a higher version number than that of the runtime
  2114. // the script is running on.
  2115. Function Int versionCheck();
  2116. Int versionCheck() {
  2117. Double v = getRuntimeVersion();
  2118. if (v < VCPU_VERSION || v > 65535) {
  2119. __deprecated_runtime = 1;
  2120. int last = getPrivateInt(getSkinName(), "runtimecheck", 0);
  2121. int now = getTimeOfDay();
  2122. if (now - last < 5000 && last < now) return 0;
  2123. setPrivateInt(getSkinName(), "runtimecheck", getTimeOfDay());
  2124. messageBox("This script requires " + MC_TARGET, "Error", 1, "");
  2125. return 0;
  2126. }
  2127. return 1;
  2128. }
  2129. // begin protecting the stack, anything below this requires a getRuntimeVersion() >= 1 and <= 65535
  2130. .STACKPROT
  2131. /*---------------*/
  2132. Function debug(string s);
  2133. debug(string s) { messagebox(s, "DEBUG", 0, ""); }
  2134. Function debugInt(int s);
  2135. debugInt(int s) { messagebox(integerToString(s), "DEBUG", 0, ""); }
  2136. #endif