Ignore:
Timestamp:
08/14/24 00:56:06 (3 months ago)
Author:
Maciej Komosinski
Message:

Updated for current SDK sources and current Emscripten

File:
1 edited

Legend:

Unmodified
Added
Removed
  • js/sdk/js_interface/js_interface.idl

    r944 r1324  
    9191
    9292enum Part_Shape {
    93         "Part::SHAPE_BALL_AND_STICK",
     93        "Part::SHAPE_BALL",
    9494        "Part::SHAPE_ELLIPSOID",
    9595        "Part::SHAPE_CUBOID",
     
    111111        [Value] attribute Pt3D scale;
    112112        [Value] attribute Pt3D vcolor;
    113         attribute double vsize;
    114113        attribute long shape;
    115 
    116         void Part(optional Part_Shape s = "Part::SHAPE_BALL_AND_STICK");
     114        static readonly attribute double BALL_AND_STICK_RADIUS;
     115
     116        void Part(optional Part_Shape s = "Part::SHAPE_BALL");
    117117
    118118        void setPositionAndRotationFromAxis([Const, Ref] Pt3D p1, [Const, Ref] Pt3D p2);
     
    126126
    127127enum Joint_Shape {
    128         "Joint::SHAPE_BALL_AND_STICK",
    129         "Joint::SHAPE_FIXED"
     128        "Joint::SHAPE_STICK",
     129        "Joint::SHAPE_FIXED",
     130        "Joint::SHAPE_HINGE_X",
     131        "Joint::SHAPE_HINGE_XY"
    130132};
    131133
     
    247249        void Geno([Const] DOMString genstring, byte genformat, [Const] DOMString genname, [Const] DOMString comment);
    248250        boolean isValid();
    249         byte getFormat();
     251        [Value] SString getFormat();
    250252        [Value] SString getGenes();
     253        [Value] SString getGenesAndFormat();
    251254        static Validators useValidators(Validators val);
    252255        static GenoConvManager useConverters(GenoConvManager gcm);
     
    261264
    262265enum Model_ShapeType {
    263         "Model::SHAPE_UNKNOWN",
    264         "Model::SHAPE_ILLEGAL",
    265         "Model::SHAPE_BALL_AND_STICK",
    266         "Model::SHAPE_SOLIDS"
     266        "Model::SHAPETYPE_UNKNOWN",
     267        "Model::SHAPETYPE_ILLEGAL",
     268        "Model::SHAPETYPE_BALL_AND_STICK",
     269        "Model::SHAPETYPE_SOLIDS"
    267270};
    268271
     
    272275        attribute double startenergy;
    273276
    274         void Model();
    275         void Model([Ref, Const] Geno newgeno, optional boolean buildmaps = false);
     277        void Model(optional Model_ShapeType sh = "Model::SHAPETYPE_UNKNOWN");
     278
     279        void Model([Ref, Const] Geno src, Model_ShapeType sh, optional boolean buildmaps = false, optional boolean _using_checkpoints = false, optional boolean _is_checkpoint = false);
     280        // The following constructor exists in the SDK, however in idl functions need to differ in number of arguments so it can't exist with the previous constructor
     281        //void Model([Ref, Const] Model model, optional boolean buildmaps = false, optional boolean _using_checkpoints = false, optional boolean _is_checkpoint = false);
    276282
    277283        [Value] MultiMap getMap();
     
    283289        long getErrorPosition(boolean includingwarnings);
    284290        Model_ShapeType getShapeType();
     291        void declareShapeType(Model_ShapeType sh);
    285292        void updateRefno();
    286293        [Const, Value] Geno getF0Geno();
    287         void makeGeno([Ref] Geno geno);
     294        void makeGeno([Ref] Geno geno, optional MultiMap sh,optional boolean handle_defaults,optional boolean can_be_invalid);
    288295        void setGeno([Const, Ref] Geno newgeno);
    289296        void setValidationLevel(long level);
     
    348355
    349356interface GenotypeMiniLoader : MultiParamLoader {
    350     void GenotypeMiniLoader(VirtFILE f);
     357        //this constructor has the same number of arguments as the next one which is not allowed in idl
     358    //void GenotypeMiniLoader(VirtFILE f);
     359        void GenotypeMiniLoader([Const] DOMString filename);
    351360        GenotypeMini loadNextGenotype();
    352361};
     
    442451};
    443452
     453interface GenoConverter {
     454        [Const] attribute DOMString name;
     455        [Value] attribute SString in_format;
     456        [Value] attribute SString out_format;
     457};
     458
     459interface GenoConv_f40 : GenoConverter{
     460        void GenoConv_f40();
     461};
     462
     463interface GenoConv_f90 : GenoConverter{
     464        void GenoConv_f90();
     465};
     466
     467interface GenoConv_fL0 : GenoConverter{
     468        void GenoConv_fL0();
     469};
     470
     471interface GenoConv_fBH : GenoConverter{
     472        void GenoConv_fBH();
     473};
     474
     475
     476interface GenoConv_fS0s : GenoConverter{
     477        void GenoConv_fS0s();
     478};
     479
     480interface GenoConv_fH0 : GenoConverter{
     481        void GenoConv_fH0();
     482};
     483
     484interface GenoConvHelper{
     485        void GenoConvHelper(GenoConverter genoConv);
     486        [Const] DOMString getName();
     487};
     488
    444489interface GenoOperators {
    445490        void GenoOperators();
     
    447492        long checkValidity([Const] DOMString geno, [Const] DOMString genoname);
    448493        long validate(DOMString geno, [Const] DOMString genoname);
    449         [Value] SString getSimplest();
     494        [Const] DOMString getSimplest();
    450495};
    451496
     
    473518        void GenoOper_fF();
    474519};
     520
     521interface GenoOper_fS : GenoOperators {
     522        void GenoOper_fS();
     523};
     524
    475525
    476526interface GenoOperatorsHelper {
     
    481531        [Value] SString getLastCrossGeno1();
    482532        [Value] SString getLastCrossGeno2();
     533        [Const] DOMString getSimplest();
    483534};
    484535
     
    542593        void quickCopyFrom(ParamInterface src);
    543594
    544         //long save(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
     595        //long saveMultiLine(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
    545596
    546597        static boolean isValidTypeDescription([Const] DOMString t);
     
    553604interface Param : SimpleAbstractParam {
    554605        void Param(ParamEntry t, VoidPtr o);
    555         //long save(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
     606        long saveMultiLine(VirtFILE file, [Const] DOMString altname, optional boolean force = false);
    556607};
    557608
Note: See TracChangeset for help on using the changeset viewer.