*/}}

la_data.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905
  1. #pragma once
  2. #include "la_5.h"
  3. #include "la_tns.h"
  4. /* | given to | given to | array | */
  5. /* | user | user calls | setting| */
  6. /* | callback | and is used | needs | */
  7. /* | callback | to recieve | offset | */
  8. /* | callback | array config| hint | */
  9. /* +----------+-------------+--------+ */
  10. /* | The | | | */
  11. /* | DataBlock| The | The | */
  12. /* return value | Name | Instance | Actual Data | Offset | */
  13. /*\ / \_ \ / _/ */
  14. /* \ / \_ \ / _/ */
  15. /* \ / \_ \ / _/ */
  16. /* \ / \_ \ / _/ */
  17. /* \ / \ \ / _/ */
  18. typedef int (*laArrayGetLenF)(void *);
  19. typedef int (*laIntGetF)(void *);
  20. typedef void (*laIntSetF)(void *, int);
  21. typedef void (*laIntReadF)(void *, int);
  22. typedef void (*laIntArrayGetAllF)(void *, int *);
  23. typedef void (*laIntArraySetF)(void *, int, int); //idx,n
  24. typedef void (*laIntArraySetAllF)(void *, int);
  25. typedef void (*laIntArraySetAllArrayF)(void *, int *);
  26. typedef void (*laIntArrayReadAllF)(void *, int *);
  27. typedef real (*laFloatGetF)(void *);
  28. typedef void (*laFloatSetF)(void *, real);
  29. typedef void (*laFloatReadF)(void *, real);
  30. typedef void (*laFloatArrayGetAllF)(void *, real *);
  31. typedef void (*laFloatArraySetF)(void *, int, real); //idx,n
  32. typedef void (*laFloatArraySetAllF)(void *, real);
  33. typedef void (*laFloatArraySetAllArrayF)(void *, real *);
  34. typedef void (*laFloatArrayReadAllF)(void *, real *);
  35. typedef int (*laEnumGetF)(void *);
  36. typedef int (*laEnumGetLengthF)(void *);
  37. typedef void (*laEnumSetF)(void *, int);
  38. typedef void (*laEnumReadF)(void *, int);
  39. typedef void (*laEnumArraySetF)(void *, int, int); //idx,n
  40. typedef void (*laEnumArraySetAllF)(void *, int *);
  41. typedef void (*laEnumArrayReadAllF)(void *, int *);
  42. typedef void (*laEnumArrayGetAllF)(void *, int *);
  43. typedef void (*laStringSetF)(void *, char *);
  44. typedef void (*laStringGetF)(void *, char *copy_result, char** direct_result);
  45. typedef void (*laStringReadF)(void *, char *);
  46. typedef int (*laStringGetLenF)(void *);
  47. typedef void (*laSubReadF)(void *, void *); //from,set
  48. typedef void *(*laSubGetInstanceF)(void *, void *); //from,iterator
  49. typedef void (*laSubSetInstanceF)(void *, void *);
  50. typedef void *(*laSubGetNextF)(void *, void *); //this,iterator
  51. typedef int (*laSubGetAmountF)(void *);
  52. typedef int (*laSubGetStateF)(void *);
  53. typedef int (*laSubSetStateF)(void *, void *, int);
  54. typedef void *(*laSubTypeDetachedGet)(void *, void *);
  55. typedef void *(*laSubTypeDetachedGetNext)(void *, void *);
  56. typedef void *(*laSubGetTypeF)(void *);// inst, returns type ref.
  57. typedef int (*laSubUIFilterF)(void* parent, void* inst); // 1 show, 0 discard.
  58. typedef void *(*laSubUIThemeF)(void* parent, void* inst); // return a theme, MAIN.CurrentTheme can always be referenced to produce invert.
  59. typedef int (*laSubUIGapF)(void* parent, void* inst);
  60. typedef void (*laSubUICategoryF)(void* parent, void* inst, char *copy_result, char** direct_result);
  61. typedef void* (*laRawGetF)(void *, int* r_size, int* return_is_a_copy);
  62. typedef int (*laRawGetSizeF)(void *);
  63. typedef void (*laRawSetF)(void *, void* data, int copy_size);
  64. typedef void (*laContainerPostReadFunc)(void *);
  65. typedef laPropContainer* (*laGetNodeTypeFunc)(void *);
  66. typedef void (*laContainerBeforeFreeF)(void *);
  67. typedef void (*laContainerUndoTouchedF)(void *, u64bit hint);
  68. typedef void (*laContainerpUDFPropagateF)(void *, void* udf, int Force);
  69. #define LA_PROP_GENERAL_ROOT (1<<7)
  70. #define LA_PROP_SUB (1<<8)
  71. #define LA_PROP_INT (1<<9)
  72. #define LA_PROP_FLOAT (1<<10)
  73. #define LA_PROP_STRING (1<<11)
  74. #define LA_PROP_ENUM (1<<12)
  75. #define LA_PROP_STRING (1<<13)
  76. #define LA_PROP_ARRAY (1<<14)
  77. #define LA_PROP_PANEL (1<<15)
  78. #define LA_PROP_UI (1<<16)
  79. #define LA_PROP_OPERATOR (1<<17)
  80. #define LA_PROP_MENU (1<<18)
  81. #define LA_PROP_SELF_CONDITION (1<<19)
  82. #define LA_PROP_BIN (1<<20)
  83. #define LA_PROP_REF_LIST (1<<21)
  84. #define LA_PROP_GENERIC_BITS (~LA_PROP_ARRAY)
  85. #define LA_PROP_IS_FOLDER (1<<22)
  86. #define LA_PROP_IS_FILE (1<<23)
  87. #define LA_PROP_RAW (1<<24)
  88. #define LA_PROP_OTHER_ALLOC (1<<3)
  89. #define LA_PROP_HYPER_BITS (1|2)
  90. #define LA_RAW_CSTR_MAX_LEN 4096
  91. typedef void (*laUiDefineFunc)(void *uil, void *collection_inst, void *this_inst, void *extra_col, int temlpate_context);
  92. typedef void (*laPanelDetachedPropFunc)(void *panel);
  93. //typedef void(*laUnlinkFunc)(void*, void*);//this instance,target instance
  94. NEED_STRUCTURE(laCanvasTemplate);
  95. NEED_STRUCTURE(laKeyMapper);
  96. STRUCTURE(laPropContainer){
  97. laListItem Item;
  98. const char *Identifier;
  99. const char *Name;
  100. const char *Description;
  101. uint32_t IconID;
  102. int NodeSize;
  103. laContainerBeforeFreeF BeforeFree;
  104. laContainerUndoTouchedF UndoTouched;
  105. laContainerpUDFPropagateF UDFPropagate;
  106. laContainerPostReadFunc PostRead;
  107. laContainerPostReadFunc PostReadIm;
  108. int Hyper;
  109. int OtherAlloc;
  110. laCanvasTemplate *Template2D;
  111. laListHandle Props;
  112. laUiDefineFunc UiDefine;
  113. laUiDefineFunc MenuUiDefine;
  114. laListHandle FailedNodes;
  115. laListHandle TrashBin;
  116. laListHandle LocalUsers;
  117. int validated;
  118. };
  119. NEED_STRUCTURE(laUiType);
  120. NEED_STRUCTURE(laPanel);
  121. NEED_STRUCTURE(laPropStep);
  122. STRUCTURE(laPropPack){
  123. laPropStep *Go;
  124. void *EndInstance;
  125. laPropStep *LastPs;
  126. laPropPack *RawThis;
  127. char LastIndex;
  128. void *CopyRef; //Also template creation
  129. };
  130. STRUCTURE(laProp){
  131. laListItem Item;
  132. laPropContainer *Container;
  133. int PropertyType;
  134. int ReadOnly;
  135. //laProp* Detached;
  136. laPropPack DetachedPP;
  137. int Len;
  138. char ElementBytes;
  139. uint32_t IconID;
  140. const char *Identifier;
  141. const char *Name;
  142. const char *Description;
  143. const char *Prefix;
  144. const char *Unit;
  145. const char *ExtraInstructions;
  146. laArrayGetLenF GetLen;
  147. laPropContainer *SubExtra; //?
  148. laPropContainer *SubProp;
  149. laUiDefineFunc UiDefine;
  150. laUiType *DefaultUiType;
  151. int DefaultFlags;
  152. int Offset;
  153. char OffsetIsPointer;
  154. char UDFIsRefer;
  155. char UDFNoCreate;
  156. char UDFIgnore;
  157. char UDFOnly;
  158. char UDFIsSingle;
  159. char IsRadAngle;
  160. //int SignalThrow;
  161. //int SignalCatch;
  162. u64bit Tag;
  163. laListHandle UserPanels;
  164. };
  165. STRUCTURE(laPropUserPanel){
  166. laListItem Item;
  167. laPanel *Panel;
  168. laListHandle UserPacks;
  169. };
  170. STRUCTURE(laPropUser){
  171. laListItem Item;
  172. laPropStep *User;
  173. unsigned int FrameDistinguish;
  174. };
  175. STRUCTURE(laPropStep){
  176. laPropStep *pNext;
  177. laProp *p;
  178. char Type;
  179. void *UseInstance;
  180. };
  181. STRUCTURE(laPropLink){
  182. laListItem Item;
  183. laPropPack Recieve;
  184. laSafeString *Identifier;
  185. laProp *Prop;
  186. laPropStep FakePS;
  187. laPropPack PP;
  188. void *DataStowage;
  189. };
  190. STRUCTURE(laIntProp){
  191. laProp Base;
  192. laIntGetF Get;
  193. laIntSetF Set;
  194. laIntArraySetF SetArr;
  195. laIntArraySetAllF SetAll;
  196. laIntArraySetAllArrayF SetAllArr;
  197. laIntArrayGetAllF GetAll;
  198. laIntReadF Read;
  199. laIntArrayReadAllF ReadAll;
  200. int Step;
  201. int Min, Max;
  202. int DefVal;
  203. const int *DefArr;
  204. int *Detached;
  205. };
  206. STRUCTURE(laFloatProp){
  207. laProp Base;
  208. laFloatGetF Get;
  209. laFloatSetF Set;
  210. laFloatArraySetF SetArr;
  211. laFloatArraySetAllF SetAll;
  212. laFloatArraySetAllArrayF SetAllArr;
  213. laFloatArrayGetAllF GetAll;
  214. laFloatReadF Read;
  215. laFloatArrayReadAllF ReadAll;
  216. real Step;
  217. real Min, Max;
  218. real DefVal;
  219. const real *DefArr;
  220. real *Detached;
  221. };
  222. STRUCTURE(laEnumItem){
  223. laListItem Item;
  224. const char *Identifier;
  225. const char *Name;
  226. const char *Description;
  227. int Index;
  228. uint32_t IconID;
  229. };
  230. STRUCTURE(laEnumProp){
  231. laProp Base;
  232. laEnumGetF Get;
  233. laEnumGetLengthF GetLen;
  234. laEnumSetF Set;
  235. laEnumArraySetF SetArr;
  236. laEnumArraySetAllF SetAll;
  237. laEnumArrayGetAllF GetAll;
  238. laEnumReadF Read;
  239. laEnumArrayReadAllF ReadAll;
  240. laListHandle Items; //id start from 1.
  241. int DefVal;
  242. const int *DefArr;
  243. int *Detached;
  244. };
  245. STRUCTURE(laStringProp){
  246. laProp Base;
  247. laStringGetF Get;
  248. laStringSetF Set;
  249. laStringGetLenF Getstrlen;
  250. laStringReadF Read;
  251. char IsSafeString;
  252. const char *DefStr;
  253. char *Detached;
  254. };
  255. NEED_STRUCTURE(laOperatorType)
  256. STRUCTURE(laOperatorProp){
  257. laProp Base;
  258. const char *OperatorID;
  259. laOperatorType *OperatorType;
  260. };
  261. STRUCTURE(laRawProp){
  262. laProp Base;
  263. laRawGetF RawGet;
  264. laRawSetF RawSet;
  265. laRawGetSizeF RawGetSize;
  266. };
  267. STRUCTURE(laSubProp){
  268. laProp Base;
  269. laSubGetInstanceF Get;
  270. laSubGetInstanceF GetActive;
  271. laSubSetInstanceF Set;
  272. laSubGetNextF GetNext;
  273. laSubGetStateF GetState;
  274. laSubSetStateF SetState;
  275. laSubGetAmountF GetAmount;
  276. laSubUIFilterF UiFilter;
  277. laSubUIThemeF GetTheme;
  278. laSubUIGapF GetGap;
  279. laSubUICategoryF GetCategory;
  280. int ListHandleOffset;
  281. laSubTypeDetachedGet DetachedGet;
  282. laSubTypeDetachedGetNext DetachedGetNext;
  283. const char *TargetID;
  284. laGetNodeTypeFunc GetType;
  285. void *Detached;
  286. int IsRefList;
  287. };
  288. STRUCTURE(laPropIterator){
  289. laListItemPointer *Linker;
  290. void *Parent;
  291. void *Handle;
  292. };
  293. //STRUCTURE(laPropGroup) {
  294. // laListItem Item;
  295. // const char * Identifier;
  296. // const char * Name;
  297. // const char * Description;
  298. // //const char * Prefix;
  299. // //const char * Unit;
  300. //
  301. // laListHandle Properties;
  302. //};
  303. STRUCTURE(laResourceFolder){
  304. laListItem Item;
  305. laSafeString* Path;
  306. };
  307. STRUCTURE(laRoot){
  308. laPropContainer *Root;
  309. void *RootInstance;
  310. };
  311. STRUCTURE(laUDFPostRead){
  312. laListItem Item;
  313. void *Instance;
  314. laContainerPostReadFunc Func;
  315. };
  316. //STRUCTURE(laUDFPointerSync) {
  317. // laListItem Item;
  318. // void* ReadPointer;
  319. // void* ActualPointer;
  320. // char * NUID;
  321. //};
  322. //STRUCTURE(laUDFPointerRecord) {
  323. // laListItem Item;
  324. // void* UseInstance;
  325. // laSubProp* SubProp;
  326. // void** PendingReference;
  327. // void* ReadInstance;
  328. // char * NUID;
  329. //};
  330. STRUCTURE(laPtrSync){
  331. laListItem Item; //hash
  332. void *RefDB;
  333. //void* ReadRef;
  334. void *Parent; //key
  335. laSubProp *Prop; //must be sub
  336. };
  337. STRUCTURE(laPtrSyncCommand){
  338. laListItem Item;
  339. laPtrSync *Target;
  340. void *ReadInstance;
  341. laUID ReadNUID;
  342. };
  343. STRUCTURE(laUDFPropSegment){
  344. laListItem Item;
  345. laPropPack *PPP;
  346. laPropPack PP;
  347. laSafeString *Path;
  348. };
  349. STRUCTURE(laUDFH2Instance){
  350. laListItem Item;
  351. laPropContainer* pc;
  352. void* Instance;
  353. };
  354. STRUCTURE(laUDF){
  355. int Opened;
  356. FILE *DiskFile;
  357. laSafeString *FileName;
  358. laListHandle H2Instances;
  359. laUDFH2Instance* CurrentH2Instance;
  360. laListHandle PropsToOperate;
  361. //laListHandle PointerSync;
  362. //laListHandle PointerRecording;
  363. short NumSegmets;
  364. short Modified;
  365. short HasInstances;
  366. short Managed;
  367. u8bit *FileContent;
  368. u64bit Seek;
  369. long TotalRefs;
  370. laListHandle HyperRecords; //writing
  371. //laListHandle LinkedFiles; //writing and reading
  372. laListHandle OwnHyperItems; //reading
  373. };
  374. STRUCTURE(laUDFHyperRecordItem){
  375. laListItem Item;
  376. void* HyperUserMem;
  377. laPropContainer* pc;
  378. u64bit Seek;
  379. };
  380. STRUCTURE(laUDFRegistry){
  381. laListItem Item;
  382. laSafeString* Path;
  383. };
  384. STRUCTURE(laUDFOwnHyperItem){
  385. laListItem Item;
  386. laUID NUID;
  387. laUDFRegistry* Registry;
  388. u64bit Seek;
  389. };
  390. STRUCTURE(laTrashRestoreExtra){
  391. void *Instance;
  392. laListHandle Instances;
  393. };
  394. STRUCTURE(laManagedUDF){
  395. laListItem Item;
  396. laUDF* udf;
  397. laSafeString *BaseName; // update together
  398. laListHandle PropSegments;
  399. };
  400. STRUCTURE(laManagedSaveProp){
  401. laListItem Item;
  402. laSafeString* Path;
  403. };
  404. NEED_STRUCTURE(laUDFContentInstance);
  405. STRUCTURE(laUDFContentNode){
  406. laListItem Item;
  407. laListHandle Instances;
  408. laSafeString *Identifier;
  409. laSafeString *FullPath;
  410. unsigned long FileSeek;
  411. laPropPack PP;
  412. laPropStep FakePS;
  413. laUDFContentInstance *Parent;
  414. };
  415. STRUCTURE(laUDFContentInstance){
  416. laListItem Item;
  417. laSafeString *Identifier;
  418. u64bit FileSeek;
  419. laUDFContentNode *Parent;
  420. laListHandle Children;
  421. };
  422. STRUCTURE(laDiff){
  423. laListItem Item;
  424. laListHandle Commands;
  425. laListHandle ExtraTouched;
  426. laSafeString* Description;
  427. u64bit Hint;
  428. };
  429. STRUCTURE(laDiffExtraTouched){
  430. laListItem Item;
  431. laDBInst* dbi;//ref, not owner
  432. };
  433. STRUCTURE(laDiffCommand){
  434. laListItem Item;
  435. laDBInst* Instance;
  436. laProp* p;
  437. void* Data; //for sub, this is dbinst.
  438. };
  439. STRUCTURE(laDiffCommandRaw){
  440. laListItem Item;
  441. laDBInst* Instance;
  442. laProp* p;
  443. void* Data; int DataSize;
  444. };
  445. STRUCTURE(laDiffCommandInst){
  446. laListItem Item;
  447. laDBInst* OriginalPrev;
  448. laDBInst* OriginalNext;
  449. laDBInst* BeforePrev;
  450. laDBInst* BeforeNext;
  451. laDBInst* DBInst;
  452. };
  453. STRUCTURE(laDiffCommandSub){
  454. laDiffCommand Base;
  455. laListHandle AddedInst;
  456. laListHandle RemovedInst;
  457. laListHandle MovedInst;
  458. };
  459. STRUCTURE(laDiffTemp){
  460. laListItem Item;
  461. void* p;
  462. void* tPrev;
  463. void* tNext;
  464. void* nPrev;
  465. void* nNext;
  466. };
  467. STRUCTURE(laDBRecordedProp){
  468. laListItem Item;
  469. laSafeString* OriginalPath;
  470. };
  471. STRUCTURE(laDBInstPendingRelink){
  472. laListItem Item;
  473. laDBInst* dbi; void* from; void* to;
  474. };
  475. STRUCTURE(laDBInst){
  476. laListItem Item;
  477. laListItem Item2;//DBInstLink
  478. void* OriginalInstance;
  479. laPropContainer* pc;
  480. laListHandle Props;
  481. };
  482. STRUCTURE(laDBProp){
  483. laListItem Item;
  484. laProp* p;
  485. void* Data;
  486. //---------------
  487. };
  488. ;
  489. STRUCTURE(laDBRawProp){
  490. laListItem Item;
  491. laProp* p;
  492. void* Data;
  493. //---------------
  494. int DataSize;
  495. };
  496. STRUCTURE(laDBSubProp){
  497. laListItem Item;
  498. laProp* p;
  499. void* Data;
  500. //---------------
  501. laListHandle Instances;
  502. };
  503. STRUCTURE(laDiffPtrSync){
  504. laListItem Item;
  505. void* instance;
  506. laDBProp* dbp;
  507. laDiffCommand* dc;
  508. };
  509. STRUCTURE(laDiffPost){
  510. laListItem Item;
  511. void* instance;
  512. laContainerUndoTouchedF Touched;
  513. };
  514. //STRUCTURE(laUDFFailNode) {
  515. // laListItemPointer Item;
  516. // laPropContainer* pc;
  517. //};
  518. /* Only little endian are supported right now */
  519. #define LA_UDF_IDENTIFIER "UDF_LE"
  520. #define LA_UDF_EXTENSION_FLOAT32 (1<<0)
  521. #define LA_UDF_EXTENSION_RAW (1<<1)
  522. #define LA_UDF_EXTENSION_BITS 0
  523. #define LA_UDF_MARK_TIMESTAMP 3
  524. #define LA_UDF_MODE_APPEND 0
  525. #define LA_UDF_MODE_OVERWRITE 1
  526. #define LA_UDF_SINGLE (1<<0)
  527. #define LA_UDF_COLLECTION (1<<1)
  528. #define LA_UDF_REFER (1<<2)
  529. #define LA_UDF_ITEM (1<<3) //ItemType
  530. #define LA_UDF_ACTIVE (1<<4)
  531. #define LA_UDF_STATE (1<<5)
  532. #define LA_UDF_REGULAR_MARK_64 (1<<6)
  533. #define LA_UDF_ARRAY_MARK_64 (1<<7)
  534. #define LA_UDF_HYPER_ITEM (1<<8) //ItemType
  535. #define LA_UDF_SHARE_RESOURCE (1<<9)
  536. #define LA_UDF_USE_VERSION (1<<10) //Use History
  537. #define LA_UDF_REGULAR_MARK_32 (1<<10)
  538. #define LA_UDF_ARRAY_MARK_32 (1<<11)
  539. #define LA_UDF_STRING_MARK (1<<12)
  540. #define LA_UDF_HYPER_MARK (1<<13)
  541. #define LA_UDF_ONLY (1<<14)
  542. #define LA_UDF_RAW_MARK (1<<14)
  543. //#define LA_UDF_LINKED_ITEM (1<<15) //ItemType
  544. #define LA_UDF_IGNORE (1<<16)
  545. #define LA_DETACHABLE (1<<17)
  546. #define LA_UDF_VARIABLE_NODE_SIZE (1<<18)
  547. #define LA_UDF_FIXED_NODE_SIZE (1<<19)
  548. #define LA_UDF_LOCAL (1<<20)
  549. #define LA_RAD_ANGLE (1<<21)
  550. #define LA_UDF_PRINT_STATICS (1<<22)
  551. #define LA_UDF_NUID_SEEK (1<<23)
  552. #define LA_UDF_NUID_LINK_FILES (1<<24)
  553. #define LA_AS_IDENTIFIER (1<<25)
  554. #define LA_UDF_USE_LINK_NODE (1<<26)
  555. #define LA_READ_ONLY (1<<27)
  556. STRUCTURE(laThreadNotifier){
  557. laListItem Item;
  558. char Path[256];
  559. };
  560. laPropContainer *laDefineRoot();
  561. NEED_STRUCTURE(laOperatorType)
  562. NEED_STRUCTURE(laOperator)
  563. NEED_STRUCTURE(laEvent)
  564. void *laget_ListNext(laListItem *Item, void *UNUSED);
  565. void *laget_ListPrev(laListItem *Item, void *UNUSED);
  566. void *laget_List2Next(laListItem2 *Item, void *UNUSED);
  567. void *laget_List2Prev(laListItem2 *Item, void *UNUSED);
  568. void la_DEBUG_VerifyThisContainer(laPanel *pa, laPropContainer *pc);
  569. void la_DEBUG_VerifyPanelPropsDestroyed(laPanel *p);
  570. void la_CopyPropPack(laPropPack *From, laPropPack *To);
  571. void laPropPackToLocal(laPropPack* ToPP, laPropPack* pp);
  572. laPropContainer* la_EnsureSubTarget(laSubProp* sp, void* optional_instance);
  573. laPropContainer *la_ContainerLookup(char *ID);
  574. laProp *la_PropLookup(laListHandle *lst, char *ID);
  575. void la_UsePropPack(laPropPack *pp, int ForceRecalc);
  576. void la_StopUsingPropPack(laPropPack *pp);
  577. void la_SetPropMathcerContext(laPanel *p);
  578. void laNotifyUsersPP(laPropPack *pp);
  579. void laNotifyUsersPPPath(laPropPack *pp, char *path);
  580. void laNotifySubPropUsers(laProp *p, void *Instance);
  581. void laNotifyUsers(char *Path);
  582. void laNotifyInstanceUsers(void *Instance);
  583. void laThreadNotifyUsers(char *Path);
  584. int laIsPropertyReadOnly(laPropPack *pp);
  585. int laGetPrefixP(laPropPack *p, char buf[8][64]);
  586. int laGetPrefix(laProp *p, char buf[8][64]);
  587. laPropContainer* laGetInstanceType(laPropPack* pp, void* instance);
  588. laUiDefineFunc* laGetPropertyUiDefine(laPropPack* pp, void* instance);
  589. int laSetInt(laPropPack *pp, int n);
  590. int laGetInt(laPropPack *pp);
  591. int laSetFloat(laPropPack *pp, real n);
  592. real laGetFloat(laPropPack *pp);
  593. int laGetArrayLength(laPropPack *pp);
  594. int laSetIntArraySingle(laPropPack *pp, int index, int n);
  595. int laSetIntArrayAll(laPropPack *pp, int n);
  596. int laSetIntArrayAllArray(laPropPack *pp, int *arr);
  597. int laGetIntArray(laPropPack *pp, int *result);
  598. int laSetFloatArraySingle(laPropPack *pp, int index, real n);
  599. int laSetFloatArrayAll(laPropPack *pp, real n);
  600. int laSetFloatArrayAllArray(laPropPack *pp, real *arr);
  601. int laGetFloatArray(laPropPack *pp, real *result);
  602. laEnumItem *laGetEnum(laPropPack *pp);
  603. laEnumItem *laGetEnumEntryLen(laPropPack *pp);
  604. laEnumItem *laGetEnumArrayIndexed(laPropPack *pp, int index);
  605. int laGetEnumArray(laPropPack *pp, laEnumItem **result);
  606. laEnumItem *laGetEnumFromIdentifier(laEnumProp *p, char *Identifier);
  607. int laEnumHasIcon(laPropPack *pp);
  608. int laSetEnumExternal(laPropPack *pp, int n);
  609. int laSetEnum(laPropPack *pp, int n);
  610. int laSetEnumArrayIndexedExternal(laPropPack *pp, int index, int n);
  611. int laSetEnumArrayIndexed(laPropPack *pp, int index, int n);
  612. int laSetEnumArrayAllArray(laPropPack* pp, laEnumItem** ei);
  613. int laSetEnumArrayAll(laPropPack* pp, int EnumN);
  614. int laSetString(laPropPack *pp, char *str);
  615. int laGetString(laPropPack *pp, char *result, char** direct_result);
  616. int laActuateProp(laPropPack *This, laPropPack *RunPP, laOperator *OptionalFrom, laEvent *e);
  617. int laGetIntRange(laPropPack *pp, int *min, int *max);
  618. int laGetFloatRange(laPropPack *pp, real *min, real *max);
  619. void* laGetRaw(laPropPack *pp, int* r_size, int* return_is_a_copy);
  620. int laSetRaw(laPropPack *pp, void* data, int _size);
  621. void laMarkPropChanged(laPropPack* pp);
  622. void *la_FindMatchingInstance(void *From, laProp *Sub, laProp *p, laPropStep *Value);
  623. void la_FreePropStepCache(laPropStep *GoTarget);
  624. void la_StepPropPack(laPropPack *pp);
  625. void la_GetPropPackFullPath(laPropPack *pp, char *result);
  626. void la_GetPropPackPath(laPropPack *pp, char *result);
  627. laItemUserLinker *laUseDataBlock(void* HyperUserMem, laProp *Which, unsigned int FrameDistinguish, void *User, laUserRemoveFunc Remover, int ForceRecalc);
  628. void laStopUsingDataBlock(void* HyperUserMem, laProp *prop, laPanel *p);
  629. void laDataBlockNoLongerExists(void *HyperUserMem, laListHandle* UserList);
  630. void laThrowToTrashBin(void* Data, char *ContainerString);
  631. void la_FreeProperty(laProp* p);
  632. void la_FreePropertyContainer(laPropContainer* pc);
  633. laPropContainer *laAddPropertyContainer(const char *Identifier, const char *Name, const char *Description, uint32_t IconID, laUiDefineFunc DefaultUiDefine,
  634. int NodeSize, laContainerPostReadFunc PostRead, laContainerPostReadFunc PostReadIm, int IsHyper);
  635. void laPropContainerExtraFunctions(laPropContainer* pc, laContainerBeforeFreeF BeforeFree, laContainerUndoTouchedF UndoTouched, laContainerpUDFPropagateF UDFPropagate, laUiDefineFunc MenuUi);
  636. const char *la_GetPropertyTypeString(int Type);
  637. NEED_STRUCTURE(laWidget);
  638. laProp *la_CreateProperty(laPropContainer *Container, int Type, const char *Identifier, const char *Name, const char *Description,
  639. const char *Prefix, const char *Unit, laWidget* DefaultWidget, u64bit Tag);
  640. void la_ClearDetachedProp(laPanel* p);
  641. laProp *la_MakeDetachedProp(laPanel* p, const char *From, const char *Rename);
  642. laProp *laAddIntProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description, laWidget* DefaultWidget,
  643. const char *Prefix, const char *Unit, int Max, int Min, int Step, int DefVal, const int *DefArr,
  644. int OffsetSize, laIntGetF Get, laIntSetF Set, int ArrayLength, laArrayGetLenF GetLen,
  645. laIntArraySetF SetArr, laIntArrayGetAllF GetAll, laIntArraySetAllF SetAll, laIntArraySetAllArrayF SetAllArr,
  646. laIntReadF Read, laIntArrayReadAllF ReadAll,
  647. u64bit Tag);
  648. laProp *laAddFloatProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description, laWidget* DefaultWidget,
  649. const char *Prefix, const char *Unit, real Max, real Min, real Step, real DefVal, const real *DefArr,
  650. int OffsetSize, laFloatGetF Get, laFloatSetF Set, int ArrayLength, laArrayGetLenF GetLen,
  651. laFloatArraySetF SetArr, laFloatArrayGetAllF GetAll, laFloatArraySetAllF SetAll, laFloatArraySetAllArrayF SetAllArr,
  652. laFloatReadF Read, laFloatArrayReadAllF ReadAll,
  653. u64bit Tag);
  654. laProp *laAddEnumProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description, laWidget* DefaultWidget,
  655. const char *Prefix, const char *Unit, int DefVal, const int *DefArr,
  656. int OffsetSize, laEnumGetF Get, laEnumSetF Set, int ArrayLength, laArrayGetLenF GetLen,
  657. laEnumArraySetF SetArr, laEnumArrayGetAllF GetAll, laEnumArraySetAllF SetAll,
  658. laEnumReadF Read, laEnumArrayReadAllF ReadAll,
  659. u64bit Tag);
  660. int laAddEnumItem(laProp *p, const char *Identifier, const char *Name, const char *Description, uint32_t IconID);
  661. int laAddEnumItemAs(laProp *p, const char *Identifier, const char *Name, const char *Description, int Index, uint32_t IconID);
  662. laProp *laAddStringProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description, laWidget* DefaultWidget,
  663. const char *Prefix, const char *Unit, const char *DefStr,
  664. int IsSafeString, int OffsetSize, laStringGetLenF GetLen, laStringGetF Get, laStringSetF Set,
  665. laStringReadF Read,
  666. u64bit Tag);
  667. laProp *laAddSubGroup(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description,
  668. const char *TargetId, laGetNodeTypeFunc GetType, laWidget* DefaultWidget, laUiDefineFunc DefaultUiDef,
  669. int OffsetSize, laSubGetInstanceF Get, laSubGetInstanceF GetActive, laSubGetNextF GetNext, laSubSetInstanceF Set,
  670. laSubGetStateF GetState, laSubSetStateF SetState, int ListHandleOffset, u64bit Tag);
  671. void laSubGroupExtraFunctions(laProp* p, laSubUIFilterF* UiFilter, laSubUIThemeF* GetTheme, laSubUIGapF GetGap, laSubUICategoryF GetCategory);
  672. void laSubGroupDetachable(laProp *SubProp, laSubTypeDetachedGet DetachedGet, laSubTypeDetachedGetNext DetachedGetNext);
  673. laProp *laAddOperatorProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description,
  674. const char *OperatorID, uint32_t IconID, laWidget* DefaultWidget);
  675. laProp *laAddRawProperty(laPropContainer *Container, const char *Identifier, const char *Name, const char *Description, int OffsetSize, laRawGetSizeF GetSize, laRawGetF RawGet, laRawSetF RawSet, u64bit Tag);
  676. //void laPropertySignal(laProp* p, int Throw, int Catch);
  677. NEED_STRUCTURE(laBoxedTheme);
  678. void *laGetInstance(laProp *sub, void *ThisInstance, laPropIterator *pi);
  679. void *laGetNextInstance(laProp *sub, void *FromInstance, laPropIterator *pi);
  680. void *laGetActiveInstanceStrict(laProp *sub, void *FromInstance);
  681. void *laGetActiveInstance(laProp *sub, void *FromInstance, laPropIterator *pi);
  682. void laSetActiveInstance(laProp *sub, void *FromInstance, void *Instance);
  683. void laAppendInstance(laSubProp *sub, void *FromInstance, void *Instance);
  684. int laGetUiState(laProp *sub, void *Instance);
  685. laBoxedTheme* laGetUiTheme(laProp *sub, void* parent, void *Instance);
  686. int laGetUiGap(laProp *sub, void* parent, void *Instance);
  687. void laGetCategory(laProp *sub, void* parent, void *Instance, char* buf, char** buf_ptr);
  688. int laCanGetState(laProp *sub);
  689. int laCanGetTheme(laProp *sub);
  690. int laCanGetGap(laProp *sub);
  691. int laCanGetCategory(laProp *sub);
  692. int laSetState(laProp *sub, void *FromInstance, void *Instance, int State);
  693. laPropContainer *la_SetGeneralRoot(laPropContainer **GeneralRoot, const char *Identifier, const char *Name, const char *Description);
  694. int la_GetPropFromPath(laPropPack *Self, laPropPack *Base, const char *Path, void **SpecifiedInstance);
  695. laProp *la_GetGeneralPropFromPath(laProp *General, const char *Path);
  696. int laValidateProperties();
  697. void laSetRootInstance(void *root);
  698. void la_RegisterMainUiTypes();
  699. void la_RegisterMainThemes();
  700. void la_RegisterInternalProps();
  701. void la_PrintPropStructure();
  702. laProp *la_GetGeneralProp(laProp *p);
  703. void* laget_InstanceActiveUDF(void* instance);
  704. void laset_InstanceUDF(void* instance, void* set);
  705. void la_UDFAppendSharedTypePointer(char *ID, void *Pointer);
  706. void la_AppendLinkedFile(laUDF *File);
  707. void la_GetWorkingDirectoryInternal();
  708. int laGetRelativeDirectory(char *FullFrom, char *FullTo, char *Result);
  709. void laGetUDFRelativeDirectory(laUDF *From, laUDF *To, char *Result);
  710. void laGetFullPath(char *FullFrom, char *Relative, char *Result);
  711. laUDF *laPrepareUDF(char *FileName);
  712. int laWriteProp(laUDF *udf, char *Path);
  713. int laWritePropP(laUDF *udf, laPropPack *pp);
  714. int laPackUDF(laUDF *udf, int UseInstanceList);
  715. void laSaveProp(char* path);
  716. void laClearSaveProp();
  717. int laRegisterModifications(int ReturnIfAnyMod, int ReturnIfAnyEmpty, int* rempty, int RegisterToUDF);
  718. laUDF *laOpenUDF(char *FileName, int ReadToMemory, laUDFRegistry* ReadRegistryRef, laManagedUDF** UseManaged);
  719. void laCloseUDF(laUDF *udf);
  720. int laExtractUDF(laUDF *udf, laManagedUDF* mUDF, int Mode, laListHandle *Parent);
  721. laUDFOwnHyperItem* laFindHyperItem(laPropContainer* pc, char* uid);
  722. laUDFRegistry* laFindUDFRegistry(char* Path);
  723. laUDFRegistry* laCreateUDFRegistry(char* Path);
  724. void laClearUDFRegistries();
  725. void laRefreshUDFRegistries();
  726. laManagedUDF* la_FindManagedUDF(char* FileName);
  727. laManagedUDF* la_EnsureManagedUDF(char* FileName, int PutAtTop);
  728. void la_MakeDummyManagedUDF();
  729. void laStopManageUDF(laManagedUDF* m);
  730. void laClearManagedUDF();
  731. void laSaveManagedUDF();
  732. void laPropagateUDF(laPropContainer* pc, void* inst, int force);
  733. //================== manifest
  734. void laAddResourceFolder(char* Path);
  735. void laRemoveResourceFolder(laResourceFolder* rf);
  736. void la_ClearUDFRegistryAndFolders();
  737. //================== undo
  738. void laPrintDBInstInfo();
  739. void la_NoLongerRecordUndo();
  740. void laAddRootDBInst(char* path);
  741. void laPushDifferences(char* Description, u64bit hint);
  742. int laRecordDifferences(laPropPack* base, char* path);
  743. int laRecordInstanceDifferences(void* instance, const char* container);
  744. void laRecordAndPush(laPropPack* base, char* path, char* description, uint64_t hint);
  745. void laRecordAndPushProp(laPropPack* base, char* path);
  746. void laRecordEverythingAndPush();
  747. void laUndo();
  748. void laRedo();