*/}}

la_interface.h 64 KB

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