*/}}
1
0

la_interface.h 76 KB

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