*/}}
1
0

la_interface.h 76 KB

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