*/}}

la_interface.h 71 KB

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