*/}}

la_interface.h 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585
  1. /*
  2. * LaGUI: A graphical application framework.
  3. * Copyright (C) 2022-2023 Wu Yiming
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #pragma once
  19. #ifdef LA_USE_GLES
  20. #include <EGL/egl.h>
  21. #include <GL/gl.h>
  22. #else
  23. #include <GL/glew.h>
  24. #include <GL/gl.h>
  25. #endif
  26. #ifdef __linux__
  27. #include <X11/Xlib.h>
  28. #include <X11/Xutil.h>
  29. #include <X11/Xresource.h>
  30. #include <X11/Xlocale.h>
  31. #include <X11/XKBlib.h>
  32. #include <X11/Xatom.h>
  33. #include <GL/glx.h>
  34. #include <GL/glext.h>
  35. #endif
  36. #ifdef _WIN32
  37. #include <GL/wglew.h>
  38. #endif
  39. #include "la_5.h"
  40. #include "la_data.h"
  41. //#include "llvm-c/Analysis.h"
  42. //#include "llvm-c/BitWriter.h"
  43. //#include "llvm-c/Core.h"
  44. //#include "llvm-c/ExecutionEngine.h"
  45. //#include "llvm-c/Target.h"
  46. //#include <Windows.h>
  47. #define LA_VERSION_MAIN 5
  48. #define LA_VERSION_SUB 3
  49. #define LA_ACTUATOR_CAPABILITY_MAIN 5
  50. #define LA_ACTUATOR_CAPABILITY_SUB 0
  51. #define LA_NODE_MAIN_MODULE_NAME "LA_NODE_MAIN_MODULE"
  52. #define LA_GUI_WNDCLASS_NAME "LA_WINDOW_CLASS"
  53. #define LA_ARROW 0
  54. #define LA_CROSS 1
  55. #define LA_LEFT_AND_RIGHT 2
  56. #define LA_UP_AND_DOWN 3
  57. #define LA_HAND 4
  58. #define LA_MOVE 5
  59. #define LA_CORNER 6
  60. #define EVT_WND_MOVE -1
  61. #define EVT_WND_SIZE_BEGIN -2
  62. #define EVT_WND_SIZE_FINISH -3
  63. #define EVT_WND_SIZE -4
  64. #define EVT_WND_SHOW -5
  65. #define EVT_FEEDBACK 8192
  66. #define LA_KEYBOARD_EVENT (1<<0)
  67. #define LA_MOUSE_EVENT (1<<1)
  68. #define LA_STATE_MOVE (1<<2)
  69. #define LA_STATE_DOWN (1<<3)
  70. #define LA_STATE_UP (1<<4)
  71. #define LA_TIME_EVENT (1<<5)
  72. #define LA_TIME_IDLE (LA_TIME_EVENT|(1<<6))
  73. #define LA_TIME_DELAY (LA_TIME_EVENT|(1<<7))
  74. #define LA_KEY_MOUSE_LEFT (1<<8)
  75. #define LA_KEY_MOUSE_MIDDLE (1<<9)
  76. #define LA_KEY_MOUSE_RIGHT (1<<10)
  77. #define LA_KEY_MOUSE_SCROLL (1<<11)
  78. #define LA_KEY_BACKSPACE (1<<12)
  79. #define LA_KEY_ESCAPE (1<<13)
  80. #define LA_KEY_ENTER (1<<14)
  81. #define LA_INPUT (1<<15)
  82. #define LA_KEY_ARRLEFT (1<<16)
  83. #define LA_KEY_ARRRIGHT (1<<17)
  84. #define LA_KEY_ARRUP (1<<18)
  85. #define LA_KEY_ARRDOWN (1<<19)
  86. #define LA_KEY_SHIFT (1<<20)
  87. #define LA_KEY_CTRL (1<<21)
  88. #define LA_KEY_ALT (1<<22)
  89. #define LA_KEY_DELETE (1<<23)
  90. #define LA_KEY_TAB (1<<24)
  91. #ifdef _WIN32
  92. #define XK_F1 1
  93. #define XK_F2 2
  94. #define XK_F3 3
  95. #define XK_F4 4
  96. #define XK_F5 5
  97. #define XK_F6 6
  98. #define XK_F7 7
  99. #define XK_F8 8
  100. #define XK_F9 9
  101. #define XK_F10 10
  102. #define XK_F11 11
  103. #define XK_F12 12
  104. #endif
  105. #define LA_KEY_F1 XK_F1
  106. #define LA_KEY_F2 XK_F2
  107. #define LA_KEY_F3 XK_F3
  108. #define LA_KEY_F4 XK_F4
  109. #define LA_KEY_F5 XK_F5
  110. #define LA_KEY_F6 XK_F6
  111. #define LA_KEY_F7 XK_F7
  112. #define LA_KEY_F8 XK_F8
  113. #define LA_KEY_F9 XK_F9
  114. #define LA_KEY_F10 XK_F10
  115. #define LA_KEY_F11 XK_F11
  116. #define LA_KEY_F12 XK_F12
  117. #define LA_KEY_SPECIALS (LA_KEY_CTRL|LA_KEY_SHIFT|LA_KEY_ALT)
  118. #define LA_MOUSEMOVE (LA_MOUSE_EVENT | LA_STATE_MOVE)
  119. #define LA_EMPTY LA_MOUSEMOVE
  120. #define LA_MOUSEDOWN (LA_MOUSE_EVENT | LA_STATE_DOWN)
  121. #define LA_MOUSEUP (LA_MOUSE_EVENT | LA_STATE_UP)
  122. #define LA_WHEEL (LA_MOUSE_EVENT | LA_KEY_MOUSE_SCROLL)
  123. #define LA_L_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_LEFT)
  124. #define LA_L_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_LEFT)
  125. #define LA_M_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_MIDDLE)
  126. #define LA_M_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_MIDDLE)
  127. #define LA_R_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_RIGHT)
  128. #define LA_R_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_RIGHT)
  129. #define LA_MOUSE_WHEEL_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_SCROLL)
  130. #define LA_MOUSE_WHEEL_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_SCROLL)
  131. #define LA_KEY_DOWN (LA_KEYBOARD_EVENT | LA_STATE_DOWN)
  132. #define LA_KEY_UP (LA_KEYBOARD_EVENT | LA_STATE_UP)
  133. #define LA_LEFT_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRLEFT | LA_STATE_DOWN)
  134. #define LA_RIGHT_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRRIGHT | LA_STATE_DOWN)
  135. #define LA_UP_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRUP | LA_STATE_DOWN)
  136. #define LA_DOWN_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRDOWN | LA_STATE_DOWN)
  137. #define LA_LEFT_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRLEFT | LA_STATE_UP)
  138. #define LA_RIGHT_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRRIGHT | LA_STATE_UP)
  139. #define LA_UP_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRUP | LA_STATE_UP)
  140. #define LA_DOWN_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRDOWN | LA_STATE_UP)
  141. #define LA_BACKSPACE_DOWN (LA_KEYBOARD_EVENT | LA_KEY_BACKSPACE | LA_STATE_DOWN)
  142. #define LA_BACKSPACE_UP (LA_KEYBOARD_EVENT | LA_KEY_BACKSPACE | LA_STATE_UP)
  143. #define LA_ESCAPE_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ESCAPE | LA_STATE_DOWN)
  144. #define LA_ESCAPE_UP (LA_KEYBOARD_EVENT | LA_KEY_ESCAPE | LA_STATE_UP)
  145. #define LA_ENTER_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ENTER | LA_STATE_DOWN)
  146. #define LA_ENTER_UP (LA_KEYBOARD_EVENT | LA_KEY_ENTER | LA_STATE_UP)
  147. #define LA_ONLY_BITS_AND(orig, yours) \
  148. ((orig & yours) == yours)
  149. NEED_STRUCTURE(laUiList);
  150. NEED_STRUCTURE(laUiItem);
  151. NEED_STRUCTURE(laColumn);
  152. typedef void (*laUiDrawFunc)(void *, int); //Instance,Theme
  153. typedef void (*laPanelDrawFunc)(void *, void *, void *); //SYSWINDOW,Instance,Theme
  154. //typedef void(*laUiDefineFunc)(laUiList*,laPropPack*,laPropPack*,laColumn*);//uil,collection inst+"This" inst,actuator inst,Extra column list.
  155. typedef void (*laOperatorArgumentParserFunc)(laStringSplitor *, uint32_t *, char *); //icon id,display string buf
  156. typedef int (*laUiGetHeightFunc)(laUiItem *);
  157. typedef int (*laUiGetMinWidthFunc)(laUiItem *);
  158. typedef int (*laUiConditionFunc)(laPropPack *); //maybe inst+actuator,replaceInst
  159. typedef void (*laUiDestroyFunc)(laUiItem *);
  160. typedef void (*laUiInitFunc)(laUiItem *);
  161. typedef void (*laUiRefreshFunc)(laUiItem *);
  162. typedef void (*laLayoutBkgDrawFunc)(void *, void *l);
  163. typedef void (*laPreFrameF)();
  164. typedef void (*laPreDrawF)();
  165. typedef void (*laPostFrameF)();
  166. typedef void (*laCleanupF)();
  167. STRUCTURE(laEvent){
  168. laListItem Item;
  169. laWindow* window;
  170. int type;
  171. int state;
  172. int x, y;
  173. int key;
  174. int SpecialKeyBit;
  175. int p1, p2;
  176. uint32_t Input;
  177. int GoodPressure,IsEraser,HasTwist;
  178. real Pressure,Orientation,Deviation,Twist;
  179. void *Localized;
  180. };
  181. typedef int (*laInputProcessF)(laEvent* e);
  182. NEED_STRUCTURE(laWindow)
  183. NEED_STRUCTURE(laRoot)
  184. NEED_STRUCTURE(laPanel)
  185. NEED_STRUCTURE(laUiItem)
  186. NEED_STRUCTURE(laUiList)
  187. NEED_STRUCTURE(laAnimationAction)
  188. NEED_STRUCTURE(laUiDescriptor)
  189. NEED_STRUCTURE(laUiConditionNode)
  190. STRUCTURE(laSharedTypeItem){
  191. laListItem Item;
  192. char ID[64];
  193. void *Pointer;
  194. };
  195. NEED_STRUCTURE(laTranslation);
  196. NEED_STRUCTURE(laTheme);
  197. STRUCTURE(laKeyMapper){
  198. laListItem Item;//unused;
  199. laListHandle Items;
  200. };
  201. STRUCTURE(laLogEntry){
  202. laListItem Item;
  203. laSafeString* Content;
  204. int Type;
  205. };
  206. NEED_STRUCTURE(laManagedUDF);
  207. STRUCTURE(laNodeOutSocket){
  208. void* Data;
  209. void* Parent;
  210. laSafeString* Label;
  211. int DataType, ArrLen;
  212. int RuntimeX, RuntimeY, RuntimePX, RuntimePY;
  213. void* Duplicated;
  214. };
  215. STRUCTURE(laNodeInSocket){
  216. laNodeOutSocket* Source;
  217. laSafeString* Label;
  218. int DataType, ArrLen; int ColorId;
  219. int RuntimeX, RuntimeY, RuntimePX, RuntimePY;
  220. };
  221. NEED_STRUCTURE(laBaseNodeType);
  222. NEED_STRUCTURE(laRackPage);
  223. NEED_STRUCTURE(laNodeCategory);
  224. STRUCTURE(laRackPageCollection){
  225. laRackPage* CurrentPage;
  226. laListHandle Pages;
  227. };
  228. typedef laBaseNodeType* (*laGetBaseNodeTypeF)(char* str);
  229. NEED_STRUCTURE(laConfirmData);
  230. STRUCTURE(laExtraPreferencePage){
  231. laListItem Item;
  232. const char* Name;
  233. laUiDefineFunc Func;
  234. };
  235. STRUCTURE(laProgressDisplay){
  236. char String[256];
  237. SYSWINDOW w;
  238. #ifdef __linux__
  239. GC gc;
  240. XGCValues gc_values;
  241. #endif
  242. #ifdef _WIN32
  243. HBRUSH brush_bg;
  244. HBRUSH brush_fg;
  245. HPEN pen_fg;
  246. HDC hdc;
  247. #endif
  248. laTimeRecorder TimeCalled;
  249. real p1,p2;
  250. int Called,Shown;
  251. };
  252. STRUCTURE(laInitArguments){
  253. int GLMajor,GLMinor,BufferSamples;
  254. int UseColorManagement;
  255. int HasWorldObjects;
  256. int HasAction;
  257. int HasTextureInspector;
  258. int HasHistories;
  259. int HasTerminal;
  260. int HasAudio;
  261. int GLDebug;
  262. int EnableLogStdOut;
  263. };
  264. NEED_STRUCTURE(laAnimation);
  265. NEED_STRUCTURE(laAudio);
  266. NEED_STRUCTURE(laInputMappingBundle);
  267. STRUCTURE(LA){
  268. laListItem Hyper;
  269. laListHandle Logs;
  270. char* TerminalInput[512];
  271. laListHandle TerminalHistories;
  272. int TerminalIncomplete;
  273. int IsTerminalEnter;
  274. #ifdef LA_WITH_LUAJIT
  275. lua_State *L;
  276. #endif
  277. laListHandle Controllers; int NextControllerID;
  278. u8bit LastControllerKey, LastControllerKeyDevice, ControllerHasNewKey;
  279. u8bit LastControllerAxis, LastControllerAxisDevice, ControllerHasNewAxis;
  280. laInputProcessF InputProcess;
  281. laListHandle Windows;
  282. laListHandle WastedPanels;
  283. laListHandle Screens;
  284. int AutoSwitchColorSpace;
  285. laConfirmData *InvokeConfirmData;
  286. laPreFrameF PreFrame;
  287. laPreDrawF PreDraw;
  288. laPostFrameF PostFrame;
  289. laCleanupF Cleanup;
  290. real IdleStart, DelayStart;
  291. int DelayTriggered;
  292. int IdleTriggered;
  293. int ReTriggerOperators;
  294. laPanel* DockingPanel;
  295. char SysFontDir[512];
  296. laInitArguments InitArgs;
  297. char *InputBuf; int InputBufNext, InputBufMax;
  298. int32_t *InputBufU; int InputBufUNext, InputBufUMax;
  299. #ifdef __linux__
  300. Atom MsgDelWindow;
  301. Atom bufid;
  302. Atom fmtid;
  303. Atom propid;
  304. Atom incrid;
  305. Atom targets_atom;
  306. Atom text_atom;
  307. Atom UTF8;
  308. Atom selection;
  309. Atom wmstate,wmfullscr,wmfullscroff;
  310. #endif
  311. laSafeString* CopyPending;
  312. int GLMajor,GLMinor,BufferSamples;
  313. GLuint TempVAO;
  314. SYSTEMDISPLAY* dpy;
  315. SYSGLCONTEXT glc;
  316. #ifdef _WIN32
  317. HINSTANCE hinstance;
  318. HDC hdc;
  319. int WinTabAvailable, WinTabOpened, WinTabMaxPenPressure, WinTabMaxEraserPressure;
  320. #endif
  321. #ifdef __linux__
  322. Window* win;
  323. XVisualInfo* xvi;
  324. #ifdef LA_USE_GLES
  325. EGLConfig BestFBC;
  326. EGLDisplay egl_dpy;
  327. #else
  328. GLXFBConfig BestFBC;
  329. #endif
  330. Colormap cmap;
  331. XIM im;
  332. XIC ic;
  333. int xi_opcode;
  334. #endif
  335. int InkOrWinTab;
  336. int WacomDeviceStylus; real StylusPressure, StylusOrientation, StylusDeviation, StylusMaxPressure;
  337. int WacomDeviceEraser; real EraserPressure, EraserOrientation, EraserDeviation, EraserMaxPressure;
  338. int StylusHasTwist; real StylusTwist;
  339. int PointerIsEraser,IsPen;
  340. int evLastX,evLastY;
  341. int EnableColorManagement;
  342. int EnableLogStdOut;
  343. int EnableGLDebug;
  344. int GLDebugSync;
  345. int GLDebugLevel;
  346. int GLDebugNeedsUpdate;
  347. int CurrentCursor;
  348. laWindow *CurrentWindow;
  349. laPanel *CurrentPanel;
  350. laListHandle DeferredRedrawList;
  351. laProgressDisplay Progress;
  352. laAudio* Audio;
  353. int InitDone;
  354. int IsReadingUDF;
  355. int SavePreferenceOnExit;
  356. laKeyMapper KeyMap;
  357. laHash256 OperatorTypeHash;
  358. //laHash256 CustomCommandHash;
  359. laSafeString* SignalFilter;
  360. laListHandle CustomSignals;
  361. laListHandle ExtraExtensions;
  362. laListHandle ExtraPreferencePaths;
  363. laListHandle ExtraPreferencePages;
  364. laUiDefineFunc PreferencePageDisplay;
  365. laUiDefineFunc PreferencePageInput;
  366. laUiDefineFunc PreferencePageResource;
  367. laUiDefineFunc PreferencePageTheme;
  368. laPropContainer *GeneralIntSub;
  369. laPropContainer *GeneralFloatSub;
  370. laPropContainer *GeneralEnumSub;
  371. laPropContainer *GeneralIntArraySub;
  372. laPropContainer *GeneralFloatArraySub;
  373. laPropContainer *GeneralEnumArraySub;
  374. laPropContainer *GeneralStringSub;
  375. laPropContainer *GeneralOperatorSub;
  376. laPropContainer *GeneralCollectionSub;
  377. laPropContainer *GeneralRawSub;
  378. laPropContainer *ContainerInt;
  379. laPropContainer *ContainerFloat;
  380. laPropContainer *ContainerEnum;
  381. laPropContainer *ContainerString;
  382. laPropContainer *ContainerOperator;
  383. laPropContainer *ContainerCollection;
  384. laPropContainer *_CONTAINER_SETTING;
  385. laProp *_PROP_SETTING;
  386. laPropContainer *_CONTAINER_SETTING_PROPAGATE_TO;
  387. void *_CONTAINER_SETTING_INSTANCE;
  388. laListHandle PropContainers;
  389. laRoot DataRoot;
  390. laPanel *PropMatcherContextP;
  391. laPanel* PendingSplash;
  392. laTheme* CurrentTheme;
  393. laListHandle Themes;
  394. laListHandle UiTypes;
  395. laListHandle InitPanelTemplates;
  396. laListHandle PanelTemplates;
  397. laListHandle View2DTemplates;
  398. laUiDefineFunc MenuButtons;
  399. laUiDefineFunc MenuExtras;
  400. laUiDefineFunc AboutContent;
  401. laUiDefineFunc AboutVersion;
  402. laUiDefineFunc AboutAuthor;
  403. const char* MenuProgramName;
  404. laHash256 GlobalMemPool;
  405. int ByteCount;
  406. int TotalByteCount;
  407. laHash65536* DBInstMemLeft;// list item pointers
  408. laHash65536 DBInst2;
  409. laHash65536 DBInst1;
  410. laHash65536 PtrSync;
  411. laListHandle PtrSyncAddressCommands;
  412. laListHandle PtrSyncHyper2Commands;
  413. laListHandle PostReadNodes;
  414. laListHandle RenewHyper2s;
  415. laListHandle SharedTypePointerSync;
  416. laListHandle PendingResourceRequests;
  417. laListHandle ResourceFolders;
  418. laListHandle ResourceRegistries;
  419. laListHandle UDFResources;
  420. laListHandle ManagedUDFs;
  421. laListHandle ManagedSaveProps;
  422. laManagedUDF* DummyManageUDF;
  423. laManagedUDF* DummyManageUDFSingle;
  424. laManagedUDF* DummyManageUDFSingleForce;
  425. int ManagerDefaultView;
  426. int SetUDFPending;
  427. laPropContainer* SaverDummyContainer;
  428. laListHandle DBInstPendingAcquireDBP;
  429. laListHandle DBInstPendingAcquireDiffCMD;
  430. laListHandle DiffTouched;
  431. laListHandle Differences;
  432. laDiff* HeadDifference;
  433. laDBInst RootDBInst;
  434. laListHandle DBRecordedProps;
  435. laHash65536* DBInstLink;
  436. laDiffPushEverythingF PushEverything;
  437. laAnimation* Animation;
  438. real FontSize;
  439. real MarginSize;
  440. int UiRowHeight;
  441. int ScaledUiRowHeight;
  442. real UiScale;
  443. void *ToPanel;
  444. int NextX, NextY, NextW, NextH;
  445. laNodeInSocket* tNodeIn;
  446. laNodeOutSocket* tNodeOut;
  447. laAuthorInfo Author;
  448. laListHandle ExternalAuthors;
  449. laSafeString *WorkingDirectory;
  450. //SYSLOCK csNotifier;
  451. laListHandle ThreadNotifiers;
  452. //preference:
  453. laInputMappingBundle* InputMapping;
  454. //color
  455. real ColorPickerGamma;
  456. real ViewportHalftoneFactor;
  457. real ViewportHalftoneSize;
  458. int NextWireColor, WireColorSlices;
  459. real WireThickness;
  460. real WireSaggyness;
  461. real* WireColorCache;
  462. //user interactions:
  463. int TopFramerate;
  464. int ValuatorThreshold;
  465. int ScrollingSpeed;
  466. int TooltipCloseDistance;
  467. real ZoomSpeed2D;
  468. real IdleTime;
  469. real DelayTime;
  470. //translations:
  471. laTranslation Translation;
  472. //display:
  473. real FloatingAlpha;
  474. int SolidShadowLength;
  475. int EnableAnimation;
  476. real AnimationSpeed;
  477. real PanelAnimationSpeed;
  478. int PanelMultisample;
  479. real LastFrameTime;
  480. real TimeAccum;
  481. //animation:
  482. int DefaultKeyFrameMode;
  483. //laThemeColor *ConditionStackColors[6];
  484. laUDFContentNode TEST_Link;
  485. laListHandle MediaFiles;
  486. int GraphNeedsRebuild; // current mechanism only allows global.
  487. int InputNeedsEval;
  488. laListHandle NodeCategories;
  489. laNodeCategory* CurrentNodeCategory;
  490. int FilterNodeCategory;
  491. laBaseNodeType** NodeTypes; int NodeTypeNext, NodeTypeMax;
  492. laUiDefineFunc ExtraAddInputNodes;
  493. laUiDefineFunc ExtraAddDriverNodes;
  494. laGetBaseNodeTypeF ExtraGetInputNodeType;
  495. laGetBaseNodeTypeF ExtraGetDriverNodeType;
  496. //laHash256 RootNodes;
  497. //LLVMContextRef llvmContext;
  498. //LLVMModuleRef llvmModule;
  499. //SYSLOCK csMediaPlay;
  500. int DetachedViewSwitch;
  501. int example_int;
  502. laSafeString* example_string;
  503. };
  504. #define LA_KM_SEL_UI_EXTRA 1
  505. #define LA_KM_SEL_PANEL 2
  506. STRUCTURE(laKeyMapItem){
  507. laListItem Item;
  508. int SpecialKeyBits;
  509. int EventType;
  510. int Key;
  511. char SelectBase;
  512. laPropPack Base;
  513. laPropPack Action;
  514. laSafeString *Operation;
  515. laSafeString *Instructions;
  516. };
  517. STRUCTURE(laScreen){
  518. laListItem Item;
  519. laSafeString* Name;
  520. laSafeString* Description;
  521. int RoughDPI;
  522. int ColorSpace;
  523. int x,y,w,h;
  524. };
  525. NEED_STRUCTURE(laLayout);
  526. NEED_STRUCTURE(laBlock);
  527. NEED_STRUCTURE(laPanel);
  528. NEED_STRUCTURE(laUiItem);
  529. STRUCTURE(laWindow){
  530. laListItem Item;
  531. SYSWINDOW* win;
  532. SYSGLCONTEXT glc;
  533. #ifdef LA_USE_GLES
  534. EGLSurface egl_surf;
  535. #endif
  536. int GLDebugNeedsUpdate;
  537. GLuint vao;
  538. struct NVGcontext* nvg;
  539. #ifdef _WIN32
  540. HDC hdc;
  541. #endif
  542. int X,Y,W,H;
  543. int CW,CH;
  544. int Activated;
  545. int Shown;
  546. int IsDocking;
  547. int OutputColorSpace;
  548. int OutputShowStripes;
  549. int UseComposing; real ComposingGamma,ComposingBlackpoint;
  550. int IsFullScreen;
  551. int Redraw;
  552. int RedrawTouched;
  553. laPropPack PP;
  554. laPropStep FakePS;
  555. laSafeString *Title;
  556. laWindow* DockingFrom;
  557. laListHandle EventList;
  558. laSafeString *OperatorHints;
  559. laListHandle Layouts;
  560. laLayout *CurrentLayout;
  561. laBlock *MaximizedBlock;
  562. laPanel *MaximizedUiPanel;
  563. laUiItem *MaximizedUi;
  564. laListHandle Panels;
  565. laListHandle FadingPanels;
  566. laListHandle Operators;
  567. laListHandle PendingOperators;
  568. laUiDrawFunc Draw;
  569. };
  570. STRUCTURE(laBlock){
  571. int X, Y, W, H;
  572. laBlock *B1;
  573. laBlock *B2;
  574. laBlock *parent;
  575. laPanel *CurrentPanel;
  576. laListHandle Panels;
  577. int Vertical;
  578. int Folded;
  579. real SplitRatio; // From Left/Top;
  580. laPropPack PP;
  581. laPropPack FakePS;
  582. int OnButton;
  583. };
  584. #define LA_BLOCK_DROP_LOCATION_L 1
  585. #define LA_BLOCK_DROP_LOCATION_R 2
  586. #define LA_BLOCK_DROP_LOCATION_U 3
  587. #define LA_BLOCK_DROP_LOCATION_B 4
  588. STRUCTURE(laLayout){
  589. laListItem Item;
  590. laBlock *OperatingBlock;
  591. laBlock *FirstBlock;
  592. laBlock *MovingBlock;
  593. int IsMoving;
  594. laPanel *ClickedPanel;
  595. laBlock *DropToBlock;
  596. laBlock *OnBlockSeperator;
  597. char DropLocation;
  598. laSafeString *ID;
  599. laLayoutBkgDrawFunc Draw;
  600. };
  601. STRUCTURE(laUiList){
  602. laListItem Item;
  603. int L, R, U, B;
  604. int TL, TR, TU, TB;
  605. real PanX, PanY; //Pan Up/Left Is Positive
  606. laListHandle UiItems;
  607. laListHandle Columns;
  608. laListHandle *ShareColumns;
  609. laSafeString *TabName;
  610. char *Instance;
  611. short HeightCoeff;
  612. char ScrollerShownV;
  613. char ScrollerShownH;
  614. uint32_t IconID;
  615. int AllowScale;
  616. real Scale; real SaveScale;
  617. };
  618. STRUCTURE(laUiListRecord){
  619. laListItem Item;
  620. laUiList* uil;
  621. laUiItem* pui;
  622. };
  623. STRUCTURE(laColumn){
  624. laListItem Item;
  625. real PreWidth;
  626. real SP;
  627. int IL, IR;
  628. laColumn *Top;
  629. int MaxW;
  630. int B;
  631. laColumn *LS, *RS;
  632. laColumn *CopyRef;
  633. };
  634. STRUCTURE(laUiListDraw){
  635. laListHandle Items;
  636. laListHandle SocketRecord;
  637. laUiList* WiresContainer;
  638. };
  639. STRUCTURE(laUiListDrawItem){
  640. laListItem Item;
  641. laUiList *Target;
  642. int L, R, U, B, XP, YP, DifX, DifY;
  643. int ExtraPanX;
  644. real Scale;
  645. };
  646. STRUCTURE(laBoxedTheme){
  647. laListItem Item;
  648. laSafeString *Name;
  649. real NormalY, Normal[4], Inactive[4];
  650. real ActiveY, Active[4];
  651. real BorderY, Border[4];
  652. real TextY, Text[4];
  653. real TextActiveY, TextActive[4], TextInactive[4];
  654. real Alpha;
  655. int TextAlign;
  656. int Margins[4];
  657. int Paddings[4];
  658. //Don't change order
  659. int LM, RM, TM, BM;
  660. int LP, RP, TP, BP;
  661. laBoxedTheme **BackRef;
  662. laTheme* Parent;
  663. };
  664. STRUCTURE(laSocketRecord){
  665. laListItem Item;
  666. laNodeInSocket* In;
  667. laNodeOutSocket* Out;
  668. };
  669. extern laPropContainer* LA_PC_SOCKET_IN;
  670. extern laPropContainer* LA_PC_SOCKET_OUT;
  671. extern laPropContainer* LA_PC_MAPPER;
  672. extern laPropContainer* LA_PROP_SOCKET_SOURCE;
  673. extern laPropContainer* LA_PROP_SOCKET_OUT;
  674. extern laPropContainer* LA_PC_RACK_PAGE;
  675. extern laProp* LA_PROP_CONTROLLER;
  676. #define LA_UI_NORMAL 0
  677. #define LA_UI_ACTIVE (1<<0)
  678. #define LA_UI_EDITING (1<<1)
  679. #define LA_UI_DISABLED (1<<8)
  680. #define LA_BT_NORMAL LA_UI_NORMAL
  681. #define LA_BT_ACTIVE LA_UI_ACTIVE
  682. #define LA_BT_BORDER (1<<6)
  683. #define LA_BT_TEXT (1<<7)
  684. #define LA_BT_TEXT_NORMAL (LA_BT_TEXT|LA_UI_NORMAL)
  685. #define LA_BT_TEXT_ACTIVE (LA_BT_TEXT|LA_UI_ACTIVE)
  686. #define LA_BT_DISABLED LA_UI_DISABLED
  687. #define LA_BT_VERTEX (1<<8)
  688. #define LA_BT_EDGE (1<<9)
  689. #define LA_BT_FACE (1<<10)
  690. #define LA_BT_SELECTED (1<<11)
  691. #define LA_BT_SVERTEX (LA_BT_VERTEX|LA_BT_SELECTED)
  692. #define LA_BT_SEDGE (LA_BT_EDGE|LA_BT_SELECTED)
  693. #define LA_BT_SFACE (LA_BT_FACE|LA_BT_SELECTED)
  694. #define LA_UI_TAG_IS_OFFSCREEN (1<<0)
  695. #define LA_UI_TAG_CAVANS_SCALED (1<<1)
  696. #define LA_UI_TAG_NEED_REBUILD (LA_UI_TAG_IS_OFFSCREEN | LA_UI_TAG_CAVANS_SCALED)
  697. #define LA_UI_TAG_SCISSOR (1<<2)
  698. STRUCTURE(laTheme){
  699. laListItem Item;
  700. laSafeString *Name;
  701. laSafeString *Author;
  702. laListHandle Colors;
  703. laListHandle BoxedThemes;
  704. int abc;
  705. //
  706. real ColorBkg[4];
  707. real Color[4];
  708. real AccentColor[4];
  709. real SelectionColor[4];
  710. real CursorColor[4];
  711. real InactiveMix;
  712. real InactiveSaturation;
  713. real CursorAlpha;
  714. real SelectionAlpha;
  715. real WireSaturation;
  716. real WireTransparency;
  717. real WireBrightness;
  718. real VertexColor[4];
  719. real EdgeColor[4];
  720. real SVertexColor[4];
  721. real SEdgeColor[4];
  722. real SFaceColor[4];
  723. real EdgeBrightness, EdgeTransparency;
  724. real VertexBrightness, VertexTransparency;
  725. real SelectedVertexTransparency;
  726. real SelectedEdgeTransparency;
  727. real SelectedFaceTransparency;
  728. };
  729. NEED_STRUCTURE(laOperatorType);
  730. STRUCTURE(laUiType){
  731. laListItem Item;
  732. const char *Identifier;
  733. int ForType;
  734. const char *TargetSub;
  735. //laPropStep FakePs;
  736. laSubProp* FakeProp;
  737. laPropContainer* ExtraProps;
  738. laBoxedTheme **Theme;
  739. laUiDrawFunc Draw;
  740. const char *OperatorID;
  741. laOperatorType *OperatorType;
  742. laUiGetMinWidthFunc GetMinWidth;
  743. laUiGetHeightFunc GetHeight;
  744. laUiDestroyFunc Destroy;
  745. laUiInitFunc Init;
  746. laKeyMapper KeyMapper;
  747. int Tag;
  748. };
  749. NEED_STRUCTURE(laUiItem);
  750. STRUCTURE(laGeneralUiExtraData){
  751. int LastX, LastY;
  752. int TargetIndexVali;
  753. real TargetIndexValf;
  754. int On; //On:Modifying
  755. int Dragging;
  756. laStringEdit *Edit;
  757. void *Ptr1;
  758. void *Ptr2;
  759. int HeightCoeff;
  760. laUiItem* ui;
  761. };
  762. STRUCTURE(laMultiStringExtra){
  763. laGeneralUiExtraData* general;
  764. int PanX, PanY;
  765. };
  766. NEED_STRUCTURE(laCanvasExtra);
  767. STRUCTURE(la3DObjectDrawExtra){
  768. int DisplayMode;
  769. int MeshEditType;
  770. tnsMatrix44d mViewProj;
  771. int W,H,Is3D;
  772. real PointScale;
  773. };
  774. typedef void(*laCanvasDrawFunc)(laBoxedTheme* bt, void* DataInstance, laCanvasExtra* Extra);
  775. typedef int (*laModalFunc)(laOperator *, laEvent *);
  776. STRUCTURE(laCanvasTemplate){
  777. laListItem Item;
  778. laSafeString *Identifier;
  779. laCanvasDrawFunc Draw;
  780. laUiDrawFunc SecondDraw;
  781. laKeyMapper KeyMapper;
  782. char *TargetContainerID;
  783. laPropContainer *TargetContainer;
  784. laPropContainer *ExtraProps;
  785. laSubProp *FakeProp;
  786. laModalFunc ExtraModal;
  787. //float LimitYScale;
  788. laUiInitFunc Init;
  789. laUiDestroyFunc Destroy;
  790. };
  791. #define LA_CANVAS_CURSOR_CROSS 1
  792. #define LA_CANVAS_CURSOR_BOX 2
  793. #define LA_CANVAS_CURSOR_ARROW 3
  794. #define LA_CANVAS_CURSOR_X 4
  795. #define LA_CANVAS_CURSOR_Y 5
  796. #define LA_CANVAS_SELECT_MODE_VERTS 0
  797. #define LA_CANVAS_SELECT_MODE_EDGES 1
  798. //#define LA_CANVAS_SELECT_MODE_FACES 2
  799. #define LA_CANVAS_SELECT_MODE_KNIFE 3
  800. #define LA_CANVAS_SELECT_THROUGH_OFF 0
  801. #define LA_CANVAS_SELECT_THROUGH_ON 1
  802. #define LA_CANVAS_DISPLAY_SOLID 0
  803. #define LA_CANVAS_DISPLAY_MATERIAL 1
  804. void la_CanvasDefaultOverlay(laUiItem* ui, int h);
  805. void la_CanvasDrawOverlay(laUiItem *ui, int h);
  806. void la_CanvasInit(laUiItem *ui);
  807. void la_CanvasDestroy(laUiItem *ui);
  808. STRUCTURE(laCanvasExtra){
  809. laListItem Item;
  810. tnsOffscreen *OffScr;
  811. tnsOffscreen *DeferredOffScr;
  812. laUiItem *ParentUi;
  813. real ZoomX,ZoomY;
  814. real PanX,PanY;
  815. int DrawCursor;
  816. real OnX, TargetX;
  817. real OnY, TargetY;
  818. real ClickedX,ClickedY;
  819. int LW,ShowLegend,UiMode;
  820. int HeightCoeff;
  821. int ShowDetails;
  822. int ImageDrawAlpha;
  823. int ImageDrawBorder;
  824. int AdaptiveLineWidth;
  825. int LineWidthWarning;
  826. int ClearBackground;
  827. int SelectMode;
  828. int SelectThrough;
  829. int EditCenter;
  830. int DeltaMode;
  831. real BL, BR, BU, BB;
  832. int Dragging;
  833. int TargetIndexVali;
  834. //3d==========
  835. tnsOffscreen *OffScrShadow;
  836. tnsCamera *ViewingCamera; //Always create this one;
  837. tnsCamera *UsingCamera;
  838. int Layers[20];
  839. int AsPlayer;
  840. int ShowFloorGrid;
  841. int ShowAxis[3];
  842. int DisplayMode;
  843. };
  844. NEED_STRUCTURE(laUiConditionNode);
  845. STRUCTURE(laConditionUiExtraData){
  846. int a;
  847. laUiItem *EndUi;
  848. laUiItem *ElseUi;
  849. laUiConditionNode *Expression;
  850. //char Remove;
  851. char IsTrue;
  852. };
  853. STRUCTURE(laUiTemplate){
  854. laListItem Item;
  855. laSafeString *Title;
  856. laSafeString *Identifier;
  857. laSafeString *CategoryName;
  858. laUiDefineFunc Define;
  859. laUiDefineFunc Header;
  860. laPanelDetachedPropFunc PropFunc;
  861. int DefaultGLFormat;
  862. int DefaultW_RH,DefaultH_RH;
  863. laKeyMapper KeyMap;
  864. };
  865. #define LA_SLOT_MARKER_1 0
  866. #define LA_SLOT_MARKER_2 1
  867. #define LA_SLOT_MARKER_3 2
  868. #define LA_SLOT_MARKER_4 3
  869. STRUCTURE(laCompoundPP){
  870. laListItem Item;
  871. int Slot;
  872. laPropPack PP;
  873. };
  874. STRUCTURE(laUiItem){
  875. laListItem Item;
  876. laColumn *C;
  877. int L, R, U, B;
  878. int TL, TR, TU, TB;
  879. int AnimationDistinguish;
  880. int State; int Flags; // expand and even (in row control ui)
  881. laPropPack ExtraPP;
  882. laPropStep FakePs;
  883. laGeneralUiExtraData *Extra;
  884. short Expand;
  885. short SymbolID;
  886. laPropPack PP;
  887. laListHandle CompoundPPs;
  888. laSafeString *Display;
  889. laSafeString *ExtraInstructions;
  890. laUiType *Type;
  891. laCanvasTemplate *CanvasTemplate;
  892. laUiList *Page; // reuse as row begin ref
  893. laOperatorType *AT; //Probably share in the future;
  894. laStringSplitor *Instructions;
  895. laListHandle Subs;
  896. laUiDefineFunc Template;
  897. int TemplateContext;
  898. laListHandle SubPanels;
  899. };
  900. STRUCTURE(laWidget){
  901. laUiType* Type;
  902. int Flags;
  903. };
  904. #define LA_UI_FLAGS_TRANSPOSE (1<<0)
  905. #define LA_UI_FLAGS_EXPAND (1<<1)
  906. #define LA_UI_FLAGS_ICON (1<<2)
  907. #define LA_UI_FLAGS_CYCLE (1<<3)
  908. #define LA_UI_FLAGS_NO_DECAL (1<<4)
  909. #define LA_UI_FLAGS_NO_EVENT (1<<5)
  910. #define LA_UI_FLAGS_NO_CONFIRM (1<<6)
  911. #define LA_TEXT_ALIGN_LEFT (1<<7)
  912. #define LA_TEXT_ALIGN_RIGHT (1<<8)
  913. #define LA_TEXT_ALIGN_CENTER (1<<9)
  914. #define LA_TEXT_ALIGN_AUTO (1<<10)
  915. #define LA_TEXT_USE_NEWLINE (1<<11)
  916. #define LA_TEXT_LINE_WRAP (1<<12)
  917. #define LA_TEXT_REVERT_Y (1<<13)
  918. #define LA_TEXT_MONO (1<<14)
  919. #define LA_UI_FLAGS_PREFER_BOTTOM (1<<15)
  920. #define LA_UI_FLAGS_NO_GAP (1<<16)
  921. #define LA_UI_FLAGS_UNDERNEATH (1<<17)
  922. #define LA_UI_FLAGS_NO_HEIGHT (LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_UNDERNEATH)
  923. #define LA_UI_FLAGS_NO_OVERLAY (1<<18)
  924. #define LA_TEXT_OVERFLOW_ARROW (1<<19)
  925. #define LA_UI_FLAGS_DISABLED (1<<20)
  926. #define LA_UI_FLAGS_HIGHLIGHT (1<<21)
  927. #define LA_UI_FLAGS_NODE_CONTAINER (1<<22)
  928. #define LA_UI_COLLECTION_NO_HIGHLIGHT LA_TEXT_ALIGN_LEFT
  929. #define LA_TEXT_ONE_LINE (1<<23)
  930. #define LA_UI_FLAGS_NO_SCROLL_INACTIVE (1<<24)
  931. #define LA_UI_FLAGS_COLOR_SPACE_CLAY (1<<25)
  932. #define LA_UI_FLAGS_EXIT_WHEN_TRIGGERED LA_UI_FLAGS_COLOR_SPACE_CLAY
  933. #define LA_TEXT_LCD_16 (1<<27)
  934. #define LA_TEXT_LCD_7 (1<<28)
  935. #define LA_UI_FLAGS_NO_TOOLTIP LA_UI_FLAGS_PREFER_BOTTOM
  936. #define LA_UI_IMAGE_FULL_W LA_TEXT_MONO
  937. #define LA_UI_MIN_WIDTH LA_UI_FLAGS_COLOR_SPACE_CLAY
  938. #define LA_UI_FLAGS_NO_LABEL (1<<29)
  939. #define LA_UI_COLLECTION_SIMPLE_SELECTOR LA_UI_FLAGS_CYCLE
  940. #define LA_UI_FLAGS_INT_ICON (LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT|LA_UI_FLAGS_ICON)
  941. #define LA_UI_FLAGS_PLAIN (LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT)
  942. #define LA_TEXT_ALIGN (LA_TEXT_ALIGN_LEFT|LA_TEXT_ALIGN_CENTER|LA_TEXT_ALIGN_RIGHT|LA_TEXT_ALIGN_AUTO)
  943. #define LA_UI_FLAGS_COLORFUL LA_UI_FLAGS_ICON
  944. #define LA_UI_FLAGS_TERMINAL_INPUT LA_UI_FLAGS_COLOR_SPACE_CLAY
  945. #define LA_UI_FLAGS_IMMEDIATE_INPUT LA_UI_FLAGS_CYCLE
  946. #define LA_UI_FLAGS_MOMENTARY (LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_NODE_CONTAINER)
  947. #define LA_UI_FLAGS_KNOB LA_UI_FLAGS_NODE_CONTAINER
  948. #define LA_UI_SOCKET_LABEL_N LA_TEXT_ALIGN_LEFT
  949. #define LA_UI_SOCKET_LABEL_S LA_TEXT_ALIGN_RIGHT
  950. #define LA_UI_SOCKET_LABEL_W LA_TEXT_ALIGN_CENTER
  951. #define LA_UI_SOCKET_LABEL_E LA_TEXT_ALIGN_AUTO
  952. extern laWidget* LA_WIDGET_FIXED_GROUP;
  953. extern laWidget* LA_WIDGET_TAB;
  954. extern laWidget* LA_WIDGET_COLLECTION;
  955. extern laWidget* LA_WIDGET_COLLECTION_ITEM;
  956. extern laWidget* LA_WIDGET_COLLECTION_SELECTOR;
  957. extern laWidget* LA_WIDGET_COLLECTION_SINGLE;
  958. extern laWidget* LA_WIDGET_CONDITION_TOGGLE;
  959. extern laWidget* LA_WIDGET_COLUMN_ADJUSTER;
  960. extern laWidget* LA_WIDGET_COLUMN_VIEWER;
  961. extern laWidget* LA_WIDGET_BUTTON;
  962. extern laWidget* LA_WIDGET_BUTTON_NO_CONFIRM;
  963. extern laWidget* LA_WIDGET_LABEL;
  964. extern laWidget* LA_WIDGET_INT;
  965. extern laWidget* LA_WIDGET_INT_PLAIN;
  966. extern laWidget* LA_WIDGET_INT_PLAIN_ICON;
  967. extern laWidget* LA_WIDGET_METER_TYPE1;
  968. extern laWidget* LA_WIDGET_METER_TYPE2;
  969. extern laWidget* LA_WIDGET_VALUE_METER_2D;
  970. extern laWidget* LA_WIDGET_FLOAT;
  971. extern laWidget* LA_WIDGET_FLOAT_PLAIN;
  972. extern laWidget* LA_WIDGET_FLOAT_COLOR;
  973. extern laWidget* LA_WIDGET_FLOAT_COLOR_HCY;
  974. extern laWidget* LA_WIDGET_ENUM_SELECTOR;
  975. extern laWidget* LA_WIDGET_ENUM_SELECTOR_ICON;
  976. extern laWidget* LA_WIDGET_ENUM_CYCLE;
  977. extern laWidget* LA_WIDGET_ENUM_CYCLE_ICON;
  978. extern laWidget* LA_WIDGET_ENUM_ICON_PLAIN;
  979. extern laWidget *LA_WIDGET_ENUM_HIGHLIGHT;
  980. extern laWidget* LA_WIDGET_STRING;
  981. extern laWidget* LA_WIDGET_STRING_PLAIN;
  982. extern laWidget* LA_WIDGET_STRING_MULTI;
  983. extern laWidget *LA_WIDGET_STRING_MONO_PLAIN;
  984. extern laWidget* LA_WIDGET_MENU_ROOT;
  985. extern laWidget* LA_WIDGET_ALIGN;
  986. extern laWidget* LA_WIDGET_3D_VIEW;
  987. extern laWidget* LA_WIDGET_2D_VIEW;
  988. extern laWidget* LA_WIDGET_SYMBOL;
  989. extern laWidget *LA_WIDGET_NODE_SOCKET;
  990. extern laWidget *LA_WIDGET_HEIGHT_ADJUSTER;
  991. extern laWidget *LA_WIDGET_RAW;
  992. extern laWidget *LA_WIDGET_MAPPER;
  993. extern laWidget *LA_WIDGET_IMAGE;
  994. extern laWidget *LA_WIDGET_SCOPE;
  995. extern laWidget *LA_WIDGET_KNOB;
  996. #define LA_CONDITION_TRUE 1
  997. #define LA_CONDITION_FALSE 2
  998. #define LA_CONDITION_GE 3
  999. #define LA_CONDITION_GT 4
  1000. #define LA_CONDITION_EQ 5
  1001. #define LA_CONDITION_LT 6
  1002. #define LA_CONDITION_LE 7
  1003. #define LA_CONDITION_AND 8
  1004. #define LA_CONDITION_OR 9
  1005. #define LA_CONDITION_NOT 10
  1006. #define LA_CONDITION_INT 11
  1007. #define LA_CONDITION_FLOAT 12
  1008. #define LA_CONDITION_STRING 13
  1009. #define LA_CONDITION_PROP 14
  1010. STRUCTURE(laUiConditionNode){
  1011. char a;
  1012. int Type;
  1013. laUiConditionNode *Expression1; // As Int Value
  1014. laUiConditionNode *Expression2;
  1015. laUiDescriptor *Base;
  1016. char IsExtra;
  1017. int IntValue;
  1018. real FloatValue;
  1019. laSafeString *String; //used as prop path in template
  1020. laPropPack PP;
  1021. };
  1022. #define LA_PANEL_NORMAL 0
  1023. #define LA_PANEL_FLOATING_PASSIVE 2
  1024. #define LA_PANEL_FLOATING_TOP 3
  1025. #define LA_PANEL_NO_PARENT_MENU 4
  1026. #define LA_TAG_REDRAW 1
  1027. #define LA_TAG_RECALC 2
  1028. #define LA_TAG_ANIMATION 4
  1029. #define LA_TAG_RECALC_SCROLLER 8
  1030. #define LA_PANEL_ANIMATION_DROP_DOWN 1
  1031. #define LA_PANEL_ANIMATION_EXPAND 2
  1032. #define LA_PANEL_ANIMATION_DISSOVE 3
  1033. #define LA_PANEL_ANIMATION_COLLAPSE 4
  1034. #define LA_PANEL_ANIMATION_MINIMIZE 5
  1035. #define LA_PANEL_ANIMATION_DESTROY 127
  1036. NEED_STRUCTURE(laOperator);
  1037. NEED_STRUCTURE(laOperator);
  1038. STRUCTURE(laPanel){
  1039. laListItem Item;
  1040. int __SAFE__;
  1041. int X, Y, W, H;
  1042. int MaxW, MaxH, MinW, MinH;
  1043. int TX, TY, TW, TH;
  1044. int TitleWidth;
  1045. char AnimationMode;
  1046. real AnimationRatio;
  1047. //int PanX, PanY;
  1048. int Show;
  1049. short Refresh;
  1050. short ShowCorner;
  1051. unsigned int FrameDistinguish;
  1052. char BoundUi;
  1053. char IsMenuPanel;
  1054. char LaterDestroy;
  1055. char CloseWhenMovedOut;
  1056. int Mode;
  1057. int LiveEditing;
  1058. laUiItem *EditingUi;
  1059. laUiItem *FocusingUi;
  1060. void *SFPNode;
  1061. int SL, SR, ST, SB; //Snap To Edge
  1062. laSafeString *Title;
  1063. laUiTemplate *PanelTemplate;
  1064. laPropPack PP;
  1065. laPropStep FakePS;
  1066. laPropContainer* PropLinkContainer;
  1067. laSubProp* PropLinkFakeProp;
  1068. laPropPack PropLinkPP;
  1069. laPropStep PropLinkFakePS;
  1070. laKeyMapper KeyMap;
  1071. laPanelDrawFunc Draw;
  1072. laBoxedTheme **BT;
  1073. tnsOffscreen *OffScr;
  1074. laUiList UI;
  1075. laUiList TitleBar;
  1076. laUiList *MenuRefer;
  1077. laUiDefineFunc UiDefine;
  1078. laListHandle SubPanels;
  1079. laPanel *Parent;
  1080. laBlock *Block;
  1081. laOperator *ParentOperator;
  1082. u64bit Tag;
  1083. //64 Main Types are useable,with 31 subtypes avainable each.
  1084. //Main Type 0~63(some are occupied by LA internal)
  1085. //Sub Type 0~31
  1086. //Main (Low) 0| 1| 2| 3|...
  1087. //[---32bits---][---32bits---][---32bits---][---32bits---]...
  1088. };
  1089. STRUCTURE(laPanelMessage){
  1090. laListItem Item;
  1091. laSafeString *Message;
  1092. };
  1093. STRUCTURE(laPanelMessageList){
  1094. laListHandle Msg;
  1095. };
  1096. NEED_STRUCTURE(laOperator);
  1097. typedef int (*laInitFunc)(laOperator *);
  1098. typedef int (*laRefreshFunc)(laOperator *);
  1099. typedef int (*laCheckFunc)(laPropPack *, laStringSplitor *); //this, ui->instructions amd ap->instructions
  1100. typedef void (*laExitFunc)(laOperator *, int); //true means Quit, false means Cancel
  1101. typedef int (*laInvokeFunc)(laOperator *, laEvent *);
  1102. typedef int (*laModalFunc)(laOperator *, laEvent *);
  1103. typedef int (*laSystemFunc)(laOperator *, laEvent *);
  1104. #define LA_CANCEL 0
  1105. #define LA_PASS_ON (1<<10)
  1106. #define LA_BLOCK (1<<11)
  1107. #define LA_FINISH (1<<12)
  1108. #define LA_CONFIRM (1<<13)
  1109. #define LA_CANCELED 0
  1110. //#define LA_PRE_INVOKE 16384
  1111. #define LA_FINISHED (LA_FINISH | LA_BLOCK)
  1112. #define LA_FINISHED_PASS (LA_FINISH | LA_PASS_ON)
  1113. #define LA_RUNNING LA_BLOCK
  1114. #define LA_RUNNING_PASS (LA_BLOCK | LA_PASS_ON)
  1115. #define LA_OPERATOR_CALLS_SHUTOFF (LA_FINISHED|(1<<5))
  1116. #define LA_EXTRA_TO_PANEL 1
  1117. #define LA_EXTRA_CONFIRM 2
  1118. #define LA_ACTUATOR_SYSTEM 4
  1119. #define LA_ACTUATOR_HIDDEN 8
  1120. #define LA_CONFIRM_OK (1<<10)
  1121. #define LA_CONFIRM_CANCEL (1<<11)
  1122. #define LA_CONFIRM_IGNORE (1<<12)
  1123. #define LA_CONFIRM_DATA (1<<13)
  1124. #define LA_CONFIRM_CUSTOM_STRING (1<<14)
  1125. STRUCTURE(laOperatorType){
  1126. laListItem Item;
  1127. const char *Identifier;
  1128. const char *Name;
  1129. const char *Description;
  1130. const char *ExtraInstructions;
  1131. laInitFunc Init;
  1132. laExitFunc Exit;
  1133. laInvokeFunc Invoke;
  1134. laModalFunc Modal;
  1135. laCheckFunc Check;
  1136. uint32_t IconID;
  1137. laPropContainer* PC;
  1138. laUiDefineFunc UiDefine;
  1139. laOperatorArgumentParserFunc ParseArgs;
  1140. laListHandle Properties;
  1141. int ExtraMark;
  1142. };
  1143. typedef void (*laConfirmDataDestroyFunc)(void *);
  1144. STRUCTURE(laConfirmData){
  1145. int Mode;
  1146. int IData;
  1147. real FData;
  1148. void *CustomData;
  1149. char *StrData;
  1150. void* PointerData;
  1151. laPropContainer* PointerType;
  1152. laConfirmDataDestroyFunc Destroy;
  1153. };
  1154. STRUCTURE(laOperator){
  1155. laListItem Item;
  1156. int State;
  1157. void *Instance;
  1158. void *CustomData;
  1159. const char *ExtraInstructions;
  1160. laStringSplitor *ExtraInstructionsP;
  1161. laPropPack PP;
  1162. laPropPack *This;
  1163. laConfirmData *ConfirmData;
  1164. laConfirmData *NextConfirmData;
  1165. laOperator *Child;
  1166. laListHandle PropertyStorage;
  1167. laOperatorType *Type;
  1168. laPropPack *CreatedThis;
  1169. int Using;
  1170. int StopNow;
  1171. int ModalOver;
  1172. laPanel *ToPanel;
  1173. laPanel *OperatorPanel;
  1174. laListHandle LocalUiLists;
  1175. laSafeString* RuntimeHint;
  1176. };
  1177. #define LA_INPUT_DEVICE_KEYBOARD 0
  1178. #define LA_INPUT_DEVICE_JOYSTICK 1
  1179. STRUCTURE(laInputMapping){
  1180. laListItem Item;
  1181. laSafeString* Name;
  1182. laListHandle Entries;
  1183. };
  1184. STRUCTURE(laInputMappingEntry){
  1185. laListItem Item;
  1186. laInputMapping* Parent;
  1187. int DeviceType;
  1188. int JoystickDevice; int Axis, Button;
  1189. laSafeString* Key; int KeyValue;
  1190. int SpecialKeyBits;
  1191. laSafeString* Signal; int SignalValue;
  1192. };
  1193. STRUCTURE(laInputMappingBundle){
  1194. void* _pad;
  1195. laListHandle InputMappings;
  1196. laInputMapping* CurrentInputMapping;
  1197. };
  1198. #define LA_SIGNAL_NEW 1
  1199. #define LA_SIGNAL_DELETE 2
  1200. #define LA_SIGNAL_CONFIRM 3
  1201. #define LA_SIGNAL_UNDO 4
  1202. #define LA_SIGNAL_REDO 5
  1203. STRUCTURE(laCustomSignal){
  1204. laListItem Item;
  1205. //laListItem Item2;
  1206. laSafeString* Name;
  1207. int Signal;
  1208. };
  1209. #define LA_JS_MAX_AXES 64
  1210. #define LA_JS_MAX_BUTTONS 128
  1211. STRUCTURE(laController){
  1212. laListItem Item;
  1213. laSafeString* Name;
  1214. laSafeString* Path;
  1215. int fd; //device;
  1216. int NumButtons; int NumAxes; int UserAssignedID; int Error;
  1217. int InternalType; // used to identify models and use specific props.
  1218. int16_t AxisValues[LA_JS_MAX_AXES],SaveAxisValues[LA_JS_MAX_AXES];
  1219. int AxisMaxes[LA_JS_MAX_AXES];
  1220. int AxisMins[LA_JS_MAX_AXES];
  1221. int16_t AxisLimitMaxes[LA_JS_MAX_AXES]; // calibrated max;
  1222. int16_t AxisLimitMins[LA_JS_MAX_AXES];
  1223. int16_t AxisCenterMaxes[LA_JS_MAX_AXES]; // calibrated center;
  1224. int16_t AxisCenterMins[LA_JS_MAX_AXES];
  1225. char ButtonValues[LA_JS_MAX_BUTTONS];
  1226. u8bit ButtonsMap[LA_JS_MAX_BUTTONS];
  1227. u8bit AxisMap[LA_JS_MAX_AXES];
  1228. laSafeString* ButtonNames[LA_JS_MAX_BUTTONS];
  1229. laSafeString* AxisNames[LA_JS_MAX_AXES];
  1230. };
  1231. void la_RefreshControllers();
  1232. void la_InitControllers();
  1233. void la_RemoveDuplicatedControllers();
  1234. void la_UpdateControllerStatus();
  1235. void la_RegisterControllerProps();
  1236. laPropContainer* laget_ControllerType(laController* c);
  1237. laController* la_FindControllerWithID(int id);
  1238. char* laControllerIDGetAxisName(int id, int axis);
  1239. char* laControllerIDGetButtonName(int id, int button);
  1240. int laControllerIDGetAxis(int id, char* name);
  1241. int laControllerIDGetButton(int id, char* name);
  1242. void la_RegisterBasicNodes();
  1243. #define LA_DAG_FLAG_ERR 0
  1244. #define LA_DAG_FLAG_TEMP 1
  1245. #define LA_DAG_FLAG_PERM 2
  1246. int laRebuildPageEval(laRackPage* rp);
  1247. int laRunPage(laRackPage* rp, uint64_t mask);
  1248. void laGraphRequestRebuild();
  1249. int la_RunDrivers();
  1250. void lapost_Node(laBaseNode *bn);
  1251. laBaseNode* la_CreateDriverNode(laNodeRack* ir, laBaseNodeType* NodeType);
  1252. void* laget_InstanceSelf(void* instace);
  1253. laPropContainer* laget_BaseNodeType(laBaseNode* bn);
  1254. void laRegisterNode(laBaseNodeType* type, laPropContainer* pc,
  1255. laBaseNodeInitF init, laBaseNodeDestroyF destroy, laBaseNodeVisitF visit, laBaseNodeEvalF eval, laBaseNodeCopyF copy,
  1256. int nodesize, char* udf_string, char* type_string, char* UiText, int icon);
  1257. void latouched_NodeInSocket(void* unused, int hint);
  1258. #define LA_BASE_NODE_HEADER(uil,c,This) \
  1259. {laSplitColumn(uil,c,0.2);laColumn*c1=laLeftColumn(c,1);c=laRightColumn(c,0);\
  1260. laShowHeightAdjuster(uil,c1,This,"base.__gap",0);}
  1261. #define LA_IDN_REGISTER(uitext,icon,a,pc,funcname,type) \
  1262. laRegisterNode(&a,pc,funcname##Init,funcname##Destroy,funcname##Visit,funcname##Eval,funcname##Copy,sizeof(type),"UDFRES_" #type, #type, uitext,icon);
  1263. #define LA_SRC_AND_PARENT(socket) \
  1264. ((socket)->Source && (socket)->Source->Parent)
  1265. #define LA_VISIT_NODE(node,vi) \
  1266. {if(node){int result=node->Type->Visit(node,vi); if(result!=LA_DAG_FLAG_PERM) return LA_DAG_FLAG_ERR;} }
  1267. #define LA_GUARD_THIS_NODE(n,vi) \
  1268. {uint64_t br=vi->Branch; if((n->Base.Branch&br)==br) return LA_DAG_FLAG_PERM; if((n->Base.BranchTemp&br)==br) return LA_DAG_FLAG_ERR; n->Base.BranchTemp|=br; }
  1269. #define LA_ADD_THIS_NODE(n,vi) \
  1270. {uint64_t br=vi->Branch; if(!n->Base.Branch){ lstAppendPointer(vi->l,n); } n->Base.Branch|=br; n->Base.BranchTemp&=(~br); }
  1271. #define LA_GET_SRC_AS_VALUE(var, socket) \
  1272. {if(socket->Source&&socket->Source->DataType&LA_PROP_FLOAT) var=*((real*)socket->Source->Data);\
  1273. if(socket->Source&&socket->Source->DataType&(LA_PROP_INT|LA_PROP_ENUM)) var=*((int*)socket->Source->Data);}
  1274. #define LA_IDN_OLD_DUPL(socket) \
  1275. old->socket->Duplicated=new->socket;
  1276. #define LA_IDN_NEW_LINK(socket) \
  1277. { memAssignRef(new->socket,&new->socket->Source,old->socket->Source?old->socket->Source->Duplicated:0); new->socket->ColorId=old->socket->ColorId; }
  1278. extern laBaseNodeType LA_IDN_KEYBOARD;
  1279. extern laBaseNodeType LA_IDN_MOUSE;
  1280. extern laBaseNodeType LA_IDN_CONTROLLER;
  1281. extern laBaseNodeType LA_IDN_VISUALIZER;
  1282. extern laBaseNodeType LA_IDN_SPLIT;
  1283. extern laBaseNodeType LA_IDN_SWITCH;
  1284. extern laBaseNodeType LA_IDN_COMBINE;
  1285. extern laBaseNodeType LA_IDN_VALUES;
  1286. extern laBaseNodeType LA_IDN_MATRIX;
  1287. extern laBaseNodeType LA_IDN_MATH;
  1288. extern laBaseNodeType TNS_IDN_TRANSFORM;
  1289. extern laBaseNodeType TNS_IDN_MAKE_TRANSFORM;
  1290. extern laNodeCategory* LA_NODE_CATEGORY_INPUT;
  1291. extern laNodeCategory* LA_NODE_CATEGORY_MATH;
  1292. extern laNodeCategory* LA_NODE_CATEGORY_ROUTE;
  1293. extern laNodeCategory* LA_NODE_CATEGORY_DRIVER;
  1294. extern laNodeCategory* LA_NODE_CATEGORY_AUX;
  1295. extern laNodeCategory* LA_NODE_CATEGORY_COLOR;
  1296. #define LA_VALUES_NODE_FLOAT 0
  1297. #define LA_VALUES_NODE_INT 1
  1298. #define LA_VALUES_NODE_ENUM 2
  1299. #define LA_MATRIX_NODE_OP_MUL 0
  1300. #define LA_MATRIX_NODE_OP_INV 1
  1301. #define LA_MATH_NODE_OP_ADD 0
  1302. #define LA_MATH_NODE_OP_SUB 1
  1303. #define LA_MATH_NODE_OP_MUL 2
  1304. #define LA_MATH_NODE_OP_DIV 3
  1305. #define LA_MATH_NODE_OP_POW 4
  1306. #define LA_MATH_NODE_OP_LOG 5
  1307. #define LA_MATH_NODE_OP_SIN 6
  1308. #define LA_MATH_NODE_OP_COS 7
  1309. #define LA_MATH_NODE_OP_TAN 8
  1310. #define LA_MATH_NODE_OP_ASIN 9
  1311. #define LA_MATH_NODE_OP_ACOS 10
  1312. #define LA_MATH_NODE_OP_ATAN 11
  1313. #define LA_MATH_NODE_OP_ATAN2 12
  1314. #define LA_MATH_NODE_OP_MOD 13
  1315. #define LA_VECTOR_MATH_OP_ADD 0
  1316. #define LA_VECTOR_MATH_OP_SUB 1
  1317. #define LA_VECTOR_MATH_OP_MUL 2
  1318. #define LA_VECTOR_MATH_OP_DIV 3
  1319. #define LA_VECTOR_MATH_OP_POW 4
  1320. #define LA_VECTOR_MATH_OP_LOG 5
  1321. #define LA_VECTOR_MATH_OP_DOT 6
  1322. #define LA_VECTOR_MATH_OP_CROSS 7
  1323. #define LA_VECTOR_MATH_OP_LEN 8
  1324. #define LA_VECTOR_MATH_OP_NORMALIZE 9
  1325. #define LA_PAGE_TRIGGER_ALWAYS 0
  1326. #define LA_PAGE_TRIGGER_NONE 1
  1327. NEED_STRUCTURE(tnsObject)
  1328. STRUCTURE(laRackPage){
  1329. laListItem Item;
  1330. laSafeString* Name;
  1331. laListHandle Racks;
  1332. laListHandle Eval;
  1333. laListHandle AlwaysBranchers;
  1334. laSafeString* Script;
  1335. tnsObject* ParentObject;
  1336. int RackType;
  1337. int TriggerMode;
  1338. int UseScript;
  1339. };
  1340. #define LA_RACK_TYPE_INPUT (1<<0)
  1341. #define LA_RACK_TYPE_DRIVER (1<<1)
  1342. #define LA_RACK_TYPE_ALL 0xfffffff
  1343. STRUCTURE(laNodeRack){
  1344. laListItem Item;
  1345. laSafeString* Name;
  1346. laListHandle Nodes;
  1347. laRackPage* ParentPage;
  1348. int RackType;
  1349. laNodeRack* Duplicated;
  1350. };
  1351. NEED_STRUCTURE(laInputControllerNode);
  1352. STRUCTURE(laInputControllerNodeSocket){
  1353. laInputControllerNode* Parent;
  1354. laSafeString* Which;
  1355. laNodeOutSocket* Out;
  1356. int Offset;
  1357. int IntVal[8]; real RealVal[8];
  1358. };
  1359. STRUCTURE(laInputControllerNode){
  1360. laBaseNode Base;
  1361. laInputControllerNodeSocket Sockets[8];
  1362. int UserID;
  1363. int Mode;// btn/axis;
  1364. };
  1365. STRUCTURE(laInputVisualizerNode){
  1366. laBaseNode Base;
  1367. laNodeInSocket* In;
  1368. int IntVal[8]; real RealVal[8];
  1369. };
  1370. STRUCTURE(laSplitNodeOutSocket){
  1371. laNodeOutSocket* Out;
  1372. };
  1373. STRUCTURE(laSplitNode){
  1374. laBaseNode Base;
  1375. laNodeInSocket* In;
  1376. laSplitNodeOutSocket Out[8];
  1377. int IntVal[8]; real RealVal[8];
  1378. int ArrLen;
  1379. };
  1380. STRUCTURE(laSwitchNodeInSocket){
  1381. laNodeInSocket* In;
  1382. };
  1383. STRUCTURE(laSwitchNode){
  1384. laBaseNode Base;
  1385. laSwitchNodeInSocket In[8];
  1386. laNodeOutSocket* Out;
  1387. laNodeInSocket* SwitchIn;
  1388. real TempVal;
  1389. int Switch;
  1390. int MaxUsed;
  1391. laRackPage* Page;
  1392. uint64_t BranchSW;
  1393. };
  1394. STRUCTURE(laCombineNode){
  1395. laBaseNode Base;
  1396. laSwitchNodeInSocket In[8];
  1397. laNodeOutSocket* Out;
  1398. laNodeOutSocket* OutInt;
  1399. laNodeOutSocket* OutEnum;
  1400. real Values[8]; int ValuesI[8];
  1401. };
  1402. STRUCTURE(laValuesNode){
  1403. laBaseNode Base;
  1404. laSplitNodeOutSocket Out[8];
  1405. real Values[8]; int ValuesI[8], ValuesE[8];
  1406. int Modes[8];
  1407. };
  1408. STRUCTURE(laMatrixNode){
  1409. laBaseNode Base;
  1410. laNodeInSocket *InL,*InR;
  1411. laNodeOutSocket* Out;
  1412. tnsMatrix44d Mat;
  1413. int Operation;
  1414. };
  1415. STRUCTURE(laMathNode){
  1416. laBaseNode Base;
  1417. laNodeInSocket *InL,*InR;
  1418. laNodeOutSocket* Out,*OutInt;
  1419. real Value; int ValueI;
  1420. real ValueL, ValueR;
  1421. int Operation;
  1422. };
  1423. STRUCTURE(laValueMapperPoint){
  1424. laListItem Item;
  1425. real x,y;
  1426. };
  1427. STRUCTURE(laValueMapper){
  1428. real pad;
  1429. laListHandle Points;
  1430. real InRange[2],OutRange[2];
  1431. };
  1432. STRUCTURE(laMapperNode){
  1433. laBaseNode Base;
  1434. laNodeInSocket *In, *InMin, *InMax, *OutMin, *OutMax;
  1435. laNodeOutSocket* Out;
  1436. real rIn,rOut;
  1437. laValueMapper* Mapper;
  1438. int ClampInput, ClampOutput;
  1439. };
  1440. STRUCTURE(laRandomNode){
  1441. laBaseNode Base;
  1442. laNodeOutSocket* Out; real rOut;
  1443. laNodeInSocket *InMin, *InMax;
  1444. real Min,Max;
  1445. };
  1446. STRUCTURE(laVectorMathNode){
  1447. laBaseNode Base;
  1448. laNodeInSocket *InL,*InR;
  1449. laNodeOutSocket* Out;
  1450. real rOut[4];
  1451. int Operation;
  1452. };
  1453. STRUCTURE(laCommentNode){
  1454. laBaseNode Base;
  1455. laSafeString* Content;
  1456. };
  1457. STRUCTURE(laRGB2OKHSLNode){
  1458. laBaseNode Base;
  1459. laNodeInSocket *In;
  1460. laNodeOutSocket* OutH;
  1461. laNodeOutSocket* OutS;
  1462. laNodeOutSocket* OutL;
  1463. real RGB[3];
  1464. real rOut[3];
  1465. };
  1466. STRUCTURE(laOKHSL2RGBNode){
  1467. laBaseNode Base;
  1468. laNodeInSocket *InH;
  1469. laNodeInSocket *InS;
  1470. laNodeInSocket *InL;
  1471. laNodeOutSocket* Out;
  1472. real rOut[3];
  1473. };
  1474. STRUCTURE(laLoopNode){
  1475. laBaseNode Base;
  1476. laNodeInSocket *InIndex;
  1477. laNodeInSocket *InIterations;
  1478. laNodeInSocket *Branch;
  1479. laNodeInSocket *Prev;
  1480. laNodeOutSocket* Next;
  1481. int Iterations;
  1482. laRackPage* Page;
  1483. uint64_t BranchControl;
  1484. };
  1485. STRUCTURE(laLoopIndexNode){
  1486. laBaseNode Base;
  1487. laNodeOutSocket* Out;
  1488. int Iteration;
  1489. };
  1490. STRUCTURE(laNodeCategory){
  1491. laListItem Item;
  1492. laSafeString* Name;
  1493. laListHandle NodeTypes;//lip
  1494. laUiDefineFunc Ui;
  1495. int For;
  1496. };
  1497. #define LA_RACK_TYPE_AUDIO (1<<2)
  1498. #define LA_SYNTH_PLEN 512
  1499. extern laPropContainer* LA_PC_SYNTH;
  1500. STRUCTURE(laSynth){
  1501. laListItem Item;
  1502. laSafeString* Name;
  1503. laRackPage* Page;
  1504. real Length;
  1505. SYSLOCK Lock;
  1506. int Playing;
  1507. real EvalTime;
  1508. int EvalSamples;
  1509. };
  1510. STRUCTURE(laSynthNodeInput){
  1511. laBaseNode Base;
  1512. laNodeOutSocket* OutTime;
  1513. laNodeOutSocket* OutTrigger;
  1514. real* rTime;
  1515. real* rTrigger;
  1516. };
  1517. STRUCTURE(laSynthNodeFM){
  1518. laBaseNode Base;
  1519. int Slow;
  1520. real Frequency,rInfluence;
  1521. laNodeInSocket* InFrequency;
  1522. laNodeOutSocket* Out;
  1523. //runtime
  1524. real Phase;
  1525. real* OutSamples;
  1526. };
  1527. STRUCTURE(laSynthNodeNoise){
  1528. laBaseNode Base;
  1529. laNodeOutSocket* OutWhite;
  1530. laNodeOutSocket* OutPink;
  1531. real* OutWhiteSamples;
  1532. real* OutPinkSamples;
  1533. //runtime
  1534. real PinkStates[3];
  1535. real PinkA[3],PinkP[3];
  1536. };
  1537. STRUCTURE(laSynthNodeVCA){
  1538. laBaseNode Base;
  1539. real Amp, rInfluence;
  1540. laNodeInSocket* In;
  1541. laNodeInSocket* InAmp;
  1542. laNodeOutSocket* Out;
  1543. real* OutSamples;
  1544. };
  1545. STRUCTURE(laSynthNodeScope){
  1546. laBaseNode Base;
  1547. int Time;
  1548. int Gain1,Gain2;
  1549. real Offset1,Offset2;
  1550. real Brightness1,Brightness2;
  1551. laNodeInSocket* In1;
  1552. laNodeInSocket* In2;
  1553. real *Display1,*Display2; // each PLEN*2, upper/lower bounds.
  1554. int NextSample;
  1555. SYSLOCK Lock;
  1556. laSynth* FromSynth;
  1557. };
  1558. NEED_STRUCTURE(laAudioChannel);
  1559. STRUCTURE(laSynthNodeOutput){
  1560. laBaseNode Base;
  1561. laNodeInSocket* In;
  1562. laSafeString* SendName;
  1563. /* Runtime */
  1564. laAudioChannel* Send;
  1565. };
  1566. STRUCTURE(laSynthNodeEnvelope){
  1567. laBaseNode Base;
  1568. laNodeInSocket* Trigger,*Gate; real rGate; int bTrigger; int Triggered;
  1569. laNodeInSocket* Restart;
  1570. laNodeInSocket* Attack; real rAttack,iAttack;
  1571. laNodeInSocket* Delay; real rDelay,iDelay;
  1572. laNodeInSocket* Sustain; real rSustain,iSustain;
  1573. laNodeInSocket* Release; real rRelease,iRelease;
  1574. laNodeOutSocket* Out; real* OutSamples;
  1575. real Time,ReleaseTime,AtLevel;
  1576. };
  1577. STRUCTURE(laSynthNodeQuantize){
  1578. laBaseNode Base;
  1579. laNodeInSocket* In;
  1580. laNodeOutSocket* Out;
  1581. real* OutSamples;
  1582. int EnabledBits[12];
  1583. };
  1584. #include "miniaudio.h"
  1585. STRUCTURE(laAudioChannel){
  1586. laListItem Item;
  1587. laSafeString* Name;
  1588. real Volume;
  1589. laSafeString* OutputChannel;
  1590. real Samples[LA_SYNTH_PLEN];
  1591. };
  1592. STRUCTURE(laAudioDevice){
  1593. laListItem Item;
  1594. int MiniAudioID;
  1595. laSafeString Name;
  1596. };
  1597. STRUCTURE(laAudio){
  1598. int AudioAny;
  1599. laListHandle Synths;
  1600. laSynth* CurrentSynth;
  1601. laListHandle Channels;
  1602. SYSLOCK AudioStatusLock;
  1603. ma_context MiniAudioContext;
  1604. ma_device AudioDevice;
  1605. laAudioDevice* UsingDevice;
  1606. laListHandle AudioDevices;
  1607. laSynth* AudioEvalSynth;
  1608. real AudioFrameInterval;
  1609. real AudioEvalTime; uint64_t AudioEvalTotalSamples;
  1610. real* AudioSamples; int NextAudioSample,AudioSampleRate;
  1611. };
  1612. int laget_SynthPlaying(laSynth* ss);
  1613. void* laget_FirstAudioDevice(void* unused1,void* unused2);
  1614. void* laget_FirstSynth(void* unused1,void* unused2);
  1615. void laset_CurrentSynth(laAudio* a,laSynth* s);
  1616. void laset_CurrentAudioDevice(laAudio* a,laAudioDevice* ad);
  1617. void laRemoveAudioChannel(laAudioChannel* ac);
  1618. laAudioChannel* laNewAudioChannel(char* Name);
  1619. laAudioChannel* laGetAudioChannel(char* Name);
  1620. void la_AudioPreFrame();
  1621. void laRebuildSynthGraphs(int current_only);
  1622. void laInitAudio();
  1623. void laDeinitAudio();
  1624. #define LA_INPUT_CONTROLLER_NODE_MODE_BTN 0
  1625. #define LA_INPUT_CONTROLLER_NODE_MODE_AXIS 1
  1626. laValueMapper* laValueMapperInit();
  1627. laValueMapper* laValueMapperDestroy(laValueMapper* vm);
  1628. laValueMapper* laValueMapperCopy(laValueMapper* new_optional, laValueMapper* vm);
  1629. real laValueMapperEvaluate(laValueMapper* vm, real x, real* force_InMin, real* force_InMax, real* force_OutMin, real* force_OutMax, int ClampIn, int ClampOut);
  1630. void laShowProgress(real p1, real p2);
  1631. void laHideProgress();
  1632. void logPrintT(int Type, char* format, ...);
  1633. void logPrint(char* format, ...);
  1634. void logPrintNew(char* format, ...);
  1635. #ifdef _WIN32
  1636. LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
  1637. LRESULT CALLBACK LA_ProgressWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
  1638. #endif
  1639. void la_RegisterMainOperators();
  1640. void la_RegisterUiOperatorsBasic();
  1641. void la_RegisterBuiltinOperators();
  1642. void la_RegisterModellingOperators();
  1643. void la_RegisterUiTypesBasic();
  1644. void la_RegisterUiTypesViewerWidgets();
  1645. void la_RegisterBuiltinTemplates();
  1646. void la_RegisterWindowKeys();
  1647. void la_RegisterGeneralProps();
  1648. void la_RegisterInternalProps();
  1649. void la_RegisterDefaultSignals();
  1650. void la_RegisterAnimationResources();
  1651. void la_RegenerateWireColors();
  1652. void laui_IntPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context);
  1653. void laui_FloatPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context);
  1654. void laui_RackPage(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1655. void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1656. void laui_DefaultNodeOperationsPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);
  1657. void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);
  1658. void laui_StringPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1659. void laui_IdentifierOnly(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1660. void laui_SubPropInfoDefault(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1661. void laui_SubPropSelection(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1662. void laui_LinkerSelectionProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1663. void laui_LinkerSelectionInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1664. void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1665. void laui_ColumnItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1666. void laui_DefaultMenuButtonsFileEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1667. void laui_DefaultMenuButtonsOptionEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1668. void laui_DefaultMenuButtons(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1669. void laui_DefaultMenuExtras(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1670. void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1671. void laui_DefaultSubWindowMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1672. void laui_ThemeListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1673. void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1674. void laui_BoxedThemeItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1675. void laui_PropertyContainerList(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1676. void laui_WindowListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1677. void laui_LayoutListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1678. void laui_PanelListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1679. void laui_InputSocketItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1680. void laui_OutputSocketItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1681. void laui_FileBrowserFileItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1682. void laui_FileBrowserDiskItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1683. void laui_LinkerPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1684. void laui_ManagedUDFItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1685. void laui_ManagedUDFOps(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1686. void laui_ManagedProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1687. void laui_ManagedSavePanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1688. void laui_ManagedUDFPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1689. void laui_FileBrowserFileList(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context);
  1690. void laui_DataRestorePage(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context);
  1691. void laui_ResourceFolderItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1692. void laui_LogItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1693. void laui_NodeCategory(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1694. void tnsui_CameraObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1695. void tnsui_LightObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1696. void tnsui_MeshObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1697. void tnsui_ShapeObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1698. void tnsui_InstancerObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1699. void tnsui_BaseObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1700. void tnsui_RootObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNUSED_Extra, laColumn *UNUSED_Colums, int context);
  1701. void tnsui_RootObjectMenuUi(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);
  1702. int OPINV_UiItem(laOperator *a, laEvent *e);
  1703. int OPEXT_UiItem(laOperator *a, int ExitCode);
  1704. int la_ArrayGetHeight(laUiItem *ui);
  1705. int la_ValueGetHeight(laUiItem*ui);
  1706. int la_3DViewGetHeight(laUiItem *ui);
  1707. int la_CanvasGetHeight(laUiItem *ui);
  1708. int la_EnumGetHeight(laUiItem *ui);
  1709. int la_ColorPickerGetHeight(laUiItem *ui);
  1710. int la_SymbolGetHeight(laUiItem *ui);
  1711. int la_GroupGetHeight(laUiItem *ui);
  1712. laPanel *la_FindFreePanelByTemplate(laWindow *w, const laUiTemplate *uit);
  1713. laUiItem *la_FindUiWithMark(laUiList *uil, char *mark);
  1714. laUiList *la_FindSubListWithInstance(laUiItem *ui, void *Instance);
  1715. void* laget_CurrentRackPage(laRackPageCollection* c);
  1716. void laset_CurrentRackPage(laRackPageCollection* c,laRackPage* rp);
  1717. void la_BeginNVG(struct NVGcontext* vg,laCanvasExtra* e,int W,int H, int Is2D);
  1718. void la_SetCanvasOrtho(laCanvasExtra* e,int W, int H);
  1719. #define LA_FILETYPE_UNKNOWN 0
  1720. #define LA_FILETYPE_UDF 1
  1721. #define LA_FILETYPE_DOCUMENT 2
  1722. #define LA_FILETYPE_IMAGE 3
  1723. #define LA_FILETYPE_AUDIO 4
  1724. #define LA_FILETYPE_VIDEO 5
  1725. #define LA_FILETYPE_COMPRESSED 6
  1726. #define LA_FILETYPE_FONT 7
  1727. #define LA_FILETYPE_VECTOR 8
  1728. #define LA_FILETYPE_WEBPAGE 9
  1729. #define LA_FILETYPE_META 10
  1730. #define LA_FILETYPE_BLEND 11
  1731. #define LA_FILETYPE_PDF 13
  1732. #define LA_FILETYPE_EXEC 14
  1733. #define LA_FILETYPE_SYS 15
  1734. #define LA_FILETYPE_FOLDER 16
  1735. #define LA_FILETYPE_LASDEXCHANGE 17
  1736. #define LA_FILE_SELECT_FILE 0
  1737. #define LA_FILE_SELECT_FOLDER 1
  1738. STRUCTURE(laExtensionType){
  1739. laListItem Item;
  1740. int FileType;
  1741. const char* Extension;
  1742. };
  1743. STRUCTURE(laFileItem){
  1744. laListItem Hyper;
  1745. int IsFolder;
  1746. char Name[1024];
  1747. int Size;
  1748. laTimeInfo TimeModified;
  1749. int Type;
  1750. };
  1751. STRUCTURE(laDiskItem){
  1752. laListItem Hyper;
  1753. char ID;
  1754. real Total_GB;
  1755. real Free_GB;
  1756. };
  1757. STRUCTURE(laBookmarkedFolder){
  1758. laListItem Item;
  1759. char Name[128];
  1760. char Path[1024];
  1761. };
  1762. STRUCTURE(laFileBrowser){
  1763. laListItem Hyper;
  1764. char Path[1024];
  1765. char FileName[512];
  1766. laDiskItem *RootDisk;
  1767. laFileItem *Active;
  1768. laListHandle FileList;
  1769. laListHandle Bookmarks;
  1770. laListHandle Disks;
  1771. int SelectFolder;
  1772. int WarnFileExists;
  1773. int StatusWaitingWarning;
  1774. char UseExtension[64];
  1775. int UseType;
  1776. int FilterType;
  1777. laStringSplitor* ss_filter_extensions;
  1778. };
  1779. STRUCTURE(laUDFPreviewExtra){
  1780. laUDF *UDF;
  1781. laListHandle ContentNodes;
  1782. int Opened;
  1783. int Append;
  1784. };
  1785. STRUCTURE(laManagedSaveExtra){
  1786. int ShowPage;
  1787. int OnExit;
  1788. };
  1789. #define LA_UDF_SHARE_POINTER(id) \
  1790. la_UDFAppendSharedTypePointer("" #id, id)
  1791. void la_MakeTranslations();
  1792. laCanvasTemplate *la_GetCanvasTemplate(char *TargetContainerID, char* TemplateID);
  1793. laPropContainer* laUiHasExtraProps(laUiType *ut, int size, int Hyper);
  1794. laPropContainer* laCanvasHasExtraProps(laCanvasTemplate *ct, int size, int Hyper);
  1795. laUiType *la_RegisterUiType(const char *Identifer, int ForType, const char *UseOperator, laBoxedTheme **bt, laUiDrawFunc *Draw, laUiGetHeightFunc GetHeight, laUiInitFunc Init, laUiDestroyFunc Destroy);
  1796. void la_NotifyGLDebugChanges();
  1797. void laSetWindowCursor(int id);
  1798. void laRenameWindow(laWindow* wnd, char* name);
  1799. #ifdef __linux__
  1800. int la_GetDPI(Window* root_win);
  1801. void la_ScanWacomDevices(SYSTEMDISPLAY *display, int deviceid);
  1802. #endif
  1803. #ifdef _WIN32
  1804. int la_GetDPI(HWND win);
  1805. void la_OpenWacomWinTab(HWND hwnd);
  1806. #endif
  1807. void laSetFontFolderPath(char* absolute);
  1808. void laSetDefaultInitArguments(laInitArguments* ia);
  1809. void laSetCompleteInitArguments(laInitArguments* ia);
  1810. void laProcessInitArguments(int argc, char* argv[],laInitArguments* ia);
  1811. int laGetReady();
  1812. int laGetReadyWith(laInitArguments* ia);
  1813. void laShutoff(int SavePreferences);
  1814. int laRestoreFactorySettings();
  1815. void laSaveUserPreferences();
  1816. void laEnsureUserPreferences();
  1817. void laAddExtraExtension(int FileType, ...);
  1818. void laAddExtraPreferencePath(const char* path);
  1819. void laAddExtraPreferencePage(const char* name, laUiDefineFunc Func);
  1820. void laSetFrameCallbacks(laPreFrameF PreFrame, laPreDrawF PreDraw, laPostFrameF PostFrame);
  1821. void laSetCleanupCallback(laCleanupF Cleanup);
  1822. void laSetInputProcessCallback(laInputProcessF InputProcess);
  1823. void laSetMenuBarTemplates(laUiDefineFunc MenuButtons, laUiDefineFunc MenuExtras, const char* ProgramName);
  1824. void laSetAboutTemplates(laUiDefineFunc AboutContent, laUiDefineFunc AboutVersion, laUiDefineFunc AboutAuthor);
  1825. void laSetPreferenceTemplates(laUiDefineFunc PreferencePageDisplay, laUiDefineFunc PreferencePageInput, laUiDefineFunc PreferencePageResource, laUiDefineFunc PreferencePageTheme);
  1826. laCustomSignal* laFindSignal(char* Name);
  1827. void laInputMappingUpdateSignal(laInputMappingEntry* ime);
  1828. laInputMapping* laNewInputMapping(char* Name);
  1829. laInputMappingEntry* laNewInputMappingEntry(laInputMapping* im, int DeviceType, int JoystickDevice, char* Key, int SpecialKeyBit, char* Signal);
  1830. void laRemoveInputMappingEntry(laInputMapping* im, laInputMappingEntry* e);
  1831. void laRemoveInputMapping(laInputMapping* im);
  1832. laCustomSignal* laNewCustomSignal(char* Name, int Signal);
  1833. void laRemoveCustomSignal(laCustomSignal* cs);
  1834. void la_RemoveScreen(laScreen*s);
  1835. laScreen* laGetWindowScreen(laWindow* w);
  1836. laWindow *laDesignWindow(int X, int Y, int W, int H);
  1837. laLayout *laDesignLayout(laWindow *w, char *Title);
  1838. void laDestroyLayout(laWindow *w, laLayout* l);
  1839. void laFoldBlockTitle(laBlock* b);
  1840. void laUnfoldBlockTitle(laBlock* b);
  1841. void laMaximizeBlock(laBlock* b);
  1842. void laRestoreToLayout();
  1843. void laMaximizeCanvasUI(laUiItem* ui, laPanel* UiParentPanel);
  1844. void laRestoreCanvasUI();
  1845. void laHideMenuBar();
  1846. void laShowMenuBar();
  1847. void laSplitBlockHorizon(laBlock *b, real Percentage);
  1848. void laSplitBlockVertical(laBlock *b, real Percentage);
  1849. void laCombineChildBlocks(laBlock *b);
  1850. laBlock *laBlock1(laBlock *b);
  1851. laBlock *laBlock2(laBlock *b);
  1852. laBlock *laSwapSubBlocks(laBlock *b);
  1853. void laDestroyBlocksRecursive(laBlock *Root);
  1854. laPanel* laTearOffPanel(laBlock* b, laPanel* p_if_set);
  1855. void laDockPanel(laWindow* from, laBlock* b, laPanel* p);
  1856. laPanel *laCreatePanel(laBlock *b, char *template_id);
  1857. laPanel *laCreateTopPanel(laWindow *w, char *template_id, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB);
  1858. void laShowPanel(laPanel *p);
  1859. void laShowPanelWithDropDownEffect(laPanel *p);
  1860. void laShowPanelWithExpandEffect(laPanel *p);
  1861. void laHidePanel(laPanel *p);
  1862. void laHidePanelWithDissoveEffect(laPanel *p);
  1863. void laActivatePanel(char* TemplateID, int x, int y);
  1864. void laPanPanel(laPanel *p, int DeltaX, int DeltaY);
  1865. int laPanUiListFree(laUiList *uil, int X, int Y);
  1866. int laPanUiList(laUiList *uil, int X, int Y, int L, int R, int U, int B);
  1867. int laPanUiListAuto(laUiList *uil, int X, int Y, int L, int R, int U, int B);
  1868. int laScaleUiList(laUiList *uil, real factor, int L, int R, int U, int B);
  1869. laPanel *laDesignPropPanel(char *Title, int X, int Y, int W, int H,
  1870. laUiDefineFunc Define, laPropPack *This, laPropPack *OperatorProps);
  1871. laPanel *laDesignOperatorPanel(char *Title, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB,
  1872. laUiDefineFunc Define, laPropPack *This, laPropPack *OperatorProps);
  1873. void laDeferedDestroyPanel(laPanel *p);
  1874. void laDestroySinglePanel(laPanel *p, int immediate);
  1875. void laEnsurePanelInBound(laPanel *p,laUiList* uil);
  1876. int laEnclosePanelContent(laPanel *p, laUiList *uil);
  1877. laPanel *laEnableIdlePanel(laPanel *Attachment, laOperator *a, laPropPack *OperatorProps, laUiDefineFunc ReplaceUiDefine, laPropPack *This,
  1878. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1879. laPanel *laEnableSplashPanel(laUiDefineFunc ReplaceUiDefine, int L, int R, int B, int MaxGH, int MaxW, laEvent* e);
  1880. laPanel *laEnablePropertyPanel(laPanel *Attachment, laOperator *a, laPropPack *OperatorProps, laUiDefineFunc ReplaceUiDefine, laUiDefineFunc FallBackUiDefine, laPropPack *This,
  1881. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1882. laPanel *laEnableEmptyPropertyPanel(laPanel *Attachment, laOperator *a, int L, int R, int U, int MaxGH, laEvent *e);
  1883. laPanel *laEnableMenuPanel(laPanel *Attachment, laOperator *a, laUiList *MenuRefer, laPropPack *This,
  1884. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1885. laPanel *laDefineAndEnableMenuPanel(laPanel *Attachment, laOperator *a, laPropPack *This,
  1886. int L, int B, int MaxGH, int MaxW, laEvent *e);
  1887. laPanel *laEnableOperatorPanel(laOperator *For, laPropPack *This, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB, laEvent *e);
  1888. laPanel *laEnableYesNoPanel(laOperator *a, laPanel *Attachment, char *Title, char *Message, int X, int Y, int W, laEvent *e);
  1889. laPanel *laEnableMessagePanel(laOperator *a, laPanel *Attachment, char *Title, char *Message, int X, int Y, int W, laEvent *e);
  1890. void laOperatorModalOver(laOperator* For);
  1891. void la_PropPanelUserRemover(void* This, laItemUserLinker* iul);
  1892. void la_EnsurePanelExtras(laPanel *p);
  1893. void laDeferredRedraw(laPanel* p);
  1894. void laRedrawAllWindows();
  1895. void laRefreshWindow();
  1896. void laRedrawCurrentWindow();
  1897. void laRedrawPanel(laPanel* p);
  1898. void laRecalcPanel(laPanel* p);
  1899. void laRedrawCurrentPanel();
  1900. void laRecalcCurrentPanel();
  1901. void laRecalcPanelImmediate(laPanel *p);
  1902. void laRecalcCurrentPanelImmediate();
  1903. int laNonFixedPanelExists(laPanel *p);
  1904. int laIsInPanel(laPanel *p, int PanelX, int PanelY);
  1905. int laIsCloseToPanel(laPanel *p, int PanelX, int PanelY);
  1906. void laPopPanel(laPanel *p);
  1907. int laPanelOverlappingEachOther(laPanel *p1, laPanel *p2);
  1908. void laUnlinkSharedPanel(laPanel *p);
  1909. int laIsPanelCovered(laPanel *p);
  1910. int laIsTopPanel(laPanel *p);
  1911. laPanel *laDetectPanel(int X, int Y);
  1912. void laWindowToLocal(laOperator *a, laPanel *p, int *x, int *y);
  1913. void laPanelToLocal(laOperator *a, int *x, int *y);
  1914. void laLocalToWindow(laOperator *a, laPanel *p, int *x, int *y);
  1915. void laLocalToPanel(laOperator *a, int *x, int *y);
  1916. void laSetNextMenuPos(int X, int Y, int W, int H);
  1917. int laIsInBlock(laBlock *b, int X, int Y);
  1918. int laIsInBlockHeader(laBlock *b, int X, int Y);
  1919. int laIsInBlockBotton1(laBlock *b, int X, int Y);
  1920. int laIsInBlockBotton2(laBlock *b, int X, int Y);
  1921. laBlock *laClearBlockButtonRecursive(laBlock *b, laBlock *except);
  1922. laBlock *laDetectBlockRecursive(laBlock *b, int X, int Y);
  1923. void la_DoUiScissor(laUiItem* ui, int* savex, int* savey, int* savew, int* saveh,
  1924. int* savel, int* saver, int* saveu, int* saveb);
  1925. laUiList *laPrepareUi(laPanel *p);
  1926. laColumn *laFirstColumn(laUiList *uil);
  1927. laColumn *laSplitColumn(laUiList *uil, laColumn *c, real Percent);
  1928. laColumn *laSplitColumnDescriptor(laUiDescriptor *ud, laColumn *c, real Percent);
  1929. laColumn *laLeftColumn(laColumn *c, int MaxWidth);
  1930. laColumn *laRightColumn(laColumn *c, int MaxWidth);
  1931. int laCheckAndMergeSubColumnsUiList(laUiList *TopUil, laColumn *c, int DoMerge);
  1932. int laCheckAndMergeSubColumnsDescriptor(laUiDescriptor *TopDescriptor, laColumn *c, int DoMerge);
  1933. laUiConditionNode *laTrue();
  1934. laUiConditionNode *laFalse();
  1935. laUiConditionNode *laPropExpression(laPropPack *Base, char *Prop);
  1936. laUiConditionNode *laIntExpression(int Value);
  1937. laUiConditionNode *laFloatExpression(real Value);
  1938. laUiConditionNode *laStringExpression(char *Content);
  1939. laUiConditionNode *laAnd(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1940. laUiConditionNode *laOr(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1941. laUiConditionNode *laNot(laUiConditionNode *Expression1);
  1942. laUiConditionNode *laEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1943. laUiConditionNode *laGreaterThan(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1944. laUiConditionNode *laLessThan(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1945. laUiConditionNode *laGreaterEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1946. laUiConditionNode *laLessEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1947. laUiItem *laShowLabel(laUiList *uil, laColumn *c, const char *Content, laUiDefineFunc Template, laWidget* Widget);
  1948. laUiItem *laShowLabelDynamic(laUiList *uil, laColumn *c, const char *Content, laUiDefineFunc Template, laWidget* Widget);
  1949. laUiItem *laShowIcon(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, laWidget* Widget);
  1950. laUiItem *laShowInvisibleItem(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path);
  1951. laUiItem *laShowItem(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path);
  1952. laUiItem *laShowItemFull(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, laWidget* Widget, char* instructions, laUiDefineFunc Template, int TemplateContext);
  1953. laUiItem *laShowImage(laUiList *uil, laColumn *c, tnsImage* Image, int Height);
  1954. laUiItem *laShowNodeSocket(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, char* instructions);
  1955. laUiItem *laShowHeightAdjuster(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, char* instructions);
  1956. laUiItem *laShowDetachedItem(laPanel *p, laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, const char *Rename, laUiDefineFunc Template, laWidget* Widget);
  1957. laUiItem *laShowCanvas(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, const char *id2DTemplate, int Height);
  1958. laUiItem *laShow3DCanvasCombo(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, int Height, laPropPack* Detached);
  1959. laUiItem *laShow2DContainerItem(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, int Height);
  1960. void laDefault3DViewOverlay(laUiItem *ui);
  1961. void laDefault2DViewOverlayRight(laUiItem *ui);
  1962. laUiItem *laShowColumnAdjuster(laUiList *uil, laColumn *c);
  1963. laUiItem *laShowSymbol(laUiList *uil, laColumn *c, int SymbolID, int Height);
  1964. laPropPack* laShowCompoundValue(laUiItem* ui, int slot, laPropPack *Base, const char *Path);
  1965. laUiItem *laBeginRow(laUiList *uil, laColumn *c, int Expand, int Even);
  1966. laUiItem *laEndRow(laUiList *uil, laUiItem* Begin);
  1967. laUiItem *laMakeGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget);
  1968. laUiItem *laMakeFoldableGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget, int DefaultFolded, int ButtonFlags);
  1969. laUiItem *laMakeEmptyGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget);
  1970. void laEndFoldableGroup(laUiList *sub, laUiItem *group);
  1971. laUiItem *laMakeTab(laUiList *uil, laColumn *c, laWidget* Widget);
  1972. laUiList *laAddTabPage(laUiItem *ui, const char *Name);
  1973. laUiItem *laOnConditionThat(laUiList *uil, laColumn *c, laUiConditionNode *Expression);
  1974. laUiItem *laOnConditionToggle(laUiList *uil, laColumn *col, laUiDefineFunc define, int Remove, laPropPack *ExtraBase, laPropPack *ExtraThis, laWidget* Widget);
  1975. laUiItem *laEndCondition(laUiList *uil, laUiItem *Beginner);
  1976. laUiItem *laElse(laUiList *uil, laUiItem *Beginner);
  1977. laUiList *laMakeMenuPage(laUiList *uil, laColumn *c, const char *Title);
  1978. laUiItem *laShowSeparator(laUiList *uil, laColumn *widest);
  1979. void laFixHeight(laUiList *uil, short Rows);
  1980. void la_ConditionerInit(laUiItem *ui, laUiConditionNode *Expression);
  1981. void laMakeExtraColumns(laUiItem *ui, u8bit HowMany, ...);
  1982. int la_UiInBoundEx(laUiItem *ui, laUiListDraw *uild);
  1983. void la_DestroyUiRange(laUiList *uil, laUiItem *Begin, laUiItem *End);
  1984. void la_ClearUiSpecificData(laUiItem *ui);
  1985. laUiItem *la_UpdatePropDisplay(laUiItem *ui, laPropPack *Base, const char *Path, laUiDefineFunc Template, laWidget* Widget, char* instructions);
  1986. laUiItem *la_UpdateLabelDisplay(laUiItem *ui, laUiDefineFunc Template, char *Content);
  1987. laUiItem *la_ShowGeneralPropItem(laUiList *uil, laColumn *c, laPropPack *Base, laProp *GeneralProp, laProp *p, laUiDefineFunc Template, laWidget* Widget);
  1988. void laFinalizeUiTemplates();
  1989. laUiTemplate *laFindUiTemplate(char *Identifier);
  1990. void la_DestroyUiTemplate(laUiTemplate* uit);
  1991. void la_DestroyCanvasTemplate(laCanvasTemplate* uit);
  1992. laUiTemplate *laRegisterUiTemplate(char *Identifier, char* Title, laUiDefineFunc func,laPanelDetachedPropFunc PropFunc, laUiDefineFunc header, char* NewCategory, int DefaultGLFormat, int DefaultW_RH, int DefaultH_RH);
  1993. laCanvasTemplate *laRegisterCanvasTemplate(char *Identifier, char *ForContainer, laModalFunc ExtraModal, laCanvasDrawFunc Func, laUiDrawFunc SecondDraw, laUiInitFunc CustomInit, laUiDestroyFunc CustomDestroy);
  1994. void la_DestroyTheme(laTheme* t);
  1995. laTheme *laDesignTheme(const char *Name, const char *AuthorName);
  1996. laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef,
  1997. real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha,
  1998. real TopMargin, real LeftMargin, real RightMargin, real BottomMargin,
  1999. real TopPadding, real LeftPadding, real RightPadding, real BottomPadding);
  2000. laTheme *laGetTheme(const char *ThemeName);
  2001. laBoxedTheme *laGetBoxedTheme(const char *ThemeName, const char *BoxName);
  2002. real* laThemeColor(laBoxedTheme* bt, int which);
  2003. real* laAccentColor(int which);
  2004. void la_RefreshBoxedThemeColor(laBoxedTheme* bt);
  2005. void la_RefreshThemeColorSelf(laTheme* th);
  2006. void la_RefreshThemeColor(laTheme* th);
  2007. #define LA_COLOR4(c) (c)[0], (c)[1], (c)[2], (c)[3]
  2008. #define LA_COLOR3(c) (c)[0], (c)[1], (c)[2]
  2009. #define LA_VEC2(c) (c)[0], (c)[1]
  2010. #define LA_SET3(c, a1,a2,a3) { (c)[0]=a1; (c)[1]=a2; (c)[2]=a3; }
  2011. #define LA_COLOR3_TO_HEX(c) (((int)((c)[0]*255)<<16)|((int)((c)[1]*255)<<8)|((int)((c)[2]*255)<<0))
  2012. #define LA_COLOR3_TO_RGB(c) (RGB((int)((c)[0]*255),(int)((c)[1]*255),(int)((c)[2]*255)))
  2013. int laIsInUiItem(laUiItem *ui, int x, int y);
  2014. int laIsInBound(int x, int y, int l, int r, int u, int b);
  2015. laUiItem *la_DetectUiItemRecursive(laUiList *uil, int x, int y, int LimB, laListHandle *LocalBuf, int Deep);
  2016. laUiItem *la_DetectSocketRecursive(laUiList* uil, int x, int y, int LimB, laPropContainer* PCInOrOut);
  2017. laUiList *la_DetectUiListRecursive(laUiList *uil, int x, int y, int LimH,
  2018. laUiItem **ParentUi, laUiList **ScrollUil, laUiList **ContainerParent, int InToContainerUI, laUiItem *Exception);
  2019. laUiList *la_DetectUiListRecursiveDeep(laUiList *uil, int x, int y, int LimH, laUiItem **ParentUi, laUiList **ScrollUil,
  2020. laUiList **ContainerParent, int InToContainerUI, laUiItem *Exception, laListHandle* levels);
  2021. int laStartWindow(laWindow *w);
  2022. void laMainLoop();
  2023. void la_DestroyOperatorType(laOperatorType* at);
  2024. laOperatorType *laCreateOperatorType(const char *ID, const char *Name, const char *Description,
  2025. laCheckFunc Check, laInitFunc Init, laExitFunc Exit, laInvokeFunc Invoke, laModalFunc Modal,
  2026. uint32_t IconID, int ExtraMark);
  2027. laPropContainer* laDefineOperatorProps(laOperatorType* ot, int HyperLevel);
  2028. #define LA_VERIFY_THIS_TYPE(this,pc,pc_identifier) \
  2029. ((this)&&(this)->EndInstance&& \
  2030. (this)->LastPs->p->PropertyType==LA_PROP_SUB&& \
  2031. ((pc)=la_EnsureSubTarget((this)->LastPs->p,(this)->EndInstance))&&strSame((pc)->Identifier,pc_identifier))
  2032. laNodeOutSocket* laCreateOutSocket(void* NodeParentOptional, char* label, int DataType);
  2033. laNodeInSocket* laCreateInSocket(char* label, int DataType);
  2034. void laDestroyInSocket(laNodeInSocket* s);
  2035. void laDestroyOutSocket(laNodeOutSocket* s);
  2036. laNodeCategory* laAddNodeCategory(char* Name,laUiDefineFunc* Ui,int ForRackTypes);
  2037. void laNodeCategoryAddNodeTypes(laNodeCategory* nc, ...);
  2038. void laDestroyRack(laNodeRack* rr);
  2039. laRackPage* laDuplicateRackPage(laRackPage* new_optional, laRackPage* from);
  2040. void laFreeKeyMapItem(laKeyMapItem* kmi);
  2041. laKeyMapItem *laAssignNewKey(laKeyMapper *km, char *Path, char *Operation, char SelectBase, int SpecialKeyBits, int EventType, int Key, char *ExtraInstructions);
  2042. int laKeyMapExecuteEvent(laOperator *from, laKeyMapper *km, laEvent *e);
  2043. int laKeyMapExecuteEventEx(laOperator *from, laPropPack *UiExtra, laKeyMapper *km, laEvent *e);
  2044. laOperatorType *laGetOperatorType(const char *ID);
  2045. void laSetOperatorLocalizer(void *ToPanel);
  2046. int laOperatorAvailable(char *ID, laPropPack *This, laStringSplitor *Instructions);
  2047. int laOperatorAvailableP(laOperatorType *at, laPropPack *This, laStringSplitor *Instructions);
  2048. int laOperatorAvailableSafe(char *ID, laPropPack *This, void *Real_FromInstance, laStringSplitor *Instructions);
  2049. int laOperatorAvailablePSafe(laOperatorType *at, laPropPack *This, void *Real_FromInstance, laStringSplitor *Instructions);
  2050. void laSendOperatorTriggerEvent();
  2051. void laRetriggerOperators();
  2052. int la_GenericTopPanelProcessing(laOperator* a, laEvent* e);
  2053. int OPMOD_FinishOnData(laOperator* a, laEvent* e);
  2054. void OPEXT_FreeUserData(laOperator* a, int mark_unused);
  2055. void laHideCursor();
  2056. void laShowCursor();
  2057. int la_UiOperatorExists(void *inst);
  2058. int laOperatorExistsT(laOperatorType* at);
  2059. int laOperatorExists(const char* ID);
  2060. int laInvokeUi(laOperator *From, char *ID, laEvent *e, void *inst, laListHandle *Locals, int IgnoreLocals);
  2061. int laInvokeUiP(laOperator *From, laOperatorType *at, laEvent *e, void *inst, laListHandle *Locals, int IgnoreLocals);
  2062. int laInvoke(laOperator *From, char *ID, laEvent *e, laPropPack *This, char *args, char *args2);
  2063. int laInvokeP(laOperator *From, laOperatorType *at, laEvent *e, laPropPack *This, char *args, char *args2);
  2064. int laInvokePCreateThis(laOperator *From, laOperatorType *at, laEvent *e, laPropPack *OrigionalThis, void *FromInstance, char *args, char *args2);
  2065. void laRequestDelayEvent(real Seconds);
  2066. int la_UiStillInService(void *UiInstance);
  2067. void la_StopUiOperatorService(void *UiInstance);
  2068. void la_StopAllOperators();
  2069. int la_ProcessTextEdit(laEvent *e, laStringEdit *se, laUiItem* ui);
  2070. void laConfirmPointer(laOperator *a, void* Data,laPropContainer* PointerType, int mode);
  2071. void laConfirmInt(laOperator *a, int Data, int mode);
  2072. void laConfirmFloat(laOperator *a, real Data, int mode);
  2073. void laConfirmString(laOperator *a, char *Str, int mode);
  2074. int laConfirmSameDataIfAny(laOperator *a);
  2075. void laConfirmUserData(laOperator *a, void *UserData, laConfirmDataDestroyFunc Destroy, int mode);
  2076. int laGetConfirmInt(laOperator *a);
  2077. real laGetConfirmFloat(laOperator *a);
  2078. void laGetConfirmString(laOperator *a, char *buf);
  2079. void *laGetConfirmUserData(laOperator *a);
  2080. //int laInvokeSub(laProp* From, char * ID, laEvent* e, void* inst);
  2081. void laFinalizeOperators();
  2082. int laWaitFor(laOperator *Who, int State);
  2083. void la_PrintOperatorStack();
  2084. void laui_DefaultPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *Extra, laUiDefineFunc header);
  2085. void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);;
  2086. void laui_DefaultSubWindowMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);;
  2087. void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);;
  2088. void laui_DefaultMenuBar(laWindow *w);
  2089. void laui_DefaultSubWindowMenuBar(laWindow *w);
  2090. void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);;
  2091. void laui_PropOperatorUiDefine(laUiList *uil, laPropPack *This, laPropPack *Unused, laColumn *UNUSED, int context);
  2092. int laCopyToClipboard(unsigned char * text);
  2093. extern laUiType *_LA_UI_FIXED_GROUP;
  2094. extern laUiType *_LA_UI_TAB;
  2095. extern laUiType _LA_UI_CONDITION; //NO PTR
  2096. extern laUiType _LA_UI_CONDITION_END; //NO PTR
  2097. extern laUiType _LA_UI_CONDITION_ELSE; //NO PTR
  2098. extern laUiType _LA_UI_ROW_BEGIN; //NO PTR
  2099. extern laUiType _LA_UI_ROW_END; //NO PTR
  2100. extern laUiType _LA_UI_INVISIBLE; //NO PTR
  2101. extern laUiType *_LA_UI_COLLECTION;
  2102. extern laUiType *_LA_UI_COLLECTION_ITEM;
  2103. extern laUiType *_LA_UI_COLLECTION_SELECTOR;
  2104. extern laUiType *_LA_UI_COLLECTION_SINGLE;
  2105. extern laUiType *_LA_UI_BUTTON;
  2106. extern laUiType *_LA_UI_LABEL;
  2107. extern laUiType *_LA_UI_INT;
  2108. extern laUiType *_LA_UI_METER_TYPE1;
  2109. extern laUiType *_LA_UI_METER_TYPE2;
  2110. extern laUiType *_LA_UI_VALUE_METER_2D;
  2111. extern laUiType *_LA_UI_FLOAT;
  2112. extern laUiType *_LA_UI_FLOAT_COLOR;
  2113. extern laUiType *_LA_UI_FLOAT_COLOR_HCY;
  2114. extern laUiType *_LA_UI_ENUM_SELECTOR;
  2115. extern laUiType *_LA_UI_MENU_ROOT;
  2116. extern laUiType *_LA_UI_CONDITION_TOGGLE;
  2117. extern laUiType *_LA_UI_STRING;
  2118. extern laUiType *_LA_UI_STRING_MULTI;
  2119. extern laUiType *_LA_UI_ALIGN;
  2120. extern laUiType *_LA_UI_CANVAS;
  2121. extern laUiType *_LA_UI_COLUMN_ADJUSTER;
  2122. extern laUiType *_LA_UI_SYMBOL;
  2123. extern laUiType *_LA_UI_COLUMN_VIEWER;
  2124. extern laUiType *_LA_UI_NODE_SOCKET;
  2125. extern laUiType *_LA_UI_HEIGHT_ADJUSTER;
  2126. extern laUiType *_LA_UI_RAW;
  2127. extern laUiType *_LA_UI_MAPPER;
  2128. extern laUiType *_LA_UI_IMAGE;
  2129. extern laUiType *_LA_UI_SCOPE;
  2130. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_UI;
  2131. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_UIE;
  2132. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_P;
  2133. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_PE;
  2134. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_BASE;
  2135. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_ACT;
  2136. extern laUiDefineFunc _LA_SUBPROP_DONT_CARE;
  2137. extern laBoxedTheme *_LA_THEME_PANEL;
  2138. extern laBoxedTheme *_LA_THEME_VALUATOR;
  2139. extern laBoxedTheme *_LA_THEME_BUTTON;
  2140. extern laBoxedTheme *_LA_THEME_STRING;
  2141. extern laBoxedTheme *_LA_THEME_SELECTOR;
  2142. extern laBoxedTheme *_LA_THEME_COLLECTION_SELECTOR;
  2143. extern laBoxedTheme *_LA_THEME_LABEL;
  2144. extern laBoxedTheme *_LA_THEME_TAB;
  2145. extern laBoxedTheme *_LA_THEME_COLLECTION_GROUP;
  2146. extern laBoxedTheme *_LA_THEME_COLLECTION_ITEM;
  2147. extern laBoxedTheme *_LA_THEME_FLOATING_PANEL;
  2148. extern laBoxedTheme *_LA_THEME_3D_VIEW;
  2149. extern laBoxedTheme *_LA_THEME_2D_VIEW;
  2150. extern laBoxedTheme *_LA_THEME_SOCKET;
  2151. extern laProp *_LA_PROP_PANEL;
  2152. extern laProp *_LA_PROP_BLOCK;
  2153. extern laProp *_LA_PROP_WINDOW;
  2154. extern laProp *_LA_PROP_UI_ITEM;
  2155. extern laProp *_LA_PROP_FAILED_ITEM;
  2156. extern laProp *_LA_PROP_TRASH_ITEM;
  2157. extern laProp *_LA_PROP_NODE_GRAPH;
  2158. extern laPropContainer *_LA_PROP_3D_EXTRA;
  2159. extern laPropContainer *_LA_PROP_2D_EXTRA;
  2160. extern laPropContainer *_LA_PROP_FILE_BROWSER;
  2161. extern laProp _P_LA_USE_INSTANCE_ONLY;
  2162. #define _LA_USE_INSTANCE_ONLY (&_P_LA_USE_INSTANCE_ONLY)
  2163. #define LA_RH0 (MAIN.UiRowHeight)
  2164. #define LA_RH (MAIN.ScaledUiRowHeight)
  2165. #define LA_2RH (MAIN.ScaledUiRowHeight*2)
  2166. #define LA_RH2 ((int)(MAIN.ScaledUiRowHeight/2))
  2167. #define LA_SCROLL_W ((int)(MAIN.ScaledUiRowHeight * 0.67))
  2168. #define LA_SEAM_W ((int)(MAIN.ScaledUiRowHeight * 0.15))