<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="newmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="newsystemmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setsystemmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetsystemmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="preventmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="enablemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="disablemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globalpreventmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globalenablemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="globaldisablemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
            <cd:keywords optional="yes">
                <cd:constant type="yes"/>
                <cd:constant type="no" default="yes"/>
                <cd:constant type="keep"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="booleanmodevalue" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsemode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifmodeelse" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifnotmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="mode" type="environment" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>
                
    <cd:command name="notmode" type="environment" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelseallmodes" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifallmodeselse" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifallmodes" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifnotallmodes" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name-list"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="allmodes" type="environment" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="notallmodes" type="environment" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="modeset" type="environment" file="core-env.mkiv">
        <cd:arguments>
            <cd:keywords list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="default"/>
            </cd:keywords>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="pushmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="popmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="pushsystemmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="popsystemmode" file="core-env.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

</cd:interface>
