*/}}

la_interface.h 68 KB

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