*/}}

la_interface.h 77 KB

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