*/}}

la_interface.h 70 KB

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