*/}}

la_interface.h 76 KB

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