<?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="doifelsebuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-buffer"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifbufferelse" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-buffer"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetbuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="buffer" type="environment" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="grabbufferdata" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-category-optional"/>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="grabbufferdatadirect" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-name"/>
            <cd:resolve name="argument-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="buffer" type="environment" begin="set" end="end" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupbuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="before">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="after">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definebuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-buffer-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupbuffer"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="getbuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getdefinedbuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="inlinebuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-list-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="buffer" type="environment" generated="yes" variant="example" file="buff-ini.mkiv">
        <cd:sequence>
            <cd:variable value="buffer"/>
        </cd:sequence>
        <cd:instances>
            <cd:constant value="hiding"/>
        </cd:instances>
    </cd:command>

    <cd:command name="getbuffer" generated="yes" variant="example" file="buff-ini.mkiv">
        <cd:sequence>
            <cd:string value="get"/>
            <cd:variable value="buffer"/>
        </cd:sequence>
    </cd:command>

    <cd:command name="hiding" type="environment" file="buff-ini.mkiv"/>

    <cd:command name="processtexbuffer" file="buff-ini.mkiv">
        <cd:sequence>
            <cd:string value="processTEXbuffer"/>
        </cd:sequence>
        <cd:arguments>
            <cd:resolve name="keyword-buffer-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="savebuffer" variant="list" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-list"/>
            <cd:resolve name="keyword-file"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="savebuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:parameter name="list">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="file">
                    <cd:constant type="cd:file"/>
                </cd:parameter>
                <cd:parameter name="prefix">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="ctxluabuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="mkvibuffer" file="buff-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getbufferdata" file="buff-ini.mkiv">  
        <cd:arguments>
            <cd:resolve name="keyword-buffer-optional"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="typebuffer" file="buff-ver.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer-list-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptyping"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="typebuffer" generated="yes" variant="example" file="buff-ver.mkiv">
        <cd:sequence>
            <cd:string value="type"/>
            <cd:variable value="buffer"/>
        </cd:sequence>
        <cd:arguments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptyping"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="typedefinedbuffer" file="buff-ver.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-buffer"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setuptyping"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

</cd:interface>
