*/}}

la_interface.h 80 KB

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