*/}}

la_interface.h 76 KB

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