*/}}

la_interface.h 71 KB

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